diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index e163bc3b6..dc2d155f0 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -9,7 +9,6 @@ import com.glxp.api.entity.basic.*; import com.glxp.api.entity.collect.IoCollectCode; import com.glxp.api.entity.collect.IoCollectOrder; import com.glxp.api.entity.collect.IoCollectOrderOrigin; -import com.glxp.api.entity.inv.InvProductDetailEntity; import com.glxp.api.exception.JsonException; import com.glxp.api.req.collect.CollectOrderBizRequest; import com.glxp.api.req.collect.CollectOrderRequest; @@ -19,7 +18,8 @@ import com.glxp.api.res.inout.IoOrderDetailCodeResponse; import com.glxp.api.res.inout.VailCodeResultResponse; import com.glxp.api.service.collect.*; import com.glxp.api.service.inout.impl.IoCodeService; -import com.glxp.api.service.inv.impl.InvProductDetailService; +import com.glxp.api.service.inv.impl.InvProductServiceNew; +import com.glxp.api.vo.basic.InvProductNewVo; import org.aspectj.weaver.ast.Var; import org.springframework.beans.BeanUtils; import cn.hutool.core.collection.CollUtil; @@ -93,7 +93,7 @@ public class IoCodeTempController extends BaseController { @Resource InvPreinProductDetailService invPreinProductDetailService; @Resource - InvProductDetailService invProductDetailService; + InvProductServiceNew invProductServiceNew; @Resource IoCodeLostService codeLostService; @Resource @@ -989,11 +989,11 @@ public class IoCodeTempController extends BaseController { if (IntUtil.value(priceFifo) > 0) { if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) { //1.获取当前批次已出库数量 - Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); + Integer outCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); //2.获取当前批次入库数量 - Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); + Integer inCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) { - InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); + InvProductNewVo nextInvProduct = invProductServiceNew.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); if (nextInvProduct != null) { genDetaiEntity.setPrice(nextInvProduct.getPrice()); genDetaiEntity.setInBatchNo(nextInvProduct.getInBatchNo()); @@ -1462,11 +1462,11 @@ public class IoCodeTempController extends BaseController { if (IntUtil.value(priceFifo) > 0) { if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) { //1.获取当前批次已出库数量 - Integer outCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); + Integer outCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_OUT); //2.获取当前批次入库数量 - Integer inCount = invProductDetailService.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); + Integer inCount = invProductServiceNew.selectCountByInBatch(exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), bussinessTypeEntity, exitLocalEntity.getInBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT); if ((IntUtil.value(inCount) - IntUtil.value(outCount) - IntUtil.value(exitLocalEntity.getReCount())) < 0) { - InvProductDetailEntity nextInvProduct = invProductDetailService.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); + InvProductNewVo nextInvProduct = invProductServiceNew.selectNextInBatch(bussinessTypeEntity, exitLocalEntity.getRelId() + "", exitLocalEntity.getBatchNo(), exitLocalEntity.getInvCode(), ConstantType.TYPE_PUT, exitLocalEntity.getInBatchNo()); if (nextInvProduct != null) { genDetaiEntity.setPrice(nextInvProduct.getPrice()); genDetaiEntity.setInBatchNo(nextInvProduct.getInBatchNo()); diff --git a/src/main/java/com/glxp/api/controller/inv/UdiTraceController.java b/src/main/java/com/glxp/api/controller/inv/UdiTraceController.java index d8ed3b1b4..0279ff6b7 100644 --- a/src/main/java/com/glxp/api/controller/inv/UdiTraceController.java +++ b/src/main/java/com/glxp/api/controller/inv/UdiTraceController.java @@ -50,6 +50,7 @@ public class UdiTraceController { InvProductServiceNew invProductServiceNew; @Resource IoCodeDao ioCodeDao; + //TODO 20241017 先把这个接口注释了 @AuthRuleAnnotation("") @GetMapping("udiwarehouse/trace/filter") @@ -201,7 +202,9 @@ public class UdiTraceController { filterCodeRequest.setCode(filterCodeTraceRequest.getCode()); filterCodeRequest.setSupId(filterCodeTraceRequest.getSupId()); - List invProductDetailEntities = ioCodeDao.selectList(new QueryWrapper().likeRight("code", filterCodeTraceRequest.getCode()).eq("supId",filterCodeRequest.getSupId())); + List invProductDetailEntities = ioCodeDao.selectList(new QueryWrapper() + .likeRight("code", filterCodeTraceRequest.getCode()) + .eq(StrUtil.isNotEmpty(filterCodeRequest.getSupId()), "supId", filterCodeRequest.getSupId())); // List invProductDetailEntities = invProductServiceNew.filterInvProductDetailList(filterCodeRequest); if (CollUtil.isNotEmpty(invProductDetailEntities)) { mInvProductDetailEntities.addAll(invProductDetailEntities);