|
|
@@ -42,6 +42,9 @@
|
|
|
javaType="com.alibaba.fastjson.JSONObject"
|
|
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
|
|
|
<result property="subOrderId" column="subOrderId" jdbcType="VARCHAR"/>
|
|
|
+ <result property="agreementCode" column="agreementCode" jdbcType="VARCHAR"/>
|
|
|
+ <result property="agreementName" column="agreementName" jdbcType="VARCHAR"/>
|
|
|
+
|
|
|
</resultMap>
|
|
|
<resultMap id="OrderResultMap" type="com.ydtech.modules.order.entity.vo.OrderVo">
|
|
|
<id property="orderno" column="orderno" jdbcType="VARCHAR"/>
|
|
|
@@ -806,11 +809,15 @@
|
|
|
io.vehicle_and_vessel_tax as vehicleAndVesselTax,
|
|
|
iac.id as subOrderId,
|
|
|
iac.id as company_id,
|
|
|
- iac.inscompany as ins_company
|
|
|
+ iac.inscompany as ins_company,
|
|
|
+ agree.agreement_code as agreementCode,
|
|
|
+ agree.agreement_name as agreementName
|
|
|
from
|
|
|
ins_area_company iac
|
|
|
left JOIN
|
|
|
ins_orders io on iac.orderno = io.orderno
|
|
|
+ left join
|
|
|
+ ptl_agreement agree on iac.agreement_id= agree.id
|
|
|
<where>
|
|
|
<if test="agentUserIds != null and agentUserIds.size>0" >
|
|
|
AND (
|
|
|
@@ -845,13 +852,13 @@
|
|
|
)
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderNo != null and orderQueryVo.orderNo != ''">
|
|
|
- and io.orderno = #{orderQueryVo.orderNo}
|
|
|
+ and iac.id = #{orderQueryVo.orderNo}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.deptId != null and orderQueryVo.deptId != ''">
|
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
|
|
|
- and iac.orderstatus = #{orderQueryVo.orderStatus}
|
|
|
+ and iac.orderstatus= #{orderQueryVo.orderStatus}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
|
|
|
and io.frameno = #{orderQueryVo.frameNo}
|
|
|
@@ -862,8 +869,8 @@
|
|
|
<if test="orderQueryVo.insuredName != null and orderQueryVo.insuredName != ''">
|
|
|
and io.insuredname = #{orderQueryVo.insuredName}
|
|
|
</if>
|
|
|
- <if test="orderQueryVo.startDate != null and orderQueryVo.endDate != null">
|
|
|
- and io.createtime between #{orderQueryVo.startDate} AND #{orderQueryVo.endDate}
|
|
|
+ <if test="orderQueryVo.quoteStartDateStr != null and orderQueryVo.quoteEndDateStr != null">
|
|
|
+ and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{orderQueryVo.quoteStartDateStr} AND #{orderQueryVo.quoteEndDateStr}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.companyId != null and orderQueryVo.companyId != ''">
|
|
|
and iac.company_id = #{orderQueryVo.companyId}
|
|
|
@@ -874,6 +881,41 @@
|
|
|
<if test="orderQueryVo.operatorName != null and orderQueryVo.operatorName != ''">
|
|
|
and io.username = #{orderQueryVo.operatorName}
|
|
|
</if>
|
|
|
+ <if test="orderQueryVo.engineNo != null and orderQueryVo.engineNo != ''">
|
|
|
+ and JSON_EXTRACT( io.carinfo, '$.engineNo' ) = #{orderQueryVo.engineNo}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.provinceId != null and orderQueryVo.provinceId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.provinceId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.cityId != null and orderQueryVo.cityId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.cityId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.countyId != null and orderQueryVo.countyId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.countyId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.houseId != null and orderQueryVo.houseId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.houseId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.agreeId != null and orderQueryVo.agreeId != ''">
|
|
|
+ and iac.agreement_id = #{orderQueryVo.agreeId}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.taskNo != null and orderQueryVo.taskNo != ''">
|
|
|
+ and io.orderno = #{orderQueryVo.taskNo}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.riskCode != null and orderQueryVo.riskCode != ''">
|
|
|
+ and io.product = #{orderQueryVo.riskCode}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
|
|
|
+ and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
|
|
|
+ and ((
|
|
|
+ DATE_FORMAT(io.jqstartdate, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
|
|
|
+ AND #{orderQueryVo.attachEndDateStr}
|
|
|
+ )
|
|
|
+ OR ( DATE_FORMAT(io.systartdate, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr} AND #{orderQueryVo.attachEndDateStr} )
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by io.createtime desc
|
|
|
</select>
|
|
|
@@ -922,7 +964,7 @@
|
|
|
)
|
|
|
</if>
|
|
|
<if test="orderQueryVo.orderNo != null and orderQueryVo.orderNo != ''">
|
|
|
- and io.orderno = #{orderQueryVo.orderNo}
|
|
|
+ and iac.id = #{orderQueryVo.orderNo}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.deptId != null and orderQueryVo.deptId != ''">
|
|
|
and io.deptid like "${orderQueryVo.deptId}%"
|
|
|
@@ -939,8 +981,8 @@
|
|
|
<if test="orderQueryVo.insuredName != null and orderQueryVo.insuredName != ''">
|
|
|
and io.insuredname = #{orderQueryVo.insuredName}
|
|
|
</if>
|
|
|
- <if test="orderQueryVo.startDate != null and orderQueryVo.endDate != null">
|
|
|
- and io.createtime between #{orderQueryVo.startDate} AND #{orderQueryVo.endDate}
|
|
|
+ <if test="orderQueryVo.quoteStartDateStr != null and orderQueryVo.quoteEndDateStr != null">
|
|
|
+ and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{orderQueryVo.quoteStartDateStr} AND #{orderQueryVo.quoteEndDateStr}
|
|
|
</if>
|
|
|
<if test="orderQueryVo.companyId != null and orderQueryVo.companyId != ''">
|
|
|
and iac.company_id = #{orderQueryVo.companyId}
|
|
|
@@ -951,6 +993,41 @@
|
|
|
<if test="orderQueryVo.operatorName != null and orderQueryVo.operatorName != ''">
|
|
|
and io.username = #{orderQueryVo.operatorName}
|
|
|
</if>
|
|
|
+ <if test="orderQueryVo.engineNo != null and orderQueryVo.engineNo != ''">
|
|
|
+ and JSON_EXTRACT( io.carinfo, '$.engineNo' ) = #{orderQueryVo.engineNo}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.provinceId != null and orderQueryVo.provinceId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.provinceId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.cityId != null and orderQueryVo.cityId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.cityId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.countyId != null and orderQueryVo.countyId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.countyId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.houseId != null and orderQueryVo.houseId != ''">
|
|
|
+ and io.deptid like "${orderQueryVo.houseId}%"
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.agreeId != null and orderQueryVo.agreeId != ''">
|
|
|
+ and iac.agreement_id = #{orderQueryVo.agreeId}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.taskNo != null and orderQueryVo.taskNo != ''">
|
|
|
+ and io.orderno = #{orderQueryVo.taskNo}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.riskCode != null and orderQueryVo.riskCode != ''">
|
|
|
+ and io.product = #{orderQueryVo.riskCode}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
|
|
|
+ and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
|
|
|
+ </if>
|
|
|
+ <if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
|
|
|
+ and ((
|
|
|
+ DATE_FORMAT(io.jqstartdate, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
|
|
|
+ AND #{orderQueryVo.attachEndDateStr}
|
|
|
+ )
|
|
|
+ OR ( DATE_FORMAT(io.systartdate, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr} AND #{orderQueryVo.attachEndDateStr} )
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
) as s
|
|
|
</select>
|