成型机生产报表优化

master
shaoyong 9 months ago
parent a05ea11a60
commit 21a01669d2

@ -20,6 +20,7 @@ public class MesMachineReport extends BaseEntity {
private String productDateStart; //查询开始时间 private String productDateStart; //查询开始时间
private String productDateEnd; //查询结束时间 private String productDateEnd; //查询结束时间
private String pduCode; //数据唯一键 private String pduCode; //数据唯一键
private String shiftId; //班次
private List<DynamicColumnVo> productNames; //产品名称列表 private List<DynamicColumnVo> productNames; //产品名称列表
@ -94,4 +95,12 @@ public class MesMachineReport extends BaseEntity {
public void setPduCode(String pduCode) { public void setPduCode(String pduCode) {
this.pduCode = pduCode; this.pduCode = pduCode;
} }
public String getShiftId() {
return shiftId;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
} }

@ -622,6 +622,8 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
} }
private List<String> getDateInterval(String start, String end) { private List<String> getDateInterval(String start, String end) {
start = start.substring(0,10);
end = end.substring(0,10);
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
List<String> dateList = Lists.newArrayList(); List<String> dateList = Lists.newArrayList();

@ -766,6 +766,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) mt ) mt
LEFT JOIN pro_order_workorder pow ON pow.workorder_id = mt.OrderCode LEFT JOIN pro_order_workorder pow ON pow.workorder_id = mt.OrderCode
WHERE pow.order_code IS NOT NULL WHERE pow.order_code IS NOT NULL
<if test="shiftId != null and shiftId != ''">
and pow.shift_id = #{shiftId}
</if>
<if test="productCode != null and productCode != ''"> <if test="productCode != null and productCode != ''">
and pow.product_code like concat('%', #{productCode}, '%') and pow.product_code like concat('%', #{productCode}, '%')
</if> </if>

Loading…
Cancel
Save