From 0fbeb2ae09e51dbd7436bc4e93889ffc3b6d676d Mon Sep 17 00:00:00 2001 From: qyt <123456> Date: Wed, 23 Oct 2024 10:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93=E9=80=BB=E8=BE=91=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E4=BB=93=E5=BA=93=E8=AF=A6=E6=83=85=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E9=83=BD=E6=94=B9=E6=88=90=E4=BB=93=E5=BA=93=E8=A1=A8?= =?UTF-8?q?=EF=BC=88=E7=AC=AC=E4=BA=8C=E6=AC=A1=E6=9B=B4=E6=96=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/inout/IoCodeTempController.java | 18 +++++++++--------- .../api/controller/inv/UdiTraceController.java | 5 ++++- 2 files changed, 13 insertions(+), 10 deletions(-) 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);