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 5d0a68e55..ace2d864b 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 @@ -17,6 +17,7 @@ import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.bean.BeanUtils; import com.op.common.core.utils.poi.ExcelMapUtil; import com.op.common.core.utils.poi.ExcelReportMapUtil; +import com.op.common.core.web.domain.AjaxResult; import com.op.quality.domain.*; import com.op.system.api.domain.mes.ProLineDTO; import com.op.system.api.domain.quality.ChartDTO; @@ -960,8 +961,8 @@ public class QcStaticTableController extends BaseController { @Log(title = "白坯缺陷排列报表--数表", businessType = BusinessType.QUERY) @GetMapping("/getMonthOfDataDefect") - public List> getMonthOfDataDefect(QcStaticTable qcStaticTable) { - return qcStaticTableService.getMonthOfDataDefect(qcStaticTable); + public AjaxResult getMonthOfDataDefect(QcStaticTable qcStaticTable) { + return AjaxResult.success(qcStaticTableService.getMonthOfDataDefectV2(qcStaticTable)); } @Log(title = "白坯缺陷排列报表导出", businessType = BusinessType.EXPORT) @PostMapping("/getMonthOfDataDefectExport") @@ -1005,12 +1006,12 @@ public class QcStaticTableController extends BaseController { @Log(title = "白坯不良项目报表--数表", businessType = BusinessType.QUERY) @GetMapping("/getDefectItemData") public List> getDefectItemData(QcStaticTable qcStaticTable) { - return qcStaticTableService.getDefectItemData(qcStaticTable); + return qcStaticTableService.getDefectItemDataV2(qcStaticTable); } @Log(title = "白坯不良项目报表--图表", businessType = BusinessType.QUERY) @GetMapping("/getDefectItemLine") - public QcStaticTable getDefectItemLine(QcStaticTable qcStaticTable) { - return qcStaticTableService.getDefectItemLine(qcStaticTable); + public AjaxResult getDefectItemLine(QcStaticTable qcStaticTable) { + return AjaxResult.success(qcStaticTableService.getDefectItemLineV2(qcStaticTable)); } @Log(title = "白坯不良项目报表导出", businessType = BusinessType.EXPORT) @PostMapping("/getDefectItemDataExport") @@ -1048,12 +1049,12 @@ public class QcStaticTableController extends BaseController { @Log(title = "白坯性能--数表", businessType = BusinessType.QUERY) @GetMapping("/getDefectItemDataPC") public List> getDefectItemDataPC(QcStaticTable qcStaticTable) { - return qcStaticTableService.getDefectItemDataPC(qcStaticTable); + return qcStaticTableService.getDefectItemDataPCV2(qcStaticTable); } @Log(title = "白坯性能--图表", businessType = BusinessType.QUERY) @GetMapping("/getDefectItemLinePC") - public QcStaticTable getDefectItemLinePC(QcStaticTable qcStaticTable) { - return qcStaticTableService.getDefectItemLinePC(qcStaticTable); + public Map getDefectItemLinePC(QcStaticTable qcStaticTable) { + return qcStaticTableService.getDefectItemLinePCV2(qcStaticTable); } @Log(title = "白坯性能报表导出", businessType = BusinessType.EXPORT) @PostMapping("/getDefectItemDataPCExport") diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBp.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBp.java index ad58cc787..99518700a 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBp.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBp.java @@ -2,6 +2,8 @@ package com.op.quality.domain; import com.op.common.core.web.domain.BaseEntity; +import java.util.List; + /** * remark * @@ -28,12 +30,12 @@ public class QcCheckBp extends BaseEntity { /** * 检查数量 * **/ - private Integer checkNum; + private Integer checkNum = 0; /** * 不良数量 * **/ - private Integer badNum; + private Integer badNum = 0; /** * 是否合格 @@ -61,6 +63,15 @@ public class QcCheckBp extends BaseEntity { * **/ private String createUserName; + /** + * 来料 + * **/ + private String incomeBatchNo; + + /** + * 缺陷列表 + * **/ + private List defectList; public String getMaterialCode() { @@ -142,4 +153,20 @@ public class QcCheckBp extends BaseEntity { public void setCreateUserName(String createUserName) { this.createUserName = createUserName; } + + public String getIncomeBatchNo() { + return incomeBatchNo; + } + + public void setIncomeBatchNo(String incomeBatchNo) { + this.incomeBatchNo = incomeBatchNo; + } + + public List getDefectList() { + return defectList; + } + + public void setDefectList(List defectList) { + this.defectList = defectList; + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBpDefect.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBpDefect.java new file mode 100644 index 000000000..8bdada966 --- /dev/null +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckBpDefect.java @@ -0,0 +1,50 @@ +package com.op.quality.domain; + +/** + * remark + * + * @author 019117 + * @date + */ +public class QcCheckBpDefect { + + private Integer badNum = 0; + + private String badItem; + + private String defectCode; + + private String defectSubclass; + + public Integer getBadNum() { + return badNum; + } + + public void setBadNum(Integer badNum) { + this.badNum = badNum; + } + + public String getBadItem() { + return badItem; + } + + public void setBadItem(String badItem) { + this.badItem = badItem; + } + + public String getDefectCode() { + return defectCode; + } + + public void setDefectCode(String defectCode) { + this.defectCode = defectCode; + } + + public String getDefectSubclass() { + return defectSubclass; + } + + public void setDefectSubclass(String defectSubclass) { + this.defectSubclass = defectSubclass; + } +} diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckBpMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckBpMapper.java index f66bea8a3..287c80db3 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckBpMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckBpMapper.java @@ -1,6 +1,7 @@ package com.op.quality.mapper; import com.op.quality.domain.QcCheckBp; +import com.op.quality.domain.QcCheckTaskDefect; import com.op.quality.domain.QcCheckTaskIncome; import org.apache.ibatis.annotations.Mapper; @@ -20,6 +21,8 @@ public interface QcCheckBpMapper { void insertCheckBpResult( QcCheckTaskIncome task ); + void batchInsertCheckBpDefects( List list ); + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java index ec27b291f..3918806a3 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcStaticTableMapper.java @@ -159,4 +159,10 @@ public interface QcStaticTableMapper { List getCpDefectTypes(QcStaticTable qcStaticTable); String getGroupIdByOrderNo(String orderNo); + + List getBPDefectList(QcStaticTable qcStaticTable); + + List getBPDefectMothMapV2(QcStaticTable qcStaticTable); + + List getBPDefectMothPCMapV2(QcStaticTable qcStaticTable); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java index 5c128c37c..4927ae051 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcStaticTableService.java @@ -97,4 +97,17 @@ public interface IQcStaticTableService { List getCpDateTitle(QcStaticTable qcStaticTable); List> getCpDefectDate(QcStaticTable qcStaticTable); + + List> getMonthOfDataDefectV2(QcStaticTable qcStaticTable); + + Map getDefectItemLineV2(QcStaticTable qcStaticTable); + + Map getDefectItemLinePCV2(QcStaticTable qcStaticTable); + + List> getDefectItemDataPCV2(QcStaticTable qcStaticTable); + + List> getDefectItemDataV2(QcStaticTable qcStaticTable); + + + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckBpServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckBpServiceImpl.java index 171456913..a2bf4b29c 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckBpServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckBpServiceImpl.java @@ -3,19 +3,17 @@ package com.op.quality.service.impl; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.uuid.IdUtils; -import com.op.quality.domain.QcCheckBp; -import com.op.quality.domain.QcCheckTaskIncome; -import com.op.quality.domain.QcCheckTaskProduce; +import com.op.quality.domain.*; import com.op.quality.mapper.QcCheckBpMapper; import com.op.quality.mapper.QcCheckTaskIncomeMapper; -import com.op.quality.mapper.QcCheckTaskProduceMapper; import com.op.quality.service.IQcCheckBpService; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -67,7 +65,29 @@ public class QcCheckBpServiceImpl implements IQcCheckBpService { task.setOrderType("bp"); task.setRemark(params.getRemark()); task.setRemarkCode(params.getBadItem()); + task.setIncomeBatchNo(params.getIncomeBatchNo()); qcCheckBpMapper.insertCheckBpResult(task); + + List defectList = new ArrayList<>(); + + for (QcCheckBpDefect item : params.getDefectList()) { + QcCheckTaskDefect defect = new QcCheckTaskDefect(); + defect.setRecordId(IdUtils.fastSimpleUUID()); + defect.setDefectCode(item.getDefectCode()); + defect.setDefectSubclass(item.getDefectSubclass()); + defect.setCreateBy(params.getCreateBy()); + defect.setFactoryCode("ds_"+params.getFactoryCode()); + defect.setBelongTo(task.getRecordId()); + defect.setOkQuality(new BigDecimal(params.getCheckNum())); + defect.setNoOkQuality(new BigDecimal(item.getBadNum())); + defect.setClassId(item.getBadItem()); + defectList.add(defect); + } + + if (!CollectionUtils.isEmpty(defectList)) { + qcCheckBpMapper.batchInsertCheckBpDefects(defectList); + } + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java index e34673924..4ba3bed2f 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java @@ -1769,6 +1769,70 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { return dtos; } + @Override + @DS("#header.poolName") + public List> getMonthOfDataDefectV2(QcStaticTable qcStaticTable) { + List bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable); + List list = qcStaticTableMapper.getBPDefectList(qcStaticTable); + List> result = new ArrayList<>(); + for (String defect : bpDefects){ + Map map = new HashMap<>(); + map.put("defect",defect); + int count = 0; + for (QcCheckTaskDefect data : list){ + if (defect.equals(data.getDefectSubclass())){ + map.put(data.getAttr1(),data.getAttr2()); + if (StringUtils.isNotBlank(data.getAttr2())){ + count = count + Integer.parseInt(data.getAttr2()); + } + } + } + map.put("count", Integer.toString(count)); + result.add(map); + } + int count1 = 0; + int count2 = 0; + Map map1 = new HashMap<>(); + map1.put("defect","合计"); + Map map2 = new HashMap<>(); + map2.put("defect","抽样数"); + for (QcCheckTaskDefect data : list){ + if ("合计".equals(data.getDefectSubclass())){ + map1.put(data.getAttr1(),data.getAttr2()); + map2.put(data.getAttr1(),data.getAttr3()); + if (StringUtils.isNotBlank(data.getAttr2())){ + count1 = count1 + Integer.parseInt(data.getAttr2()); + } + if (StringUtils.isNotBlank(data.getAttr3())){ + count2 = count2 + Integer.parseInt(data.getAttr3().replace(".00","")); + } + } + } + map1.put("count", Integer.toString(count1)); + map2.put("count", Integer.toString(count2)); + result.add(map1); + result.add(map2); + + + return result; + } + + @Override + @DS("#header.poolName") + public List> getDefectItemDataV2(QcStaticTable qcStaticTable) { + List> dtos = new ArrayList<>(); + //获取不良种类 + List bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable); + List monthList = qcStaticTableMapper.getBPDefectMothMapV2(qcStaticTable); + qcStaticTable.setYearMonth(null); + List totalList = qcStaticTableMapper.getBPDefectMothMapV2(qcStaticTable); + + dtos.add(computerBpDefectsRate(monthList,"num","不良数", bpDefects)); + dtos.add(computerBpDefectsRate(monthList,"rate","不良比例", bpDefects)); + dtos.add(computerBpDefectsRate(totalList,"rate","累计不良比例", bpDefects)); + return dtos; + } + @Override @DS("#header.poolName") public List getDefectItemTitle(QcStaticTable qcStaticTable) { @@ -1888,6 +1952,80 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { return dto; } + @Override + @DS("#header.poolName") + public Map getDefectItemLineV2(QcStaticTable qcStaticTable) { + Map result = new HashMap<>(); + + //获取不良种类 + List bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable); + result.put("xData",bpDefects); + + //当前查询月份的不良率 + List monthList = qcStaticTableMapper.getBPDefectMothMapV2(qcStaticTable); + //计算总不良率 + //不良数 + BigDecimal noOkQty = new BigDecimal(0); + //样品数 + BigDecimal sampleQty = new BigDecimal(0); + for (QcCheckTaskDefect item : monthList){ + if (StringUtils.isNotBlank(item.getAttr2())){ + noOkQty = noOkQty.add(new BigDecimal(item.getAttr2())); + } + if (StringUtils.isNotBlank(item.getAttr3())){ + sampleQty = sampleQty.add(new BigDecimal(item.getAttr3())); + } + } + //不良率 + BigDecimal noOkRate = new BigDecimal(0); + if (sampleQty.compareTo(BigDecimal.ZERO) > 0){ + noOkRate = noOkQty.divide(sampleQty,4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)); + } + //合格率 + BigDecimal okRate = new BigDecimal(100).subtract(noOkRate); + result.put("noOkQty",noOkQty); + result.put("sampleQty",sampleQty); + result.put("noOkRate",noOkRate); + result.put("okRate",okRate); + + List yDataLeft = new ArrayList<>(); + for (String defect : bpDefects) { + boolean flag = true; + for (QcCheckTaskDefect item : monthList){ + if (defect.equals(item.getDefectSubclass())){ + yDataLeft.add(item.getAttr1()); + flag = false; + break; + } + } + if (flag){ + yDataLeft.add("0"); + } + } + result.put("yDataLeft",yDataLeft); + + + //累计不良率 + qcStaticTable.setYearMonth(null); + List totalList = qcStaticTableMapper.getBPDefectMothMapV2(qcStaticTable); + List yDataRight = new ArrayList<>(); + for (String defect : bpDefects) { + boolean flag = true; + for (QcCheckTaskDefect item : totalList){ + if (defect.equals(item.getDefectSubclass())){ + yDataRight.add(item.getAttr1()); + flag = false; + break; + } + } + if (flag){ + yDataRight.add("0"); + } + } + result.put("yDataRight",yDataRight); + return result; + } + @Override @DS("#header.poolName") public List> getDefectItemDataPC(QcStaticTable qcStaticTable) { @@ -1933,6 +2071,55 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { return dtos; } + + + @Override + @DS("#header.poolName") + public List> getDefectItemDataPCV2(QcStaticTable qcStaticTable) { + List> dtos = new ArrayList<>(); + //获取不良种类 + List bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable); + List monthList = qcStaticTableMapper.getBPDefectMothPCMapV2(qcStaticTable); + qcStaticTable.setYearMonth(null); + List totalList = qcStaticTableMapper.getBPDefectMothPCMapV2(qcStaticTable); + + dtos.add(computerBpDefectsRate(monthList,"num","不良数", bpDefects)); + dtos.add(computerBpDefectsRate(monthList,"rate","不良比例", bpDefects)); + dtos.add(computerBpDefectsRate(totalList,"rate","累计不良比例", bpDefects)); + return dtos; + } + + //计算 + private Map computerBpDefectsRate(List list, String type, String title, List bpDefects ){ + Map result= new HashMap<>(); + result.put("dataType",title); + int i = 0; + for (String defect : bpDefects) { + for (QcCheckTaskDefect item : list){ + if (defect.equals(item.getDefectSubclass())){ + if (StringUtils.isNotBlank(item.getAttr1())){ + if ("rate".equals(type)){ + result.put("item"+i, item.getAttr1()); + }else { + if (StringUtils.isNotBlank(item.getAttr2())){ + result.put("item"+i,new BigDecimal(item.getAttr1()).divide(new BigDecimal(item.getAttr2()),2,RoundingMode.HALF_UP).toString()); + }else { + result.put("item"+i,"100"); + } + } + + }else { + result.put("item"+i,"0"); + } + break; + } + } + i++; + } + + return result; + } + @Override @DS("#header.poolName") public QcStaticTable getDefectItemLinePC(QcStaticTable qcStaticTable) { @@ -2001,6 +2188,81 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { return dto; } + @Override + @DS("#header.poolName") + public Map getDefectItemLinePCV2(QcStaticTable qcStaticTable) { + Map result = new HashMap<>(); + + //获取不良种类 + List bpDefects = qcStaticTableMapper.getBpDefects(qcStaticTable); + result.put("xData",bpDefects); + + //当前查询月份的不良率 + List monthList = qcStaticTableMapper.getBPDefectMothPCMapV2(qcStaticTable); + //计算总不良率 + //不良数 + BigDecimal noOkQty = new BigDecimal(0); + //样品数 + BigDecimal sampleQty = new BigDecimal(0); + for (QcCheckTaskDefect item : monthList){ + if (StringUtils.isNotBlank(item.getAttr2())){ + noOkQty = noOkQty.add(new BigDecimal(item.getAttr2())); + } + if (StringUtils.isNotBlank(item.getAttr3())){ + sampleQty = sampleQty.add(new BigDecimal(item.getAttr3())); + } + } + //不良率 + BigDecimal noOkRate = new BigDecimal(0); + if (sampleQty.compareTo(BigDecimal.ZERO) > 0){ + noOkRate = noOkQty.divide(sampleQty,4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)); + } + //合格率 + BigDecimal okRate = new BigDecimal(100).subtract(noOkRate); + result.put("noOkQty",noOkQty); + result.put("sampleQty",sampleQty); + result.put("noOkRate",noOkRate); + result.put("okRate",okRate); + + List yDataLeft = new ArrayList<>(); + for (String defect : bpDefects) { + boolean flag = true; + for (QcCheckTaskDefect item : monthList){ + if (defect.equals(item.getDefectSubclass())){ + yDataLeft.add(item.getAttr1()); + flag = false; + break; + } + } + if (flag){ + yDataLeft.add("0"); + } + } + result.put("yDataLeft",yDataLeft); + + + //累计不良率 + qcStaticTable.setYearMonth(null); + List totalList = qcStaticTableMapper.getBPDefectMothPCMapV2(qcStaticTable); + List yDataRight = new ArrayList<>(); + for (String defect : bpDefects) { + boolean flag = true; + for (QcCheckTaskDefect item : totalList){ + if (defect.equals(item.getDefectSubclass())){ + yDataRight.add(item.getAttr1()); + flag = false; + break; + } + } + if (flag){ + yDataRight.add("0"); + } + } + result.put("yDataRight",yDataRight); + return result; + } + + @Override @DS("#header.poolName") public List getCpDateTitle(QcStaticTable qcStaticTable) { diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckBpMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckBpMapper.xml index 90599297a..6815f22c4 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckBpMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckBpMapper.xml @@ -99,4 +99,17 @@ + + insert into qc_check_task_defect( + record_id, defect_code, defect_subclass, create_by, create_time, + factory_code, belong_to, ok_quality, noOk_quality, class_id + ) values + + ( + #{item.recordId}, #{item.defectCode}, #{item.defectSubclass}, #{item.createBy}, GETDATE(), + #{item.factoryCode}, #{item.belongTo}, #{item.okQuality}, #{item.noOkQuality},#{item.classId} + ) + + + \ No newline at end of file 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 1cca932bf..3f55a007d 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 @@ -359,7 +359,12 @@ select qct.record_id, qct.check_no, qct.income_batch_no, qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status, - qct.check_time, qct.check_result, qct.check_type,'首件检验' check_name, + qct.check_time, qct.check_result, qct.check_type, + CASE + WHEN 'checkTypeSC' = #{checkType} THEN '首件检验' + WHEN 'checkTypeCPPC' = #{checkType} THEN '批次成品检验' + ELSE '' + END check_name, CONVERT(varchar(10),qct.create_time, 120) createTimeStr, qct.confirm,qct.confirm_man_name,qct.check_man_code ,qct.check_man_name from qc_check_task qct @@ -386,44 +391,8 @@ and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120) and CONVERT(varchar(30),qct.create_time, 120) >= #{checkTimeStart} and #{checkTimeEnd} > CONVERT(varchar(30),qct.create_time, 120) - and qct.check_type = 'checkTypeSC' and qct.del_flag = '0' + and qct.check_type in ('checkTypeSC','checkTypeCPPC') and qct.del_flag = '0' - union ALL - select - '','','', - qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, - qct.supplier_code, qct.supplier_name,CONVERT(varchar(10), qct.income_time, 120) income_time,'','', - null,'', qct.check_type,'巡检检验' check_name,CONVERT(varchar(10),qct.create_time, 120) createTimeStr, - qct.confirm,qct.confirm_man_name,'','' - from qc_check_task qct - - and qct.check_no = #{checkNo} - and qct.income_batch_no = #{incomeBatchNo} - and qct.order_no = #{orderNo} - and qct.material_code = #{materialCode} - and qct.material_name like concat('%', - #{materialName}, '%') - - and qct.supplier_code = #{supplierCode} - and qct.supplier_name like concat('%', - #{supplierName}, '%') - - and qct.check_loc = #{checkLoc} - and qct.check_status = #{checkStatus} - and qct.check_man_code = #{checkManCode} - and qct.check_man_name like concat('%', - #{checkManName}, '%') - - and qct.check_result = #{checkResult} - and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart} - and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120) - and CONVERT(varchar(30),qct.create_time, 120) >= #{checkTimeStart} - and #{checkTimeEnd} > CONVERT(varchar(30),qct.create_time, 120) - and qct.check_type = 'checkTypeSCXJ' and qct.del_flag = '0' - - GROUP BY qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, - qct.supplier_code, qct.supplier_name,CONVERT(varchar(10), qct.income_time, 120), qct.check_type,CONVERT(varchar(10),qct.create_time, 120), - qct.confirm,qct.confirm_man_name ) t left join pro_order_workorder pow on pow.workorder_code = t.order_no where pow.del_flag = '0' diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml index 32ed4fff6..08d737d29 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcStaticTableMapper.xml @@ -1412,4 +1412,79 @@ where pow.workorder_code = #{orderNo} + + + + + +