|
|
|
@ -17,6 +17,7 @@ import com.glxp.api.entity.basic.UdiEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.*;
|
|
|
|
|
import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InvPreinDetailEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemParamConfigEntity;
|
|
|
|
|
import com.glxp.api.res.inout.IoOrderCheckResultResponse;
|
|
|
|
|
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
|
|
|
|
|
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
|
|
|
|
@ -27,6 +28,7 @@ import com.glxp.api.service.inout.impl.IoOrderInvoiceService;
|
|
|
|
|
import com.glxp.api.service.inv.InvPreinDetailService;
|
|
|
|
|
import com.glxp.api.service.inv.InvPreinOrderService;
|
|
|
|
|
import com.glxp.api.service.inv.InvPreinProductDetailService;
|
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.util.*;
|
|
|
|
|
import com.glxp.api.util.udi.FilterUdiUtils;
|
|
|
|
|
import com.glxp.api.util.udi.UdiCalCountUtil;
|
|
|
|
@ -78,6 +80,8 @@ public class IoCheckInoutService {
|
|
|
|
|
IoGenInvService genInvService;
|
|
|
|
|
@Resource
|
|
|
|
|
IoAddInoutService addInoutService;
|
|
|
|
|
@Resource
|
|
|
|
|
SystemParamConfigService systemParamConfigService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断是否需要手动校验
|
|
|
|
@ -265,12 +269,25 @@ public class IoCheckInoutService {
|
|
|
|
|
|
|
|
|
|
public String checkCode(IoCodeTempEntity codeEntity) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("only_vail_batch");
|
|
|
|
|
boolean vailBatchNo = false;
|
|
|
|
|
if (systemParamConfigEntity != null) {
|
|
|
|
|
if (systemParamConfigEntity.getParamValue().equals("1")) {
|
|
|
|
|
vailBatchNo = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
boolean isBillExit = orderDetailBizService.isExit(codeEntity.getOrderId());
|
|
|
|
|
if (!isBillExit) {
|
|
|
|
|
return "请先录入业务详情";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate());
|
|
|
|
|
IoOrderDetailBizEntity bizEntity;
|
|
|
|
|
if (vailBatchNo) {
|
|
|
|
|
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo());
|
|
|
|
|
} else {
|
|
|
|
|
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate());
|
|
|
|
|
}
|
|
|
|
|
if (bizEntity == null) {
|
|
|
|
|
return "非此单产品!";
|
|
|
|
|
}
|
|
|
|
@ -1061,6 +1078,12 @@ public class IoCheckInoutService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String checkProductDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
|
|
|
|
|
|
|
|
|
|
String value = systemParamConfigService.selectValueByParamKey("only_vail_batch");
|
|
|
|
|
if (StrUtil.isNotEmpty(value) && value.equals("1")) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StrUtil.nullToEmpty(bizEntity.getProductDate()).equals(StrUtil.nullToEmpty(codeEntity.getProductDate()))) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
@ -1069,6 +1092,12 @@ public class IoCheckInoutService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String checkExpireDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
|
|
|
|
|
|
|
|
|
|
String value = systemParamConfigService.selectValueByParamKey("only_vail_batch");
|
|
|
|
|
if (StrUtil.isNotEmpty(value) && value.equals("1")) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StrUtil.nullToEmpty(bizEntity.getExpireDate()).equals(StrUtil.nullToEmpty(codeEntity.getExpireDate()))) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|