根据全局设置项,不校验生产日期和失效日期

dev
anthonywj 2 years ago
parent c57b6a645f
commit d086c63ab2

@ -34,6 +34,7 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus<IoOrderDetailBizDao,
IoOrderInvoiceResponse selectByinvoiceId(Long id);
IoOrderDetailBizEntity findByRelBatch(@Param("orderId") String orderId, @Param("relId") Long relId, @Param("bacthNo") String bacthNo);
/**
*

@ -313,15 +313,22 @@ public class IoCheckInoutService {
public String checkCode(IoCodeTempEntity codeEntity) {
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("only_vail_batch");
// if(systemParamConfigEntity.)
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 = null;
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 "非此单产品!";
}
@ -1128,6 +1135,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 {
@ -1136,6 +1149,10 @@ 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 {

@ -33,6 +33,7 @@ public interface IoOrderDetailBizService {
boolean isExit(Long relId, String bacthNo, Long ignoreId, String orderId);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo);
IoOrderDetailBizEntity findByRelId(String orderId, Long relId);

@ -96,8 +96,13 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
}
@Override
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate) {
return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, bacthNo, productDate, expireDate);
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String batchNo, String productDate, String expireDate) {
return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, batchNo, productDate, expireDate);
}
@Override
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String batchNo) {
return ioOrderDetailBizDao.findByRelBatch(orderId, relId, batchNo);
}
@Override

@ -117,6 +117,27 @@
AND (expireDate is null or expireDate = '')
</if>
</where>
limit 1
</select>
<select id="findByRelBatch" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity">
select *
from io_order_detail_biz
<where>
<if test="orderId != null and orderId != ''">
AND orderIdFk = #{orderId}
</if>
<if test="relId != null">
AND bindRlFk = #{relId}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == null || batchNo == ''">
AND (batchNo is null or batchNo = '')
</if>
</where>
limit 1
</select>
<select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse">

Loading…
Cancel
Save