From 46872a311da9480d3edb19223aca2e0833fb1e31 Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期二, 17 十二月 2024 11:41:00 +0800 Subject: [PATCH] 1. 完成数据产品中间结果基本信息和具体信息入库 2. 修改ColInspectionInfo.kt 监管时间格式修改为yyyy-mm-dd 3. 新增数据产品类型枚举类 DataProductType 4. 修改BaseTemplate实现类通过重写genData方法生成Template相关数据 5. TODO 其他未涉及到的产品对象的中间结果对象 --- src/main/resources/mapper/ds1/InspectionMapper.xml | 104 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 61 insertions(+), 43 deletions(-) diff --git a/src/main/resources/mapper/ds1/InspectionMapper.xml b/src/main/resources/mapper/ds1/InspectionMapper.xml index ca55298..c606054 100644 --- a/src/main/resources/mapper/ds1/InspectionMapper.xml +++ b/src/main/resources/mapper/ds1/InspectionMapper.xml @@ -8,35 +8,47 @@ <id column="I_GUID" property="guid" jdbcType="VARCHAR" /> <result column="ST_GUID" property="stguid" jdbcType="VARCHAR" /> <result column="S_GUID" property="sguid" jdbcType="VARCHAR" /> - <result column="I_ScenseName" property="iScensename" jdbcType="VARCHAR" /> - <result column="I_ScenseAddress" property="iScenseaddress" jdbcType="VARCHAR" /> - <result column="I_IsTogether" property="iIstogether" jdbcType="BIT" /> - <result column="I_EntourageT" property="iEntouraget" jdbcType="VARCHAR" /> - <result column="I_EntourageWX" property="iEntouragewx" jdbcType="VARCHAR" /> - <result column="I_Entourage" property="iEntourage" jdbcType="VARCHAR" /> - <result column="I_ExecutionStartTime" property="iExecutionstarttime" jdbcType="TIMESTAMP" /> - <result column="I_ExecutionEndTime" property="iExecutionendtime" jdbcType="TIMESTAMP" /> - <result column="I_ProblemCount" property="iProblemcount" jdbcType="INTEGER" /> - <result column="I_IsRechecked" property="iIsrechecked" jdbcType="BIT" /> - <result column="I_RecheckCount" property="iRecheckcount" jdbcType="INTEGER" /> - <result column="I_PromissedNum" property="iPromissednum" jdbcType="INTEGER" /> - <result column="I_ChangedNum" property="iChangednum" jdbcType="INTEGER" /> - <result column="I_IsChanged" property="iIschanged" jdbcType="BIT" /> - <result column="I_IsRvaluated" property="iIsrvaluated" jdbcType="BIT" /> - <result column="I_isPromissed" property="iIspromissed" jdbcType="BIT" /> - <result column="I_PromissedTime" property="iPromissedtime" jdbcType="TIMESTAMP" /> - <result column="I_PromissedUserGUID" property="iPromisseduserguid" jdbcType="VARCHAR" /> - <result column="I_PromissedUserName" property="iPromissedusername" jdbcType="VARCHAR" /> - <result column="I_PromissedUserRealName" property="iPromisseduserrealname" jdbcType="VARCHAR" /> - <result column="I_PromissedWay" property="iPromissedway" jdbcType="VARCHAR" /> - <result column="I_PromissedDeadline" property="iPromisseddeadline" jdbcType="TIMESTAMP" /> - <result column="I_PromissBookPath" property="iPromissbookpath" jdbcType="VARCHAR" /> - <result column="I_SignPath" property="iSignpath" jdbcType="VARCHAR" /> - <result column="I_Extension1" property="iExtension1" jdbcType="VARCHAR" /> - <result column="I_Extension2" property="iExtension2" jdbcType="VARCHAR" /> - <result column="I_Extension3" property="iExtension3" jdbcType="VARCHAR" /> - <result column="I_Remark" property="iRemark" jdbcType="VARCHAR" /> + <result column="I_ScenseName" property="scensename" jdbcType="VARCHAR" /> + <result column="I_ScenseAddress" property="scenseaddress" jdbcType="VARCHAR" /> + <result column="I_IsTogether" property="istogether" jdbcType="BIT" /> + <result column="I_EntourageT" property="entouraget" jdbcType="VARCHAR" /> + <result column="I_EntourageWX" property="entouragewx" jdbcType="VARCHAR" /> + <result column="I_Entourage" property="entourage" jdbcType="VARCHAR" /> + <result column="I_ExecutionStartTime" property="executionstarttime" jdbcType="TIMESTAMP" /> + <result column="I_ExecutionEndTime" property="executionendtime" jdbcType="TIMESTAMP" /> + <result column="I_ProblemCount" property="problemcount" jdbcType="INTEGER" /> + <result column="I_IsRechecked" property="isrechecked" jdbcType="BIT" /> + <result column="I_RecheckCount" property="recheckcount" jdbcType="INTEGER" /> + <result column="I_PromissedNum" property="promissednum" jdbcType="INTEGER" /> + <result column="I_ChangedNum" property="changednum" jdbcType="INTEGER" /> + <result column="I_IsChanged" property="ischanged" jdbcType="BIT" /> + <result column="I_IsRvaluated" property="isrvaluated" jdbcType="BIT" /> + <result column="I_isPromissed" property="ispromissed" jdbcType="BIT" /> + <result column="I_PromissedTime" property="promissedtime" jdbcType="TIMESTAMP" /> + <result column="I_PromissedUserGUID" property="promisseduserguid" jdbcType="VARCHAR" /> + <result column="I_PromissedUserName" property="promissedusername" jdbcType="VARCHAR" /> + <result column="I_PromissedUserRealName" property="promisseduserrealname" jdbcType="VARCHAR" /> + <result column="I_PromissedWay" property="promissedway" jdbcType="VARCHAR" /> + <result column="I_PromissedDeadline" property="promisseddeadline" jdbcType="TIMESTAMP" /> + <result column="I_PromissBookPath" property="promissbookpath" jdbcType="VARCHAR" /> + <result column="I_SignPath" property="signpath" jdbcType="VARCHAR" /> + <result column="I_Extension1" property="extension1" jdbcType="VARCHAR" /> + <result column="I_Extension2" property="extension2" jdbcType="VARCHAR" /> + <result column="I_Extension3" property="extension3" jdbcType="VARCHAR" /> + <result column="I_Remark" property="remark" jdbcType="VARCHAR" /> </resultMap> + + <sql id="Base_Column_List" > + <!-- + WARNING - @mbg.generated + --> + I_GUID, ST_GUID, S_GUID, I_ScenseName, I_ScenseAddress, I_IsTogether, I_EntourageT, + I_EntourageWX, I_Entourage, I_ExecutionStartTime, I_ExecutionEndTime, I_ProblemCount, + I_IsRechecked, I_RecheckCount, I_PromissedNum, I_ChangedNum, I_IsChanged, I_IsRvaluated, + I_isPromissed, I_PromissedTime, I_PromissedUserGUID, I_PromissedUserName, I_PromissedUserRealName, + I_PromissedWay, I_PromissedDeadline, I_PromissBookPath, I_SignPath, I_Extension1, + I_Extension2, I_Extension3, I_Remark + </sql> <resultMap id="InspectionStatisticVo" type="cn.flightfeather.supervision.lightshare.vo.InspectionStatisticVo" > <id column="MOV_DisplayID" property="index" jdbcType="INTEGER" /> @@ -52,19 +64,25 @@ <result column="problems" property="problem" jdbcType="VARCHAR" /> </resultMap> - <sql id="Base_Column_List" > - <!-- - WARNING - @mbg.generated - --> - I_GUID, ST_GUID, S_GUID, I_ScenseName, I_ScenseAddress, I_IsTogether, I_EntourageT, - I_EntourageWX, I_Entourage, I_ExecutionStartTime, I_ExecutionEndTime, I_ProblemCount, - I_IsRechecked, I_RecheckCount, I_PromissedNum, I_ChangedNum, I_IsChanged, I_IsRvaluated, - I_isPromissed, I_PromissedTime, I_PromissedUserGUID, I_PromissedUserName, I_PromissedUserRealName, - I_PromissedWay, I_PromissedDeadline, I_PromissBookPath, I_SignPath, I_Extension1, - I_Extension2, I_Extension3, I_Remark - </sql> + <resultMap id="InspectionInfoVo" type="cn.flightfeather.supervision.lightshare.vo.InspectionInfoVo" > + <id column="inspectionId" property="inspectionId" /> + <result column="topTaskid" property="topTaskid"/> + <result column="topTaskName" property="topTaskName"/> + <result column="sceneId" property="sceneId"/> + <result column="sceneName" property="sceneName"/> + <result column="subtaskId" property="subtaskId"/> + <result column="inspected" property="inspected"/> + <result column="inspectionTime" property="inspectionTime"/> + <result column="inspectionTimes" property="inspectionTimes"/> + <result column="promised" property="promised"/> + <result column="changed" property="changed"/> + <result column="unChangedCount" property="unChangedCount"/> + <result column="changedCount" property="changedCount"/> + <result column="inspectionTimes" property="inspectionTimes"/> + <result column="promisedTime" property="promisedTime"/> + </resultMap> - <select id="getInspectionInfoByScene" parameterType="String" resultType="map"> + <select id="getInspectionInfoByScene" resultMap="InspectionInfoVo"> SELECT a.T_GUID AS topTaskId, a.T_Name AS topTaskName, @@ -72,11 +90,11 @@ b.ST_ScenseName AS sceneName, c.I_GUID AS inspectionId, b.ST_GUID AS subtaskId, - (CASE WHEN COUNT(DISTINCT c.I_GUID) > 0 THEN TRUE ELSE FALSE END) AS isInspected, + (CASE WHEN COUNT(DISTINCT c.I_GUID) > 0 THEN TRUE ELSE FALSE END) AS inspected, c.I_ExecutionStartTime AS inspectionTime, COUNT(DISTINCT c.I_GUID) AS inspectionTimes, - (CASE WHEN (SUM(CASE WHEN d.PL_Extension1 IS NULL THEN 0 ELSE 1 END)) > 0 THEN TRUE ELSE FALSE END) AS isPromised, - CASE WHEN SUM(d.PL_IsChanged) = COUNT(d.PL_IsChanged) THEN TRUE ELSE FALSE END AS isChanged, + (CASE WHEN (SUM(CASE WHEN d.PL_Extension1 IS NULL THEN 0 ELSE 1 END)) > 0 THEN TRUE ELSE FALSE END) AS promised, + CASE WHEN SUM(d.PL_IsChanged) = COUNT(d.PL_IsChanged) THEN TRUE ELSE FALSE END AS changed, COUNT(CASE WHEN d.PL_IsChanged = 0 AND d.PL_Extension3 = 'pass' THEN 1 ELSE NULL END) AS unChangedCount, COUNT(CASE WHEN d.PL_IsChanged = 1 THEN 1 ELSE NULL END) AS changedCount, d.PL_Extension1 AS promisedTime -- Gitblit v1.9.3