From 12f530fdb21fd14bdaafbb8d101cd40e781dc9d3 Mon Sep 17 00:00:00 2001 From: shaoyong Date: Wed, 14 Aug 2024 18:02:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E5=9B=BE=E7=89=87=E5=9C=B0=E5=9D=80=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=89=AF=E7=B1=BB=E5=9E=8B=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/quality/domain/QcCheckTaskIncome.java | 32 +++++++++++++++++++ .../impl/QcCheckTaskIncomeServiceImpl.java | 4 +++ .../quality/QcCheckTaskIncomeMapper.xml | 8 ++++- .../controller/BaseDictDataController.java | 6 ++++ .../com/op/wms/mapper/BaseDictDataMapper.java | 2 ++ .../op/wms/service/IBaseDictDataService.java | 2 ++ .../service/impl/BaseDictDataServiceImpl.java | 5 +++ .../mapper/wms/BaseDictDataMapper.xml | 31 ++++++++++++++++++ 8 files changed, 89 insertions(+), 1 deletion(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java index f6b7da61..cf51b102 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java @@ -216,6 +216,38 @@ public class QcCheckTaskIncome extends BaseEntity { private String oaFactoryF;//异常范围 private String sccj; private String bz; + /** + * cxzz:产线组长签名路径,(首检) + * jgy:机管员签名路径,(首检) + * pgy:品管员签名路径(首检) + */ + private String cxzz; + private String jgy; + private String pgy; + + public String getCxzz() { + return cxzz; + } + + public void setCxzz(String cxzz) { + this.cxzz = cxzz; + } + + public String getJgy() { + return jgy; + } + + public void setJgy(String jgy) { + this.jgy = jgy; + } + + public String getPgy() { + return pgy; + } + + public void setPgy(String pgy) { + this.pgy = pgy; + } public String getBz() { return bz; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 107427c7..5bb13f95 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -1,6 +1,7 @@ package com.op.quality.service.impl; import java.math.BigDecimal; +import java.math.BigInteger; import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.regex.Matcher; @@ -852,6 +853,9 @@ public class QcCheckTaskIncomeServiceImpl implements qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName()); qcCheckTask.setReason(qcCheckTaskIncome.getReason()); qcCheckTask.setBz(qcCheckTaskIncome.getAttr3());//备注 + qcCheckTask.setCxzz(qcCheckTaskIncome.getCxzz()); + qcCheckTask.setJgy(qcCheckTaskIncome.getJgy()); + qcCheckTask.setPgy(qcCheckTaskIncome.getPgy()); BigDecimal sampleQuality = new BigDecimal("0"); for(QcCheckTaskDetail detail:details){ diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index fbb784b1..abdd4fe7 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -315,6 +315,9 @@ remark = #{remark}, reason = #{reason}, bz = #{bz}, + cxzz = #{cxzz}, + jgy = #{jgy}, + pgy = #{pgy}, check_result = #{checkResult}, update_by = #{updateBy}, update_time = #{updateTime} @@ -588,7 +591,10 @@ qct.check_result checkResult, qct.income_time incomeTime, qct.check_loc checkLoc, - qct.remark + qct.remark, + qct.cxzz, + qct.jgy, + qct.pgy from qc_check_task qct left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0' where qct.record_id = #{recordId} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseDictDataController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseDictDataController.java index 446d6447..d580e1f4 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseDictDataController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseDictDataController.java @@ -44,6 +44,12 @@ public class BaseDictDataController extends BaseController { List list = dictDataService.selectDictDataList(dictData); return getDataTable(list); } + @GetMapping("/getDictData") + @DS("#header.poolName") + public AjaxResult getDict(SysDictData dictData) { + List list = dictDataService.getDictDataList(dictData); + return success(list); + } @Log(title = "字典数据", businessType = BusinessType.EXPORT) @RequiresPermissions("factory:dict:export") diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseDictDataMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseDictDataMapper.java index 98874b80..c8ec1d80 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseDictDataMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseDictDataMapper.java @@ -92,4 +92,6 @@ public interface BaseDictDataMapper { * @return 结果 */ public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); + + List getDictDataList(SysDictData dictData); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseDictDataService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseDictDataService.java index 983c1e00..c85239c7 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseDictDataService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseDictDataService.java @@ -58,4 +58,6 @@ public interface IBaseDictDataService { * @return 结果 */ public int updateDictData(SysDictData dictData); + + List getDictDataList(SysDictData dictData); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseDictDataServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseDictDataServiceImpl.java index 13998818..91edf88f 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseDictDataServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseDictDataServiceImpl.java @@ -30,6 +30,11 @@ public class BaseDictDataServiceImpl implements IBaseDictDataService { return dictDataMapper.selectDictDataList(dictData); } + @Override + public List getDictDataList(SysDictData dictData) { + return dictDataMapper.getDictDataList(dictData); + } + /** * 根据字典类型和字典键值查询字典数据信息 * diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/BaseDictDataMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/BaseDictDataMapper.xml index 0a50f4e9..7476aa1e 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/BaseDictDataMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/BaseDictDataMapper.xml @@ -41,6 +41,37 @@ order by dict_sort asc + + + SELECT + mrw.workorder_code, + mrw.machine_name, + mrw.product_code, + mrw.product_name, + bpa.category, + bp.umrez, + SUM ( mrw.quantity ) AS plan_production, + SUM ( mrw.quantity_feedback ) AS quantity_feedback, + MAX(A.quantity_s) AS quantity_s, + MAX(A.quantity_s_total) AS quantity_s_total, + bpa.man_standar, + MAX(A.use_man) AS use_man, + SUM(A.work_time) AS work_time, + mrw.parent_order , + bpa.iei, + FORMAT(ROUND((bpa.iei / bp.umrez / bpa.man_standar), 1), '0.#') AS standardEfficiency, + FORMAT(ROUND( + CASE + WHEN MAX(A.use_man) = 0 OR SUM(A.work_time) = 0 THEN NULL + ELSE SUM(mrw.quantity_feedback) / MAX(A.use_man) / SUM(A.work_time) + END, + 1 + ), '0.#') AS actualEfficiency, + FORMAT( + CASE + WHEN (bpa.iei / bp.umrez / bpa.man_standar) = 0 + THEN NULL + ELSE (CAST( + ROUND( + CASE + WHEN MAX(A.use_man) = 0 OR SUM(A.work_time) = 0 THEN NULL + ELSE SUM(mrw.quantity_feedback) / MAX(A.use_man) / SUM(A.work_time) + END, + 1 + ) AS DECIMAL(10,1)) + / CAST( + ROUND((bpa.iei / bp.umrez / bpa.man_standar), 1) AS DECIMAL(10,1) + ) * 100 + ) + END, + '0.#' + ) + '%' AS efficiencyAcRate + FROM + [dbo].[mes_report_work] mrw + LEFT JOIN base_product_attached bpa ON bpa.product_code = RIGHT ( mrw.product_code, 11 ) + LEFT JOIN base_product bp ON bp.product_code = mrw.product_code + LEFT JOIN ( + SELECT + mrws.workorder_code, + mrws.parent_order, + MAX(mrws.use_man) AS use_man, + MAX(pow.quantity_split) AS quantity_s, + SUM(mrws.quantity_feedback) AS quantity_s_total, + SUM (mrws.work_time ) AS work_time + FROM + [dbo].[mes_report_work] mrws + LEFT JOIN pro_order_workorder pow ON mrws.workorder_code=pow.workorder_code + WHERE + CAST (mrws.feedback_time AS DATE ) = #{feedbackTime} + AND mrws.parent_order != '0' + GROUP BY + mrws.workorder_code, + mrws.parent_order + ) A ON A.parent_order= mrw.workorder_code + WHERE + CAST ( mrw.feedback_time AS DATE ) = #{feedbackTime} + AND mrw.parent_order = '0' + GROUP BY + mrw.workorder_code, + mrw.machine_name, + mrw.product_code, + mrw.product_name, + bpa.category, + bp.umrez, + bpa.man_standar, + mrw.use_man, + mrw.parent_order, + bpa.iei + ORDER BY mrw.machine_name ASC + + + + +