| | |
| | | <result column="ST_Remark" property="remark" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | ST_GUID, T_GUID, TS_GUID, ST_name, ST_Priority, ST_TypeNo, ST_Type, ST_ProvinceCode, |
| | | ST_ProvinceName, ST_CityCode, ST_CityName, ST_DistrictCode, ST_DistrictName, ST_TownCode, |
| | | ST_TownName, ST_ScenseName, ST_ScenseID, ST_ScenseAddress, ST_DeadLineType, ST_PlanStartTime, |
| | | ST_PlanEndTime, ST_DeployerGUID, ST_DeployerUserName, ST_DeployerRealName, ST_DeployTime, |
| | | ST_ExecutionStartTime, ST_ExecutionEndTime, ST_ExecutorGUIDs, ST_ExecutorUserNames, |
| | | ST_ExecutorRealTimes, ST_Status, ST_NotifedCount, ST_RuleList, ST_AssessorGUID, ST_AssessorUserName, |
| | | ST_AssessorRealName, ST_AssessTime, ST_AssessResult, ST_ThirdAssessorGUID, ST_ThirdAssessorUserName, |
| | | ST_ThirdAssessorRealName, ST_ThirdAssessTime, ST_ThirdAssessResult, ST_Extension1, |
| | | ST_Extension2, ST_Extension3, ST_Remark |
| | | </sql> |
| | | |
| | | <resultMap id="SubtaskSearchResultVo" type="cn.flightfeather.supervision.lightshare.vo.SubtaskSearchResultVo"> |
| | | <result column="subTaskId" property="subTaskId" jdbcType="VARCHAR" /> |
| | | <result column="districtName" property="districtName" jdbcType="VARCHAR" /> |
| | |
| | | <result column="status" property="status" jdbcType="VARCHAR" /> |
| | | <result column="path" property="path" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SubTaskSearchResultVo2" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSearchResultVo2"> |
| | | <result column="subTaskId" property="subTaskId" jdbcType="VARCHAR" /> |
| | | <result column="districtName" property="districtName" jdbcType="VARCHAR" /> |
| | |
| | | <result column="mExtension1" property="mExtension1" jdbcType="VARCHAR" /> |
| | | <result column="isChanged" property="isChanged" jdbcType="BIT" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SubtaskVoMap" type="cn.flightfeather.supervision.lightshare.vo.SubtaskVo" > |
| | | <id column="ST_GUID" property="stguid" jdbcType="VARCHAR" /> |
| | | <result column="T_GUID" property="tguid" jdbcType="VARCHAR" /> |
| | |
| | | <result column="ST_Extension3" property="extension3" jdbcType="VARCHAR" /> |
| | | <result column="ST_Remark" property="remark" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SubTaskSummary" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSummary" > |
| | | <result column="ST_GUID" property="stGuid" jdbcType="VARCHAR" /> |
| | | <result column="ST_name" property="stName" jdbcType="VARCHAR" /> |
| | |
| | | <result column="ST_Status" property="stStatus" jdbcType="VARCHAR" /> |
| | | <result column="S_GUID" property="sceneId" jdbcType="VARCHAR" /> |
| | | <result column="S_Name" property="sceneName" jdbcType="VARCHAR" /> |
| | | <result column="S_TypeID" property="sceneTypeId" jdbcType="TINYINT"/> |
| | | <result column="S_Type" property="sceneType" jdbcType="VARCHAR" /> |
| | | <result column="S_Location" property="location" jdbcType="VARCHAR"/> |
| | | <result column="S_Longitude" property="longitude" jdbcType="DECIMAL"/> |
| | | <result column="S_Latitude" property="latitude" jdbcType="DECIMAL"/> |
| | | <result column="S_Index" property="sceneIndex" jdbcType="INTEGER"/> |
| | | <result column="I_GUID" property="insGuid" jdbcType="VARCHAR" /> |
| | | <result column="proNum" property="proNum" jdbcType="INTEGER" /> |
| | | <result column="changeNum" property="changeNum" jdbcType="INTEGER" /> |
| | | <result column="proCheckedNum" property="proCheckedNum" jdbcType="INTEGER" /> |
| | | <result column="changeCheckedNum" property="changeCheckedNum" jdbcType="INTEGER" /> |
| | | <association property="subtask" resultMap="BaseResultMap"/> |
| | | <association property="inspection" |
| | | resultMap="cn.flightfeather.supervision.domain.ds1.mapper.InspectionMapper.BaseResultMap"/> |
| | | <association property="scene" |
| | | resultMap="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.BaseResultMap"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | ST_GUID, T_GUID, TS_GUID, ST_name, ST_Priority, ST_TypeNo, ST_Type, ST_ProvinceCode, |
| | | ST_ProvinceName, ST_CityCode, ST_CityName, ST_DistrictCode, ST_DistrictName, ST_TownCode, |
| | | ST_TownName, ST_ScenseName, ST_ScenseID, ST_ScenseAddress, ST_DeadLineType, ST_PlanStartTime, |
| | | ST_PlanEndTime, ST_DeployerGUID, ST_DeployerUserName, ST_DeployerRealName, ST_DeployTime, |
| | | ST_ExecutionStartTime, ST_ExecutionEndTime, ST_ExecutorGUIDs, ST_ExecutorUserNames, |
| | | ST_ExecutorRealTimes, ST_Status, ST_NotifedCount, ST_RuleList, ST_AssessorGUID, ST_AssessorUserName, |
| | | ST_AssessorRealName, ST_AssessTime, ST_AssessResult, ST_ThirdAssessorGUID, ST_ThirdAssessorUserName, |
| | | ST_ThirdAssessorRealName, ST_ThirdAssessTime, ST_ThirdAssessResult, ST_Extension1, |
| | | ST_Extension2, ST_Extension3, ST_Remark |
| | | |
| | | <sql id="Sub_Task_Summary_Column_List"> |
| | | SELECT |
| | | a.*, |
| | | b.*, |
| | | c.*, |
| | | SUM(d.PL_GUID is NOT null) AS proNum, |
| | | SUM(d.PL_IsChanged = TRUE) AS changeNum, |
| | | SUM(d.PL_Extension3 != 'unCheck') AS proCheckedNum, |
| | | SUM( |
| | | d.PL_Extension3 = 'change_pass' || d.PL_Extension3 = 'change_fail' |
| | | ) AS changeCheckedNum |
| | | FROM |
| | | tm_t_subtask AS a |
| | | LEFT JOIN sm_t_scense AS b ON a.ST_ScenseID = b.S_GUID |
| | | LEFT JOIN im_t_inspection AS c ON a.ST_GUID = c.ST_GUID |
| | | LEFT JOIN im_t_problemlist AS d ON a.ST_GUID = d.ST_GUID |
| | | </sql> |
| | | <!-- 行政区划条件 --> |
| | | <sql id="Where_Area"> |
| | | <if test="provincecode != null"> |
| | | AND ${tableAlias}.ST_ProvinceCode = #{provincecode} |
| | | </if> |
| | | <if test="provincename != null"> |
| | | AND ${tableAlias}.ST_ProvinceName = #{provincename} |
| | | </if> |
| | | <if test="citycode != null"> |
| | | AND ${tableAlias}.ST_CityCode = #{citycode} |
| | | </if> |
| | | <if test="cityname != null"> |
| | | AND ${tableAlias}.ST_CityName = #{cityname} |
| | | </if> |
| | | <if test="districtcode != null"> |
| | | AND ${tableAlias}.ST_DistrictCode = #{districtcode} |
| | | </if> |
| | | <if test="districtname != null"> |
| | | AND ${tableAlias}.ST_DistrictName = #{districtname} |
| | | </if> |
| | | <if test="towncode != null"> |
| | | AND ${tableAlias}.ST_TownCode = #{towncode} |
| | | </if> |
| | | <if test="townname != null"> |
| | | AND ${tableAlias}.ST_TownName = #{townname} |
| | | </if> |
| | | </sql> |
| | | <!-- 任务计划时间条件 --> |
| | | <sql id="Where_Plan_Time"> |
| | | <if test="starttime != null"> |
| | | AND ${tableAlias}.ST_PlanStartTime >= #{starttime} |
| | | </if> |
| | | <if test="endtime != null"> |
| | | AND ${tableAlias}.ST_PlanStartTime <= #{endtime} |
| | | </if> |
| | | </sql> |
| | | |
| | | <select id="getSubtask" resultMap="SubtaskSearchResultVo"> |
| | |
| | | AND d.PL_Extension3 IS NOT NULL |
| | | ORDER BY updateTime |
| | | </select> |
| | | |
| | | <select id="selectByTopTask" resultMap="SubtaskVoMap"><![CDATA[ |
| | | select * from tm_t_subtask as a left join sm_t_scense as b on a.ST_ScenseID = b.S_GUID |
| | | where a.ST_PlanStartTime >=#{param2} and a.ST_PlanEndTime <= #{param3} and a.T_GUID = #{param1}]]> |
| | |
| | | and b.S_TypeID = #{param4} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectByTopTask2" resultMap="BaseResultMap"> |
| | | select * from tm_t_subtask as a left join sm_t_scense as b on a.ST_ScenseID = b.S_GUID |
| | | where a.T_GUID = #{param1} |
| | |
| | | and b.S_TypeID = #{param2} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSummary" resultMap="SubTaskSummary"> |
| | | SELECT |
| | | a.ST_GUID, |
| | |
| | | a.ST_Status, |
| | | b.S_GUID, |
| | | b.S_Name, |
| | | b.S_TypeID, |
| | | b.S_Type, |
| | | b.S_Location, |
| | | b.S_Longitude, |
| | | b.S_Latitude, |
| | | b.S_Index, |
| | | c.I_GUID, |
| | | SUM(d.PL_GUID is NOT null) AS proNum, |
| | | SUM(d.PL_IsChanged = TRUE) AS changeNum, |
| | |
| | | GROUP BY |
| | | a.ST_GUID |
| | | </select> |
| | | |
| | | <select id="getSummaryByScene" resultMap="SubTaskSummary"> |
| | | SELECT |
| | | a.ST_GUID, |
| | |
| | | a.ST_GUID |
| | | ORDER BY a.ST_PlanStartTime DESC |
| | | </select> |
| | | |
| | | <select id="getSummaryByArea" resultMap="SubTaskSummary"> |
| | | <include refid="Sub_Task_Summary_Column_List"/> |
| | | <where> |
| | | <include refid="Where_Area"> |
| | | <property name="tableAlias" value="a"/> |
| | | </include> |
| | | <include refid="Where_Plan_Time"> |
| | | <property name="tableAlias" value="a"/> |
| | | </include> |
| | | </where> |
| | | GROUP BY |
| | | a.ST_GUID |
| | | ORDER BY a.ST_PlanStartTime DESC |
| | | </select> |
| | | <select id="findSubTasksByProType" resultMap="BaseResultMap"> |
| | | SELECT |
| | | a.* |