From 1519a7c81e6566dd0cbc6acfb1b5e92c3aaba7df Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期日, 02 三月 2025 10:53:57 +0800 Subject: [PATCH] 赋码定时任务只判断超时,且用红码时间判断 --- business/src/main/resources/mapper/PlanMapper.xml | 50 ++++++++++++++++++++++++++++++++------------------ 1 files changed, 32 insertions(+), 18 deletions(-) diff --git a/business/src/main/resources/mapper/PlanMapper.xml b/business/src/main/resources/mapper/PlanMapper.xml index eb6d1d9..d25ab8e 100644 --- a/business/src/main/resources/mapper/PlanMapper.xml +++ b/business/src/main/resources/mapper/PlanMapper.xml @@ -9,8 +9,8 @@ <result column="month_status" property="monthStatus" /> <result column="season_status" property="seasonStatus" /> <result column="year_status" property="yearStatus" /> - <result column="gmt_create_time" property="gmtCreateTime" /> - <result column="gmt_update_time" property="gmtUpdateTime" /> + <result column="gmt_create" property="gmtCreate" /> + <result column="gmt_update" property="gmtUpdate" /> </resultMap> <!-- 鍒嗛〉鏉′欢鏌ヨ椤圭洰璁″垝璁板綍鏄犲皠缁撴灉 --> @@ -26,12 +26,8 @@ <result property="yearStatus" column="year_status" /> <result property="projectStatus" column="project_status" /> <result property="investType" column="invest_type" /> + <result property="exception" column="exception" /> </resultMap> - - - - - <select id="getById" resultMap="BaseResultMap"> @@ -59,19 +55,37 @@ pi.project_code, pi.project_type, pi.project_phase, - IFNULL((select report_status from t_project_plan_record - WHERE plan_time_flag = 0 AND project_info_id = pi.id ORDER BY create_time DESC LIMIT 1),1) as month_status, - IFNULL((select report_status from t_project_plan_record - WHERE plan_time_flag = 1 AND project_info_id = pi.id ORDER BY create_time DESC LIMIT 1),1) as season_status, - IFNULL((select report_status from t_project_plan_record - WHERE plan_time_flag = 2 AND project_info_id = pi.id ORDER BY create_time DESC LIMIT 1),1) as year_status, + p.month_status, + p.season_status, + p.year_status, + p.exception, pi.project_status, pi.invest_type - FROM t_plan AS p - INNER JOIN t_project_info AS pi ON p.project_info_id = pi.id - INNER JOIN t_project_plan_record AS ppr ON p.id = ppr.plan_id - WHERE - p.deleted = 0 + FROM t_project_info AS pi + LEFT JOIN t_plan AS p ON p.project_info_id = pi.id + LEFT JOIN sys_dept d ON d.dept_id = PI.project_owner_unit + <where> + pi.deleted = 0 AND pi.used_status = 2 + <if test="query.projectName!= null and query.projectName!= ''"> + AND pi.project_name LIKE CONCAT('%', #{query.projectName}, '%') + </if> + <if test="query.projectCode!= null and query.projectCode!= ''"> + AND pi.project_code LIKE CONCAT('%', #{query.projectCode}, '%') + </if> + <if test="query.reportStatus!= null"> + AND p.report_status = #{query.reportStatus} + </if> + <if test="query.monthStatus!= null"> + AND p.month_status = #{query.monthStatus} + </if> + <if test="query.seasonStatus!= null"> + AND p.season_status = #{query.seasonStatus} + </if> + <if test="query.yearStatus!= null"> + AND p.year_status = #{query.yearStatus} + </if> + ${query.params.dataScope} + </where> </select> </mapper> -- Gitblit v1.8.0