产品转换/完产清线点检表等逻辑修改

master
Yangwl 2 months ago
parent cab780b4df
commit 20cf1b58a6

@ -84,7 +84,16 @@ public class MesInspectionReport extends BaseEntity {
private String clearLine;
//班组
private String team;
//班次
private String shiftId;
public String getShiftId() {
return shiftId;
}
public void setShiftId(String shiftId) {
this.shiftId = shiftId;
}
public void setId(String id) { this.id = id; }
public String getId() { return id; }

@ -33,7 +33,7 @@ public class MesInspectionReportServiceImpl implements IMesInspectionReportServi
public List selectSelfMutualInspectionList(MesInspectionReport mesInspectionReport) {
//mesInspectionReport.setReportName("ConversionReport");
List<MesInspectionReport> list = mesInspectionReportMapper.selectSelfMutualInspectionList(mesInspectionReport);
//1.查询左侧边 存入
//1.查询左侧边列存入
String param = "";
if(mesInspectionReport.getReportName().equals("ConversionReport")){
param = "self_mutual_inspection";
@ -57,7 +57,6 @@ public class MesInspectionReportServiceImpl implements IMesInspectionReportServi
dto.setProjectName(project.getProjectName());//项目名
dto.setProjectCode(project.getProjectCode());//项目编码
dynamicTime.put("开始-结束",dto);
if(CollectionUtils.isEmpty(timeArray)){
dynamicTime.put("", new MesInspectionReport());
dynamicTime.put(" ", new MesInspectionReport());

@ -32,10 +32,10 @@
<result property="timeArray" column="timeArray"/>
<result property="equipmentCode" column="equipment_code"/>
<result property="equipmentName" column="equipment_name"/>
<result property="projectName" column="project_name"/>
<result property="lineName" column="line_name"/>
<result property="workorderId" column="workorder_id"/>
<result property="shiftId" column="shiftId"/>
</resultMap>
<select id="selectSelfMutualInspectionList" resultMap="MesInspectionReportResult" parameterType="MesInspectionReport">
@ -92,8 +92,16 @@
and mtsd.del_flag = '0'
and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate})
and mts.line_code = #{lineCode}
and mts.report_name = #{reportName}
and mtsd.table_line is not null
<choose>
<when test="shiftId != null">
AND mts.report_name = CONCAT(#{reportName}, (SELECT Shift_Desc FROM base_shifts_t WHERE Shift_Id = #{shiftId}))
</when>
<otherwise>
AND mts.report_name = #{reportName}
</otherwise>
</choose>
</where>
group by mtsd.check_time_s , mtsd.check_time_e , mtsd.table_line
order by mtsd.check_time_s
@ -109,7 +117,14 @@
and mtsd.del_flag = '0'
and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate})
and mts.line_code = #{lineCode}
and mts.report_name = #{reportName}
<choose>
<when test="shiftId != null">
AND mts.report_name = CONCAT(#{reportName}, (SELECT Shift_Desc FROM base_shifts_t WHERE Shift_Id = #{shiftId}))
</when>
<otherwise>
AND mts.report_name = #{reportName}
</otherwise>
</choose>
group by mtsd.remark
order by mtsd.remark
</select>
@ -127,14 +142,23 @@
mts.create_by
from mes_table_self mts
where 1=1
<if test="reportName == 'CheckReport'">
and report_name = #{reportName}
<choose>
<when test="shiftId != null and reportName = 'CheckReport'">
and report_name = CONCAT(#{reportName}, (SELECT Shift_Desc FROM base_shifts_t WHERE Shift_Id = #{shiftId}))
and line_code = #{lineCode}
and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate})
</if>
<if test="reportName != 'CheckReport'">
</when>
<when test="shiftId = null and reportName = 'CheckReport'">
AND mts.report_name = #{reportName}
and line_code = #{lineCode}
and CONVERT(date, mts.check_date) = CONVERT(date,#{checkDate})
</when>
<otherwise>
and id = #{id}
</if>
</otherwise>
</choose>
and del_flag = '0'
</select>
@ -149,23 +173,31 @@
select
mts.id,
pow.workorder_id,
mts.product_name,
mts.product_code
pow.product_name,
pow.product_code
from mes_table_self mts
left join pro_order_workorder pow on mts.product_code = pow.product_code
left join pro_order_workorder pow on mts.line_code = pow.workorder_name
LEFT JOIN base_shifts_t bst ON pow.shift_id = bst.Shift_Id
where DATEDIFF(DAY, mts.check_date, #{checkDate}) = 0
and DATEDIFF(DAY, pow.product_date, #{checkDate}) = 0
and mts.del_flag = '0'
and mts.product_code is not null AND mts.product_code!= ''
and pow.del_flag = '0'
and mts.report_name = #{reportName}
and pow.parent_order = '0'
<choose>
<when test="shiftId != null">
AND mts.report_name = CONCAT(#{reportName}, bst.Shift_Desc)
</when>
<otherwise>
AND mts.report_name = #{reportName}
</otherwise>
</choose>
and mts.line_code = #{lineCode}
and pow.workorder_name = #{lineCode}
group by
mts.id,
pow.workorder_id,
mts.product_name,
mts.product_code
pow.product_name,
pow.product_code
</select>
<select id="getDataCodeList" resultType ="com.op.mes.domain.ProOrderWorkorder" parameterType="MesInspectionReport">

Loading…
Cancel
Save