|
|
|
@ -166,7 +166,7 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
collectOrder.setWorkPlaceCode(addEnterCodeRequest.getWorkPlaceCode());
|
|
|
|
|
collectOrder.setBusType(addEnterCodeRequest.getBusType());
|
|
|
|
|
IoCollectOrder ioCollectOrder = new IoCollectOrder();
|
|
|
|
|
BeanUtils.copyProperties(collectOrder,ioCollectOrder);
|
|
|
|
|
BeanUtils.copyProperties(collectOrder, ioCollectOrder);
|
|
|
|
|
collectOrderService.updateById(ioCollectOrder);
|
|
|
|
|
|
|
|
|
|
BaseResponse response = ResultVOUtils.error(601, code);
|
|
|
|
@ -272,20 +272,20 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
// TODO: 2024/9/13 首次无单进入的时候报错提示,不需要执行校验
|
|
|
|
|
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
|
|
|
|
|
if (udiEntity == null) {
|
|
|
|
|
String sptmtodi = systemParamConfigService.selectValueByParamKey(Constant.SPTM_TO_DI);
|
|
|
|
|
if (sptmtodi.equals("1")) {
|
|
|
|
|
if (code.length() == 13) {
|
|
|
|
|
UdiProductEntity udiProductEntity = udiProductService.findBySptm(code);
|
|
|
|
|
if (udiProductEntity != null) {
|
|
|
|
|
BaseResponse baseResponse = ResultVOUtils.error(508, "UDI码格式错误");
|
|
|
|
|
baseResponse.setData(udiProductEntity);
|
|
|
|
|
return baseResponse;
|
|
|
|
|
}
|
|
|
|
|
String sptmtodi = systemParamConfigService.selectValueByParamKey(Constant.SPTM_TO_DI);
|
|
|
|
|
if (sptmtodi.equals("1")) {
|
|
|
|
|
if (code.length() == 13) {
|
|
|
|
|
UdiProductEntity udiProductEntity = udiProductService.findBySptm(code);
|
|
|
|
|
if (udiProductEntity != null) {
|
|
|
|
|
BaseResponse baseResponse = ResultVOUtils.error(508, "UDI码格式错误");
|
|
|
|
|
baseResponse.setData(udiProductEntity);
|
|
|
|
|
return baseResponse;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
BaseResponse baseResponse = ResultVOUtils.error(501, "UDI码格式错误");
|
|
|
|
|
baseResponse.setData(originCode);
|
|
|
|
|
return baseResponse;
|
|
|
|
|
}
|
|
|
|
|
BaseResponse baseResponse = ResultVOUtils.error(501, "UDI码格式错误");
|
|
|
|
|
baseResponse.setData(originCode);
|
|
|
|
|
return baseResponse;
|
|
|
|
|
}
|
|
|
|
|
if (IntUtil.value(udiEntity.getProductType()) == 2) {
|
|
|
|
|
//药品
|
|
|
|
@ -404,18 +404,20 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
return ResultVOUtils.error(500, "追溯码不能为空");
|
|
|
|
|
List<VailCodeResultResponse> vailCodeResultResponses = new ArrayList<>();
|
|
|
|
|
for (String code : codeList) {
|
|
|
|
|
VailCodeResultResponse vailCodeResultResponse = new VailCodeResultResponse();
|
|
|
|
|
AddOrderRequest addOrderRequest = new AddOrderRequest();
|
|
|
|
|
BeanUtils.copyProperties(addOrderCodeRequest, addOrderRequest);
|
|
|
|
|
if (StringUtils.isBlank(code)) return ResultVOUtils.error(ResultEnum.DATA_ERROR);
|
|
|
|
|
code = code.trim();
|
|
|
|
|
if (code.endsWith("\u001D")) {
|
|
|
|
|
code = code.replace("\u001D", "");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
|
|
|
|
|
if (udiEntity == null)
|
|
|
|
|
return ResultVOUtils.error(500, "无效条码!");
|
|
|
|
|
|
|
|
|
|
if (udiEntity == null) {
|
|
|
|
|
vailCodeResultResponse.setCode(code);
|
|
|
|
|
vailCodeResultResponse.setStatus(2);
|
|
|
|
|
vailCodeResultResponse.setErrMsg("无效条码");
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isNotEmpty(addOrderRequest.getBatchNo())) {
|
|
|
|
|
udiEntity.setBatchNo(addOrderRequest.getBatchNo());
|
|
|
|
|
}
|
|
|
|
@ -439,12 +441,13 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
addOrderRequest.setFromCorp(ConstantType.SPLIT_CORP);
|
|
|
|
|
|
|
|
|
|
BaseResponse baseResponse = null;
|
|
|
|
|
addOrderRequest.setCode(code);
|
|
|
|
|
if (IntUtil.value(udiEntity.getProductType()) == 2) {
|
|
|
|
|
baseResponse = adddGrugOrder(addOrderRequest, udiEntity, code);
|
|
|
|
|
} else {
|
|
|
|
|
baseResponse = addMaterOrder(addOrderRequest, udiEntity, code);
|
|
|
|
|
}
|
|
|
|
|
VailCodeResultResponse vailCodeResultResponse = new VailCodeResultResponse();
|
|
|
|
|
|
|
|
|
|
if (baseResponse.getCode() == 20000) {
|
|
|
|
|
vailCodeResultResponse.setCode(code);
|
|
|
|
|
vailCodeResultResponse.setStatus(1);
|
|
|
|
|