소스 검색

1.子订单报价明细导出添加轨迹得逻辑

wuhp 1 년 전
부모
커밋
e539537ae3

+ 6 - 0
src/main/java/com/ydtech/modules/admin/service/impl/CompanyDataReportServiceImpl.java

@@ -345,6 +345,12 @@ public class CompanyDataReportServiceImpl implements CompanyDataReportService {
                 if("10".equals(quotationDetailsExcel.getOrderstatus())){
                     quotationDetailsExcel.setOrderstatus("报价失败");
                 }
+                if("11".equals(quotationDetailsExcel.getOrderstatus())){
+                    quotationDetailsExcel.setOrderstatus("重复投保");
+                }
+                if("4".equals(quotationDetailsExcel.getOrderstatus())){
+                    quotationDetailsExcel.setOrderstatus("核保退回");
+                }
             }
 
         }

+ 9 - 3
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -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}