From 99c37b5e591f32f88ff08194467d2404c035a690 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 11 Jun 2024 18:12:21 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/mes/domain/vo/MesDailyReportVo.java | 10 +- .../impl/MesReportWorkServiceImpl.java | 39 +++--- .../mapper/mes/MesReportWorkMapper.xml | 8 +- .../op/open/service/impl/OpenServiceImpl.java | 18 +-- .../op/quality/domain/QcCheckTaskIncome.java | 18 +++ .../op/quality/domain/QcSampleRuleAql.java | 5 - .../impl/QcCheckTaskIncomeServiceImpl.java | 117 ++++++++++-------- .../impl/QcCheckTaskInventoryServiceImpl.java | 20 +-- .../impl/QcCheckTaskMarketServiceImpl.java | 16 +-- .../impl/QcCheckTaskProduceServiceImpl.java | 16 +-- .../QcCheckTaskWarehousingServiceImpl.java | 16 +-- .../impl/QcSampleRuleAqlServiceImpl.java | 6 +- 12 files changed, 167 insertions(+), 122 deletions(-) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportVo.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportVo.java index ae22df33..a74d8c7f 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportVo.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportVo.java @@ -97,7 +97,15 @@ public class MesDailyReportVo extends BaseEntity { private String machineCode; @Excel(name = "工厂编码") private String factoryCode; + private BigDecimal reportRate; + public BigDecimal getReportRate() { + return reportRate; + } + + public void setReportRate(BigDecimal reportRate) { + this.reportRate = reportRate; + } public String getProductDateStart() { return productDateStart; @@ -440,4 +448,4 @@ public class MesDailyReportVo extends BaseEntity { public void setFactoryCode(String factoryCode) { this.factoryCode = factoryCode; } -} \ No newline at end of file +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index de0972aa..d10cc050 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -9,6 +9,7 @@ import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; +import com.alibaba.csp.sentinel.util.StringUtil; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.baomidou.dynamic.datasource.annotation.DS; @@ -424,9 +425,9 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { quantityDto.setWorkorderCode(workorderCode); quantityDto.setMachineCode(machineCode); - QuantityDto realQuantity = mesReportWorkMapper.getRealQuantity(quantityDto); - List sumQuantityList = mesReportWorkMapper.getSumQuantity(quantityDto); - QuantityDto sumQuantity = sumQuantityList.stream().max(Comparator.comparingLong(QuantityDto::getUseMan)).orElse(null); + QuantityDto parentMesReport = mesReportWorkMapper.getRealQuantity(quantityDto); + List sonMesReportList = mesReportWorkMapper.getSumQuantity(quantityDto); + QuantityDto sonMesReport = sonMesReportList.stream().max(Comparator.comparingLong(QuantityDto::getUseMan)).orElse(null); // 产量 Long sumQua = 0L; @@ -436,27 +437,29 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { BigDecimal workTime = BigDecimal.ZERO; // 实际用人 Long useMan = 0L; - if (realQuantity != null && sumQuantity != null) { - sumQua = sumQuantity.getQuantityFeedbackSum(); - realQua = realQuantity.getQuantityFeedbackSum(); - workTime = sumQuantity.getWorkTime(); - useMan = sumQuantity.getUseMan(); + if (sonMesReport != null && sonMesReport != null) { + sumQua = sonMesReport.getQuantityFeedbackSum(); + realQua = parentMesReport.getQuantityFeedbackSum(); + workTime = sonMesReport.getWorkTime(); + useMan = sonMesReport.getUseMan(); dto.setQuantityAct(String.valueOf(sumQua)); dto.setQuantityFeedback(String.valueOf(realQua)); dto.setWorkTime(workTime); - dto.setManStandard(useMan.toString()); - + //实际用人 + dto.setUseMan(useMan); // 计算规格 - dto.setSpec(sumQua / realQua); + //dto.setSpec(sumQua / realQua); // 订单完成率 实际产量/计划产量 BigDecimal completeRate = new BigDecimal(realQua) .multiply(new BigDecimal("100.00")) .divide(new BigDecimal(dto.getQuantitySplit()),2,BigDecimal.ROUND_HALF_UP); dto.setCompleteRate(completeRate.toString()+"%"); - // 标准工时 产量/产线标准效率 - BigDecimal workTimeStandard = new BigDecimal(sumQua) - .divide(dto.getEfficiency(),1,BigDecimal.ROUND_HALF_UP); + //标准工时=母单数量*规格/产线标准效率 + BigDecimal workTimeStandard = new BigDecimal(realQua) + .multiply(new BigDecimal(dto.getSpec())) + .divide(dto.getEfficiency(),2,BigDecimal.ROUND_HALF_UP); dto.setWorkTimeStandard(workTimeStandard.toString()); + // 产线效率 标准工时/实际工时 BigDecimal productivity = workTimeStandard .multiply(new BigDecimal("100.00")) @@ -468,17 +471,17 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { dto.setTotalWorkTime(totalWorkTime.toString()); // 标准人均效率 实际产量/标准用人/标准工时 BigDecimal manAvgStandard = new BigDecimal(realQua) - .divide(new BigDecimal(dto.getUseMan()),2,BigDecimal.ROUND_HALF_UP) + .divide(new BigDecimal(dto.getManStandard()),4,BigDecimal.ROUND_HALF_UP) .divide(workTimeStandard,2,BigDecimal.ROUND_HALF_UP); dto.setManAvgStandard(manAvgStandard.toString()); // 实际人均效率 实际产量/总工时 BigDecimal manAvgActual = new BigDecimal(realQua) .divide(totalWorkTime,2,BigDecimal.ROUND_HALF_UP); dto.setManAvgActual(manAvgActual.toString()); - // 人均效率达成率 标准人均效率/实际人均效率 - BigDecimal manAvgDo = manAvgStandard + // 人均效率达成率 实际人均效率/标准人均效率 + BigDecimal manAvgDo = manAvgActual .multiply(new BigDecimal("100.00")) - .divide(manAvgActual,2,BigDecimal.ROUND_HALF_UP); + .divide(manAvgStandard,2,BigDecimal.ROUND_HALF_UP); dto.setManAvgDo(manAvgDo.toString()+"%"); } diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 12c2a398..96208f49 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -679,14 +679,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pow.product_name productName, pow.unit unit, pow.quantity_split quantitySplit, - mlp.use_man useMan, + pow.attr3 teamLeaderName, + mlp.use_man manStandard, mlp.efficiency efficiency, mlp.attr1 unitWorkingHours, pow.workorder_code workorderCode, - pow.workorder_name workorderName + pow.workorder_name workorderName, + bp.umrez spec, + bp.report_rate reportRate from base_equipment be left join pro_order_workorder pow on be.equipment_code = pow.workorder_name left join mes_line_product mlp on pow.workorder_name = mlp.line_code and pow.product_code = mlp.product_code + left join base_product bp on bp.product_code = pow.product_code where be.del_flag = '0' and be.sap_code is not null and pow.status = 'w3' and mlp.del_flag='0' and pow.parent_order = '0' and pow.del_flag='0' and be.sap_name like concat('%', #{sapName}, '%') diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index 4d49b5cc..acca56e6 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -386,7 +386,7 @@ public class OpenServiceImpl implements OpenService { @Override public int insertQcCheckTaskProduce(QcCheckTaskProduceDTO qcCheckTaskProduce) { DynamicDataSourceContextHolder.push("ds_" + qcCheckTaskProduce.getFactoryCode()); - + logger.info("创建检验任务"+qcCheckTaskProduce.getCheckType()+":"+JSONObject.toJSONString(qcCheckTaskProduce)); // 1分钟不允许存在两条 Date lastData = openMapper.getLastTask(qcCheckTaskProduce); if(this.oneMinHas(lastData)){ @@ -457,14 +457,14 @@ public class OpenServiceImpl implements OpenService { return 0;//没有找到检测项目 } - /**qc_sample_rule**/ - QcCheckTaskProduceDTO sampQua = new QcCheckTaskProduceDTO(); - sampQua.setCheckType(qcCheckTaskProduce.getCheckType()); - sampQua.setQuality(qcCheckTaskProduce.getQuality()); - String sampNum = openMapper.getSampNum(sampQua); - if(StringUtils.isNotBlank(sampNum)){ - qcCheckTaskProduce.setSampleQuality(new BigDecimal(sampNum)); - } +// /**qc_sample_rule**/ +// QcCheckTaskProduceDTO sampQua = new QcCheckTaskProduceDTO(); +// sampQua.setCheckType(qcCheckTaskProduce.getCheckType()); +// sampQua.setQuality(qcCheckTaskProduce.getQuality()); +// String sampNum = openMapper.getSampNum(sampQua); +// if(StringUtils.isNotBlank(sampNum)){ +// qcCheckTaskProduce.setSampleQuality(new BigDecimal(sampNum)); +// } /**qc_check_task**/ qcCheckTaskProduce.setRecordId(beLongId); 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 99397fa8..a44b62f6 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 @@ -198,6 +198,24 @@ public class QcCheckTaskIncome extends BaseEntity { private String materialType;//来料类别 private String materialFrom;//物料来源 private String startOA;//发起oa 1是 0否 + private String checkLevel; + private String checkAql; + + public String getCheckLevel() { + return checkLevel; + } + + public void setCheckLevel(String checkLevel) { + this.checkLevel = checkLevel; + } + + public String getCheckAql() { + return checkAql; + } + + public void setCheckAql(String checkAql) { + this.checkAql = checkAql; + } public String getOrderCode() { return orderCode; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcSampleRuleAql.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcSampleRuleAql.java index 6c9f75bd..fb61b154 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcSampleRuleAql.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcSampleRuleAql.java @@ -26,26 +26,21 @@ private static final long serialVersionUID=1L; private String sampleAql; /** 预留字段1 */ - @Excel(name = "预留字段1") private String attr1; /** 工厂编码 */ - @Excel(name = "工厂编码") private String factoryCode; /** 删除标识1删除0正常 */ private String delFlag; /** 最大坏量 */ - @Excel(name = "最大坏量") private Long maxBadQuality; /** 小节点 */ - @Excel(name = "小节点") private String checkType; /** 大节点 */ - @Excel(name = "大节点") private String typeCode; /** 0.010 */ 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 1dcf1598..8bfd0a86 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 @@ -189,14 +189,14 @@ public class QcCheckTaskIncomeServiceImpl implements return 0;//没有找到检测项目 } - /**qc_sample_rule**/ - QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); - sampQua.setCheckType(qcCheckTaskIncome.getCheckType()); - sampQua.setQuality(qcCheckTaskIncome.getQuality()); - String sampNum = qcSampleRuleMapper.getSampNum(sampQua); - if(StringUtils.isNotBlank(sampNum)){ - qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampNum)); - } +// /**qc_sample_rule**/ +// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); +// sampQua.setCheckType(qcCheckTaskIncome.getCheckType()); +// sampQua.setQuality(qcCheckTaskIncome.getQuality()); +// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); +// if(StringUtils.isNotBlank(sampNum)){ +// qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampNum)); +// } /**qc_check_task**/ String beLongId = IdUtils.fastSimpleUUID(); @@ -659,9 +659,12 @@ public class QcCheckTaskIncomeServiceImpl implements result = qcCheckTaskIncome.getCheckResult(); } + //抽样方案 + BigDecimal sampleQua = this.getSampleQua(qcCheckTaskIncome); int n = 0; QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome(); + qcCheckTask.setSampleQuality(sampleQua); qcCheckTask.setUpdateBy(updateBy); qcCheckTask.setRecordId(belongId); qcCheckTask.setCheckStatus("2");//检测状态0待检测1检测中2检测完成 @@ -830,56 +833,66 @@ public class QcCheckTaskIncomeServiceImpl implements unqualified.setUser("999999"); qcCheckUnqualifiedService.updateQcCheckUnqualified(unqualified); } + //发送企业微信 + this.sendWX(qcCheckTaskIncome); + } + return 1 ; + } - //发企业微信--------------------开始(跟班组有关) - SysNoticeGroup noticeQo = new SysNoticeGroup(); - if(qcCheckTaskIncome.getCheckType().equals("checkTypeLL")){ - noticeQo.setNoticeId(9L); - }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeSC")){ - noticeQo.setNoticeId(13L); - }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeSCXJ")){ - noticeQo.setNoticeId(14L); - }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeCP")){ - noticeQo.setNoticeId(15L); - }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeCPPC")){ - noticeQo.setNoticeId(16L); - } + protected void sendWX(QcCheckTaskIncome qcCheckTaskIncome){ + //发企业微信--------------------开始(跟班组有关) + SysNoticeGroup noticeQo = new SysNoticeGroup(); + if(qcCheckTaskIncome.getCheckType().equals("checkTypeLL")){ + noticeQo.setNoticeId(9L); + }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeSC")){ + noticeQo.setNoticeId(13L); + }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeSCXJ")){ + noticeQo.setNoticeId(14L); + }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeCP")){ + noticeQo.setNoticeId(15L); + }else if(qcCheckTaskIncome.getCheckType().equals("checkTypeCPPC")){ + noticeQo.setNoticeId(16L); + } - List notices = qcCheckTaskIncomeMapper.getNoticesGroup(noticeQo); - if(!CollectionUtils.isEmpty(notices)) { - List wecharts = new ArrayList<>(); - for (SysNoticeGroup noticedto : notices) { - WechartDTO wechart0 = new WechartDTO(); - wechart0.setUserId(noticedto.getWxId()); - String contentInfo = noticedto.getNoticeContent(); - contentInfo = contentInfo.replace("${materialCode}", qcCheckTaskIncome.getMaterialCode()+"\n") - .replace("${materialName}", qcCheckTaskIncome.getMaterialName()+"\n") - .replace("${checkNo}", qcCheckTaskIncome.getCheckNo()+"\n") - .replace("${supplierName}", qcCheckTaskIncome.getSupplierName()+"\n") - .replace("${quality}", qcCheckTaskIncome.getQuality()+"\n"); - if(StringUtils.isNotBlank(qcCheckTaskIncome.getIncomeBatchNo())){ - contentInfo = contentInfo.replace("${incomeBatchNo}", qcCheckTaskIncome.getIncomeBatchNo()+"\n"); - } - if(StringUtils.isNotBlank(qcCheckTaskIncome.getOrderNo())){ - contentInfo = contentInfo.replace("${orderNo}", qcCheckTaskIncome.getOrderNo()+"\n"); - } - Matcher m = p2.matcher(contentInfo); - contentInfo = m.replaceAll(""); - wechart0.setText(contentInfo); - wecharts.add(wechart0); + List notices = qcCheckTaskIncomeMapper.getNoticesGroup(noticeQo); + if(!CollectionUtils.isEmpty(notices)) { + List wecharts = new ArrayList<>(); + for (SysNoticeGroup noticedto : notices) { + WechartDTO wechart0 = new WechartDTO(); + wechart0.setUserId(noticedto.getWxId()); + String contentInfo = noticedto.getNoticeContent(); + contentInfo = contentInfo.replace("${materialCode}", qcCheckTaskIncome.getMaterialCode()+"\n") + .replace("${materialName}", qcCheckTaskIncome.getMaterialName()+"\n") + .replace("${checkNo}", qcCheckTaskIncome.getCheckNo()+"\n") + .replace("${supplierName}", qcCheckTaskIncome.getSupplierName()+"\n") + .replace("${quality}", qcCheckTaskIncome.getQuality()+"\n"); + if(StringUtils.isNotBlank(qcCheckTaskIncome.getIncomeBatchNo())){ + contentInfo = contentInfo.replace("${incomeBatchNo}", qcCheckTaskIncome.getIncomeBatchNo()+"\n"); } - logger.info("检验企业微信提醒请求:" + JSONObject.toJSONString(wecharts)); - if (!CollectionUtils.isEmpty(wecharts)) { - new Thread(() -> { - AjaxResult wxresult = remoteOpenService.sendWeChartMessage(wecharts); - logger.info("检验企业微信提醒结果:" + JSONObject.toJSONString(wxresult)); - - }).start(); + if(StringUtils.isNotBlank(qcCheckTaskIncome.getOrderNo())){ + contentInfo = contentInfo.replace("${orderNo}", qcCheckTaskIncome.getOrderNo()+"\n"); } - //发企业微信--------------------结束 + Matcher m = p2.matcher(contentInfo); + contentInfo = m.replaceAll(""); + wechart0.setText(contentInfo); + wecharts.add(wechart0); + } + logger.info("检验企业微信提醒请求:" + JSONObject.toJSONString(wecharts)); + if (!CollectionUtils.isEmpty(wecharts)) { + new Thread(() -> { + AjaxResult wxresult = remoteOpenService.sendWeChartMessage(wecharts); + logger.info("检验企业微信提醒结果:" + JSONObject.toJSONString(wxresult)); + + }).start(); } + //发企业微信--------------------结束 } - return 1 ; + } + //抽样方案 + protected BigDecimal getSampleQua(QcCheckTaskIncome qcCheckTaskIncome){ + BigDecimal sampleQua = BigDecimal.ZERO; + + return sampleQua; } @Override diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java index 68512ce5..fdd00373 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java @@ -192,16 +192,16 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer } qcCheckTaskInventory.setNoOkQuality(noOkQuality); - /**qc_sample_rule**/ - if(qcCheckTaskInventory.getNoOkQuality()==null) { - QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); - sampQua.setCheckType(qcCheckTaskInventory.getCheckType()); - sampQua.setQuality(qcCheckTaskInventory.getQuality()); - String sampNum = qcSampleRuleMapper.getSampNum(sampQua); - if (StringUtils.isNotBlank(sampNum)) { - qcCheckTaskInventory.setSampleQuality(new BigDecimal(sampNum)); - } - } +// /**qc_sample_rule**/ +// if(qcCheckTaskInventory.getNoOkQuality()==null) { +// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); +// sampQua.setCheckType(qcCheckTaskInventory.getCheckType()); +// sampQua.setQuality(qcCheckTaskInventory.getQuality()); +// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); +// if (StringUtils.isNotBlank(sampNum)) { +// qcCheckTaskInventory.setSampleQuality(new BigDecimal(sampNum)); +// } +// } /**qc_check_task**/ qcCheckTaskInventoryMapper.insertQcCheckTaskInventory(qcCheckTaskInventory); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java index cc823457..13012b6c 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java @@ -188,14 +188,14 @@ public class QcCheckTaskMarketServiceImpl implements IQcCheckTaskMarketService { qcCheckTaskMarket.setNoOkQuality(noOkQuality); } - /**qc_sample_rule**/ - QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); - sampQua.setCheckType(qcCheckTaskMarket.getCheckType()); - sampQua.setQuality(qcCheckTaskMarket.getQuality()); - String sampNum = qcSampleRuleMapper.getSampNum(sampQua); - if(StringUtils.isNotBlank(sampNum)){ - qcCheckTaskMarket.setSampleQuality(new BigDecimal(sampNum)); - } +// /**qc_sample_rule**/ +// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); +// sampQua.setCheckType(qcCheckTaskMarket.getCheckType()); +// sampQua.setQuality(qcCheckTaskMarket.getQuality()); +// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); +// if(StringUtils.isNotBlank(sampNum)){ +// qcCheckTaskMarket.setSampleQuality(new BigDecimal(sampNum)); +// } /**qc_check_task**/ qcCheckTaskMarketMapper.insertQcCheckTaskMarket(qcCheckTaskMarket); 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 5b93e926..0aba0dd8 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 @@ -250,14 +250,14 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService } qcCheckTaskProduce.setNoOkQuality(noOkQuality); - /**qc_sample_rule**/ - QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); - sampQua.setCheckType(qcCheckTaskProduce.getCheckType()); - sampQua.setQuality(qcCheckTaskProduce.getQuality()); - String sampNum = qcSampleRuleMapper.getSampNum(sampQua); - if(StringUtils.isNotBlank(sampNum)){ - qcCheckTaskProduce.setSampleQuality(new BigDecimal(sampNum)); - } +// /**qc_sample_rule**/ +// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); +// sampQua.setCheckType(qcCheckTaskProduce.getCheckType()); +// sampQua.setQuality(qcCheckTaskProduce.getQuality()); +// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); +// if(StringUtils.isNotBlank(sampNum)){ +// qcCheckTaskProduce.setSampleQuality(new BigDecimal(sampNum)); +// } /**qc_check_task**/ if("LJ01".equals(qcCheckTaskProduce.getProductType())){ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java index 25359878..80882e76 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java @@ -242,14 +242,14 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin } } qcCheckTaskWarehousing.setNoOkQuality(noOkQuality); - /**qc_sample_rule**/ - QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); - sampQua.setCheckType(qcCheckTaskWarehousing.getCheckType()); - sampQua.setQuality(qcCheckTaskWarehousing.getQuality()); - String sampNum = qcSampleRuleMapper.getSampNum(sampQua); - if(StringUtils.isNotBlank(sampNum)){ - qcCheckTaskWarehousing.setSampleQuality(new BigDecimal(sampNum)); - } +// /**qc_sample_rule**/ +// QcCheckTaskIncome sampQua = new QcCheckTaskIncome(); +// sampQua.setCheckType(qcCheckTaskWarehousing.getCheckType()); +// sampQua.setQuality(qcCheckTaskWarehousing.getQuality()); +// String sampNum = qcSampleRuleMapper.getSampNum(sampQua); +// if(StringUtils.isNotBlank(sampNum)){ +// qcCheckTaskWarehousing.setSampleQuality(new BigDecimal(sampNum)); +// } /**qc_check_task**/ qcCheckTaskWarehousing.setIncomeTime(DateUtils.getNowDate());//检验任务日期 int n = qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcSampleRuleAqlServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcSampleRuleAqlServiceImpl.java index 77355cda..30537d15 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcSampleRuleAqlServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcSampleRuleAqlServiceImpl.java @@ -44,7 +44,11 @@ public class QcSampleRuleAqlServiceImpl implements IQcSampleRuleAqlService { @Override @DS("#header.poolName") public List selectQcSampleRuleAqlList(QcSampleRuleAql qcSampleRuleAql) { - return qcSampleRuleAqlMapper.selectQcSampleRuleAqlList(qcSampleRuleAql); + List dtos = qcSampleRuleAqlMapper.selectQcSampleRuleAqlList(qcSampleRuleAql); + for(QcSampleRuleAql aql:dtos){ + aql.setSampleAql(aql.getSampleCode().split("-")[1]); + } + return dtos; } /**