|
@@ -40,10 +40,10 @@
|
|
|
|
|
|
<select id="detail" resultType="java.util.Map">
|
|
|
select DISTINCT
|
|
|
-<!-- cast(tbsi.id as char) as id,-->
|
|
|
-<!-- cast(tbs.id as char) as serviceId,-->
|
|
|
+ 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,
|
|
@@ -55,24 +55,24 @@
|
|
|
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-->
|
|
|
+ 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
|
|
@@ -81,11 +81,11 @@
|
|
|
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
|