|
@@ -50,8 +50,9 @@
|
|
|
<result property="agreementName" column="agreementName" jdbcType="VARCHAR"/>
|
|
<result property="agreementName" column="agreementName" jdbcType="VARCHAR"/>
|
|
|
<result property="partnerCompaniesName" column="partnerCompaniesName" jdbcType="VARCHAR"/>
|
|
<result property="partnerCompaniesName" column="partnerCompaniesName" jdbcType="VARCHAR"/>
|
|
|
<result property="managementSource" column="managementSource" jdbcType="VARCHAR"/>
|
|
<result property="managementSource" column="managementSource" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="leaderName" column="leader_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="leaderId" column="leader_id" jdbcType="VARCHAR"/>
|
|
|
<result property="underwritingStatus" column="underwritingStatus" jdbcType="INTEGER"/>
|
|
<result property="underwritingStatus" column="underwritingStatus" jdbcType="INTEGER"/>
|
|
|
-
|
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<resultMap id="OrderResultMap" type="com.ydtech.modules.order.entity.vo.OrderVo">
|
|
<resultMap id="OrderResultMap" type="com.ydtech.modules.order.entity.vo.OrderVo">
|
|
|
<id property="orderno" column="orderno" jdbcType="VARCHAR"/>
|
|
<id property="orderno" column="orderno" jdbcType="VARCHAR"/>
|
|
@@ -900,6 +901,8 @@
|
|
|
company.namesimple as partnerCompaniesName,
|
|
company.namesimple as partnerCompaniesName,
|
|
|
iac.api_type,
|
|
iac.api_type,
|
|
|
io.is_external,
|
|
io.is_external,
|
|
|
|
|
+ u.leader_name,
|
|
|
|
|
+ u.leader_id,
|
|
|
CASE dept.management_source
|
|
CASE dept.management_source
|
|
|
WHEN '1' THEN '渠道'
|
|
WHEN '1' THEN '渠道'
|
|
|
WHEN '2' THEN '个代'
|
|
WHEN '2' THEN '个代'
|
|
@@ -916,6 +919,8 @@
|
|
|
esm_ins_company company on agree.partner_companies_id= company.id
|
|
esm_ins_company company on agree.partner_companies_id= company.id
|
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
|
sys_dept dept ON dept.id = io.deptid
|
|
sys_dept dept ON dept.id = io.deptid
|
|
|
|
|
+ LEFT JOIN
|
|
|
|
|
+ sys_user u on io.userid = u.id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="agentUserIds != null and agentUserIds.size>0" >
|
|
<if test="agentUserIds != null and agentUserIds.size>0" >
|
|
|
AND (
|
|
AND (
|
|
@@ -1011,6 +1016,14 @@
|
|
|
<if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
|
|
<if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
|
|
|
and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
|
|
and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="orderQueryVo.leaderId != null and orderQueryVo.leaderId != ''">
|
|
|
|
|
+ and u.leader_id = #{leaderId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orderQueryVo.leaderName != null and orderQueryVo.leaderName != ''">
|
|
|
|
|
+ and u.leader_name = #{leaderName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
<if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
|
|
<if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
|
|
|
and ((
|
|
and ((
|
|
|
DATE_FORMAT(iac.jq_start_date, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
|
|
DATE_FORMAT(iac.jq_start_date, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
|
|
@@ -1043,6 +1056,8 @@
|
|
|
ins_orders io on iac.orderno = io.orderno
|
|
ins_orders io on iac.orderno = io.orderno
|
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
|
sys_dept dept ON dept.id = io.deptid
|
|
sys_dept dept ON dept.id = io.deptid
|
|
|
|
|
+ LEFT JOIN
|
|
|
|
|
+ sys_user u on io.userid = u.id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="agentUserIds != null and agentUserIds.size>0" >
|
|
<if test="agentUserIds != null and agentUserIds.size>0" >
|
|
|
AND (
|
|
AND (
|
|
@@ -1136,6 +1151,14 @@
|
|
|
<if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
|
|
<if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
|
|
|
and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
|
|
and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="orderQueryVo.leaderId != null and orderQueryVo.leaderId != ''">
|
|
|
|
|
+ and u.leader_id = #{leaderId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orderQueryVo.leaderName != null and orderQueryVo.leaderName != ''">
|
|
|
|
|
+ and u.leader_name = #{leaderName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
<if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
|
|
<if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
|
|
|
and ((
|
|
and ((
|
|
|
DATE_FORMAT(iac.jq_start_date, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
|
|
DATE_FORMAT(iac.jq_start_date, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
|