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 eb6cf52b7..a95879ae8 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 @@ -750,7 +750,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { return 0; } int reportNum = mesReportWorkMapper.deleteReport(reportCode); - int consumeNum = mesReportWorkMapper.deleteReportConsume(reportCode); + //int consumeNum = mesReportWorkMapper.deleteReportConsume(reportCode); return reportNum; } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportInventoryController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportInventoryController.java index ae7745138..a709f34bc 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportInventoryController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportInventoryController.java @@ -67,18 +67,18 @@ public class QcCheckReportInventoryController extends BaseController { * 导出来料检验列表 */ @RequiresPermissions("quality:inventoryReport:export") - @Log(title = "来料检验", businessType = BusinessType.EXPORT) + @Log(title = "库存检验报告明细", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) { //默认时间范围T 00:00:00~T+1 00:00:00 - if (StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())) { - qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate() + " 00:00:00");//start + if (StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())) { + qcCheckReportIncome.setCheckTimeStart(DateUtils.getDate() + " 00:00:00");//start LocalDate date = LocalDate.now(); LocalDate dateEnd = date.plusDays(1); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - String dateEndStr = dtf.format(dateEnd) + " 00:00:00"; - qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end + String dateEndStr = dtf.format(dateEnd) + " 23:59:59"; + qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end } // if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){ @@ -88,7 +88,7 @@ public class QcCheckReportInventoryController extends BaseController { List list = qcCheckReportInventoryService.selectQcCheckReportIncomeList(qcCheckReportIncome); ExcelUtil util = new ExcelUtil(QcCheckReportIncome.class); - util.exportExcel(response, list, "来料检验数据"); + util.exportExcel(response, list, "库存检验报告明细"); } /** diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java index e7c92a71b..757f10df2 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java @@ -59,7 +59,7 @@ public class QcCheckReportProduceController extends BaseController { * 导出来料检验列表 */ @RequiresPermissions("quality:produceReport:export") - @Log(title = "来料检验", businessType = BusinessType.EXPORT) + @Log(title = "生产过程检验报告明细导出", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) { @@ -80,7 +80,7 @@ public class QcCheckReportProduceController extends BaseController { List list = qcCheckReportProduceService.selectQcCheckReportIncomeList(qcCheckReportIncome); ExcelUtil util = new ExcelUtil(QcCheckReportIncome.class); - util.exportExcel(response, list, "来料检验数据"); + util.exportExcel(response, list, "生产过程检验报告明细"); } /** 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 d061c259a..07f499be2 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 @@ -714,6 +714,9 @@ public class QcStaticTableController extends BaseController { //表格结构数据 ArrayList excelCols = new ArrayList<>(); excelCols.add(new ExcelCol("CPK品类", "cpkTypeName", 30)); + excelCols.add(new ExcelCol("线体名称", "lineName", 30)); + excelCols.add(new ExcelCol("检验节点", "checkTypeName", 30)); + excelCols.add(new ExcelCol("检测项", "ruleName", 30)); for (int n = 0; n < title2Cols.size(); n++) { excelCols.add(new ExcelCol(title2Cols.get(n), "date" + (n+1), 20)); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java index fe108425e..5c55c6f27 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java @@ -70,13 +70,13 @@ public class QcCheckReportIncome extends BaseEntity { /** * 供应商编码 */ - @Excel(name = "供应商编码") + @Excel(name = "供应商/车间编码") private String supplierCode; /** * 供应商名称 */ - @Excel(name = "供应商名称") + @Excel(name = "供应商/车间名称") private String supplierName; /** diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java index b74b119fd..c35490f02 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcStaticTable.java @@ -118,6 +118,33 @@ public class QcStaticTable extends BaseEntity { private List columns2; private String incomeTimeStart; private String incomeTimeEnd; + private String lineCode; + private String lineName; + private String checkTypeName; + + public String getCheckTypeName() { + return checkTypeName; + } + + public void setCheckTypeName(String checkTypeName) { + this.checkTypeName = checkTypeName; + } + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getLineName() { + return lineName; + } + + public void setLineName(String lineName) { + this.lineName = lineName; + } public String getEquipmentName() { return equipmentName; 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 cf7281e5b..dd389615d 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 @@ -1281,11 +1281,15 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { colNameArray = this.getMonthByMonth(qcCPKInfo.getYmArrayStart(),qcCPKInfo.getYmArrayEnd()); mxMapData = qcStaticTableMapper.getDLData(qcCPKInfo); } + + // List lines = qcStaticTableMapper.getProdLineList() + List mapData = new ArrayList(); List echartData = new ArrayList<>(); HashMap dmap = null; ChartDTO edata = null; for(QcCPKInfo cpkT:cpkTypeList){ + dmap = new HashMap(); edata = new ChartDTO(); @@ -1296,54 +1300,67 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { double USL = cpkT.getUpperDiff().doubleValue(); double LSL = cpkT.getDownDiff().doubleValue(); dmap.put("cpkTypeName",cpkT.getCpkTypeName()); - int monthNum = 0;//有数据的月份 - BigDecimal monthSum = BigDecimal.ZERO; - for(int m=0;m actArray0 = Arrays.asList(actArrayStr.split(",")); - List actArray = new ArrayList<>(); - for(String avg:actArray0){ - if(avg.matches(".*\\..*\\..*")){ - actArray.add(avg.substring(2)); - }else{ - actArray.add(avg); + + //for(ProLineDTO proLineDTO:lines){ + int monthNum = 0;//有数据的月份 + BigDecimal monthSum = BigDecimal.ZERO; + for(int m=0;m actArray0 = Arrays.asList(actArrayStr.split(",")); + List actArray = new ArrayList<>(); + for(String avg:actArray0){ + if(avg.matches(".*\\..*\\..*")){ + actArray.add(avg.substring(2)); + }else{ + actArray.add(avg); + } } + double[] data = actArray.stream() + .mapToDouble(Double::parseDouble) // 将String转换为double + .toArray(); // 转换为double数组 ; + + double cpk = calculateCpk(data,USL,LSL); + BigDecimal cpkVal = new BigDecimal(Double.toString(cpk)).setScale(2, BigDecimal.ROUND_HALF_UP); + String index = (m+1)+""; + dmap.put("date"+index,cpkVal); + monthSum = monthSum.add(cpkVal); + ++monthNum; + + serisedata.add(cpkVal.doubleValue()); + + dmap.put("lineName",act.getLineName()); + dmap.put("checkTypeName",act.getCheckTypeName()); + dmap.put("ruleName",act.getRuleName()); + }else{ + String index = (m+1)+""; + dmap.put("date"+index,"0"); + dmap.put("cpkAvg","0"); + + dmap.put("lineName",""); + dmap.put("checkTypeName",""); + dmap.put("ruleName",""); + + serisedata.add(0.0); } - double[] data = actArray.stream() - .mapToDouble(Double::parseDouble) // 将String转换为double - .toArray(); // 转换为double数组 ; - double cpk = calculateCpk(data,USL,LSL); - BigDecimal cpkVal = new BigDecimal(Double.toString(cpk)).setScale(2, BigDecimal.ROUND_HALF_UP); - String index = (m+1)+""; - dmap.put("date"+index,cpkVal); - monthSum = monthSum.add(cpkVal); - ++monthNum; - serisedata.add(cpkVal.doubleValue()); - }else{ - String index = (m+1)+""; - dmap.put("date"+index,"0"); - dmap.put("cpkAvg","0"); - - serisedata.add(0.0); } - } - edata.setData(serisedata); + edata.setData(serisedata); - if(monthNum>0){ - BigDecimal avgBD = monthSum.divide(new BigDecimal(monthNum),2,RoundingMode.HALF_UP); - dmap.put("cpkAvg",avgBD.toString()); - } + if(monthNum>0){ + BigDecimal avgBD = monthSum.divide(new BigDecimal(monthNum),2,RoundingMode.HALF_UP); + dmap.put("cpkAvg",avgBD.toString()); + } - mapData.add(dmap); - echartData.add(edata); + mapData.add(dmap); + echartData.add(edata); + //} } resultDto.setTableData(mapData); resultDto.setEchartData(echartData); diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml index 390049f00..9ac56ced3 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml @@ -78,7 +78,7 @@ and qct.check_status = #{checkStatus} and qct.check_man_code = #{checkManCode} and qct.check_man_name like concat('%',#{checkManName}, '%') - and qct.del_flag = '0' and pow.del_flag = '0' + and qct.del_flag = '0' and qct.check_result = #{checkResult} and qct.status = #{status} and qct.del_flag = #{delFlag} @@ -88,6 +88,7 @@ and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120) and q.type_code = #{typeCode} and qct.check_type = #{checkType} + and pow.del_flag = '0' 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 9a3af6f34..402be5e3b 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 @@ -357,7 +357,7 @@ 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, CONVERT(varchar(10),qct.create_time, 120) createTimeStr, - qct.confirm,qct.confirm_man_name + qct.confirm,qct.confirm_man_name,qct.check_man_code ,qct.check_man_name from qc_check_task qct and qct.check_no = #{checkNo} @@ -390,7 +390,7 @@ 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 + qct.confirm,qct.confirm_man_name,'','' from qc_check_task qct and qct.check_no = #{checkNo} 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 d3733fc05..8f9446c71 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 @@ -467,7 +467,7 @@ @@ -947,7 +950,7 @@