|
@@ -138,14 +138,18 @@
|
|
|
ifa.audittime as auditTime,
|
|
ifa.audittime as auditTime,
|
|
|
ifa.auditstatus as auditStatus,
|
|
ifa.auditstatus as auditStatus,
|
|
|
eic.namesimple as partnerCompaniesName,
|
|
eic.namesimple as partnerCompaniesName,
|
|
|
- iac.id as subOrderId
|
|
|
|
|
|
|
+ iac.id as subOrderId,
|
|
|
|
|
+ iac.signing_time as signingTime,
|
|
|
|
|
+ iac.pay_date as payDate,
|
|
|
|
|
+ pa.agreement_code as agreementCode,
|
|
|
|
|
+ pa.agreement_name as agreementName
|
|
|
FROM
|
|
FROM
|
|
|
ins_orders io
|
|
ins_orders io
|
|
|
- LEFT JOIN ins_fee_audit ifa ON ifa.orderno = io.orderno
|
|
|
|
|
|
|
+ LEFT JOIN ins_area_company iac ON iac.orderno = io.orderno and iac.orderstatus = 3
|
|
|
|
|
+ LEFT JOIN ins_fee_audit ifa ON ifa.ins_order_no = iac.id
|
|
|
LEFT JOIN sys_user su ON su.id = io.userid
|
|
LEFT JOIN sys_user su ON su.id = io.userid
|
|
|
LEFT JOIN sys_dept sd ON sd.id = su.dept_id
|
|
LEFT JOIN sys_dept sd ON sd.id = su.dept_id
|
|
|
LEFT JOIN sys_user su2 ON ifa.audituser = su2.id
|
|
LEFT JOIN sys_user su2 ON ifa.audituser = su2.id
|
|
|
- LEFT JOIN ins_area_company iac ON iac.orderno = io.orderno and iac.orderstatus = 3
|
|
|
|
|
LEFT JOIN ptl_agreement pa ON pa.id = iac.agreement_id
|
|
LEFT JOIN ptl_agreement pa ON pa.id = iac.agreement_id
|
|
|
LEFT JOIN esm_ins_company eic on eic.id = pa.partner_companies_id
|
|
LEFT JOIN esm_ins_company eic on eic.id = pa.partner_companies_id
|
|
|
WHERE
|
|
WHERE
|
|
@@ -181,10 +185,10 @@
|
|
|
<if test="params.riskCode != null and params.riskCode != ''">
|
|
<if test="params.riskCode != null and params.riskCode != ''">
|
|
|
and io.product = #{params.riskCode}
|
|
and io.product = #{params.riskCode}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="params.quoteStartDateStr != null and params.quoteStartDateStr != ''">
|
|
|
|
|
|
|
+ <if test="params.quoteStartDateStr != null and params.quoteStartDateStr != '' and params.quoteEndDateStr != null and params.quoteEndDateStr != ''">
|
|
|
and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{params.quoteStartDateStr} AND #{params.quoteEndDateStr}
|
|
and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{params.quoteStartDateStr} AND #{params.quoteEndDateStr}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="params.attachStartDateStr != null and params.attachStartDateStr != ''">
|
|
|
|
|
|
|
+ <if test="params.attachStartDateStr != null and params.attachStartDateStr != '' and params.attachStartDateStr != null and params.attachStartDateStr != '' ">
|
|
|
and ((
|
|
and ((
|
|
|
DATE_FORMAT(io.jqstartdate, '%Y-%m-%d') BETWEEN #{params.attachStartDateStr}
|
|
DATE_FORMAT(io.jqstartdate, '%Y-%m-%d') BETWEEN #{params.attachStartDateStr}
|
|
|
AND #{params.attachEndDateStr}
|
|
AND #{params.attachEndDateStr}
|
|
@@ -219,8 +223,12 @@
|
|
|
<if test="params.managementSource != null and params.managementSource != ''">
|
|
<if test="params.managementSource != null and params.managementSource != ''">
|
|
|
and sd.management_source = #{params.managementSource}
|
|
and sd.management_source = #{params.managementSource}
|
|
|
</if>
|
|
</if>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <if test="params.signStartDateStr != null and params.signStartDateStr != '' and params.signEndDateStr != null and params.signEndDateStr != ''">
|
|
|
|
|
+ and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{params.signStartDateStr} AND #{params.signEndDateStr}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="params.payStartDateStr != null and params.payStartDateStr != '' and params.payEndDateStr != null and params.payEndDateStr != ''">
|
|
|
|
|
+ and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{params.payStartDateStr} AND #{params.payEndDateStr}
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getByUserId" resultType="com.ydtech.modules.order.entity.InsOrders">
|
|
<select id="getByUserId" resultType="com.ydtech.modules.order.entity.InsOrders">
|