Merge remote-tracking branch 'origin/dev_fifo_z' into dev_fifo_z

workplace
yewj 10 months ago
commit bb46fbd9d5

@ -3,9 +3,13 @@ package com.glxp.api.controller.inout;
import com.glxp.api.annotation.CusRedissonAnnotation; import com.glxp.api.annotation.CusRedissonAnnotation;
import com.glxp.api.constant.*; import com.glxp.api.constant.*;
import com.glxp.api.entity.basic.*; import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.collect.IoCollectOrder;
import com.glxp.api.entity.inv.InvProductDetailEntity; import com.glxp.api.entity.inv.InvProductDetailEntity;
import com.glxp.api.exception.JsonException; import com.glxp.api.exception.JsonException;
import com.glxp.api.req.collect.CollectOrderRequest;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse; import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.service.collect.IoCollectOrderService;
import com.glxp.api.service.collect.IoCollectOriginService;
import com.glxp.api.service.inout.impl.IoCodeService; import com.glxp.api.service.inout.impl.IoCodeService;
import com.glxp.api.service.inv.impl.InvProductDetailService; import com.glxp.api.service.inv.impl.InvProductDetailService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -96,6 +100,10 @@ public class IoCodeTempController extends BaseController {
IoCheckInvService checkInvService; IoCheckInvService checkInvService;
@Resource @Resource
IoSplitFifoCodeService splitFifoCodeService; IoSplitFifoCodeService splitFifoCodeService;
@Resource
IoCollectOriginService collectOriginService;
@Resource
IoCollectOrderService collectOrderService;
/** /**
* PDA----- * PDA-----
@ -216,6 +224,33 @@ public class IoCodeTempController extends BaseController {
UdiEntity udiEntity = FilterUdiUtils.getUdi(code); UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (udiEntity == null) { if (udiEntity == null) {
String viewType = addEnterCodeRequest.getViewType();
if (viewType.equals("tagCode")){
IoCollectOrder collectOrder = collectOrderService.getByBillNo(code);
if (collectOrder == null ){
//=============================================//
//本地数据库 无此单据时 触发 用billNo 到 处方下载方法 进行下载
CollectOrderRequest collectOrderRequest = new CollectOrderRequest();
collectOrderRequest.setBusType("YPCF002");
collectOrderRequest.setBillNo(code);
BaseResponse baseResponse = collectOriginService.downloadOrder(collectOrderRequest);
if (ResultEnum.SUCCESS.getCode() == baseResponse.getCode()){
collectOrder = collectOrderService.getByBillNo(code);
//=============================================//
BaseResponse response = ResultVOUtils.error(601, code);
response.setData(collectOrder);
return response;
}else {
BaseResponse response = ResultVOUtils.error(501, "UDI码格式错误");
response.setData(originCode);
return response;
}
}else {
BaseResponse response = ResultVOUtils.error(601, code);
response.setData(collectOrder);
return response;
}
} else{
String sptmtodi = systemParamConfigService.selectValueByParamKey(Constant.SPTM_TO_DI); String sptmtodi = systemParamConfigService.selectValueByParamKey(Constant.SPTM_TO_DI);
if (sptmtodi.equals("1")) { if (sptmtodi.equals("1")) {
if (code.length() == 13) { if (code.length() == 13) {
@ -231,6 +266,7 @@ public class IoCodeTempController extends BaseController {
baseResponse.setData(originCode); baseResponse.setData(originCode);
return baseResponse; return baseResponse;
} }
}
if (IntUtil.value(udiEntity.getProductType()) == 2) { if (IntUtil.value(udiEntity.getProductType()) == 2) {
//药品 //药品
udiEntity.setCode(code); udiEntity.setCode(code);

@ -6,4 +6,5 @@ import lombok.Data;
public class AddEnterCodeRequest { public class AddEnterCodeRequest {
private String originCode; private String originCode;
private String code; private String code;
private String viewType;
} }

Loading…
Cancel
Save