|
@@ -9,14 +9,14 @@
|
|
|
su.`name`,
|
|
|
tbsi.sop_no,
|
|
|
tffa.status,
|
|
|
- tffa.setup,
|
|
|
- CASE
|
|
|
+ tffa.setup
|
|
|
+<!-- CASE-->
|
|
|
|
|
|
- WHEN tffa.STATUS = 'FINISH' THEN
|
|
|
- '已完结'
|
|
|
- WHEN tffa.STATUS = 'END' THEN
|
|
|
- '已作废' ELSE '进行中'
|
|
|
- END AS statusStr
|
|
|
+<!-- WHEN tffa.STATUS = 'FINISH' THEN-->
|
|
|
+<!-- '已完结'-->
|
|
|
+<!-- WHEN tffa.STATUS = 'END' THEN-->
|
|
|
+<!-- '已作废' ELSE '进行中'-->
|
|
|
+<!-- END AS statusStr-->
|
|
|
FROM
|
|
|
t_b_sop_info tbsi
|
|
|
left join t_b_service_region r on r.service_id=tbsi.service_id
|
|
@@ -39,10 +39,11 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="detail" resultType="java.util.Map">
|
|
|
- select DISTINCT cast(tbsi.id as char) as id,
|
|
|
- cast(tbs.id as char) as serviceId,
|
|
|
+ select DISTINCT
|
|
|
+<!-- cast(tbsi.id as char) as id,-->
|
|
|
+<!-- cast(tbs.id as char) as serviceId,-->
|
|
|
tbs.name as serviceName,
|
|
|
- tbsi.sop_no as sopNo,
|
|
|
+<!-- tbsi.sop_no as sopNo,-->
|
|
|
tbsi.crm_no as crmNo,
|
|
|
tbc.begin_time as beginTime,
|
|
|
cast(tbc.crm_user_id as char) as customManagerId,
|
|
@@ -54,45 +55,44 @@
|
|
|
cast(tbp.id as char) as productId,
|
|
|
tbp.name as productName,
|
|
|
tbc.exam_start_time as examStartTime,
|
|
|
- tbc.exam_end_time as examEndTime,
|
|
|
- cast(tfcfe.flow_id as char) as flowId,
|
|
|
- cast(tfcfe.create_id as char) as flowCreateId,
|
|
|
- su2.real_name as flowCreateName,
|
|
|
- tffa.create_time as flowCreateTime,
|
|
|
- tffa.update_time as flowUpdateTime,
|
|
|
- tffa.status,
|
|
|
- CASE
|
|
|
- WHEN tffa.status = 'FINISH' THEN '已完结'
|
|
|
- WHEN tffa.status = 'END' THEN '已作废'
|
|
|
- ELSE '进行中'
|
|
|
- END as statusStr,
|
|
|
- tfcf.type,
|
|
|
- IF(tfcf.type = 'OFFICE_SOP_FLOW','教务处SOP','研究生SOP') as typeStr,
|
|
|
- tfcf.version,
|
|
|
- cast(tfcf.flow_deployment_id as char) as flowDeploymentId,
|
|
|
- art.NAME_ as taskName,
|
|
|
- art.TASK_DEF_KEY_ as taskDefKey
|
|
|
- from t_b_sop_info tbsi
|
|
|
- left join t_b_crm tbc on tbc.crm_no = tbsi.crm_no
|
|
|
- left join t_b_service tbs on tbs.id = tbsi.service_id
|
|
|
- left join t_b_service_region r on tbsi.service_id=r.service_id
|
|
|
- left join sys_custom sc on sc.id = tbsi.custom_id
|
|
|
+ tbc.exam_end_time as examEndTime
|
|
|
+<!-- cast(tfcfe.flow_id as char) as flowId,-->
|
|
|
+<!-- cast(tfcfe.create_id as char) as flowCreateId,-->
|
|
|
+<!-- su2.real_name as flowCreateName,-->
|
|
|
+<!-- tffa.create_time as flowCreateTime,-->
|
|
|
+<!-- tffa.update_time as flowUpdateTime,-->
|
|
|
+<!-- tffa.status,-->
|
|
|
+<!-- CASE-->
|
|
|
+<!-- WHEN tffa.status = 'FINISH' THEN '已完结'-->
|
|
|
+<!-- WHEN tffa.status = 'END' THEN '已作废'-->
|
|
|
+<!-- ELSE '进行中'-->
|
|
|
+<!-- END as statusStr,-->
|
|
|
+<!-- tfcf.type,-->
|
|
|
+<!-- IF(tfcf.type = 'OFFICE_SOP_FLOW','教务处SOP','研究生SOP') as typeStr,-->
|
|
|
+<!-- tfcf.version,-->
|
|
|
+<!-- cast(tfcf.flow_deployment_id as char) as flowDeploymentId,-->
|
|
|
+<!-- art.NAME_ as taskName,-->
|
|
|
+<!-- art.TASK_DEF_KEY_ as taskDefKey-->
|
|
|
+ from t_b_crm tbc
|
|
|
+ left join t_b_sop_info tbsi on tbc.crm_no = tbsi.crm_no
|
|
|
+ left join t_b_service tbs on tbs.id = tbc.service_id
|
|
|
+ left join t_b_service_region r on tbc.service_id=r.service_id
|
|
|
+ left join sys_custom sc on sc.id = tbc.custom_id
|
|
|
left join sys_user su1 on su1.id = tbc.crm_user_id
|
|
|
left join t_b_product tbp on tbp.id = tbc.product_id
|
|
|
left join t_f_custom_flow_entity tfcfe on tfcfe.code = tbsi.sop_no
|
|
|
- left join sys_user su2 on su2.id = tfcfe.create_id
|
|
|
+<!-- left join sys_user su2 on su2.id = tfcfe.create_id-->
|
|
|
left join t_f_flow_approve tffa on tffa.flow_id = tfcfe.flow_id
|
|
|
- left join ACT_RU_TASK art on art.PROC_INST_ID_ = tffa.flow_id
|
|
|
- left join act_ru_identitylink ari on ari.TASK_ID_ = art.ID_
|
|
|
- left join t_f_custom_flow tfcf on tfcf.id = tfcfe.t_f_custom_flow_id
|
|
|
+<!-- left join ACT_RU_TASK art on art.PROC_INST_ID_ = tffa.flow_id-->
|
|
|
+<!-- left join act_ru_identitylink ari on ari.TASK_ID_ = art.ID_-->
|
|
|
+<!-- left join t_f_custom_flow tfcf on tfcf.id = tfcfe.t_f_custom_flow_id-->
|
|
|
LEFT JOIN t_b_sop_info_detail sd ON sd.sop_info_id = tbsi.id
|
|
|
LEFT JOIN sys_user u ON u.id = tbc.region_coordinator_id
|
|
|
LEFT JOIN t_b_user_archives ua ON ua.mobile_number = u.mobile_number
|
|
|
LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
|
|
|
<where>
|
|
|
-
|
|
|
<if test="serviceId != null and serviceId != ''">
|
|
|
- and tbs.id = #{serviceId}
|
|
|
+ and tbc.service_id = #{serviceId}
|
|
|
</if>
|
|
|
<if test="regionId != null and regionId != ''">
|
|
|
and r.id = #{regionId}
|