|
|
@@ -44,10 +44,13 @@ |
|
|
|
<result property="createTime" column="create_time" /> |
|
|
|
<result property="updateBy" column="update_by" /> |
|
|
|
<result property="updateTime" column="update_time" /> |
|
|
|
<result property="abnormalCount" column="abnormal_count" /> |
|
|
|
|
|
|
|
<result property="overdue" column="overdue" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectTAgentTaskVo"> |
|
|
|
select id, agent_center, county_code, county_name, town_code, town_name, org_code, org_name, book_id, book_name, order_year, order_month, voucher_count, contrac_count, asset_count, all_count, finish_count, agent_status, distri_user, distri_nick, distri_date, end_at, handle_user, handle_nick, handle_remark, handle_date, audit_user, audit_nick, audit_date, is_audit, appraise_user, appraise_nick, appraise_score, appraise_remark, is_appraise, create_by, create_time, update_by, update_time from t_agent_task |
|
|
|
select id, agent_center, county_code, county_name, town_code, town_name, org_code, org_name, book_id, book_name, order_year, order_month, voucher_count, contrac_count, asset_count, all_count, finish_count, agent_status, distri_user, distri_nick, distri_date, end_at, handle_user, handle_nick, handle_remark, handle_date, audit_user, audit_nick, audit_date, is_audit, appraise_user, appraise_nick, appraise_score, appraise_remark, is_appraise, create_by, create_time, update_by, update_time, abnormal_count from t_agent_task |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectTAgentTaskList" parameterType="TAgentTask" resultMap="TAgentTaskResult"> |
|
|
@@ -144,6 +147,7 @@ |
|
|
|
<if test="createTime != null">create_time,</if> |
|
|
|
<if test="updateBy != null">update_by,</if> |
|
|
|
<if test="updateTime != null">update_time,</if> |
|
|
|
<if test="abnormalCount != null">abnormal_count,</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="agentCenter != null and agentCenter != ''">#{agentCenter},</if> |
|
|
@@ -184,6 +188,7 @@ |
|
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
|
<if test="updateTime != null">#{updateTime},</if> |
|
|
|
<if test="abnormalCount != null">#{abnormalCount},</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
|
|
|
@@ -229,6 +234,7 @@ |
|
|
|
create_time, |
|
|
|
update_by, |
|
|
|
update_time, |
|
|
|
abnormal_count, |
|
|
|
</trim> |
|
|
|
values |
|
|
|
<foreach item="item" collection="list" separator="," > |
|
|
@@ -271,6 +277,7 @@ |
|
|
|
#{item.createTime}, |
|
|
|
#{item.updateBy}, |
|
|
|
#{item.updateTime}, |
|
|
|
#{item.abnormalCount}, |
|
|
|
</trim> |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
@@ -316,6 +323,7 @@ |
|
|
|
<if test="createTime != null">create_time = #{createTime},</if> |
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
|
|
<if test="abnormalCount != null">abnormal_count = #{abnormalCount},</if> |
|
|
|
</trim> |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
@@ -363,6 +371,7 @@ |
|
|
|
<if test="item.createTime != null">create_time = #{item.createTime},</if> |
|
|
|
<if test="item.updateBy != null">update_by = #{item.updateBy},</if> |
|
|
|
<if test="item.updateTime != null">update_time = #{item.updateTime},</if> |
|
|
|
<if test="item.abnormalCount != null">abnormal_count = #{item.abnormalCount},</if> |
|
|
|
</set> |
|
|
|
where id = #{item.id} |
|
|
|
</foreach> |
|
|
@@ -542,7 +551,8 @@ |
|
|
|
IFNULL(SUM(IF(agent_status = '3', 1, 0)), 0) as num_process_finish, |
|
|
|
IFNULL(SUM(IF(is_audit = 'Y', 1, 0)), 0) as num_approval_finish, |
|
|
|
town_name, town_code, |
|
|
|
order_year, order_month |
|
|
|
order_year, order_month, |
|
|
|
IFNULL(SUM(abnormal_count), 0) as num_except |
|
|
|
FROM |
|
|
|
t_agent_task |
|
|
|
<where> |
|
|
@@ -579,7 +589,8 @@ |
|
|
|
IFNULL(SUM(IF(agent_status = '3', 1, 0)), 0) as num_process_finish, |
|
|
|
IFNULL(SUM(IF(is_audit = 'Y', 1, 0)), 0) as num_approval_finish, |
|
|
|
org_name, org_code, town_code, |
|
|
|
MAX(end_at) as end_at, MAX(handle_date) as handle_date, MAX(distri_date) as distri_date, handle_nick |
|
|
|
MAX(end_at) as end_at, MAX(handle_date) as handle_date, MAX(distri_date) as distri_date, handle_nick, |
|
|
|
IFNULL(SUM(abnormal_count), 0) as num_except |
|
|
|
FROM |
|
|
|
t_agent_task |
|
|
|
<where> |
|
|
@@ -643,4 +654,26 @@ |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getTAgentTaskProcessedList" parameterType="TAgentTask" resultMap="TAgentTaskResult"> |
|
|
|
select id, agent_center, county_code, county_name, town_code, town_name, org_code, org_name, book_id, book_name, order_year, order_month, voucher_count, contrac_count, asset_count, all_count, finish_count, agent_status, distri_user, distri_nick, distri_date, end_at, handle_user, handle_nick, handle_remark, handle_date, audit_user, audit_nick, audit_date, is_audit, appraise_user, appraise_nick, appraise_score, appraise_remark, is_appraise, create_by, create_time, update_by, update_time |
|
|
|
, IF(LEFT(handle_date, 10) > end_at, 1, 0) as overdue |
|
|
|
from t_agent_task |
|
|
|
<where> |
|
|
|
AND agent_status IN ('3', '4') |
|
|
|
<if test="agentCenter != null and agentCenter != ''"> and agent_center = #{agentCenter}</if> |
|
|
|
<if test="countyCode != null and countyCode != ''"> and county_code = #{countyCode}</if> |
|
|
|
<if test="townCode != null and townCode != ''"> and town_code = #{townCode}</if> |
|
|
|
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
|
|
|
<if test="orderYear != null and orderYear != ''"> and order_year = #{orderYear}</if> |
|
|
|
<if test="orderMonth != null and orderMonth != ''"> and order_month = #{orderMonth}</if> |
|
|
|
<if test="isAudit != null and isAudit != ''"> and is_audit = #{isAudit}</if> |
|
|
|
<if test="isAppraise != null and isAppraise != ''"> and is_appraise = #{isAppraise}</if> |
|
|
|
<if test="params != null"> |
|
|
|
<if test="params.orgCodeList != null"> |
|
|
|
AND org_code IN (null <foreach collection="params.orgCodeList" item="i">,#{i}</foreach> ) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</mapper> |