修改:同步任务异常信息优化

This commit is contained in:
2026-02-03 14:35:32 +08:00
parent 0ee4b469b2
commit 61001d680a
4 changed files with 36 additions and 35 deletions

View File

@@ -1,4 +1,5 @@
package com.sdm.outbridge.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -12,7 +13,7 @@ import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "v_project_station_exception_to_DM", autoResultMap = true)
@TableName(value = "v_ecn_info_DM", autoResultMap = true)
@Schema(description = "项目——工位——异常信息视图")
public class LyricVProjectStationExcepTionToDM {
@@ -21,35 +22,35 @@ public class LyricVProjectStationExcepTionToDM {
private String projectNum;
@Schema(description = "异常编号")
@TableField(value = "exception_num")
private String exceptionNum;
@TableField(value = "ecn_code")
private String ecnCode;
@Schema(description = "异常描述")
@TableField(value = "exception_desc")
private String exceptionDesc;
@TableField(value = "question_description")
private String questionDescription;
@Schema(description = "工位")
@TableField(value = "station_num")
private String stationNum;
@Schema(description = "工位")
@TableField(value = "station_code")
private String stationCode;
@Schema(description = "工位名称")
@TableField(value = "station_name")
private String stationName;
@Schema(description = "异常类别")
@TableField(value = "exception_type")
private String exceptionType;
@Schema(description = "当前责任人")
@TableField(value = "current_responsible_person")
private String currentResponsiblePerson;
@Schema(description = "异常提出者")
@TableField(value = "exception_proposer")
private String exceptionProposer;
@TableField(value = "question_proposer")
private String questionProposer;
@Schema(description = "异常类别")
@TableField(value = "exception_category")
private String exceptionCategory;
@Schema(description = "异常等级")
@TableField(value = "exception_level")
private String exceptionLevel;
@TableField(value = "abnormal_level")
private String abnormalLevel;
@Schema(description = "工号")
@TableField(value = "jobnum")
private String jobNum;
}

View File

@@ -5,21 +5,21 @@
<select id="queryExceptionsByProjectAndStation"
resultType="com.sdm.outbridge.entity.LyricVProjectStationExcepTionToDM">
SELECT
project_num,
exception_num,
exception_desc,
station_num,
station_name,
exception_type,
current_responsible_person,
exception_proposer,
exception_level
FROM LyricVProjectStationExcepTionToDM
project_num projectNum,
ecn_code ecnCode,
question_description questionDescription,
station_code stationCode,
station_name stationName,
question_proposer questionProposer,
exception_category exceptionCategory,
abnormal_level abnormalLevel,
jobnum jobNum
FROM v_ecn_info_DM
WHERE 1=1
AND (
<foreach collection="list" item="task" separator="OR">
<!-- 核心条件projectNum = tag1Code 且 stationNum = tag5Code -->
(project_num = #{task.tag1Code} AND station_num = #{task.tag5Code})
<!-- 核心条件project_num = tag1Code 且 station_code = tag5Code -->
(project_num = #{task.tag1Code} AND station_code = #{task.tag5Code})
</foreach>
)
</select>