|
|
@ -628,7 +628,11 @@ public class IoCheckInoutService {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String errMsg = "";
|
|
|
|
String errMsg = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BasicBussinessTypeEntity businessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
|
|
|
if (IntUtil.value(businessTypeEntity.getCheckWebNew()) != 3 || IntUtil.value(businessTypeEntity.getCheckWebNewType()) != 3) {
|
|
|
|
//正向校验
|
|
|
|
//正向校验
|
|
|
|
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
|
|
|
|
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
|
|
|
|
String msg = "";
|
|
|
|
String msg = "";
|
|
|
@ -672,7 +676,6 @@ public class IoCheckInoutService {
|
|
|
|
&& checkProductDate(bizEntity, codeEntity) == null
|
|
|
|
&& checkProductDate(bizEntity, codeEntity) == null
|
|
|
|
&& checkExpireDate(bizEntity, codeEntity) == null
|
|
|
|
&& checkExpireDate(bizEntity, codeEntity) == null
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
|
|
if (checkCount(bizEntity, codeEntity) == null) {
|
|
|
|
if (checkCount(bizEntity, codeEntity) == null) {
|
|
|
|
bizEntity.setCheckSuccess(true);
|
|
|
|
bizEntity.setCheckSuccess(true);
|
|
|
|
codeEntity.setCheckSuccess(true);
|
|
|
|
codeEntity.setCheckSuccess(true);
|
|
|
@ -681,12 +684,13 @@ public class IoCheckInoutService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
|
|
|
|
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
|
|
|
|
if (!codeEntity.isCheckSuccess()) {
|
|
|
|
if (!codeEntity.isCheckSuccess()) {
|
|
|
|
errMsg = errMsg + codeEntity.getCoName() + ";";
|
|
|
|
errMsg = errMsg + codeEntity.getCoName() + ";";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(errMsg)) {
|
|
|
|
if (StrUtil.isNotEmpty(errMsg)) {
|
|
|
|
orderEntity.setErrMsg(errMsg + "校验失败");
|
|
|
|
orderEntity.setErrMsg(errMsg + "校验失败");
|
|
|
@ -735,6 +739,49 @@ public class IoCheckInoutService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String bizOrderCheckPass(List<IoOrderDetailBizEntity> orderDetailBizEntities, List<IoOrderDetailCodeEntity> orderDetailCodeEntities) {
|
|
|
|
|
|
|
|
String errMsg = "";
|
|
|
|
|
|
|
|
//初始化默认值
|
|
|
|
|
|
|
|
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
|
|
|
|
|
|
|
|
codeEntity.setCheckSuccess(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
|
|
|
|
|
|
|
|
bizEntity.setCheckSuccess(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
|
|
|
|
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
|
|
|
|
|
|
|
|
if (!bizEntity.isCheckSuccess() && !codeEntity.isCheckSuccess() && checkId(bizEntity, codeEntity) == null
|
|
|
|
|
|
|
|
&& checkBatchNo(bizEntity, codeEntity) == null
|
|
|
|
|
|
|
|
&& checkProductDate(bizEntity, codeEntity) == null
|
|
|
|
|
|
|
|
&& checkExpireDate(bizEntity, codeEntity) == null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (checkBizCount(bizEntity, codeEntity) == null) {
|
|
|
|
|
|
|
|
bizEntity.setCheckSuccess(true);
|
|
|
|
|
|
|
|
codeEntity.setCheckSuccess(true);
|
|
|
|
|
|
|
|
bizEntity.setScanCount(codeEntity.getReCount());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
msg = "扫码数量超出";
|
|
|
|
|
|
|
|
bizEntity.setCheckSuccess(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(msg) && !bizEntity.isCheckSuccess()) {
|
|
|
|
|
|
|
|
msg = "三期不匹配";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bizEntity.setErrMsg(msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
|
|
|
|
|
|
|
|
if (!bizEntity.isCheckSuccess()) {
|
|
|
|
|
|
|
|
errMsg = errMsg + bizEntity.getCoName() + bizEntity.getErrMsg() + ";";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return errMsg;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//业务单正向校验
|
|
|
|
//业务单正向校验
|
|
|
|
public String bizNoPiCheck(List<IoOrderDetailBizEntity> orderDetailBizEntities, IoOrderEntity orderEntity) {
|
|
|
|
public String bizNoPiCheck(List<IoOrderDetailBizEntity> orderDetailBizEntities, IoOrderEntity orderEntity) {
|
|
|
@ -862,7 +909,7 @@ public class IoCheckInoutService {
|
|
|
|
ioOrderCheckResultResponse.setBBatchNo(bizEntity.getBatchNo());
|
|
|
|
ioOrderCheckResultResponse.setBBatchNo(bizEntity.getBatchNo());
|
|
|
|
ioOrderCheckResultResponse.setBProductDate(bizEntity.getProductDate());
|
|
|
|
ioOrderCheckResultResponse.setBProductDate(bizEntity.getProductDate());
|
|
|
|
ioOrderCheckResultResponse.setBExpireDate(bizEntity.getExpireDate());
|
|
|
|
ioOrderCheckResultResponse.setBExpireDate(bizEntity.getExpireDate());
|
|
|
|
if (product.getProductsType() == 2){
|
|
|
|
if (product.getProductsType() == 2) {
|
|
|
|
ioOrderCheckResultResponse.setBzgg(product.getBzgg());
|
|
|
|
ioOrderCheckResultResponse.setBzgg(product.getBzgg());
|
|
|
|
ioOrderCheckResultResponse.setPrepnSpec(product.getPrepnSpec());
|
|
|
|
ioOrderCheckResultResponse.setPrepnSpec(product.getPrepnSpec());
|
|
|
|
ioOrderCheckResultResponse.setPrepnUnit(product.getPrepnUnit());
|
|
|
|
ioOrderCheckResultResponse.setPrepnUnit(product.getPrepnUnit());
|
|
|
@ -1409,4 +1456,12 @@ public class IoCheckInoutService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String checkBizCount(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
|
|
|
|
|
|
|
|
if (bizEntity.getCount() > codeEntity.getReCount()) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return bizEntity.getCoName() + "数量不匹配!";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|