|
@@ -92,16 +92,33 @@
|
|
b.REGISTER_TIME,
|
|
b.REGISTER_TIME,
|
|
b.REGION_NAME || ' ' || ADDRE address,
|
|
b.REGION_NAME || ' ' || ADDRE address,
|
|
b.USER_PHONE,
|
|
b.USER_PHONE,
|
|
- (select REAL_NAME from sys_user where id =duty_user) duty_user,-- 勘察人,
|
|
+ (select REAL_NAME from sys_user where id = duty_user) duty_user,-- 勘察人,
|
|
b.SURVEY_DATE SURVEY_DATE,-- 勘察日期
|
|
b.SURVEY_DATE SURVEY_DATE,-- 勘察日期
|
|
b.HOUSEHOLD_NUMBER ,--申请户数
|
|
b.HOUSEHOLD_NUMBER ,--申请户数
|
|
(select name from SYS_DICT where id = user_type) PROJECT_NATURE,--工程性质
|
|
(select name from SYS_DICT where id = user_type) PROJECT_NATURE,--工程性质
|
|
b.INSTALL_CONTENT, --安装内容
|
|
b.INSTALL_CONTENT, --安装内容
|
|
- b.process_id
|
|
+ b.process_id,
|
|
-
|
|
+ m.NAME LABEL_NAME,
|
|
- from TF_PROJECT_BASE_W b left join tf_process_l c on b.process_id = c.id
|
|
+ (select REAL_NAME from sys_user where id = b.REGISTER_STAFF) REGISTER_STAFF_NAME
|
|
- where 1=1 and c.is_del=0
|
|
+ from TF_PROJECT_BASE_W b
|
|
-
|
|
+ left join tf_process_l c on b.process_id = c.id
|
|
|
|
+ LEFT JOIN
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ PROCESS_ID,
|
|
|
|
+ MAX( h.ID ) ID
|
|
|
|
+ FROM TF_NOW_HANDLE_L h
|
|
|
|
+ LEFT JOIN TF_CONFIG_STEP_USER_L su ON ( h.STEP_ID = su.STEP_ID AND h.STEP_NODE = su.STEP_NODE )
|
|
|
|
+ WHERE
|
|
|
|
+ su.USER_TYPE = 1
|
|
|
|
+ GROUP BY
|
|
|
|
+ PROCESS_ID
|
|
|
|
+ ) h ON b.PROCESS_ID = h.PROCESS_ID
|
|
|
|
+ LEFT JOIN TF_NOW_HANDLE_L nh ON ( b.PROCESS_ID = nh.PROCESS_ID AND h.ID = nh.ID )
|
|
|
|
+ LEFT JOIN SYS_MENU m ON nh.LABEL = m.ID
|
|
|
|
+ where
|
|
|
|
+ 1=1
|
|
|
|
+ and c.is_del = 0
|
|
<if test="reportDto !=null">
|
|
<if test="reportDto !=null">
|
|
<if test="reportDto.tenantId !=null and reportDto.tenantId !='' ">
|
|
<if test="reportDto.tenantId !=null and reportDto.tenantId !='' ">
|
|
and b.tenant_id=#{reportDto.tenantId}
|
|
and b.tenant_id=#{reportDto.tenantId}
|
|
@@ -123,8 +140,6 @@
|
|
instr (USER_PHONE,#{reportDto.keywords})>0
|
|
instr (USER_PHONE,#{reportDto.keywords})>0
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
-
|
|
|
|
<if test="reportDto.processTypes!=null and reportDto.processTypes!=''.toString()">
|
|
<if test="reportDto.processTypes!=null and reportDto.processTypes!=''.toString()">
|
|
AND b.process_type in
|
|
AND b.process_type in
|
|
<foreach item="item" index="index" collection="reportDto.processTypes.split(',')" open="(" separator=","
|
|
<foreach item="item" index="index" collection="reportDto.processTypes.split(',')" open="(" separator=","
|
|
@@ -132,7 +147,6 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
<if test="reportDto.projectNatureIds!=null and reportDto.projectNatureIds!=''.toString()">
|
|
<if test="reportDto.projectNatureIds!=null and reportDto.projectNatureIds!=''.toString()">
|
|
AND user_type in
|
|
AND user_type in
|
|
<foreach item="item" index="index" collection="reportDto.projectNatureIds.split(',')" open="("
|
|
<foreach item="item" index="index" collection="reportDto.projectNatureIds.split(',')" open="("
|
|
@@ -140,10 +154,7 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
-
|
|
|
|
</select>
|
|
</select>
|
|
<select id="getDispatchCount" resultType="com.tofly.workflow.report.vo.ProjectDispatchVo">
|
|
<select id="getDispatchCount" resultType="com.tofly.workflow.report.vo.ProjectDispatchVo">
|
|
select duty_post_name,duty_user,
|
|
select duty_post_name,duty_user,
|