|
|
@ -313,15 +313,22 @@ public class IoCheckInoutService {
|
|
|
|
public String checkCode(IoCodeTempEntity codeEntity) {
|
|
|
|
public String checkCode(IoCodeTempEntity codeEntity) {
|
|
|
|
|
|
|
|
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("only_vail_batch");
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("only_vail_batch");
|
|
|
|
|
|
|
|
boolean vailBatchNo = false;
|
|
|
|
// if(systemParamConfigEntity.)
|
|
|
|
if (systemParamConfigEntity != null) {
|
|
|
|
|
|
|
|
if (systemParamConfigEntity.getParamValue().equals(1)) {
|
|
|
|
|
|
|
|
vailBatchNo = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
boolean isBillExit = orderDetailBizService.isExit(codeEntity.getOrderId());
|
|
|
|
boolean isBillExit = orderDetailBizService.isExit(codeEntity.getOrderId());
|
|
|
|
if (!isBillExit) {
|
|
|
|
if (!isBillExit) {
|
|
|
|
return "请先录入业务详情";
|
|
|
|
return "请先录入业务详情";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
IoOrderDetailBizEntity bizEntity = null;
|
|
|
|
IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate());
|
|
|
|
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) {
|
|
|
|
if (bizEntity == null) {
|
|
|
|
return "非此单产品!";
|
|
|
|
return "非此单产品!";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1128,6 +1135,12 @@ public class IoCheckInoutService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String checkProductDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
|
|
|
|
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()))) {
|
|
|
|
if (StrUtil.nullToEmpty(bizEntity.getProductDate()).equals(StrUtil.nullToEmpty(codeEntity.getProductDate()))) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1136,6 +1149,10 @@ public class IoCheckInoutService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String checkExpireDate(IoOrderDetailBizEntity bizEntity, IoOrderDetailCodeEntity codeEntity) {
|
|
|
|
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()))) {
|
|
|
|
if (StrUtil.nullToEmpty(bizEntity.getExpireDate()).equals(StrUtil.nullToEmpty(codeEntity.getExpireDate()))) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|