Browse Source

add processedDataName for TDataProcess

allen 11 months ago
parent
commit
9311a43d4b

+ 22 - 16
pdaaphm-admin/src/main/java/com/pdaaphm/system/domain/TDataProcess.java

@@ -32,6 +32,8 @@ public class TDataProcess extends BaseEntity
     @Excel(name = "被处理数据id")
     private Long processedDataId;
 
+    private String processedDataName;
+
     /** 处理结果数据id */
     @Excel(name = "处理结果数据id")
     private Long resultDataId;
@@ -136,23 +138,27 @@ public class TDataProcess extends BaseEntity
         return log;
     }
 
+    public String getProcessedDataName() {
+        return processedDataName;
+    }
+
+    public void setProcessedDataName(String processedDataName) {
+        this.processedDataName = processedDataName;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("processType", getProcessType())
-            .append("processAlgId", getProcessAlgId())
-            .append("processedDataId", getProcessedDataId())
-            .append("resultDataId", getResultDataId())
-            .append("processStatus", getProcessStatus())
-            .append("startTime", getStartTime())
-            .append("endTime", getEndTime())
-            .append("log", getLog())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return "TDataProcess{" +
+                "id=" + id +
+                ", processType='" + processType + '\'' +
+                ", processAlgId=" + processAlgId +
+                ", processedDataId=" + processedDataId +
+                ", processedDataName='" + processedDataName + '\'' +
+                ", resultDataId=" + resultDataId +
+                ", processStatus='" + processStatus + '\'' +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", log='" + log + '\'' +
+                '}';
     }
 }

+ 28 - 10
pdaaphm-admin/src/main/resources/mapper/system/TDataProcessMapper.xml

@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="processType"    column="process_type"    />
         <result property="processAlgId"    column="process_alg_id"    />
         <result property="processedDataId"    column="processed_data_id"    />
+        <result property="processedDataName"    column="processed_data_name"    />
         <result property="resultDataId"    column="result_data_id"    />
         <result property="processStatus"    column="process_status"    />
         <result property="startTime"    column="start_time"    />
@@ -22,27 +23,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTDataProcessVo">
-        select id, process_type, process_alg_id, processed_data_id, result_data_id, process_status, start_time, end_time, log, create_by, create_time, update_by, update_time, remark from t_data_process
+        SELECT
+            dp.id,
+            dp.process_type,
+            dp.process_alg_id,
+            dp.processed_data_id,
+            d.data_name processed_data_name,
+            dp.result_data_id,
+            dp.process_status,
+            dp.start_time,
+            dp.end_time,
+            dp.log,
+            dp.create_by,
+            dp.create_time,
+            dp.update_by,
+            dp.update_time,
+            dp.remark
+        FROM
+            t_data_process dp LEFT JOIN t_data d on dp.processed_data_id = d.id
     </sql>
 
     <select id="selectTDataProcessList" parameterType="TDataProcess" resultMap="TDataProcessResult">
         <include refid="selectTDataProcessVo"/>
         <where>  
-            <if test="processType != null  and processType != ''"> and process_type = #{processType}</if>
-            <if test="processAlgId != null "> and process_alg_id = #{processAlgId}</if>
-            <if test="processedDataId != null "> and processed_data_id = #{processedDataId}</if>
-            <if test="resultDataId != null "> and result_data_id = #{resultDataId}</if>
-            <if test="processStatus != null  and processStatus != ''"> and process_status = #{processStatus}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
-            <if test="log != null  and log != ''"> and log = #{log}</if>
+            <if test="processType != null  and processType != ''"> and dp.process_type = #{processType}</if>
+            <if test="processAlgId != null "> and dp.process_alg_id = #{processAlgId}</if>
+            <if test="processedDataId != null "> and dp.processed_data_id = #{processedDataId}</if>
+            <if test="resultDataId != null "> and dp.result_data_id = #{resultDataId}</if>
+            <if test="processStatus != null  and processStatus != ''"> and dp.process_status = #{processStatus}</if>
+            <if test="startTime != null "> and dp.start_time = #{startTime}</if>
+            <if test="endTime != null "> and dp.end_time = #{endTime}</if>
+            <if test="log != null  and log != ''"> and dp.log = #{log}</if>
         </where>
         order by create_time desc
     </select>
     
     <select id="selectTDataProcessById" parameterType="Long" resultMap="TDataProcessResult">
         <include refid="selectTDataProcessVo"/>
-        where id = #{id}
+        where dp.id = #{id}
     </select>
         
     <insert id="insertTDataProcess" parameterType="TDataProcess" useGeneratedKeys="true" keyProperty="id">