From 9e43a9682f389e7477d2bcea2f3daa64e0cd5998 Mon Sep 17 00:00:00 2001 From: vayne Date: Tue, 30 Jul 2024 19:04:20 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E5=85=B3=E7=B3=BB=E8=A1=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scm/WarehousingOutboundProductMapper.xml | 34 ++-- .../WarehousingOutboundProductMapper.java | 2 +- .../WarehousingOutboundProductService.java | 2 +- .../service/impl/CwsettlementServiceImpl.java | 192 +++++++++++------- .../jnpf/service/impl/VoucherServiceImpl.java | 4 +- ...WarehousingOutboundProductServiceImpl.java | 4 +- .../impl/WarehousingOutboundServiceImpl.java | 24 ++- .../impl/WarehousingStorageServiceImpl.java | 12 +- .../views/scm/saleCenter/saleOrder/form.vue | 6 +- 9 files changed, 162 insertions(+), 118 deletions(-) diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml index 765f9e16..5a5eccdc 100644 --- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml +++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml @@ -41,30 +41,22 @@ diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/WarehousingOutboundProductMapper.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/WarehousingOutboundProductMapper.java index 6c731eb7..23837d35 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/WarehousingOutboundProductMapper.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/WarehousingOutboundProductMapper.java @@ -19,5 +19,5 @@ public interface WarehousingOutboundProductMapper extends BaseMapper queryOutboundProduct(String id); - List queryOutboundProductPurchase(@Param("id") String id, @Param("ordLn") String ordLn); + List queryOutboundProductPurchase(@Param("id") String id); } diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/WarehousingOutboundProductService.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/WarehousingOutboundProductService.java index 5c883fb7..63e62341 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/WarehousingOutboundProductService.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/WarehousingOutboundProductService.java @@ -17,6 +17,6 @@ public interface WarehousingOutboundProductService extends IService getChild(WarehousingOutboundPagination pagination,QueryWrapper warehousingOutboundProductQueryWrapper); List queryOutboundProductInfo(String id); - List queryOutboundProductPurchase(String id,String ordLn); + List queryOutboundProductPurchase(String id); } 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 50a6b4ed..aa0af84c 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 @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; import jnpf.base.ActionResult; import jnpf.entity.*; import jnpf.mapper.CwsettlementMapper; +import jnpf.mapper.DeliveryProductRelationMapper; import jnpf.mapper.WarehousingOutboundProductMapper; import jnpf.model.yunguan.YunguanPurchaseSettlementModel; import jnpf.model.yunguan.YunguanPurchaseSettlementProductModel; @@ -100,6 +101,14 @@ public class CwsettlementServiceImpl extends ServiceImpl getList(CwsettlementPagination cwsettlementPagination){ @@ -1049,52 +1058,77 @@ public class CwsettlementServiceImpl extends ServiceImpl settlementRelationPurchaseEntityQueryWrapper = new QueryWrapper<>(); settlementRelationPurchaseEntityQueryWrapper.lambda().eq(SettlementRelationPurchaseEntity::getPurchaseSettlementCode, entity.getCode()); settlementRelationPurchaseService.remove(settlementRelationPurchaseEntityQueryWrapper); } - SettlementRelationPurchaseEntity settlementRelationPurchaseEntity=new SettlementRelationPurchaseEntity(); - //采购结算 - QueryWrapper cwaccountstorageQueryWrapper=new QueryWrapper<>(); - cwaccountstorageQueryWrapper.lambda().eq(CwaccountstorageEntity::getAccountId,cwsettlementForm.getCwsettlementaccountList().get(0).getAccountId()); - List cwaccountstorageEntityList=cwaccountstorageService.list(cwaccountstorageQueryWrapper); - if (cwaccountstorageEntityList!=null && cwaccountstorageEntityList.size()>0){ - //入库单的采购订单 - QueryWrapper warehousingStorageQueryWrapper=new QueryWrapper<>(); - warehousingStorageQueryWrapper.lambda().eq(WarehousingStorageEntity::getDocumentNo,cwaccountstorageEntityList.get(0).getDocumentNo()); - List warehousingStorageEntityList=warehousingStorageService.list(warehousingStorageQueryWrapper); - if (warehousingStorageEntityList!=null && warehousingStorageEntityList.size()>0){ - //收货单 - QueryWrapper receiptOrderEntityQueryWrapper=new QueryWrapper<>(); - receiptOrderEntityQueryWrapper.lambda().eq(ReceiptOrderEntity::getId,warehousingStorageEntityList.get(0).getWarehousingId()); - List receiptOrderEntities=receiptOrderService.list(receiptOrderEntityQueryWrapper); - if (receiptOrderEntities!=null && receiptOrderEntities.size()>0){ - settlementRelationPurchaseEntity.setPurchaseSettlementCode(entity.getCode()); //采购结算单 - settlementRelationPurchaseEntity.setReceiptCode(receiptOrderEntities.get(0).getReceiptCode()); //收货单 - settlementRelationPurchaseEntity.setContract(cwsettlementForm.getCwsettlementaccountList().get(0).getContractCode()); - settlementRelationPurchaseEntity.setPurchaseCode(warehousingStorageEntityList.get(0).getBusinessOrderNo()); - settlementRelationPurchaseEntity.setOrdLn( tableField207.get(i).getOrdLn()); //订单行 - settlementRelationPurchaseEntity.setSettlementSum( tableField207.get(i).getSettlementSum()); //结算量 - settlementRelationPurchaseEntity.setSettlementPrice( tableField207.get(i).getSettlementPrice()); //单价量 - settlementRelationPurchaseEntity.setSettlementCount( tableField207.get(i).getSettlementSubtotal()); //单价量 - SubjectbasicEntity subjectbasicEntity =subjectbasicService.getInfo(cwsettlementForm.getCwsettlementsubjectList().get(0).getSubjectId()); - settlementRelationPurchaseEntity.setSupplier(subjectbasicEntity.getName()); - settlementRelationPurchaseEntity.setPurchaseBusinessLine(entity.getBusinessLine()); - settlementRelationPurchaseEntity.setPaymentAmount(cwsettlementForm.getPaymentAmount()); //已付款金额 + SettlementRelationPurchaseEntity settlementRelationPurchaseEntity = new SettlementRelationPurchaseEntity(); + for (CwsettlementaccountModel model : cwsettlementForm.getCwsettlementaccountList()) { + + //采购结算 + QueryWrapper cwaccountstorageQueryWrapper = new QueryWrapper<>(); + cwaccountstorageQueryWrapper.lambda().eq(CwaccountstorageEntity::getAccountId, model.getAccountId()); + cwaccountstorageQueryWrapper.lambda().isNull(CwaccountstorageEntity::getDeleteMark); + List cwaccountstorageEntityList = cwaccountstorageService.list(cwaccountstorageQueryWrapper); + for (CwaccountstorageEntity cwaccountstorage : cwaccountstorageEntityList) { + //入库单的采购订单 + QueryWrapper warehousingStorageQueryWrapper = new QueryWrapper<>(); + warehousingStorageQueryWrapper.lambda().eq(WarehousingStorageEntity::getDocumentNo, cwaccountstorage.getDocumentNo()); + warehousingStorageQueryWrapper.lambda().isNull(WarehousingStorageEntity::getDeleteMark); + List warehousingStorageEntityList = warehousingStorageService.list(warehousingStorageQueryWrapper); + if (warehousingStorageEntityList != null && warehousingStorageEntityList.size() > 0) { + //收货单 + QueryWrapper receiptOrderEntityQueryWrapper = new QueryWrapper<>(); + receiptOrderEntityQueryWrapper.lambda().eq(ReceiptOrderEntity::getId, warehousingStorageEntityList.get(0).getWarehousingId()); + receiptOrderEntityQueryWrapper.lambda().isNull(ReceiptOrderEntity::getDeleteMark); + List receiptOrderEntities = receiptOrderService.list(receiptOrderEntityQueryWrapper); + if (receiptOrderEntities != null && receiptOrderEntities.size() > 0) { + //采购订单 + BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(receiptOrderEntities.get(0).getBusinessId()); + if (ObjectUtil.isNotEmpty(businessOrderEntity)) { + //采购订单子表 + QueryWrapper businessOrderSonQueryWrapper = new QueryWrapper<>(); + businessOrderSonQueryWrapper.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId, businessOrderEntity.getId()); + businessOrderSonQueryWrapper.lambda().isNull(BusinessOrderProductRelationalEntity::getDeleteMark); + List businessOrderProductRelationalEntityList = businessOrderProductRelationalService.list(businessOrderSonQueryWrapper); + for (BusinessOrderProductRelationalEntity businessSon : businessOrderProductRelationalEntityList) { + settlementRelationPurchaseEntity.setPurchaseSettlementCode(entity.getCode()); //采购结算单 + settlementRelationPurchaseEntity.setReceiptCode(receiptOrderEntities.get(0).getReceiptCode()); //收货单 + //采购合同编号 + ContractLEntity contractLEntity = contractLService.getInfo(businessOrderEntity.getContractId()); + if (ObjectUtil.isNotEmpty(contractLEntity)) { + settlementRelationPurchaseEntity.setContract(contractLEntity.getContractNumber()); + } + settlementRelationPurchaseEntity.setPurchaseCode(businessOrderEntity.getCode()); + settlementRelationPurchaseEntity.setOrdLn(businessSon.getOrdLn()); //订单行 + settlementRelationPurchaseEntity.setSettlementSum(tableField207.get(i).getSettlementSum()); //结算量 + settlementRelationPurchaseEntity.setSettlementPrice(tableField207.get(i).getSettlementPrice()); //单价量 + settlementRelationPurchaseEntity.setSettlementCount(tableField207.get(i).getSettlementSubtotal()); //单价量 + SubjectbasicEntity subjectbasicEntity = subjectbasicService.getInfo(businessOrderEntity.getFirstSubjectBasicId()); + if (ObjectUtil.isNotEmpty(subjectbasicEntity)) { + settlementRelationPurchaseEntity.setSupplier(subjectbasicEntity.getName()); + } + BusinessLineEntity businessLineEntity = businessLineService.getInfo(businessOrderEntity.getBusinessLineId()); + if (ObjectUtil.isNotEmpty(businessLineEntity)) { + settlementRelationPurchaseEntity.setPurchaseBusinessLine(businessLineEntity.getName()); + } + settlementRelationPurchaseEntity.setPaymentAmount(cwsettlementForm.getPaymentAmount()); //已付款金额 // settlementRelationPurchaseEntity.setPurchaseBusinessLine(cwsettlementForm.getBusinessLine()); - settlementRelationPurchaseService.saveOrUpdate(settlementRelationPurchaseEntity); + settlementRelationPurchaseService.saveOrUpdate(settlementRelationPurchaseEntity); + } + } + + } } } - } - }else if(entity.getType().equals("2") && entity.getBusinessLine().equals("550709408384942213")){ if(!isSave){ @@ -1105,52 +1139,60 @@ public class CwsettlementServiceImpl extends ServiceImpl warehousingOutboundProductList =warehousingOutboundProductService.queryOutboundProductPurchase(cwsettlementForm.getCwsettlementaccountList().get(0).getAccountId(), tableField207.get(i).getOrdLn()); - if (warehousingOutboundProductList!=null && warehousingOutboundProductList.size()>0){ - settlementRelationSaleEntity.setPurchaseCode(warehousingOutboundProductList.get(0).getCode()); //采购订单 - settlementRelationSaleEntity.setContract(warehousingOutboundProductList.get(0).getContractName()); //采购合同 - settlementRelationSaleEntity.setSupplier(warehousingOutboundProductList.get(0).getName()); //供应商 - settlementRelationSaleEntity.setOrdLn(warehousingOutboundProductList.get(0).getOrdLn()); //供应商 - - } - - QueryWrapper cwaccountstorageQueryWrapper=new QueryWrapper<>(); - cwaccountstorageQueryWrapper.lambda().eq(CwaccountstorageEntity::getAccountId,cwsettlementForm.getCwsettlementaccountList().get(0).getAccountId()); - List cwaccountstorageEntityList=cwaccountstorageService.list(cwaccountstorageQueryWrapper); - if (cwaccountstorageEntityList!=null && cwaccountstorageEntityList.size()>0){ + for (CwsettlementaccountModel model : cwsettlementForm.getCwsettlementaccountList()) { //销售结算 - QueryWrapper warehousingOutboundQueryWrapper=new QueryWrapper<>(); - warehousingOutboundQueryWrapper.lambda().eq(WarehousingOutboundEntity::getDocumentNo,cwaccountstorageEntityList.get(0).getDocumentNo()); - List warehousingOutboundEntityList=warehousingOutboundService.list(warehousingOutboundQueryWrapper); - if (warehousingOutboundEntityList!=null && warehousingOutboundEntityList.size()>0){ - //收货单 - QueryWrapper deliveryOrderQueryWrapper=new QueryWrapper<>(); - deliveryOrderQueryWrapper.lambda().eq(DeliveryOrderEntity::getId,warehousingOutboundEntityList.get(0).getWarehousingId()); - List deliveryOrderEntityList=deliveryOrderService.list(deliveryOrderQueryWrapper); - if (deliveryOrderEntityList!=null && deliveryOrderEntityList.size()>0){ - settlementRelationSaleEntity.setSettlementCode(entity.getCode()); //销售结算单 - settlementRelationSaleEntity.setDeliveryCode(deliveryOrderEntityList.get(0).getDeliveryCode()); //发货单 - settlementRelationSaleEntity.setSaleContract(cwsettlementForm.getCwsettlementaccountList().get(0).getContractCode()); - settlementRelationSaleEntity.setSaleCode(warehousingOutboundEntityList.get(0).getBusinessOrderNo()); - settlementRelationSaleEntity.setSaleOrdLn( tableField207.get(i).getOrdLn()); //订单行 - settlementRelationSaleEntity.setSaleSettlementSum( tableField207.get(i).getSettlementSum()); //结算量 - settlementRelationSaleEntity.setSettlementPrice( tableField207.get(i).getSettlementPrice()); //单价量 - settlementRelationSaleEntity.setSettlementCount( tableField207.get(i).getSettlementSubtotal()); //单价量 - SubjectbasicEntity subjectbasicEntity =subjectbasicService.getInfo(cwsettlementForm.getCwsettlementsubjectList().get(0).getSubjectId()); - settlementRelationSaleEntity.setCustomer(subjectbasicEntity.getName()); - settlementRelationSaleEntity.setPurchaseBusinessLine(entity.getBusinessLine()); - settlementRelationSaleEntity.setPaymentAmount(cwsettlementForm.getPaymentAmount()); //已收款金额 - } - settlementRelationSaleService.saveOrUpdate(settlementRelationSaleEntity); - + QueryWrapper cwaccountstorageQueryWrapper = new QueryWrapper<>(); + cwaccountstorageQueryWrapper.lambda().eq(CwaccountstorageEntity::getAccountId, model.getAccountId()); + List cwaccountstorageEntityList = cwaccountstorageService.list(cwaccountstorageQueryWrapper); + for (CwaccountstorageEntity cwaccountstorageEntity : cwaccountstorageEntityList) { + //销售结算 + QueryWrapper warehousingOutboundQueryWrapper = new QueryWrapper<>(); + warehousingOutboundQueryWrapper.lambda().eq(WarehousingOutboundEntity::getDocumentNo, cwaccountstorageEntity.getDocumentNo()); + List warehousingOutboundEntityList = warehousingOutboundService.list(warehousingOutboundQueryWrapper); + if (warehousingOutboundEntityList != null && warehousingOutboundEntityList.size() > 0) { + //发货单 + DeliveryOrderEntity deliveryOrderEntity = deliveryOrderService.getInfo(warehousingOutboundEntityList.get(0).getWarehousingId()); + if (ObjectUtil.isNotEmpty(deliveryOrderEntity)) { + BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(deliveryOrderEntity.getBusinessId()); + List warehousingOutboundProductList = warehousingOutboundProductService.queryOutboundProductPurchase(model.getAccountId()); + for (WarehousingOutboundProductEntity warehousingOutboundProductEntity : warehousingOutboundProductList) { + settlementRelationSaleEntity.setPurchaseCode(warehousingOutboundProductEntity.getCode()); //采购订单 + settlementRelationSaleEntity.setContract(warehousingOutboundProductEntity.getContractName()); //采购合同编号 + settlementRelationSaleEntity.setSupplier(warehousingOutboundProductEntity.getName()); //供应商 + settlementRelationSaleEntity.setOrdLn(warehousingOutboundProductEntity.getOrdLn()); //供应商 + + settlementRelationSaleEntity.setSettlementCode(entity.getCode()); //销售结算单 + settlementRelationSaleEntity.setDeliveryCode(deliveryOrderEntity.getDeliveryCode()); //发货单 + if (ObjectUtil.isNotEmpty(businessOrderEntity)){ + settlementRelationSaleEntity.setSaleCode(businessOrderEntity.getCode()); + ContractLEntity contractLEntity = contractLService.getInfo(businessOrderEntity.getContractId()); + SubjectbasicEntity subjectbasicEntity = subjectbasicService.getInfo(businessOrderEntity.getFirstSubjectBasicId()); + BusinessLineEntity businessLineEntity = businessLineService.getInfo(businessOrderEntity.getBusinessLineId()); + if (ObjectUtil.isNotEmpty(contractLEntity)){ + settlementRelationSaleEntity.setSaleContract(contractLEntity.getContractNumber());//合同号 + } + if(ObjectUtil.isNotEmpty(subjectbasicEntity)) { + settlementRelationSaleEntity.setCustomer(subjectbasicEntity.getName());//客户 + } + if (ObjectUtil.isNotEmpty(businessLineEntity)){ + settlementRelationSaleEntity.setPurchaseBusinessLine(businessLineEntity.getName());//业务线 + } + } + settlementRelationSaleEntity.setSaleOrdLn(tableField207.get(i).getOrdLn()); //订单行 + settlementRelationSaleEntity.setSaleSettlementSum(tableField207.get(i).getSettlementSum()); //结算量 + settlementRelationSaleEntity.setSettlementPrice(tableField207.get(i).getSettlementPrice()); //单价量 + settlementRelationSaleEntity.setSettlementCount(tableField207.get(i).getSettlementSubtotal()); //单价量 + settlementRelationSaleEntity.setPaymentAmount(cwsettlementForm.getPaymentAmount()); //已收款金额 + } + } + settlementRelationSaleService.saveOrUpdate(settlementRelationSaleEntity); + + + } + } } - } - - } } diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/VoucherServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/VoucherServiceImpl.java index c4b95c31..4f477ab0 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/VoucherServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/VoucherServiceImpl.java @@ -151,6 +151,7 @@ public class VoucherServiceImpl extends ServiceImpl allRuleIDlist = new ArrayList<>(); String ruleOp =""; + ruleJson= null; if (ObjectUtil.isNotEmpty(ruleJson)){ List allRuleList = new ArrayList<>(); List> intersectionRuleList = new ArrayList<>(); @@ -536,7 +537,8 @@ public class VoucherServiceImpl extends ServiceImpl queryOutboundProductPurchase(String id, String ordLn) { - return warehousingOutboundProductMapper.queryOutboundProductPurchase(id,ordLn); + public List queryOutboundProductPurchase(String id) { + return warehousingOutboundProductMapper.queryOutboundProductPurchase(id); } } 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 23939406..1a961482 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 @@ -22,6 +22,8 @@ import jnpf.database.model.superQuery.ConditionJsonModel; import jnpf.database.model.superQuery.SuperQueryConditionModel; import java.lang.reflect.Field; import com.baomidou.mybatisplus.annotation.TableField; + +import java.math.RoundingMode; import java.util.regex.Pattern; import jnpf.model.QueryModel; import java.util.stream.Collectors; @@ -735,6 +737,9 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl tableField119 = JsonUtil.getJsonToList(receiptOrderForm.getDeliveryProductRelationList(),WarehousingStorageProductEntity.class); for(DeliveryProductRelationModel entitys : deliveryOrderForm.getDeliveryProductRelationList()){ countNum = countNum.add(entitys.getDeliveryNum()); @@ -778,31 +783,32 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl queryWrapper=new QueryWrapper<>(); queryWrapper.lambda().eq(DeliveryProductRelationEntity::getBusinessType,"1"); queryWrapper.lambda().eq(DeliveryProductRelationEntity::getBatchNo,entitys.getBatchNo()); List deliveryProductRelationEntities=deliveryProductRelationService.list(queryWrapper); if (deliveryProductRelationEntities!=null && deliveryProductRelationEntities.size()>0){ -// DeliveryOrderEntity deliveryOrderEntity =deliveryOrderService.getInfo( deliveryProductRelationEntities.get(0).getOrderId()); - QueryWrapper receiptOrderEntityQueryWrapper=new QueryWrapper<>(); - receiptOrderEntityQueryWrapper.lambda().eq(ReceiptOrderEntity::getId,deliveryProductRelationEntities.get(0).getOrderId()); - List deliveryOrderEntityList=receiptOrderService.list(receiptOrderEntityQueryWrapper); + ReceiptOrderEntity receiptOrderEntity = receiptOrderService.getInfo(deliveryProductRelationEntities.get(0).getOrderId()); deliveryRelationEntity.setPurchaseOrdLn(deliveryProductRelationEntities.get(0).getOrdLn()); //采购订单行 //销售收货采购对应 - BusinessOrderEntity businessOrderEntity1 = businessOrderService.getInfo(deliveryOrderEntityList.get(0).getBusinessId()); + BusinessOrderEntity businessOrderEntity1 = businessOrderService.getInfo(receiptOrderEntity.getBusinessId()); if (ObjectUtil.isNotEmpty(businessOrderEntity1)){ deliveryRelationEntity.setPurchaseCode(businessOrderEntity1.getCode()); //订单 ContractLEntity contractLEntity = contractLService.getInfo(businessOrderEntity1.getContractId()); if (ObjectUtil.isNotEmpty(contractLEntity)){ deliveryRelationEntity.setPurchaseContract(contractLEntity.getContractNumber()); //合同 } - deliveryRelationEntity.setBusinessLine(businessOrderEntity1.getBusinessLineId());//业务线 +// deliveryRelationEntity.setBusinessLine(businessOrderEntity1.getBusinessLineId());//业务线 SubjectbasicEntity subjectbasicEntity=subjectbasicService.getInfo(businessOrderEntity1.getFirstSubjectBasicId()); if (ObjectUtil.isNotEmpty(subjectbasicEntity)){ deliveryRelationEntity.setSupplier(subjectbasicEntity.getName()); //供应商 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 f1d0835f..f3f5ea94 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 @@ -4,10 +4,7 @@ import baiduUtils.BeanMergeUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import jnpf.entity.*; -import jnpf.mapper.CwaccountvoucherMapper; -import jnpf.mapper.VoucherMapper; -import jnpf.mapper.WarehousingNotificationMapper; -import jnpf.mapper.WarehousingStorageMapper; +import jnpf.mapper.*; import jnpf.model.receiptorder.DeliveryProductRelationModel; import jnpf.model.receiptorder.ReceiptOrderForm; import jnpf.model.receiptrelation.ReceiptRelationForm; @@ -100,6 +97,8 @@ public class WarehousingStorageServiceImpl extends ServiceImpl getList(WarehousingStoragePagination warehousingStoragePagination){ return getTypeList(warehousingStoragePagination,warehousingStoragePagination.getDataType()); @@ -931,7 +930,10 @@ public class WarehousingStorageServiceImpl extends ServiceImpl { this.dataForm.isTransferSource.push(val.id) val.businessOrderProductRelationalList.forEach((item, index) => { - + item.salePrice = item.salePrice ? item.salePrice : 0 if (this.dataForm.businessOrderProductRelationalList.length == 0) { // this.dataForm.businessOrderProductRelationalList.push(item); + item.salePrice = item.salePrice ? item.salePrice : 0 let item1 = { productId: item.productId, businessNum: item.businessNum, - businessPrice: undefined, name: item.name, spec: item.spec, code: item.code, @@ -2070,7 +2070,7 @@ export default { data.forEach((val, index) => { this.dataForm.isTransferSource.push(val.id) val.businessOrderProductRelationalList.forEach((item, index) => { - + item.salePrice = item.salePrice ? item.salePrice : 0 if (this.dataForm.businessOrderProductRelationalList.length == 0) { // this.dataForm.businessOrderProductRelationalList.push(item); let item1 = { From dbfacb048b11d1a925c121f0aa0df46c06889834 Mon Sep 17 00:00:00 2001 From: vayne Date: Wed, 31 Jul 2024 09:06:14 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jnpf/service/impl/WarehousingOutboundServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 1a961482..3ca1c629 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 @@ -95,6 +95,8 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl getList(WarehousingOutboundPagination warehousingOutboundPagination){ return getTypeList(warehousingOutboundPagination,warehousingOutboundPagination.getDataType()); @@ -771,10 +773,13 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl Date: Wed, 31 Jul 2024 11:19:08 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E9=87=91=E9=A2=9D=E8=B4=9F=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jnpf/service/impl/WarehousingOutboundServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 3ca1c629..0a091754 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 @@ -742,9 +742,11 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl tableField119 = JsonUtil.getJsonToList(receiptOrderForm.getDeliveryProductRelationList(),WarehousingStorageProductEntity.class); for(DeliveryProductRelationModel entitys : deliveryOrderForm.getDeliveryProductRelationList()){ countNum = countNum.add(entitys.getDeliveryNum()); + SaleTaxCount = SaleTaxCount.add(entitys.getTaxCount()); WarehousingOutboundProductEntity warehousingOutboundProductEntity = new WarehousingOutboundProductEntity(); warehousingOutboundProductEntity.setId(RandomUtil.uuId()); warehousingOutboundProductEntity.setWarehousingOutboundId(entity.getId()); @@ -789,7 +791,7 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl Date: Wed, 31 Jul 2024 13:24:58 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/scm/WarehousingOutboundProductMapper.xml | 2 +- .../java/jnpf/service/impl/CwsettlementServiceImpl.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml index 5a5eccdc..e23e95ee 100644 --- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml +++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml @@ -54,7 +54,7 @@ LEFT JOIN jg_subject_basic f ON e.first_subject_basic_id = f.id LEFT JOIN jg_contract g ON e.contract_id = g.id WHERE - a.id = #{id} + a.document_no = #{id} AND c.business_type = '1' AND a.f_delete_mark IS NULL 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 aa0af84c..817b957d 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 @@ -1154,7 +1154,7 @@ public class CwsettlementServiceImpl extends ServiceImpl warehousingOutboundProductList = warehousingOutboundProductService.queryOutboundProductPurchase(model.getAccountId()); + List warehousingOutboundProductList = warehousingOutboundProductService.queryOutboundProductPurchase(cwaccountstorageEntity.getDocumentNo()); for (WarehousingOutboundProductEntity warehousingOutboundProductEntity : warehousingOutboundProductList) { settlementRelationSaleEntity.setPurchaseCode(warehousingOutboundProductEntity.getCode()); //采购订单 settlementRelationSaleEntity.setContract(warehousingOutboundProductEntity.getContractName()); //采购合同编号 @@ -1183,9 +1183,12 @@ public class CwsettlementServiceImpl extends ServiceImpl Date: Wed, 31 Jul 2024 14:00:05 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E9=94=80=E5=94=AE=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scm/WarehousingOutboundProductMapper.xml | 5 +- .../service/impl/CwsettlementServiceImpl.java | 272 ++++++++++-------- .../WarehousingOutboundProductEntity.java | 2 + 3 files changed, 163 insertions(+), 116 deletions(-) diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml index 5a5eccdc..bd5620bd 100644 --- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml +++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingOutboundProductMapper.xml @@ -26,7 +26,7 @@ - + @@ -41,10 +41,11 @@ SELECT - a.id AS OUT_ID, + aa.id AS OUT_ID, e.f_en_code AS COMP_ID, f.f_en_code AS DEPT_ID, a.document_no AS PROD_ZL, - aa.order_line as CK_ORDER, + concat(a.document_no,'-',LPAD(aa.order_line,3,0)) as CK_ORDER, IF(a.warehousing_outbound_type = 1,c.code,m.code) as SAL_ORDER, IF(a.warehousing_outbound_type = 1,d.code,q.code) as CUS_ID, IF(a.warehousing_outbound_type = 1,d.name,q.name) as CUS_NAME, diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingStorageMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingStorageMapper.xml index 6f60d660..788bbad9 100644 --- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingStorageMapper.xml +++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/WarehousingStorageMapper.xml @@ -358,7 +358,7 @@