|
|
@@ -938,9 +938,9 @@
|
|
|
|
|
|
<select id="quotationDetailsExcel" resultType="com.ydtech.modules.admin.model.dto.QuotationDetailsExcel">
|
|
|
select
|
|
|
- iac.orderno as "orderno",
|
|
|
+ iac.id as "orderno",
|
|
|
iac.agreement_id as "agreementId",
|
|
|
- iac.orderstatus as "orderstatus",
|
|
|
+ iot.order_status as "orderstatus",
|
|
|
iac.company_id as "companyId",
|
|
|
agree.partner_companies_id as "partnerCompaniesId",
|
|
|
ins.namesimple as "partnerCompaniesName",
|
|
|
@@ -959,7 +959,12 @@
|
|
|
io.licenseno as "licenseno",
|
|
|
su1.name as "userName",
|
|
|
su1.leader_name as "leaderName"
|
|
|
- from ins_area_company iac
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select iot.suborder,iot.order_status from `ins_orders_track` iot
|
|
|
+ GROUP BY iot.suborder ,iot.order_status
|
|
|
+ ) iot
|
|
|
+ left join ins_area_company iac ON iac.id = iot.suborder
|
|
|
LEFT JOIN ptl_agreement agree ON iac.agreement_id = agree.id
|
|
|
LEFT JOIN ins_orders io ON iac.orderno = io.orderno
|
|
|
LEFT JOIN sys_user su1 on su1.id=io.userid
|
|
|
@@ -968,6 +973,7 @@
|
|
|
LEFT JOIN esm_ins_company ins ON agree.partner_companies_id = ins.id
|
|
|
<where>
|
|
|
agree.id IS NOT NULL
|
|
|
+
|
|
|
and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
|
|
|
<if test="vo.companyId != null and vo.companyId!='' ">
|
|
|
AND agree.insurance_company_id = #{vo.companyId}
|