|
@@ -1065,6 +1065,7 @@
|
|
|
sd.NAME AS "deptName",
|
|
sd.NAME AS "deptName",
|
|
|
io.userid AS "userId",
|
|
io.userid AS "userId",
|
|
|
sd.parent_id as "deptId",
|
|
sd.parent_id as "deptId",
|
|
|
|
|
+ sd.management_source as "managementSource",
|
|
|
COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) AS qutationCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) AS qutationCount,
|
|
|
COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) AS underwritingCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) AS underwritingCount,
|
|
|
COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
@@ -1138,7 +1139,8 @@
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
io.userid,
|
|
io.userid,
|
|
|
sd.NAME,
|
|
sd.NAME,
|
|
|
- sd.id
|
|
|
|
|
|
|
+ sd.id,
|
|
|
|
|
+ sd.management_source
|
|
|
) a
|
|
) a
|
|
|
left join sys_user su on su.id =a.userId
|
|
left join sys_user su on su.id =a.userId
|
|
|
LEFT JOIN ins_upload_files inf on su.head_sculpture =inf.id
|
|
LEFT JOIN ins_upload_files inf on su.head_sculpture =inf.id
|
|
@@ -1168,6 +1170,7 @@
|
|
|
sd.NAME AS "deptName",
|
|
sd.NAME AS "deptName",
|
|
|
io.userid AS "userId",
|
|
io.userid AS "userId",
|
|
|
sd.parent_id as "deptId",
|
|
sd.parent_id as "deptId",
|
|
|
|
|
+ sd.management_source as "managementSource",
|
|
|
COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) AS qutationCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) AS qutationCount,
|
|
|
COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) AS underwritingCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) AS underwritingCount,
|
|
|
COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
@@ -1244,7 +1247,8 @@
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
io.userid,
|
|
io.userid,
|
|
|
sd.NAME,
|
|
sd.NAME,
|
|
|
- sd.id
|
|
|
|
|
|
|
+ sd.id,
|
|
|
|
|
+ sd.management_source
|
|
|
) a
|
|
) a
|
|
|
left join sys_user su on su.id =a.userId
|
|
left join sys_user su on su.id =a.userId
|
|
|
LEFT JOIN ins_upload_files inf on su.head_sculpture =inf.id
|
|
LEFT JOIN ins_upload_files inf on su.head_sculpture =inf.id
|
|
@@ -1544,6 +1548,7 @@
|
|
|
sd.id as "deptId",
|
|
sd.id as "deptId",
|
|
|
suLeader.name as "leaderName",
|
|
suLeader.name as "leaderName",
|
|
|
suLeader.mobile as "leaderMobile",
|
|
suLeader.mobile as "leaderMobile",
|
|
|
|
|
+ sd.management_source as "managementSource",
|
|
|
COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) AS qutationCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) AS qutationCount,
|
|
|
COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) AS underwritingCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) AS underwritingCount,
|
|
|
COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
@@ -1627,7 +1632,7 @@
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
- GROUP BY io.userid , su.name, sd.id , sd.name,suLeader.name,suLeader.mobile
|
|
|
|
|
|
|
+ GROUP BY io.userid , su.name, sd.id , sd.name,suLeader.name,suLeader.mobile,sd.management_source
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|