From 105e2a0780c7bdb7e3adf6f69dbfbd643b660529 Mon Sep 17 00:00:00 2001 From: xs Date: Tue, 5 Nov 2024 20:00:56 +0800 Subject: [PATCH] =?UTF-8?q?3.4.4=201=E3=80=81=E5=9B=BA=E5=AE=9A=E6=9D=A1?= =?UTF-8?q?=E7=A0=81=E5=A2=9E=E5=8A=A0=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E9=80=89=E6=8B=A9=202=E3=80=81=E6=88=90=E5=93=81?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2=203?= =?UTF-8?q?=E3=80=81=E5=90=88=E5=B9=B6=E6=96=B0=E5=A2=9E=E5=8E=9F=E6=9D=90?= =?UTF-8?q?=E6=96=99=E6=9D=A1=E7=A0=81=E7=94=9F=E6=88=90bom=E4=B8=BB?= =?UTF-8?q?=E9=94=AE=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=88=E4=BB=8E?= =?UTF-8?q?=E6=8F=90=E8=B5=84=E5=8D=95bom=E8=8E=B7=E5=8F=96=E4=B8=BB?= =?UTF-8?q?=E9=94=AE=EF=BC=89=204=E3=80=81=E6=A3=80=E9=AA=8C=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=A2=9E=E5=8A=A0=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98=205=E3=80=81=E8=B4=A8=E6=A3=80=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2=E5=AE=8C=E5=96=84=206=E3=80=81?= =?UTF-8?q?=E8=B4=A8=E6=A3=80=E7=BB=93=E6=9E=9C=E5=AE=8C=E5=96=84=207?= =?UTF-8?q?=E3=80=81=E4=B8=80=E6=A5=BC=E5=B7=A5=E5=BA=8F=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=A2=86=E6=96=99=208=E3=80=81=E6=88=90=E5=93=81=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/MesBaseBarcodeInfoServiceImpl.java | 29 +- .../impl/MesPurchaseOrderServiceImpl.java | 4 + .../mapper/mes/MesBaseBarcodeInfoMapper.xml | 1 + .../mapper/mes/MesMaterialBomMapper.xml | 2 + .../mapper/mes/MesPurchaseOrderMapper.xml | 2 +- .../hw-qms/src/main/java/com/hw/Main.java | 16 +- .../controller/QmsCheckRuleController.java | 2 +- .../hw/qms/domain/QmsCheckInstanceFile.java | 20 + .../com/hw/qms/domain/QmsCheckResult.java | 10 + .../mapper/QmsCheckInstanceFileMapper.java | 9 + ...QmsQualityInstanceActivityServiceImpl.java | 56 +- .../mapper/qms/QmsCheckInstanceFileMapper.xml | 11 + .../mapper/qms/QmsCheckResultMapper.xml | 3 +- .../wms/controller/WmsMobileController.java | 1 + .../WmsProductInstockController.java | 23 +- .../WmsProductOutstockController.java | 2 +- .../controller/WmsRawInstockController.java | 2 +- .../com/hw/wms/domain/WmsProductInstock.java | 42 ++ .../com/hw/wms/domain/WmsProductOutstock.java | 20 +- .../wms/domain/WmsProductOutstockDetail.java | 6 +- .../java/com/hw/wms/domain/WmsStockTotal.java | 21 + .../hw/wms/domain/vo/WmsProduceInstockVo.java | 1 - .../wms/mapper/WmsProductInstockMapper.java | 8 + .../service/IWmsProductInstockService.java | 8 + .../wms/service/impl/WmsMoveServiceImpl.java | 37 +- .../impl/WmsProductInstockServiceImpl.java | 14 + .../impl/WmsProductOutstockServiceImpl.java | 2 + .../impl/WmsStockTotalServiceImpl.java | 20 +- .../impl/WmsWarehouseMaterialServiceImpl.java | 21 +- .../mapper/wms/WmsProductInstockMapper.xml | 39 ++ .../mapper/wms/WmsProductOutstockMapper.xml | 19 +- .../mapper/wms/WmsProductStockMapper.xml | 2 +- .../mapper/wms/WmsStockTotalMapper.xml | 6 +- hw-ui/src/api/wms/productInstock.js | 10 + hw-ui/src/api/wms/productoutstock.js | 44 ++ hw-ui/src/router/index.js | 2 +- hw-ui/src/views/board/firstFloor/index.vue | 4 +- hw-ui/src/views/dms/shutDown/index.vue | 21 +- hw-ui/src/views/mes/barcode/index.vue | 67 +- .../views/mes/materialinfo/selectMaterial.vue | 1 - .../views/mes/productOrder/addSaleOrder.vue | 2 +- .../views/mes/productplan/editProductPlan.vue | 1 + .../mes/purchaseOrder/addPurchaseOrder.vue | 34 +- .../mes/purchaseOrder/selectOrderBind.vue | 6 +- .../mes/purchaseOrder/selectSaleOrder.vue | 35 +- .../src/views/qms/base/checkresult/index.vue | 50 +- .../qms/base/checkresultdetail/index.vue | 104 +++- .../views/qms/base/qualityinstance/index.vue | 14 +- .../base/qualityinstanceactivity/index.vue | 78 ++- .../views/wms/info/productInstock/index.vue | 332 +++------- .../views/wms/info/productoutstock/index.vue | 575 ++++++++++++++++++ 51 files changed, 1385 insertions(+), 454 deletions(-) create mode 100644 hw-ui/src/views/wms/info/productoutstock/index.vue diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java index 47e0754..14d09b7 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java @@ -82,6 +82,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService @Autowired private MesSaleOrderRelateMapper mesSaleOrderRelateMapper; + @Autowired + private MesRaiseCapitalBomMapper mesRaiseCapitalBomMapper; + @Autowired private MesConfig mesConfig; @@ -1270,9 +1273,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService throw new ServiceException("未找到生产任务"); } - if (!mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_INTERNAL)) { - throw new ServiceException("此生产任务为外部销售,不能直接出库"); - } +// if (!mesProductOrder.getSaleType().equals(MesConstants.MES_PRODUCT_ORDER_INTERNAL)) { +// throw new ServiceException("此生产任务为外部销售,不能直接出库"); +// } return 1; @@ -1513,14 +1516,30 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService virtualMaterialBom.setActiveFlag(MesConstants.MES_MATERIAL_ACTIVE_FLAG_NORMAL); virtualMaterialBom.setCreateBy(userName); virtualMaterialBom.setCreateTime(currentDate); + + //用来获取主键使用 + MesRaiseCapitalBom mesRaiseCapitalBom = new MesRaiseCapitalBom(); + mesRaiseCapitalBom.setTaskCode("delete"); + mesRaiseCapitalBom.setParentId(0L); + mesRaiseCapitalBom.setMaterialId(materialId); + mesRaiseCapitalBom.setStandardAmount(BigDecimal.ONE); + mesRaiseCapitalBom.setActiveFlag("0"); + mesRaiseCapitalBom.setErpMaterialId(materialId); + mesRaiseCapitalBomMapper.insertMesRaiseCapitalBom(mesRaiseCapitalBom); + Long raiseCaptialId = mesRaiseCapitalBom.getRaiseCapitalId(); + mesRaiseCapitalBomMapper.deleteMesRaiseCapitalBomByRaiseCapitalId(raiseCaptialId); + + virtualMaterialBom.setMaterialBomId(raiseCaptialId); mesMaterialBomMapper.insertMesMaterialBom(virtualMaterialBom); + + toUpdatedMaterialBoms.forEach(umb -> { MesMaterialBom queryChildBom = new MesMaterialBom(); - queryChildBom.setParentId(umb.getParentId()); + queryChildBom.setParentId(umb.getMaterialBomId()); List childBomList = mesMaterialBomMapper.selectMesMaterialBomList(queryChildBom); for (MesMaterialBom childBom : childBomList) { - childBom.setAncestors(childBom.getAncestors() + "," + virtualMaterialBom.getMaterialBomId()); + childBom.setAncestors("0," + virtualMaterialBom.getMaterialBomId() + "," + childBom.getParentId()); childBom.setUpdateBy(userName); childBom.setUpdateTime(currentDate); mesMaterialBomMapper.updateMesMaterialBom(childBom); diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesPurchaseOrderServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesPurchaseOrderServiceImpl.java index 500c41a..b2f004d 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesPurchaseOrderServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesPurchaseOrderServiceImpl.java @@ -525,6 +525,10 @@ public class MesPurchaseOrderServiceImpl implements IMesPurchaseOrderService { dateStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date()); } + + + + //查询采购订单 采购订单号不在原材料入库记录中当前日期入库的并且同一物料的采购订单,并且采购订单是采购入库完成的。 List mesPurchaseOrderList = mesPurchaseOrderMapper.selectNotRawInstockPurchaseOrderList(dateStr); List autoStockPurchaseOrderList = new ArrayList<>(); if (mesPurchaseOrderList != null && !mesPurchaseOrderList.isEmpty()) { diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml index 3748c71..88e7762 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml @@ -106,6 +106,7 @@ and bbi.print_person = #{printPerson} and bbi.print_flag = #{printFlag} and bbi.batch_flag = #{batchFlag} + and bbi.barcode_type in (${barcodeTypeStr}) and bbi.barcode_type = #{barcodeType} and bbi.single_flag = #{singleFlag} and bbi.barcode_info = #{barcodeInfo} diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesMaterialBomMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesMaterialBomMapper.xml index b5da4fe..1b3d6f9 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesMaterialBomMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesMaterialBomMapper.xml @@ -83,6 +83,7 @@ keyProperty="materialBomId"> insert into mes_material_bom + material_bom_id, parent_id, ancestors, material_classfication, @@ -103,6 +104,7 @@ assemble_time, + #{materialBomId}, #{parentId}, #{ancestors}, #{materialClassfication}, diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseOrderMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseOrderMapper.xml index d495832..dde12f3 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseOrderMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseOrderMapper.xml @@ -376,7 +376,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mpo.fentry_id, mpo.po_no, mpo.document_status, - mpo.material_id, + mbmi.material_id, mbmi.material_code, mbmi.material_name, mbmi.material_spec, diff --git a/hw-modules/hw-qms/src/main/java/com/hw/Main.java b/hw-modules/hw-qms/src/main/java/com/hw/Main.java index 0dcc1da..13655b2 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/Main.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/Main.java @@ -6,14 +6,16 @@ public class Main { public static void main(String[] args) { // Press Alt+Enter with your caret at the highlighted text to see how // IntelliJ IDEA suggests fixing it. - System.out.printf("Hello and welcome!"); +// System.out.printf("Hello and welcome!"); +// +// // Press Shift+F10 or click the green arrow button in the gutter to run the code. +// for (int i = 1; i <= 5; i++) { +// +// // Press Shift+F9 to start debugging your code. We have set one breakpoint +// // for you, but you can always add more by pressing Ctrl+F8. +// System.out.println("i = " + i); +// } - // Press Shift+F10 or click the green arrow button in the gutter to run the code. - for (int i = 1; i <= 5; i++) { - // Press Shift+F9 to start debugging your code. We have set one breakpoint - // for you, but you can always add more by pressing Ctrl+F8. - System.out.println("i = " + i); - } } } \ No newline at end of file diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckRuleController.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckRuleController.java index 068a148..0b8081d 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckRuleController.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckRuleController.java @@ -128,7 +128,7 @@ public class QmsCheckRuleController extends BaseController @GetMapping("/getCheckProjects") public AjaxResult getCheckProjects(QmsCheckProject checkProject) { - startPage(); +// startPage(); List checkProjects = qmsCheckProjectService.selectQmsCheckProjectList(checkProject); return success(checkProjects); } diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckInstanceFile.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckInstanceFile.java index 8238d4f..cf94a4a 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckInstanceFile.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckInstanceFile.java @@ -32,6 +32,10 @@ public class QmsCheckInstanceFile extends BaseEntity private String filePath; + private String name; + private String url; + + public String getFilePath() { return filePath; } @@ -77,6 +81,22 @@ public class QmsCheckInstanceFile extends BaseEntity return faultFile; } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java index 4cea0d1..a0688f7 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java @@ -85,6 +85,8 @@ public class QmsCheckResult extends BaseEntity private String materialName; + private String materialSpec; + /** 质检结果详情信息 */ private List qmsCheckResultDetailList; @@ -266,6 +268,14 @@ public class QmsCheckResult extends BaseEntity this.materialName = materialName; } + public String getMaterialSpec() { + return materialSpec; + } + + public void setMaterialSpec(String materialSpec) { + this.materialSpec = materialSpec; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/mapper/QmsCheckInstanceFileMapper.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/mapper/QmsCheckInstanceFileMapper.java index 9774e58..cf129c2 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/mapper/QmsCheckInstanceFileMapper.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/mapper/QmsCheckInstanceFileMapper.java @@ -58,4 +58,13 @@ public interface QmsCheckInstanceFileMapper * @return 结果 */ public int deleteQmsCheckInstanceFileByCheckInstanceFileIds(Long[] checkInstanceFileIds); + + /** + * 查询质检文件列表,转换字段,适应于前台展现 + * + * @param qmsCheckInstanceFile 质检文件 + * @return 质检文件集合 + */ + public List selectQmsCheckInstanceFileConvertList(QmsCheckInstanceFile qmsCheckInstanceFile); + } diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsQualityInstanceActivityServiceImpl.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsQualityInstanceActivityServiceImpl.java index 98b9f31..884f537 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsQualityInstanceActivityServiceImpl.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsQualityInstanceActivityServiceImpl.java @@ -1,13 +1,17 @@ package com.hw.qms.service.impl; import java.util.List; + import com.hw.common.core.utils.DateUtils; import com.hw.common.security.utils.SecurityUtils; import com.hw.qms.domain.QmsQualityInstance; +import com.hw.qms.mapper.QmsCheckInstanceFileMapper; import com.hw.qms.mapper.QmsQualityInstanceMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + import java.util.ArrayList; + import com.hw.common.core.utils.StringUtils; import org.springframework.transaction.annotation.Transactional; import com.hw.qms.domain.QmsCheckInstanceFile; @@ -22,12 +26,13 @@ import com.hw.qms.service.IQmsQualityInstanceActivityService; * @date 2024-04-22 */ @Service -public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanceActivityService -{ +public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanceActivityService { @Autowired private QmsQualityInstanceActivityMapper qmsQualityInstanceActivityMapper; @Autowired private QmsQualityInstanceMapper qmsQualityInstanceMapper; + @Autowired + private QmsCheckInstanceFileMapper qmsCheckInstanceFileMapper; /** * 查询质检工单实例节点 @@ -36,8 +41,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc * @return 质检工单实例节点 */ @Override - public QmsQualityInstanceActivity selectQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId) - { + public QmsQualityInstanceActivity selectQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId) { return qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivityByInstanceActivityId(instanceActivityId); } @@ -48,15 +52,25 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc * @return 质检工单实例节点 */ @Override - public List selectQmsQualityInstanceActivityList(QmsQualityInstanceActivity qmsQualityInstanceActivity) - { + public List selectQmsQualityInstanceActivityList(QmsQualityInstanceActivity qmsQualityInstanceActivity) { return qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivityList(qmsQualityInstanceActivity); } @Override public List selectQmsQualityInstanceActivitynoStatus(QmsQualityInstanceActivity qmsQualityInstanceActivity) { - return qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivitynoStatus(qmsQualityInstanceActivity); + List qmsQualityInstanceActivities = qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivitynoStatus(qmsQualityInstanceActivity); + if (qmsQualityInstanceActivities != null) { + for (QmsQualityInstanceActivity qmsQualityInstanceActivity1 : qmsQualityInstanceActivities) { + QmsCheckInstanceFile queryCheckInstanceFile = new QmsCheckInstanceFile(); + queryCheckInstanceFile.setTargetType("1"); + queryCheckInstanceFile.setTargetId(qmsQualityInstanceActivity1.getInstanceActivityId()); + List qmsCheckInstanceFileList = qmsCheckInstanceFileMapper.selectQmsCheckInstanceFileConvertList(queryCheckInstanceFile); + qmsQualityInstanceActivity1.setQmsCheckInstanceFileList(qmsCheckInstanceFileList); + } + } + + return qmsQualityInstanceActivities; } /** @@ -67,8 +81,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc */ @Transactional @Override - public int insertQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity) - { + public int insertQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity) { QmsQualityInstanceActivity qms = new QmsQualityInstanceActivity(); qms.setProcessHandleStatus("2"); @@ -91,10 +104,10 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc insertQmsCheckInstanceFile(activity); qms.setProcessHandleStatus("1"); List qmsQualityInstanceActivities1 = qmsQualityInstanceActivityMapper.selectQmsQualityInstanceActivityList(qms); - for (QmsQualityInstanceActivity q:qmsQualityInstanceActivities1){ + for (QmsQualityInstanceActivity q : qmsQualityInstanceActivities1) { q.setProcessHandleStatus("3"); q.setEndTime(DateUtils.getNowDate()); - qmsQualityInstanceActivityMapper.updateQmsQualityInstanceActivity(q); + qmsQualityInstanceActivityMapper.updateQmsQualityInstanceActivity(q); } int rows = qmsQualityInstanceActivityMapper.updateQmsQualityInstanceActivity(activity); @@ -109,8 +122,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc */ @Transactional @Override - public int updateQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity) - { + public int updateQmsQualityInstanceActivity(QmsQualityInstanceActivity qmsQualityInstanceActivity) { qmsQualityInstanceActivityMapper.deleteQmsCheckInstanceFileByTargetId(qmsQualityInstanceActivity.getInstanceActivityId()); insertQmsCheckInstanceFile(qmsQualityInstanceActivity); return qmsQualityInstanceActivityMapper.updateQmsQualityInstanceActivity(qmsQualityInstanceActivity); @@ -124,8 +136,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc */ @Transactional @Override - public int deleteQmsQualityInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds) - { + public int deleteQmsQualityInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds) { qmsQualityInstanceActivityMapper.deleteQmsCheckInstanceFileByTargetIds(instanceActivityIds); return qmsQualityInstanceActivityMapper.deleteQmsQualityInstanceActivityByInstanceActivityIds(instanceActivityIds); } @@ -138,8 +149,7 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc */ @Transactional @Override - public int deleteQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId) - { + public int deleteQmsQualityInstanceActivityByInstanceActivityId(Long instanceActivityId) { qmsQualityInstanceActivityMapper.deleteQmsCheckInstanceFileByTargetId(instanceActivityId); return qmsQualityInstanceActivityMapper.deleteQmsQualityInstanceActivityByInstanceActivityId(instanceActivityId); } @@ -149,20 +159,16 @@ public class QmsQualityInstanceActivityServiceImpl implements IQmsQualityInstanc * * @param qmsQualityInstanceActivity 质检工单实例节点对象 */ - public void insertQmsCheckInstanceFile(QmsQualityInstanceActivity qmsQualityInstanceActivity) - { + public void insertQmsCheckInstanceFile(QmsQualityInstanceActivity qmsQualityInstanceActivity) { List qmsCheckInstanceFileList = qmsQualityInstanceActivity.getQmsCheckInstanceFileList(); Long instanceActivityId = qmsQualityInstanceActivity.getInstanceActivityId(); - if (StringUtils.isNotNull(qmsCheckInstanceFileList)) - { + if (StringUtils.isNotNull(qmsCheckInstanceFileList)) { List list = new ArrayList(); - for (QmsCheckInstanceFile qmsCheckInstanceFile : qmsCheckInstanceFileList) - { + for (QmsCheckInstanceFile qmsCheckInstanceFile : qmsCheckInstanceFileList) { qmsCheckInstanceFile.setTargetId(instanceActivityId); list.add(qmsCheckInstanceFile); } - if (list.size() > 0) - { + if (list.size() > 0) { qmsQualityInstanceActivityMapper.batchQmsCheckInstanceFile(list); } } diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckInstanceFileMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckInstanceFileMapper.xml index 15f21bb..5cd91bd 100644 --- a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckInstanceFileMapper.xml +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckInstanceFileMapper.xml @@ -63,4 +63,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{checkInstanceFileId} + + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml index cb47446..0df688c 100644 --- a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml @@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -199,7 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml index 2c115a4..053bf92 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml @@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -248,8 +250,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml index 172a6fd..637a106 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml @@ -229,7 +229,7 @@ and wps.update_date = #{updateDate} and wps.active_flag = #{activeFlag} and wps.instock_date = #{instockDate} - and wps.totalAmount>0 + and wps.total_amount>0 diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml index b66a0ce..70e73bc 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml @@ -56,6 +56,7 @@ + @@ -186,7 +187,8 @@ #{materialName}, '%') - and (wst.sale_order_id = #{saleOrderId} or wst.safe_flag='1') + and (wst.sale_order_id = #{saleOrderId} or wst.safe_flag='1') + and (exists (select 1 from mes_sale_order_relate msor where wst.sale_order_id=msor.relate_sale_order_id and msor.sale_order_id=#{saleOrderId}) or wst.safe_flag='1') and wst.safe_flag='1' and (mbmi.material_code like concat('%', #{materialCodeNameSpec},'%') or mbmi.material_name like concat('%',#{materialCodeNameSpec},'%') @@ -300,6 +302,7 @@ wst.update_date, wst.active_flag, mso.order_amount,mso.saleorder_code, + wbw.warehouse_type, (select sum(wpo.apply_qty) from wms_product_outstock wpo where wpo.sale_order_id=wst.sale_order_id and wpo.warehouse_id=wst.warehouse_id and wpo.product_id=wst.material_id and (wpo.execute_status='0' or wpo.execute_status='1')) apply_amount @@ -310,6 +313,7 @@ and wst.warehouse_id = #{warehouseId} and wst.warehouse_floor = #{warehouseFloor} + and wbw.warehouse_type = #{warehouseType} and wst.stock_type = #{stockType} and wst.material_id = #{materialId} and wst.sale_order_id = #{saleOrderId} diff --git a/hw-ui/src/api/wms/productInstock.js b/hw-ui/src/api/wms/productInstock.js index 9cfae9a..1487955 100644 --- a/hw-ui/src/api/wms/productInstock.js +++ b/hw-ui/src/api/wms/productInstock.js @@ -42,3 +42,13 @@ export function delProductInstock(productInstockId) { method: 'delete' }) } + + +// 查询成品仓库列表 +export function getProductWarehouses(query) { + return request({ + url: '/wms/productInstock/getProductWarehouses', + method: 'get', + params: query + }) +} diff --git a/hw-ui/src/api/wms/productoutstock.js b/hw-ui/src/api/wms/productoutstock.js index 61892e6..c77b325 100644 --- a/hw-ui/src/api/wms/productoutstock.js +++ b/hw-ui/src/api/wms/productoutstock.js @@ -1,5 +1,49 @@ import request from '@/utils/request' +// 查询成品出库记录列表 +export function listProductoutstock(query) { + return request({ + url: '/wms/productoutstock/list', + method: 'get', + params: query + }) +} + +// 查询成品出库记录详细 +export function getProductoutstock(productOutstockId) { + return request({ + url: '/wms/productoutstock/' + productOutstockId, + method: 'get' + }) +} + +// 新增成品出库记录 +export function addProductoutstock(data) { + return request({ + url: '/wms/productoutstock', + method: 'post', + data: data + }) +} + +// 修改成品出库记录 +export function updateProductoutstock(data) { + return request({ + url: '/wms/productoutstock', + method: 'put', + data: data + }) +} + +// 删除成品出库记录 +export function delProductoutstock(productOutstockId) { + return request({ + url: '/wms/productoutstock/' + productOutstockId, + method: 'delete' + }) +} + + // 查询成品出库记录列表,提供审核使用 export function auditListProductoutstock(query) { return request({ diff --git a/hw-ui/src/router/index.js b/hw-ui/src/router/index.js index 143923a..07d4a63 100644 --- a/hw-ui/src/router/index.js +++ b/hw-ui/src/router/index.js @@ -625,7 +625,7 @@ export const dynamicRoutes = [ permissions: ["tool:gen:edit"], children: [ { - path: "index/:checkResultId(\\d+)", + path: "index/:checkResultId/:materialCode/:materialName/:materialSpec/:checkRuleName/:checkStatus/:checkMode", component: () => import("@/views/qms/base/checkresultdetail/index"), name: "checkResultDetail", meta: { title: "质检结果详细", activeMenu: "/qms/base/checkresultdetail" }, diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue index 871b5df..f434c84 100644 --- a/hw-ui/src/views/board/firstFloor/index.vue +++ b/hw-ui/src/views/board/firstFloor/index.vue @@ -238,7 +238,7 @@ @@ -842,7 +842,7 @@ export default { planCode: val.planCode, dispatchCode: val.dispatchCode, planDetailCode: val.planDetailCode, - saleOrderId: val.saleOrderId, + saleOrderId: this.saleOrderId, productId: this.productId, materialBomId: this.materialBomId, maxPlanAmount: 100000000, diff --git a/hw-ui/src/views/dms/shutDown/index.vue b/hw-ui/src/views/dms/shutDown/index.vue index efbbcc5..821c323 100644 --- a/hw-ui/src/views/dms/shutDown/index.vue +++ b/hw-ui/src/views/dms/shutDown/index.vue @@ -101,17 +101,16 @@ v-hasPermi="['dms:shutDown:remove']" >删除 - - 导出 - - + + + + + + + + + + diff --git a/hw-ui/src/views/mes/barcode/index.vue b/hw-ui/src/views/mes/barcode/index.vue index bb04adb..8d0c2a9 100644 --- a/hw-ui/src/views/mes/barcode/index.vue +++ b/hw-ui/src/views/mes/barcode/index.vue @@ -390,7 +390,7 @@ - + @@ -682,15 +702,15 @@ import {checkWarehouseMaterials} from "@/api/wms/wmswarehouse"; import selectOrderBind from '@//views/mes/purchaseOrder/selectOrderBind.vue'; import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue'; -import {getMaterialinfo} from "@/api/mes/materialinfo"; - +import selectPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue'; export default { name: "Barcode", dicts: ['bind_status', 'active_flag', 'barcode_type', 'mes_safe_flag', 'mes_print_flag', 'mes_material_batch_flag'], components: { 'select-orderBind': selectOrderBind, - 'select-material': selectMaterial + 'select-material': selectMaterial, + 'select-purchaseOrder': selectPurchaseOrder, }, data() { @@ -711,8 +731,9 @@ export default { // 条码信息表格数据 barcodeList: [], // 是否显示采购订单弹出层 - purchaseOrderOpen: false, + onlyPurchaseOrderOpen: false, + purchaseOrderOpen: false, //是否显示选择物料弹出层 selectMaterialVisible: false, // 弹出层标题 @@ -728,7 +749,7 @@ export default { printPerson: null, printFlag: null, batchFlag: null, - barcodeType: "1", + barcodeTypeStr: "1,9", barcodeInfo: null, batchCode: null, palletInfoCode: null, @@ -1166,7 +1187,7 @@ export default { // alert(JSON.stringify(selectedRows)); - } else { + } else { this.submitSingleSelectPurchaseOrder(); } @@ -1221,6 +1242,12 @@ export default { this.purchaseOrderOpen = false; }, + + + + + + handleDeletePurchaseOrder(row) { const mesSaleOrderRelateList = this.materialRelateForm.mesSaleOrderRelateList; @@ -1816,6 +1843,30 @@ export default { }); }, + + handleOnlyPurchaseOrderAdd() { + this.onlyPurchaseOrderOpen = true; + }, + + //固定条码选择采购订单 + submitOnlyPurchaseOrderForm() { + let selectedRow = this.$refs.purchaseOrderRef.selectedRow; + this.regularForm.materialId = null; + this.regularForm.materialCode = null; + this.regularForm.materialName = null; + this.regularForm.materialSpec = null; + + this.$set(this.regularForm, "poNo", selectedRow.poNo); + this.regularForm.purchaseOrderId = selectedRow.purchaseOrderId; + this.regularForm.materialId = selectedRow.materialId;//物料信息表中物料ID主键 + this.regularForm.materialCode = selectedRow.materialCode; + this.regularForm.materialName = selectedRow.materialName; + this.regularForm.materialSpec = selectedRow.materialSpec; + this.regularForm.orderBindId = selectedRow.orderBindId; + + this.onlyPurchaseOrderOpen = false; + }, + } }; diff --git a/hw-ui/src/views/mes/materialinfo/selectMaterial.vue b/hw-ui/src/views/mes/materialinfo/selectMaterial.vue index 678b782..b2ed55d 100644 --- a/hw-ui/src/views/mes/materialinfo/selectMaterial.vue +++ b/hw-ui/src/views/mes/materialinfo/selectMaterial.vue @@ -52,7 +52,6 @@ diff --git a/hw-ui/src/views/mes/productOrder/addSaleOrder.vue b/hw-ui/src/views/mes/productOrder/addSaleOrder.vue index f0c0288..08afcaf 100644 --- a/hw-ui/src/views/mes/productOrder/addSaleOrder.vue +++ b/hw-ui/src/views/mes/productOrder/addSaleOrder.vue @@ -99,7 +99,6 @@ { // mesBaseProcessUser.id = this.id + 1; diff --git a/hw-ui/src/views/mes/purchaseOrder/addPurchaseOrder.vue b/hw-ui/src/views/mes/purchaseOrder/addPurchaseOrder.vue index 0bbe94f..342fbfc 100644 --- a/hw-ui/src/views/mes/purchaseOrder/addPurchaseOrder.vue +++ b/hw-ui/src/views/mes/purchaseOrder/addPurchaseOrder.vue @@ -53,11 +53,19 @@ + + + @@ -72,11 +80,11 @@ - - - - - + + + + + - - + - - + + + @@ -157,7 +139,7 @@ icon="el-icon-edit" @click="getJump(scope.row)" v-hasPermi="['qms:checkresult:edit']" - >结果详细 + >质检明细 @@ -300,12 +282,12 @@ export default { }, created() { this.getList(); - this.getMaterialInfo(); - this.getCheckRule(); + // this.getMaterialInfo(); + // this.getCheckRule(); }, methods: { getJump(row){ - this.$router.push('/qms/base/checkresultdetail/index/'+row.checkResultId) + this.$router.push('/qms/base/checkresultdetail/index/'+row.checkResultId+'/'+row.materialCode+'/'+row.materialName+'/'+row.materialSpec+'/'+row.checkRuleName+'/'+row.checkStatus+'/'+row.checkMode) }, /** 查询条码信息集合 */ @@ -317,13 +299,13 @@ export default { }); }, /** 查询物料信息集合 */ - getMaterialInfo(){ - this.loading = true; - listMaterialinfo(this.queryParams).then(response => { - this.materialinfoList = response.rows; - this.loading = false; - }); - }, + // getMaterialInfo(){ + // this.loading = true; + // listMaterialinfo(this.queryParams).then(response => { + // this.materialinfoList = response.rows; + // this.loading = false; + // }); + // }, /** 查询质检结果列表 */ getList() { this.loading = true; diff --git a/hw-ui/src/views/qms/base/checkresultdetail/index.vue b/hw-ui/src/views/qms/base/checkresultdetail/index.vue index d00e932..361a5e2 100644 --- a/hw-ui/src/views/qms/base/checkresultdetail/index.vue +++ b/hw-ui/src/views/qms/base/checkresultdetail/index.vue @@ -3,42 +3,67 @@

质检结果信息

+ + + + + - - + + - - + + + + + + + + - - + + + + + + - - + + - - + + + + - + + + + + + - @@ -197,6 +222,9 @@ export default { checkModeUp:"", checkRuleNameUp:"", checkRuleIdUp:"", + materialCode:"", + materialName:"", + materialSpec:"", //检验项目 checkprojectList:[], //质检结果 @@ -276,7 +304,20 @@ export default { const checkResultIdFather =this.$route.params && this.$route.params.checkResultId; this.queryParams.checkResultId = checkResultIdFather; this.queryParamsFather.checkResultId = checkResultIdFather; - this.getCheckRusult(); + + this.checkResultIdUp = this.$route.params.checkResultId; + this.checkRuleNameUp = this.$route.params.checkRuleName; + this.materialCode = this.$route.params.materialCode; + this.materialName = this.$route.params.materialName; + this.materialSpec = this.$route.params.materialSpec; + this.checkStatusUp = this.$route.params.checkStatus; + this.checkModeUp = this.$route.params.checkMode; + + if (this.checkMode !== "2"){ + this.isIf = false; + } + + this.getCheckRusult(); this.getList(); this.getCheckProject(); @@ -298,27 +339,24 @@ export default { listCheckresult(this.queryParamsFather).then(response => { // console.log(response) this.checkresultList = response.rows; - this.checkRuleIdUp = this.checkresultList[0].checkRuleId; - this.checkRuleNameUp = this.checkresultList[0].checkRuleName; - this.checkSampleUp = this.checkresultList[0].checkSample; - this.materialIdUpId = this.checkresultList[0].materialId; - this.queryParamsMaterials.materialId = this.checkresultList[0].materialId; - this.getMaterialInfo(); - if (this.checkresultList[0].checkMode != "2"){ - this.isIf = false; - } - //将查到的数字转为字典的label - for (let i = 0; i < this.dict.type.qms_check_mode.length;i++ ){ - if (this.dict.type.qms_check_mode[i].value ==this.checkresultList[0].checkMode){ - this.checkModeUp = this.dict.type.qms_check_mode[i].label; - } - } - for (let j = 0; j < this.dict.type.qms_check_status.length;j++){ - if (this.dict.type.qms_check_status[j].value == this.checkresultList[0].checkStatus){ - this.checkStatusUp = this.dict.type.qms_check_status[j].label; - } - } + this.queryParamsMaterials.materialId = this.checkresultList[0].materialId; + // this.getMaterialInfo(); + // if (this.checkresultList[0].checkMode != "2"){ + // this.isIf = false; + // } + // //将查到的数字转为字典的label + // for (let i = 0; i < this.dict.type.qms_check_mode.length;i++ ){ + // if (this.dict.type.qms_check_mode[i].value ==this.checkresultList[0].checkMode){ + // this.checkModeUp = this.dict.type.qms_check_mode[i].label; + // } + // } + // + // for (let j = 0; j < this.dict.type.qms_check_status.length;j++){ + // if (this.dict.type.qms_check_status[j].value == this.checkresultList[0].checkStatus){ + // this.checkStatusUp = this.dict.type.qms_check_status[j].label; + // } + // } this.loading = false; }); diff --git a/hw-ui/src/views/qms/base/qualityinstance/index.vue b/hw-ui/src/views/qms/base/qualityinstance/index.vue index 9d008b1..1b694fb 100644 --- a/hw-ui/src/views/qms/base/qualityinstance/index.vue +++ b/hw-ui/src/views/qms/base/qualityinstance/index.vue @@ -57,13 +57,13 @@ v-hasPermi="['qms:checkrule:add']" >查看工单 - 修改 + + + + + + +
diff --git a/hw-ui/src/views/qms/base/qualityinstanceactivity/index.vue b/hw-ui/src/views/qms/base/qualityinstanceactivity/index.vue index 72bfa28..ce749e6 100644 --- a/hw-ui/src/views/qms/base/qualityinstanceactivity/index.vue +++ b/hw-ui/src/views/qms/base/qualityinstanceactivity/index.vue @@ -11,9 +11,14 @@ - + + + + @@ -45,26 +50,32 @@ +
+ 图 片 +
+
+ +
+ - - - - - + + + + + + + + + @@ -76,20 +87,20 @@ > - - -
- - - + > -
+ + + + + + + + + +
提 交
@@ -187,9 +198,12 @@ import { listQualityinstanceactivity, listQualityinstanceactivitynoStatus,getQualityinstanceactivity, delQualityinstanceactivity, addQualityinstanceactivity, updateQualityinstanceactivity } from "@/api/qms/qualityinstanceactivity"; import { listQualityinstance } from '@/api/qms/qualityinstance' import { listWfprocessactivity } from '@/api/system/common/wfprocessactivity' +import ViewFile from "@/components/viewFile/index.vue"; export default { name: "Qualityinstanceactivity", + components: {ViewFile}, + dicts:['qms_quality_instance_status'], data() { return { formIf:true, @@ -255,7 +269,14 @@ export default { processHandleResolution: [ { required: true, message: "处理意见不能为空", trigger: "blur" } ], - } + }, + + //显示预览文件 + showFileDialog: false, + //显示预览文件标题 + thisTitle: "质检图片", + //预览文件数据列表 + fileListData: [], }; }, created() { @@ -446,6 +467,17 @@ export default { this.download('qms/qualityinstanceactivity/export', { ...this.queryParams }, `qualityinstanceactivity_${new Date().getTime()}.xlsx`) + }, + + handleViewFile(fileList){ + // let file = {'name':'dd.jpg','url':'http://172.16.12.100:7309/statics/2024/11/05/output_imgage20241105_152542_20241105152632A001.jpg'}; + if(fileList==null || fileList.length<=0){ + this.$modal.msgWarning("无图片"); + return; + } + this.fileListData = fileList; + // this.fileListData = fileList; + this.showFileDialog = true; } } }; diff --git a/hw-ui/src/views/wms/info/productInstock/index.vue b/hw-ui/src/views/wms/info/productInstock/index.vue index d4ebf4a..398146f 100644 --- a/hw-ui/src/views/wms/info/productInstock/index.vue +++ b/hw-ui/src/views/wms/info/productInstock/index.vue @@ -1,29 +1,23 @@