From 1ad99b2a5a8279deb297bdab34617bfd6a3d2730 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Thu, 16 May 2024 11:19:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[feat]=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=20=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20manufacturingCheckout.html=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8C=89=E9=92=AE=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E5=92=8C?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=82=B9=E5=87=BB=E8=AF=A6=E6=83=85=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=B8=AD=E5=B7=B2=E6=9C=89=E7=9A=84=E7=89=A9=E6=96=99=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ualityManufacturingCheckoutController.java | 38 ++- .../QualityManufacturingCheckoutMapper.java | 6 + ...tyManufacturingCheckoutMaterialMapper.java | 8 + .../IQualityManufacturingCheckoutService.java | 17 ++ ...alityManufacturingCheckoutServiceImpl.java | 39 +++ .../QualityManufacturingCheckoutMapper.xml | 9 +- ...ityManufacturingCheckoutMaterialMapper.xml | 8 +- .../quality/manufacturingCheckout/detail.html | 249 ++++++++++++++++++ .../manufacturingCheckout.html | 13 +- 9 files changed, 373 insertions(+), 14 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/detail.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java index 450fa808..224afd9c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityManufacturingCheckoutController.java @@ -2,6 +2,7 @@ package com.ruoyi.quality.controller; import java.util.List; +import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; import com.ruoyi.aftersales.domain.vo.AftersalesMaterialVO; import com.ruoyi.quality.domain.QualityManufacturingCheckoutMaterial; import com.ruoyi.quality.domain.QualityManufacturingProcess; @@ -113,18 +114,29 @@ public class QualityManufacturingCheckoutController extends BaseController return toAjax(qualityManufacturingCheckoutService.updateQualityManufacturingCheckout(qualityManufacturingCheckout)); } + /** - * 删除品质管理制程检验 + * 品质管理制程检验详情 */ - @RequiresPermissions("quality:manufacturingCheckout:remove") - @Log(title = "品质管理制程检验", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) + @GetMapping("/detail/{manufacturingCheckoutCode}") + public String detail(@PathVariable("manufacturingCheckoutCode") String manufacturingCheckoutCode, ModelMap mmap) { - return toAjax(qualityManufacturingCheckoutService.deleteQualityManufacturingCheckoutByIds(ids)); + QualityManufacturingCheckout qualityManufacturingCheckout = qualityManufacturingCheckoutService.selectQualityManufacturingCheckoutByCode(manufacturingCheckoutCode); + mmap.put("qualityManufacturingCheckout", qualityManufacturingCheckout); + return prefix + "/detail"; } + /** + * 修改保存品质管理制程检验 + */ + @RequiresPermissions("quality:manufacturingCheckout:detail") + @Log(title = "品质管理制程检验", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(QualityManufacturingCheckout qualityManufacturingCheckout) + { + return toAjax(qualityManufacturingCheckoutService.detailQualityManufacturingCheckout(qualityManufacturingCheckout)); + } @@ -194,4 +206,16 @@ public class QualityManufacturingCheckoutController extends BaseController List list = qualityManufacturingCheckoutService.selectAllProcess(); return getDataTable(list); } + + + /** + * 点击详情的时候查询数据库中已有的物料信息 + * */ + @ResponseBody + @PostMapping("/getMaterialListByCode") + public TableDataInfo getMaterialListByCode(QualityManufacturingCheckout qualityManufacturingCheckout){ + startPage(); + List list = qualityManufacturingCheckoutService.selectMaterialListByCode(qualityManufacturingCheckout.getManufacturingCheckoutCode()); + return getDataTable(list); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMapper.java index 57ce33f6..56d757f7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMapper.java @@ -80,4 +80,10 @@ public interface QualityManufacturingCheckoutMapper * 查询数据库中当前最大的编号 * */ public String findMaxRoundCode(@Param("prefix") String prefix); + + + /* + * 根据制程检验单号查找制程检验 + * */ + QualityManufacturingCheckout selectQualityManufacturingCheckoutByCode(String manufacturingCheckoutCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java index b4662698..ef20b5e8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingCheckoutMaterialMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.quality.mapper; import java.util.List; + +import com.ruoyi.quality.domain.QualityManufacturingCheckout; import com.ruoyi.quality.domain.QualityManufacturingCheckoutMaterial; /** @@ -74,4 +76,10 @@ public interface QualityManufacturingCheckoutMaterialMapper * @return 结果 */ public int restoreQualityManufacturingCheckoutMaterialById(Long manufacturingCheckoutMaterialId); + + /* + * 根据制程检验单号查找制程检验物料 + * */ + List selectCheckoutMaterialByCode(String manufacturingCheckoutCode); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutService.java index c8327e70..b2acad8a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityManufacturingCheckoutService.java @@ -91,4 +91,21 @@ public interface IQualityManufacturingCheckoutService * 查找制程工序列表 * */ QualityManufacturingCheckoutMaterial selectManufacturingCheckoutMaterial(String materialNo, String makeNo); + + + + /* + * 根据制程检验单号查找制程检验 + * */ + QualityManufacturingCheckout selectQualityManufacturingCheckoutByCode(String manufacturingCheckoutCode); + + /* + * 根据制程检验单号查找制程检验物料 + * */ + List selectMaterialListByCode(String manufacturingCheckoutCode); + + /* + * 制程检验详情 + * */ + int detailQualityManufacturingCheckout(QualityManufacturingCheckout qualityManufacturingCheckout); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutServiceImpl.java index 402e2a2c..67fd4906 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityManufacturingCheckoutServiceImpl.java @@ -115,6 +115,7 @@ public class QualityManufacturingCheckoutServiceImpl implements IQualityManufact qualityManufacturingCheckoutMaterial.setManufacturingCheckoutCode(newCode); qualityManufacturingCheckoutMaterial.setCreateBy(loginName); qualityManufacturingCheckoutMaterial.setCreateTime(new Date()); + qualityManufacturingCheckoutMaterial.setCheckoutTime(qualityManufacturingCheckout.getCheckoutTime()); checkoutMaterialMapper.insertQualityManufacturingCheckoutMaterial(qualityManufacturingCheckoutMaterial); } @@ -280,4 +281,42 @@ public class QualityManufacturingCheckoutServiceImpl implements IQualityManufact return checkoutMaterial; } + + /* + * 根据制程检验单号查找制程检验 + * */ + @Override + public QualityManufacturingCheckout selectQualityManufacturingCheckoutByCode(String manufacturingCheckoutCode) { + + QualityManufacturingCheckout qualityManufacturingCheckout = qualityManufacturingCheckoutMapper.selectQualityManufacturingCheckoutByCode(manufacturingCheckoutCode); + return qualityManufacturingCheckout; + } + + @Override + public List selectMaterialListByCode(String manufacturingCheckoutCode) { + ArrayList checkoutMaterialVOS = new ArrayList<>(); + List checkoutMaterials = checkoutMaterialMapper.selectCheckoutMaterialByCode(manufacturingCheckoutCode); + if (StringUtils.isEmpty(checkoutMaterials)){ + // 记录日志 + log.warn("未查找到与制程检验单号关联的物料相关数据, 制程检验单号: {}", manufacturingCheckoutCode); + } + for (QualityManufacturingCheckoutMaterial checkoutMaterial : checkoutMaterials) { + CheckoutMaterialVO checkoutMaterialVO = new CheckoutMaterialVO(); + checkoutMaterialVO.setMaterialNo(checkoutMaterial.getMaterialNo()); + checkoutMaterialVO.setMaterialBrand(checkoutMaterial.getMaterialBrand()); + checkoutMaterialVO.setMaterialDescribe(checkoutMaterial.getMaterialDescribe()); + checkoutMaterialVO.setMaterialName(checkoutMaterial.getMaterialName()); + checkoutMaterialVO.setMaterialProcessMethod(checkoutMaterial.getMaterialProcessMethod()); + checkoutMaterialVO.setMaterialPhotourl(checkoutMaterial.getMaterialPhotourl()); + checkoutMaterialVO.setMaterialUnit(checkoutMaterial.getMaterialUnit()); + checkoutMaterialVO.setMaterialType(checkoutMaterial.getMaterialType()); + checkoutMaterialVOS.add(checkoutMaterialVO); + } + return checkoutMaterialVOS; + } + + @Override + public int detailQualityManufacturingCheckout(QualityManufacturingCheckout qualityManufacturingCheckout) { + return 1; + } } diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMapper.xml index d078829d..106062f1 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMapper.xml @@ -44,7 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where manufacturing_checkout_id = #{manufacturingCheckoutId} - + + + + + insert into quality_manufacturing_checkout diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml index 8e65883e..5682a9ac 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingCheckoutMaterialMapper.xml @@ -46,7 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where manufacturing_checkout_material_id = #{manufacturingCheckoutMaterialId} - + + + + insert into quality_manufacturing_checkout_material diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/detail.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/detail.html new file mode 100644 index 00000000..71682415 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/detail.html @@ -0,0 +1,249 @@ + + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html index 0e43a9ec..fe4089a9 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html @@ -62,10 +62,8 @@ \ No newline at end of file From cc0d582e1e5df6c381d54200d79b515c0136ac04 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Thu, 16 May 2024 14:17:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=20=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=B6=E7=A8=8B=E6=A3=80=E9=AA=8C=E6=96=B0=E5=A2=9E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E9=AA=8C=E6=8A=A5=E5=91=8A=E7=9A=84?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=89=A9=E6=96=99=E7=9A=84=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/quality/manufacturingCheckout/add.html | 5 +++++ .../quality/manufacturingCheckout/checkoutReport.html | 6 +++++- .../quality/manufacturingCheckout/materialSelect.html | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/add.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/add.html index ffbb2074..db66f40e 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/add.html +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/add.html @@ -135,6 +135,11 @@ $(function() { var options = { modalName: "选择物料", + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 columns: [{ checkbox: true }, diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/checkoutReport.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/checkoutReport.html index 1548ee36..302b59fb 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/checkoutReport.html +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/checkoutReport.html @@ -98,8 +98,12 @@ $(function() { var options = { id:'bootstrap-manufacturingProcess-table', + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 modalName: "选择制程工序", - height:50, columns: [{ checkbox: true }, diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/materialSelect.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/materialSelect.html index 9209a42f..67918d0d 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/materialSelect.html +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/materialSelect.html @@ -21,6 +21,11 @@ id: 'bootstrap-materialSelect-table', clickToSelect: true, // 点击选中行 singleSelect: true, // 单选 + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 url: prefix + "/getMaterialInfoByMakeNo", queryParams:queryParams, modalName: "物料信息",