From 8204f7ad9282bda6ec6bc800433cd556ae059238 Mon Sep 17 00:00:00 2001 From: songxiaopeng <1393756821@qq.com> Date: Thu, 16 May 2024 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E4=BF=AE=E6=94=B9=E8=B4=B4?= =?UTF-8?q?=E6=A0=87=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/config/application.yml | 2 +- .../acs/service/impl/AcsToWmsServiceImpl.java | 26 ++++++++++++++----- .../src/views/wms/basedata/material/index.vue | 4 +-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/acs/nladmin-system/src/main/resources/config/application.yml b/acs/nladmin-system/src/main/resources/config/application.yml index 43cf9ea..fbf3987 100644 --- a/acs/nladmin-system/src/main/resources/config/application.yml +++ b/acs/nladmin-system/src/main/resources/config/application.yml @@ -2,7 +2,7 @@ spring: freemarker: check-template-location: false profiles: - active: prod + active: dev jackson: time-zone: GMT+8 data: diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index c2646c2..53d5460 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -17,6 +17,8 @@ import org.nl.wms.das.device.record.service.IDasDeviceErrorRecordService; import org.nl.wms.das.device.record.service.dao.DasDeviceErrorRecord; import org.nl.wms.das.inspection.service.IDasQualityInspectionService; import org.nl.wms.database.brick.service.IMdBaseBrickInfoService; +import org.nl.wms.database.customer.service.IMdCsCustomerbaseService; +import org.nl.wms.database.customer.service.dao.MdCsCustomerbase; import org.nl.wms.database.material.service.IMdBaseMaterialService; import org.nl.wms.database.material.service.dao.MdBaseMaterial; import org.nl.wms.ext.acs.service.AcsToWmsService; @@ -130,6 +132,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { @Autowired private YZMapper yzMapper; + @Autowired + private IMdCsCustomerbaseService mdCsCustomerbaseService; + @Autowired private IDasDeviceErrorRecordService dasDeviceErrorRecordService; @@ -519,21 +524,28 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { GroupBindMaterialStatusEnum.BOUND.getValue()); String materialId = groupInfo.getMaterial_id(); MdBaseMaterial baseMaterial = materialService.getById(materialId); - BigDecimal materialWeight = ObjectUtil.isNotEmpty(groupInfo.getMaterial_weight()) - ? groupInfo.getMaterial_weight() : BigDecimal.valueOf(0); String singleWeightStr = baseMaterial.getSingle_weight(); BigDecimal singleWeight = BigDecimal.valueOf(Double.parseDouble(singleWeightStr)); - BigDecimal multiply = materialWeight.multiply(singleWeight).multiply(BigDecimal.valueOf(1000)); + BigDecimal totalWeight = singleWeight.multiply(BigDecimal.valueOf(groupInfo.getMaterial_qty())); // 获取工单 PdmBdWorkorder workorder = workorderService.selectApplyLabelInfo(groupInfo.getWorkorder_code()); + if (null == workorder){ + return ApplyTaskResponse.responseError(requestNo, "未查询到工单信息!"); + } + MdCsCustomerbase customerbase = mdCsCustomerbaseService.getById(workorder.getCustomer()); + if (null == customerbase){ + return ApplyTaskResponse.responseError(requestNo, "未查询到客户信息!"); + } // 组合 - sb.append(workorder.getOrder_number()).append("##") - .append(workorder.getProduct_code()).append("##") + sb.append(customerbase.getCust_name()).append("##") .append(workorder.getMaterial_name()).append("##") - .append(workorder.getMaterial_code()).append("##") .append(workorder.getMaterial_spec()).append("##") + .append(workorder.getMaterial_code()).append("##") + .append(singleWeight).append("##") + .append(groupInfo.getMaterial_qty()).append("##") + .append(totalWeight).append("##") + .append(workorder.getProduct_code()).append("##") .append(workorder.getMaterial_model()).append("##") - .append(multiply).append("##") .append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy/MM/dd")); return ApplyTaskResponse.responseOk(requestNo, sb.toString()); } diff --git a/lms/nladmin-ui/src/views/wms/basedata/material/index.vue b/lms/nladmin-ui/src/views/wms/basedata/material/index.vue index d68fd25..6b45625 100644 --- a/lms/nladmin-ui/src/views/wms/basedata/material/index.vue +++ b/lms/nladmin-ui/src/views/wms/basedata/material/index.vue @@ -105,7 +105,7 @@ - + - +