From dadbb054813acc189511c582d8e336e9ba7e6de7 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Mon, 15 Jan 2024 09:55:59 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/QcCheckTaskIncomeServiceImpl.java | 77 +------------------ .../impl/QcCheckTaskProduceServiceImpl.java | 4 +- .../quality/QcCheckTaskProduceMapper.xml | 3 +- 3 files changed, 5 insertions(+), 79 deletions(-) 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 6ee70097..adb2c76c 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 @@ -393,82 +393,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { return n ; } - /*来料检验不良OA流程 - * CQ 厂区、 OEMCM 厂名 、 LLLB 来料类别【0、1】、MATNR 物料编号、MAKTX 物料名称、suppliernum 供应商编码 - * supplier 供应商名称、CHARG 生产批号、comeQty 来料数量、testDate 检验日期 、 JYBH 检验编号、 - * BJY 仓储报检人(OEM产品提报人)、WLLY 物料来源、ZCF 转出方、 ZCOEMCM 转出OEM厂名、 - * memo 不合格情况描述 、PZGLBZG QC主管 - */ - private AjaxResult createLLOA(QcCheckTaskIncome qcCheckTaskIncome){ - - QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskIncome.getRecordId()); - - //发起来料检验OA流程 - Map paramMap = new HashMap<>(); - paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号 - paramMap.put("requestLevel",0);//流程紧急度 - paramMap.put("requestName","ZL0020-来料检验不合格审批流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称 - paramMap.put("workflowId",26235);//该流程对应的唯- workFlowld - - StringBuffer mainObject = new StringBuffer(); - mainObject.append("{"); - mainObject.append("\"CQ\":"+qcCheckTaskIncome.getFactoryCode());//厂区 - mainObject.append(",\"LLLB\":"+0);//来料类别【0、1】 - mainObject.append(",\"MATNR\":"+"\""+detailInfo.getMaterialCode()+"\"");//物料编码 - mainObject.append(",\"MAKTX\":"+"\""+detailInfo.getMaterialName()+"\"");//物料名称 - mainObject.append(",\"suppliernum\":"+"\""+detailInfo.getSupplierCode()+"\"");//供应商编码 - mainObject.append(",\"supplier\":"+"\""+detailInfo.getSupplierName()+"\"");//供应商名称 - mainObject.append(",\"CHARG\":"+"\""+detailInfo.getIncomeBatchNo()+"\"");//生产批号 - mainObject.append(",\"comeQty\":"+"\""+detailInfo.getQuality()+"\"");//来料数量 - mainObject.append(",\"memo\":"+"\""+detailInfo.getRemark()+"\"");//不合格情况描述 - mainObject.append("}"); - - paramMap.put("mainObject",mainObject.toString()); - logger.info("流程Id 26235:"+ JSONObject.toJSONString(paramMap)); - AjaxResult oaR = remoteOpenService.OAInspection(paramMap); - logger.info("流程Id 26235:"+ JSONObject.toJSONString(oaR)); - return oaR; - } - /*生产过程不良OA流程 - * ZL0020-成品检验控制流程:"workflowId": 26234 - * - * --------主表------- - * PGBCJ 申请部门/SSCJ 所属车间/ZRPSN报检人/GJZ关键字/SCLX生产类型/OEM OEM厂名/DH 单号/DW单位/MEMO01 不合格描述/ - * MEMO03 备注/SFXZG 是否需要QC主管审核/PGZG QC主管 - * PGZRJL 品管主任 - * ----------明细表--- - * 请求示例:{"colNames":"PROCODE,PRONAME,SCCODE......","details":[{"PROCODE":"","PRONAME":"",.....},{},{},.....]} - * PROCODE 产品编码、PRONAME 产品名称、SCCODE 批次号、SCTOTAL 数量、 - * BJDATE 报检日期、JYCODE 检验编号、JYDATE 检验日期、JYRESULT检验结果:0合格 2不合格、 - * PROCODEBAK 、BZ 备注、CPCYS 产品抽样数(PC)、JYBHGMS 不合格情况描述*/ - private AjaxResult createProduceOA(QcCheckTaskIncome qcCheckTaskIncome){ - - QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskIncome.getRecordId()); - - //发起来料检验OA流程 - Map paramMap = new HashMap<>(); - paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号qcCheckTaskIncome.getUpdateBy() - paramMap.put("requestLevel",0);//流程紧急度 - paramMap.put("requestName","ZL0010-成品检验控制流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称 - paramMap.put("workflowId",26234);//该流程对应的唯- workFlowld - - StringBuffer mainObject = new StringBuffer(); - mainObject.append("{"); - mainObject.append("\"SSCJ\":"+detailInfo.getSupplierName());//所属车间 - mainObject.append(",\"ZRPSN\":"+"\""+qcCheckTaskIncome.getUpdateBy()+"\"");//报检人 - mainObject.append(",\"OEM\":"+"\""+qcCheckTaskIncome.getFactoryCode()+"\"");//OEM厂名 - mainObject.append(",\"DH\":"+"\""+qcCheckTaskIncome.getWorkorderCodeSap()+"\"");//单号 - mainObject.append(",\"MEMO01\":"+"\""+detailInfo.getRemark()+"\"");//不合格情况描述 - mainObject.append("}"); - - - - paramMap.put("mainObject",mainObject.toString()); - logger.info("流程Id 26234:"+ JSONObject.toJSONString(paramMap)); - AjaxResult oaR = remoteOpenService.OAInspection(paramMap); - logger.info("流程Id 26234:"+ JSONObject.toJSONString(oaR)); - return oaR; - } + @Override @DS("#header.poolName") public List getDefectList(QcDefectType qcDefectType) { diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java index 8968e71f..9e788741 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java @@ -90,10 +90,10 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService QcCheckTaskProduce qcCheckTaskProduce = qcCheckTaskProduceMapper.selectQcCheckTaskProduceByRecordId(recordId); //获取拼接好的检验人员信息 QcCheckTaskUser qcCheckTaskUser = qcCheckTaskUserService.selectQcCheckTaskUserByBelongTo(recordId); - if (StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) { + if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) { qcCheckTaskProduce.setCheckManName(qcCheckTaskUser.getManNames()); } - if (StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) { + if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) { qcCheckTaskProduce.setCheckManCode(qcCheckTaskUser.getManCodes()); } //获取不良品检验信息 diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml index 4ecd9d7c..01c7860d 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml @@ -141,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id,check_name checkName from qc_check_type - where type_code = #{typeCode} and del_flag='0' + where del_flag='0' + and type_code = #{typeCode} + + diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml index ebe4817f..b31c6fc4 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml @@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" product_date incomeTime, status from pro_order_workorder - where status != 'w5' and parent_order != '0' and workorder_code_sap is not null + where status != 'w5' and parent_order = '0' and workorder_code_sap is not null and workorder_code_sap like concat ('%',#{orderNo},'%') order by product_date desc @@ -178,6 +178,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{requestid}, + + insert into qc_check_task( + record_id,check_no,income_batch_no,order_no, + material_code,material_name,quality,unit, + supplier_code,supplier_name,income_time, + check_status, + create_by,create_time,factory_code,del_flag, + check_type,noOk_quality,sample_quality,type_code,order_type + ) + select + #{recordId},check_no,income_batch_no ,order_no , + material_code,material_name,quality ,unit , + supplier_code,supplier_name,income_time, + '0', + #{createBy},#{createTime},factory_code,del_flag, + check_type,noOk_quality,sample_quality,type_code ,'reCheckCS' + from qc_check_task where record_id = #{oldBelongTo} and del_flag = '0' + + + insert qc_check_task_defect( + record_id, + defect_code,defect_subclass, + create_by,create_time, + factory_code,del_flag, + belong_to,noOk_quality) + select + REPLACE(NEWID(), '-',''), + defect_code,defect_subclass, + #{createBy},#{createTime}, + factory_code,del_flag, + #{belongTo},noOk_quality + from qc_check_task_defect where belong_to = #{oldBelongTo} and del_flag = '0' + + + insert into qc_check_task_detail( + record_id,belong_to,order_num,rule_name,property_code, + check_mode,check_tool,unit_code,check_standard,actual_value, + create_by,create_time,factory_code,del_flag, + project_id,project_no,type_project_id,defect_code + ) + select + REPLACE(NEWID(), '-',''),#{belongTo},order_num,rule_name,property_code, + check_mode,check_tool,unit_code,check_standard,actual_value, + #{createBy},#{createTime},factory_code,del_flag, + project_id,project_no,type_project_id,defect_code + from qc_check_task_detail where belong_to = #{oldBelongTo} and del_flag = '0' + + + insert into qc_check_task_user( + record_id,check_no, + check_man_code,check_man_name, + create_by,create_time, + factory_code,del_flag,belong_to + ) + select + REPLACE(NEWID(), '-',''),check_no, + check_man_code,check_man_name, + #{createBy},#{createTime}, + factory_code,del_flag,#{belongTo} + from qc_check_task_user where belong_to = #{oldBelongTo} and del_flag = '0' + update qc_check_unqualified diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml index 95970101..79812c8f 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into qc_project_type @@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" factory_code, del_flag, standard_no, - version = #{version} + version, #{id}, @@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{factoryCode}, #{delFlag}, - #{standardNo} - #{version} + #{standardNo}, + #{version}, @@ -96,9 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from qc_project_type where id in + delete from qc_project_type where id in #{id} - \ No newline at end of file + From 69793976edde4480dfac29f0f043886ffe457399 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Mon, 15 Jan 2024 15:35:21 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/op/quality/controller/QcStaticTableController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java index 8fb6c60d..a4ab7034 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java @@ -80,7 +80,7 @@ public class QcStaticTableController extends BaseController { /** * 生产过程质量报表 */ - @RequiresPermissions("quality:gcTableProduce:list") + @RequiresPermissions("quality:qcTableProduce:list") @GetMapping("/getProduceChartData") public QcStaticTable getProduceChartData(QcStaticTable qcStaticTable) { QcStaticTable resultdto = new QcStaticTable();