diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportProduction.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportProduction.java index abcfa9fd..667d3b1c 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportProduction.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportProduction.java @@ -43,6 +43,8 @@ public class MesReportProduction extends BaseEntity { private String productSpc; @Excel(name = "工厂编码") private String unit; + private String productDateStart; + private String productDateEnd; public String getFactoryCode() { return factoryCode; @@ -147,4 +149,20 @@ public class MesReportProduction extends BaseEntity { public void setUnit(String unit) { this.unit = unit; } + + public String getProductDateStart() { + return productDateStart; + } + + public void setProductDateStart(String productDateStart) { + this.productDateStart = productDateStart; + } + + public String getProductDateEnd() { + return productDateEnd; + } + + public void setProductDateEnd(String productDateEnd) { + this.productDateEnd = productDateEnd; + } } 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 b0f42dc8..595812c5 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 @@ -133,26 +133,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sf1.factory_name carName, sf.factory_code machineCode, sf.factory_name machineName, - pow.order_code orderCode, - pow.product_code productCode, - pow.product_name productName, + mrw.product_code productCode, + mrw.product_name productName, mrw.quantity, mrw.quantity_feedback quantityFeedback, mrw.spec productSpc, mrw.unit from mes_report_work mrw - left join pro_order_workorder pow on mrw.workorder_code = pow.workorder_code - left join sys_factory sf on sf.factory_code = pow.prod_line_code + left join sys_factory sf on sf.factory_code = mrw.machine_code left join sys_factory sf1 on sf.parent_id = sf1.factory_id left join sys_factory sf2 on sf1.parent_id = sf2.factory_id - where 1=1 + where + 1=1 and sf.factory_name like concat('%', #{machineName}, '%') and sf1.factory_name like concat('%', #{carName}, '%') and sf2.factory_name like concat('%', #{factoryName}, '%') and pow.product_code like concat('%', #{productCode}, '%') and pow.product_name like concat('%', #{productName}, '%') - and pow.order_code like concat('%', #{orderCode}, '%') + + and CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart} and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120) diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index 6b1d6e2c..293ce3f1 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -91,8 +91,8 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { prodLineName += equipMap.get(key).getLabel()+","; } workorder.setProdLineName(prodLineName); - // 通过设备code查询出机型名称 - workorder.setProdLineCode(proOrderMapper.selectProdLineName(workorder.getProdLineCode())); +// // 通过设备code查询出机型名称 +// workorder.setProdLineCode(proOrderMapper.selectProdLineName(workorder.getProdLineCode())); // 通过工艺编码code查询出机型名称 workorder.setRouteName(proOrderWorkorderMapper.selectRouteNameByRouteCode(workorder.getRouteCode())); } @@ -646,7 +646,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { // 通过班次id查询班次名称 String shiftDesc = proOrderMapper.selectShiftNameById(proOrderWorkorder.getShiftId()); - JSONArray codeArray = JSONArray.parseArray(proOrderWorkorder.getProdLineName()); + JSONArray codeArray = JSONArray.parseArray(proOrderWorkorder.getProdLineCode()); String[][] array = new String[codeArray.size()][2]; for(int c1=0;c1