|
|
@@ -887,6 +887,9 @@
|
|
|
<if test="vo.userId != null and vo.userId !=''">
|
|
|
AND io.userid =#{vo.userId}
|
|
|
</if>
|
|
|
+ <if test="vo.deptId != null and vo.deptId !=''">
|
|
|
+ AND io.deptId like concat('%',#{vo.leaderName},'%')
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
agree.insurance_company,
|
|
|
iac.company_id,
|
|
|
@@ -946,6 +949,9 @@
|
|
|
<if test="vo.userId != null and vo.userId !=''">
|
|
|
AND io.userid =#{vo.userId}
|
|
|
</if>
|
|
|
+ <if test="vo.deptId != null and vo.deptId !=''">
|
|
|
+ AND io.deptId like concat('%',#{vo.leaderName},'%')
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
agree.partner_companies_id
|
|
|
) a
|
|
|
@@ -983,7 +989,9 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="queryPageTaskStatistics" resultType="com.ydtech.modules.admin.model.dto.TaskStatisticsDto">
|
|
|
- select a.*,(select name from sys_user where id =a.userId) as "userName",
|
|
|
+ select a.*, su.name as "userName",
|
|
|
+ inf.url as "logo",
|
|
|
+ sui.sex as "sex",
|
|
|
su.leader_name as "leaderName"
|
|
|
from (
|
|
|
SELECT
|
|
|
@@ -1056,6 +1064,9 @@
|
|
|
sd.id
|
|
|
) a
|
|
|
left join sys_user su on su.id =a.userId
|
|
|
+ LEFT JOIN ins_upload_files inf on su.head_sculpture =inf.id
|
|
|
+ LEFT JOIN sys_user_info sui on sui .id =su.id
|
|
|
+
|
|
|
</select>
|
|
|
<select id="queryPageTaskStatisticsTotal" resultType="java.lang.Long">
|
|
|
select count(0) from (
|
|
|
@@ -1737,31 +1748,14 @@
|
|
|
<select id="querOrdersDataPage" resultType="com.ydtech.modules.admin.model.report.company.OrdersDataDto">
|
|
|
SELECT
|
|
|
count( 0 ) AS "orderNumber",
|
|
|
- SUM( CASE WHEN orderstatus = '3' THEN 1 ELSE 0 END ) / count( 0 ) AS "closeRate",
|
|
|
b.licenseno as "licenseno",
|
|
|
- b.frameno as "frameno",
|
|
|
- b.inscompany as "namesimple"
|
|
|
+ b.frameno as "frameno"
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
io.orderstatus AS orderstatus,
|
|
|
io.frameno AS frameno,
|
|
|
- ifnull(io.licenseno, '') AS licenseno,
|
|
|
- ifnull(
|
|
|
- (
|
|
|
- SELECT
|
|
|
- ifnull( inscompany, '' )
|
|
|
- FROM
|
|
|
- ins_area_company
|
|
|
- WHERE
|
|
|
- orderno = io.orderno
|
|
|
- AND io.orderstatus = 3
|
|
|
- AND orderstatus = 3
|
|
|
- ORDER BY
|
|
|
- createtime DESC
|
|
|
- LIMIT 1
|
|
|
- ), ''
|
|
|
- ) AS inscompany
|
|
|
+ ifnull(io.licenseno, '') AS licenseno
|
|
|
FROM
|
|
|
ins_orders io
|
|
|
LEFT JOIN sys_user su on io.userid=su.id
|
|
|
@@ -1797,9 +1791,7 @@
|
|
|
) b
|
|
|
GROUP BY
|
|
|
b.licenseno,
|
|
|
- b.frameno,
|
|
|
- b.inscompany,
|
|
|
- b.orderstatus
|
|
|
+ b.frameno
|
|
|
</select>
|
|
|
|
|
|
<select id="getOrdersGroupByLicenseno" resultType="com.ydtech.modules.admin.model.report.company.OrdersDataDto">
|
|
|
@@ -2126,4 +2118,26 @@
|
|
|
|
|
|
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getSumBigOrderCount" resultType="com.ydtech.modules.admin.model.report.company.OrdersDataDto">
|
|
|
+ select count(0) as "orderNumber",
|
|
|
+ GROUP_CONCAT(inscompany ORDER BY inscompany SEPARATOR ',') as "namesimple"
|
|
|
+ from ins_area_company iac
|
|
|
+ left join ins_orders io on io.orderno = iac.orderno
|
|
|
+ <where>
|
|
|
+ 1=1
|
|
|
+ and iac.orderstatus ='3'
|
|
|
+ and io.orderstatus ='3'
|
|
|
+ <if test="vo.licenseno !=null and vo.licenseno!=''">
|
|
|
+ AND io.licenseno =#{vo.licenseno}
|
|
|
+ </if>
|
|
|
+ <if test="vo.frameno !=null and vo.frameno!=''">
|
|
|
+ AND io.frameno =#{vo.frameno}
|
|
|
+ </if>
|
|
|
+ <if test="vo.beginDate != null and vo.beginDate!='' and vo.endDate != null and vo.endDate!=''">
|
|
|
+ AND io.createtime BETWEEN #{vo.beginDate} AND #{vo.endDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|