From 5c802b673de310c4bbdd0b6b8c8f9e15ca8a625c Mon Sep 17 00:00:00 2001 From: "XI_TENG\\xixi_" <971623072> Date: Fri, 26 Jul 2024 15:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF=EF=BC=8C=E5=BA=93=E5=AD=98=E5=92=8C?= =?UTF-8?q?=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E7=BB=91=E5=AE=9A=E5=90=88?= =?UTF-8?q?=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CwsettlementServiceImpl.java | 10 +++++++++ .../impl/WarehousingOutboundServiceImpl.java | 22 ++++++++++++++++++- .../impl/WarehousingStorageServiceImpl.java | 6 ++++- .../jnpf/entity/ContractRelationEntity.java | 2 ++ .../java/jnpf/entity/CwsettlementEntity.java | 2 ++ .../java/jnpf/entity/InventoryEntity.java | 4 ++++ .../contractl/ContractRelationModel.java | 4 ++++ .../model/cwsettlement/CwsettlementForm.java | 3 +++ .../contractLRelation/formContractBatch.vue | 14 ++++++++++++ 9 files changed, 65 insertions(+), 2 deletions(-) diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/CwsettlementServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/CwsettlementServiceImpl.java index 1e761db9..2ff42558 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/CwsettlementServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/CwsettlementServiceImpl.java @@ -878,6 +878,16 @@ public class CwsettlementServiceImpl extends ServiceImpl contractLEntityQueryWrapper =new QueryWrapper<>(); + contractLEntityQueryWrapper.lambda().eq(ContractLEntity::getId,cwsettlementForm.getCwsettlementcontractList().get(0).getContractId()); + List contractLEntityList=contractLService.list(contractLEntityQueryWrapper); + if (contractLEntityList!=null && contractLEntityList.size()>0){ + entity.setBusinessLine(contractLEntityList.get(0).getBusinessId()); + } + } + if(isSave){ String mainId = id ; entity.setCode(generaterSwapUtil.getBillNumber("JSD", false)); diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingOutboundServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingOutboundServiceImpl.java index f64ee5a4..cd7d4d30 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingOutboundServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingOutboundServiceImpl.java @@ -81,6 +81,8 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl getList(WarehousingOutboundPagination warehousingOutboundPagination){ return getTypeList(warehousingOutboundPagination,warehousingOutboundPagination.getDataType()); @@ -685,6 +687,8 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl 0){ inventoryEntity = inventoryList.get(0); inventoryEntity.setInventoryNumber(inventoryEntity.getInventoryNumber().subtract((entitys.getDeliveryNum())));//库存数量 - + inventoryEntity.setContractSaleId(contractSale); if (deliveryType.equals("1")) { inventoryEntity.setPurchasePrice(entitys.getReturnUnit());//平均采购单价 }else if (deliveryType.equals("2")){ @@ -783,6 +788,8 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl contractRelationQueryWrapper = new QueryWrapper<>(); + contractRelationQueryWrapper.lambda().eq(ContractRelationEntity::getBusinessId, contractSale); //销售合同ud + contractRelationQueryWrapper.lambda().eq(ContractRelationEntity::getBusinessIds, inventoryEntity.getContractPurchaseId()); //采购合同id + List contractRelationEntityList = contractRelationService.list(contractRelationQueryWrapper); + if(contractRelationEntityList != null && contractRelationEntityList.size() > 0){ + //查询到则不做处理 + }else { + ContractRelationEntity contractRelationEntity = new ContractRelationEntity(); + contractRelationEntity.setBusinessId(contractSale);//合同主表id + contractRelationEntity.setBusinessIds(inventoryEntity.getContractPurchaseId()); //合同对应id + contractRelationService.saveOrUpdate(contractRelationEntity); + } + //更新库存流水 InventoryLogEntity inventoryLogEntity = new InventoryLogEntity(); inventoryLogEntity.setProductId(entitys.getProductId()); diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingStorageServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingStorageServiceImpl.java index 262240f0..5d5d1722 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingStorageServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingStorageServiceImpl.java @@ -749,11 +749,13 @@ public class WarehousingStorageServiceImpl extends ServiceImpl + +