From a232c48df48dc759fced8e286206cb3d5907b50d Mon Sep 17 00:00:00 2001 From: xs Date: Tue, 22 Oct 2024 18:03:03 +0800 Subject: [PATCH] =?UTF-8?q?3.3.1=20MES:=20=E8=99=9A=E6=8B=9F=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E5=8F=AF=E4=BB=A5=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=9A=84=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw/mes/service/impl/MesImportImpl.java | 45 ++++++---- .../views/mes/productOrder/addSaleOrder.vue | 6 +- .../views/mes/purchaseApplyProcess/index.vue | 34 +++++++- hw-ui/src/views/mes/purchaseOrder/index.vue | 12 --- hw-ui/src/views/mes/saleOrder/index.vue | 52 ++++++++---- .../views/mes/saleOrder/saleOrderRelates.vue | 83 +++++++++++++++++++ 6 files changed, 182 insertions(+), 50 deletions(-) create mode 100644 hw-ui/src/views/mes/saleOrder/saleOrderRelates.vue diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesImportImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesImportImpl.java index be717f9f..cdd2d734 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesImportImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesImportImpl.java @@ -325,9 +325,9 @@ public class MesImportImpl implements IMesImportService { Long parentBomId = 0L; String parentBomDesc = productMaterial.getMaterialName(); finishedProductNameList.add(productMaterial.getMaterialName()); - if (productBomList.size() > 0) { - MesRaiseCapitalBom mesMaterialBom = productBomList.get(0); - throw new ServiceException(mesMaterialBom.getMaterialName() + "已存在!" + "任务编号:" + mesMaterialBom.getTaskCode()); +// if (productBomList.size() > 0) { +// MesRaiseCapitalBom mesMaterialBom = productBomList.get(0); +// throw new ServiceException(mesMaterialBom.getMaterialName() + "已存在!" + "任务编号:" + mesMaterialBom.getTaskCode()); // parentBomId = mesMaterialBom.getRaiseCapitalId(); // MesRaiseCapitalBom materialBom = new MesRaiseCapitalBom(); // materialBom.setParentId(mesMaterialBom.getRaiseCapitalId()); @@ -335,19 +335,19 @@ public class MesImportImpl implements IMesImportService { // for (MesRaiseCapitalBom bom : mesMaterialBoms) { // mesRaiseCapitalBomService.deleteMesRaiseCapitalBomByRaiseCapitalId(bom.getRaiseCapitalId()); // } - } else { - MesRaiseCapitalBom materialBom = new MesRaiseCapitalBom(); - materialBom.setTaskCode(taskCode); - materialBom.setMaterialId(productMaterial.getMaterialId()); - materialBom.setMaterialName(productMaterial.getMaterialName()); - materialBom.setMaterialBomDesc(productMaterial.getMaterialName()); - materialBom.setParentId(0L); - materialBom.setActiveFlag("1"); - materialBom.setStandardAmount(new BigDecimal(1)); - materialBom.setErpMaterialId(productMaterial.getErpId()); - mesRaiseCapitalBomService.insertMesRaiseCapitalBom(materialBom); - parentBomId = materialBom.getRaiseCapitalId(); - } +// } else { + MesRaiseCapitalBom parentMaterialBom = new MesRaiseCapitalBom(); + parentMaterialBom.setTaskCode(taskCode); + parentMaterialBom.setMaterialId(productMaterial.getMaterialId()); + parentMaterialBom.setMaterialName(productMaterial.getMaterialName()); + parentMaterialBom.setMaterialBomDesc(productMaterial.getMaterialName()); + parentMaterialBom.setParentId(0L); + parentMaterialBom.setActiveFlag("1"); + parentMaterialBom.setStandardAmount(new BigDecimal(1)); + parentMaterialBom.setErpMaterialId(productMaterial.getErpId()); + mesRaiseCapitalBomService.insertMesRaiseCapitalBom(parentMaterialBom); + parentBomId = parentMaterialBom.getRaiseCapitalId(); +// } ArrayList bomList = new ArrayList<>(); while (true) { @@ -356,9 +356,20 @@ public class MesImportImpl implements IMesImportService { } Row rowC = sheet.getRow(i); Cell numberCell = rowC.getCell(0); - if (StringUtils.isNull(numberCell) || numberCell.getCellType() != NUMERIC) { + if (StringUtils.isNull(numberCell)) { break; + } else { + if (numberCell.getCellType() != NUMERIC && numberCell.getCellType() != STRING) { + break; + } +// if (numberCell.getCellType() == NUMERIC) { +// System.out.println("----nnu"+numberCell.getNumericCellValue()); +// double numericCellValue = numberCell.getNumericCellValue(); +// } else if (numberCell.getCellType() == STRING) { +// System.out.println("----sss"+numberCell.getStringCellValue()); +// } } + Cell materialCodeCell = rowC.getCell(1); String materialCode = null; if (materialCodeCell.getCellType() == NUMERIC) { diff --git a/hw-ui/src/views/mes/productOrder/addSaleOrder.vue b/hw-ui/src/views/mes/productOrder/addSaleOrder.vue index 5eeb0f1b..a00da6e6 100644 --- a/hw-ui/src/views/mes/productOrder/addSaleOrder.vue +++ b/hw-ui/src/views/mes/productOrder/addSaleOrder.vue @@ -112,7 +112,7 @@ - + @@ -340,14 +334,34 @@ 取 消 + + + + + + + + + +