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