From 9e5a9f6059c2e0118f3f763e2c4f6f5932263b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E5=BC=BA?= Date: Thu, 30 Mar 2023 17:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PoundlistController.java | 27 +- .../poundlist/entity/PoundlistEntity.java | 2 + .../controller/SaleorderitemController.java | 29 +- .../saleorderitem/SaleorderitemInfoVO.java | 6 + .../mapper/salesorderitem/SaleorderMapper.xml | 2 + .../basicInformation/poundlist/salesForm.vue | 2366 +++++++++-------- .../scm/basicInformation/saleorder/Detail.vue | 39 +- .../scm/basicInformation/saleorder/Form.vue | 61 +- 8 files changed, 1337 insertions(+), 1195 deletions(-) diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java index 9122c1c2..5500d7e5 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java @@ -16,7 +16,13 @@ import jnpf.base.vo.DownloadVO; import jnpf.config.ConfigValueUtil; import jnpf.contractfile.entity.ContractFileEntity; import jnpf.contractfile.service.ContractFileService; +import jnpf.customer.entity.CustomerEntity; +import jnpf.customer.service.CustomerService; import jnpf.exception.DataException; +import jnpf.materialvo.entity.MaterialEntity; +import jnpf.materialvo.service.MaterialService; +import jnpf.vehicle.entity.VehicleEntity; +import jnpf.vehicle.service.VehicleService; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.transaction.annotation.Transactional; @@ -79,6 +85,12 @@ public class PoundlistController { private PoundlistService poundlistService; @Autowired private ContractFileService contractFileService; + @Autowired + private CustomerService customerService; + @Autowired + private VehicleService vehicleService; + @Autowired + private MaterialService materialService; /** * 生成销售 @@ -98,8 +110,21 @@ public class PoundlistController { PoundlistEntity poundlistEntity = poundlistService.getOne(queryWrapper); if (ObjectUtils.isNotEmpty(poundlistEntity)) { ContractFileEntity entity = contractFileService.getInfo(poundlistEntity.getSalesId()); - if (entity!=null && StringUtils.isNotEmpty(entity.getContractNo())) { + if (ObjectUtils.isNotEmpty(entity) && StringUtils.isNotEmpty(entity.getContractNo())) { poundlistEntity.setContractNo(entity.getContractNo()); + poundlistEntity.setContractName(entity.getContractName()); + } + CustomerEntity customerEntity = customerService.getInfo(poundlistEntity.getCustomerId()); + if (ObjectUtils.isNotEmpty(customerEntity) && StringUtils.isNotEmpty(customerEntity.getSupplierNm())){ + poundlistEntity.setCustomerName(customerEntity.getSupplierNm()); + } + VehicleEntity vehicleEntity = vehicleService.getInfo(poundlistEntity.getVehicleId()); + if (ObjectUtils.isNotEmpty(vehicleEntity) && StringUtils.isNotEmpty(vehicleEntity.getTicketno())){ + poundlistEntity.setVehicleName(vehicleEntity.getTicketno()); + } + MaterialEntity materialEntity = materialService.getInfo(poundlistEntity.getMaterialId()); + if (ObjectUtils.isNotEmpty(materialEntity) && StringUtils.isNotEmpty(materialEntity.getItemName())){ + poundlistEntity.setMaterialName(materialEntity.getItemName()); } poundlistEntity.setDocumentNo(generaterSwapUtil.getBillNumber("salesOrder", false)); poundlistEntity.setRate("0"); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java index 1bee327c..c0b6d221 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java @@ -245,4 +245,6 @@ public class PoundlistEntity { private String colectionBank; @TableField(exist = false) private String poundlistId; + @TableField(exist = false) + private String ContractName; } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java b/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java index c5598bdc..3f05226a 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java @@ -693,10 +693,15 @@ public class SaleorderitemController { vo.setCreatorTime(vo.getCreatorTime()); //子表 - List Salesorder_item0List = saleorderitemService.GetSalesorder_item0List(id); - for(Salesorder_item0Entity salesorder_item0Entity : Salesorder_item0List){ - } - vo.setSalesorder_item0List(JsonUtil.getJsonToList(Salesorder_item0List,Salesorder_item0Model.class )); + List jg_salesorder_item0List = saleorderitemService.querySaleOrderItemInfo(id); + List jg_salesorder_item0ModelList = JsonUtil.getJsonToList(jg_salesorder_item0List,Salesorder_item0Model.class); +// for(Salesorder_item0Model jg_salesorder_item0Model : jg_salesorder_item0ModelList){ +// Map vehicleIdMap = new HashMap<>(); +// jg_salesorder_item0Model.setVehicleId(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",jg_salesorder_item0Model.getVehicleId(),vehicleIdMap)); +// Map materialIdMap = new HashMap<>(); +// jg_salesorder_item0Model.setMaterialId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",jg_salesorder_item0Model.getMaterialId(),materialIdMap)); +// } + vo.setSalesorder_item0List(jg_salesorder_item0ModelList); List jg_receiptoutList = saleorderitemService.GetReceiptoutsoitemList(id); List jg_receiptoutModelList = new ArrayList<>(); if (jg_receiptoutList!=null && jg_receiptoutList.size()>0) { @@ -758,14 +763,14 @@ public class SaleorderitemController { //附表数据转换 //添加到详情表单对象中 -// ContractFileEntity contractFileEntity = contractFileService.getInfo(vo.getContractId()); -// if (ObjectUtils.isNotEmpty(contractFileEntity) && StringUtils.isNotEmpty(contractFileEntity.getContractName())){ -// vo.setContractId(contractFileEntity.getContractName()); -// } -// CustomerEntity customerEntity = customerService.getInfo(vo.getCustomerId()); -// if (ObjectUtils.isNotEmpty(customerEntity) && StringUtils.isNotEmpty(customerEntity.getSupplierNm())){ -// vo.setCustomerId(customerEntity.getSupplierNm()); -// } + ContractFileEntity contractFileEntity = contractFileService.getInfo(vo.getContractId()); + if (ObjectUtils.isNotEmpty(contractFileEntity) && StringUtils.isNotEmpty(contractFileEntity.getContractName())){ + vo.setContractName(contractFileEntity.getContractName()); + } + CustomerEntity customerEntity = customerService.getInfo(vo.getCustomerId()); + if (ObjectUtils.isNotEmpty(customerEntity) && StringUtils.isNotEmpty(customerEntity.getSupplierNm())){ + vo.setCustomerName(customerEntity.getSupplierNm()); + } // Map contractCodeMap = new HashMap<>(); // vo.setContractId(generaterSwapUtil.getPopupSelectValue("391146878474963333","id","contract_name",vo.getContractId(),contractCodeMap)); // Map costomerCodeMap = new HashMap<>(); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/model/saleorderitem/SaleorderitemInfoVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/model/saleorderitem/SaleorderitemInfoVO.java index 9013a02b..12527978 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/model/saleorderitem/SaleorderitemInfoVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/model/saleorderitem/SaleorderitemInfoVO.java @@ -135,4 +135,10 @@ public class SaleorderitemInfoVO{ /** 所属标段**/ @TableField("bidSection") private String bidSection; + + @TableField("contractName") + private String contractName; + + @TableField("customerName") + private String customerName; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/salesorderitem/SaleorderMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/salesorderitem/SaleorderMapper.xml index 91d40e71..48deca4d 100644 --- a/SC-boot/linkage-scm/src/main/resources/mapper/salesorderitem/SaleorderMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/mapper/salesorderitem/SaleorderMapper.xml @@ -76,6 +76,7 @@ FROM jg_salesorder_item0 a LEFT JOIN jg_vehicle b ON a.vehicle_id = b.id and b.delete_mark = '0' LEFT JOIN jg_material c ON a.material_id = c.id and c.delete_mark = '0' + LEFT JOIN jg_poundlist d ON a.poundlist_id = d.id and d.delete_mark = '0' WHERE a.delete_mark = '0' and a.sales_order_id = #{id} @@ -97,4 +98,5 @@ FROM and a.receiptin_id = #{id} + diff --git a/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue b/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue index 94c7ed21..83dcbe5c 100644 --- a/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue +++ b/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue @@ -1,1179 +1,1269 @@ diff --git a/SC-web/src/views/scm/basicInformation/saleorder/Detail.vue b/SC-web/src/views/scm/basicInformation/saleorder/Detail.vue index 59cc563a..49faa804 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/Detail.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/Detail.vue @@ -18,26 +18,34 @@ - - + --> + + + - - + --> + + + @@ -137,16 +145,7 @@ diff --git a/SC-web/src/views/scm/basicInformation/saleorder/Form.vue b/SC-web/src/views/scm/basicInformation/saleorder/Form.vue index 65f55078..cf28b9c2 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/Form.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/Form.vue @@ -18,26 +18,34 @@ - + + + + + + - + + + + - - + + + + + + + + + + @@ -139,34 +147,31 @@ @@ -682,6 +687,8 @@ costomerCode: "", contractId: "", customerId: "", + contractName: "", + customerName: "", currency: "0", contractNo: '', bidSection: '',