南靖高值扫码查库存

dev_kcyj
anthonywj 12 months ago
parent f5c5b10c21
commit 6b099bff4c

@ -87,42 +87,44 @@ public class ForThirdSysApiController {
if (checkUdi == null) {
return ResultVOUtils.error(500, "收费项目未对照!");
}
boolean checkSuccess = true;
String lostMsg = "";
//校验条码完整性
if ("是".equals(checkUdi.getScbssfbhph()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
checkSuccess = false;
lostMsg = lostMsg + ",批次号";
}
if ("是".equals(checkUdi.getScbssfbhscrq()) && StrUtil.isEmpty(udiEntity.getProduceDate())) {
checkSuccess = false;
lostMsg = lostMsg + ",生产日期";
}
if ("是".equals(checkUdi.getScbssfbhsxrq()) && StrUtil.isEmpty(udiEntity.getExpireDate())) {
checkSuccess = false;
lostMsg = lostMsg + ",失效日期";
}
if ("是".equals(checkUdi.getScbssfbhxlh()) && StrUtil.isEmpty(udiEntity.getSerialNo())) {
checkSuccess = false;
lostMsg = lostMsg + ",序列号";
}
if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) {
return ResultVOUtils.error(504, "序列号超出20位");
}
if (StrUtil.isNotEmpty(udiEntity.getBatchNo()) && udiEntity.getBatchNo().length() > 20) {
return ResultVOUtils.error(504, "批次号超出20位");
}
if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
checkSuccess = false;
}
if (!checkSuccess) {
return ResultVOUtils.error("UDI码格式错误缺少" + lostMsg);
}
// boolean checkSuccess = true;
// String lostMsg = "";
// //校验条码完整性
// if ("是".equals(checkUdi.getScbssfbhph()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
// checkSuccess = false;
// lostMsg = lostMsg + ",批次号";
// }
// if ("是".equals(checkUdi.getScbssfbhscrq()) && StrUtil.isEmpty(udiEntity.getProduceDate())) {
// checkSuccess = false;
// lostMsg = lostMsg + ",生产日期";
// }
//
// if ("是".equals(checkUdi.getScbssfbhsxrq()) && StrUtil.isEmpty(udiEntity.getExpireDate())) {
// checkSuccess = false;
// lostMsg = lostMsg + ",失效日期";
// }
//
// if ("是".equals(checkUdi.getScbssfbhxlh()) && StrUtil.isEmpty(udiEntity.getSerialNo())) {
// checkSuccess = false;
// lostMsg = lostMsg + ",序列号";
// }
// if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) {
// return ResultVOUtils.error(504, "序列号超出20位");
// }
// if (StrUtil.isNotEmpty(udiEntity.getBatchNo()) && udiEntity.getBatchNo().length() > 20) {
// return ResultVOUtils.error(504, "批次号超出20位");
// }
// if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
// checkSuccess = false;
// }
// if (!checkSuccess) {
// return ResultVOUtils.error("UDI码格式错误缺少" + lostMsg);
// }
IoCodeEntity codeEntity = codeService.getOne(new QueryWrapper<IoCodeEntity>().likeLeft("code", filterInvProductRequest.getUdiCode()).last("limit 1"));
if (codeEntity == null) {
return ResultVOUtils.error("库存未找到该UDI码请检查该UDI是否存在错误");
codeEntity = codeService.getOne(new QueryWrapper<IoCodeEntity>().likeLeft("errUdiCode", filterInvProductRequest.getUdiCode()).last("limit 1"));
if (codeEntity == null)
return ResultVOUtils.error("库存未找到该UDI码请检查该UDI是否存在错误");
}
//1.获取预验收库存
InvWarehouseEntity preInInv = invWarehouseService.findByOne(ConstantStatus.ACTION_TYPE_PREIN);

Loading…
Cancel
Save