Selaa lähdekoodia

Merge remote-tracking branch 'origin/test' into test

Qchen 2 vuotta sitten
vanhempi
commit
b69742319b

+ 1 - 0
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -809,6 +809,7 @@ handlingProportion,
                 if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
                     objectObjectHashMap.put("noPolicyno", excelItem.getNoPolicyno());   //非车保单号
                 }
+                objectObjectHashMap.put("agreementType","1");
                 InsPlyIncome insPlyIncome = baseMapper.findByLicenseno(objectObjectHashMap);
                 if (ObjectUtils.isNotEmpty(insPlyIncome)) {
 //                  如果能查询出来则 修改结算  变成已结算

+ 169 - 0
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -475,6 +475,13 @@
        select
         <include refid="income_com"/>
         from  ins_ply_income a
+        LEFT  JOIN  ptl_agreement  pa  on  a.agreement_id  = pa.id
+        LEFT  JOIN  sys_user   su  on su.id=a.user_id
+        LEFT  JOIN  sys_user   su1  on su1.id=a.settlement_user_id
+        LEFT  JOIN  sys_user   su2  on su2.id=a.update_user_id
+        LEFT  JOIN   ins_upload_files  upf   on  a.settlement_image_id=upf.id
+        LEFT  JOIN   esm_ins_company  eic   on  eic.id=a.partner_companies_id
+        LEFT  JOIN   sys_dept b on pa.dept_id=b.id
         <where>
             1=1
             <if test="licenseno !=null  and  licenseno !=''">
@@ -492,6 +499,168 @@
             <if test="isOther !=null  and  isOther  !=''">
                 and a.is_not_documentary   =#{isOther}
             </if>
+            <if test="startDate !=null  and  startDate!='' and  endDate !=null and endDate !=''">
+                and DATE_FORMAT( a.signdate, '%Y-%m-%d')  between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')
+            </if>
+            <if test="agreementType !=null  and  agreementType  !=''">
+                and pa.agreement_type =#{agreementType}
+            </if>
+
+            <if test="signDateEnd !=null  and  signDateEnd!='' and  signDateStart !=null and signDateStart !=''">
+                and a.signdate   between #{signDateStart} and #{signDateEnd}
+            </if>
+
+            <if test="handlingFeesStatus !=null  and  handlingFeesStatus  !=''">
+                and a.handling_fees_status =#{handlingFeesStatus}
+            </if>
+            <if test="jqReceivableProportion !=null  and  jqReceivableProportion  !=''">
+                and a.jq_receivable_proportion =#{jqReceivableProportion}
+            </if>
+
+            <if test="syReceivableProportion !=null  and  syReceivableProportion  !=''">
+                and a.sy_receivable_proportion =#{syReceivableProportion}
+            </if>
+            <if test="noReceivableProportion !=null  and  noReceivableProportion  !=''">
+                and a.no_receivable_proportion =#{noReceivableProportion}
+            </if>
+
+
+
+            <if test="id !=null  and  id  !=''">
+                and a.id =#{id}
+            </if>
+
+            <if test="allPartnerCompaniesId !=null  and  allPartnerCompaniesId  !=''">
+                AND eic.parent_id LIKE CONCAT(#{allPartnerCompaniesId}, '%')
+            </if>
+
+            <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
+                and eic.parent_id LIKE CONCAT(#{provincePartnerCompaniesId}, '%')
+            </if>
+
+            <if test="dockingPerson !=null  and  dockingPerson  !=''">
+                and  pa.docking_person  =#{dockingPerson}
+            </if>
+
+            <if test="provinceId != null and provinceId != ''">
+                and pa.dept_id  LIKE CONCAT(#{provinceId}, '%')
+            </if>
+
+            <if test="cityId != null and cityId != ''">
+                and pa.dept_id  LIKE CONCAT(#{cityId}, '%')
+            </if>
+
+            <if test="createTimeQuery != null and createTimeQuery != ''">
+                and DATE_FORMAT( a.create_time, '%Y-%m-%d')   =#{createTimeQuery}
+            </if>
+
+            <if test="countyId != null and countyId != ''">
+                and pa.dept_id   LIKE CONCAT(#{countyId}, '%')
+            </if>
+            <if test="taskId != null and taskId != ''">
+                and a.task_id = #{taskId}
+            </if>
+            <if test="orderno !=null  and  orderno  !=''">
+                and a.orderno =#{orderno}
+            </if>
+            <if test="companyName !=null  and  companyName  !=''">
+                and a.company_id =#{companyName}
+            </if>
+
+            <if test="documentaryFeesStatus !=null  and  documentaryFeesStatus  !=''">
+                and a.documentary_fees_status =#{documentaryFeesStatus}
+            </if>
+
+            <if test="isNotCar !=null  and  isNotCar  !=''">
+                and a.is_not_car =#{isNotCar}
+            </if>
+
+            <if test="deptId !=null  and  deptId  !=''">
+                and pa.dept_id =#{deptId}
+            </if>
+
+
+            <if test="ids != null and ids != '' and ids.length > 0">
+                and a.id in
+                <foreach collection="ids" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="incomeIds != null and incomeIds != '' and incomeIds.size() > 0">
+                and a.id in
+                <foreach collection="incomeIds" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+
+            <if test="selectIds != null and selectIds != '' and selectIds.size() > 0">
+                and a.id in
+                <foreach collection="selectIds" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+
+            <if test="partnerCompaniesIdList != null and partnerCompaniesIdList != '' and partnerCompaniesIdList.size() > 0">
+                and a.partner_companies_id in
+                <foreach collection="partnerCompaniesIdList" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="signdate !=null  and  signdate  !=''">
+                AND  a.signdate =#{signdate}
+            </if>
+            <if test="partnerCompaniesId !=null  and  partnerCompaniesId  !=''">
+                AND a.partner_companies_id =#{partnerCompaniesId}
+            </if>
+
+            <if test="partnerCompaniesName !=null  and  partnerCompaniesName  !=''">
+                AND   a.partner_companies_name =#{partnerCompaniesName}
+            </if>
+
+            <if test="createTime !=null  and  createTime  !=''">
+                AND  a.create_time =#{createTime}
+            </if>
+            <if test="settlementTime !=null  and  settlementTime  !=''">
+                AND a.settlement_time =#{settlementTime}
+            </if>
+
+            <if test="settlementDate !=null  and  settlementDate  !=''">
+                AND a.settlement_time =#{settlementDate}
+            </if>
+
+            <if test="userId !=null  and  userId  !=''">
+                and a.userId   =#{userId}
+            </if>
+            <if test="companyId !=null  and  companyId  !=''">
+                and a.company_id   =#{companyId}
+            </if>
+            <if test="riskcode !=null  and  riskcode  !=''">
+                and a.riskcode   =#{riskcode}
+            </if>
+            <if test="year !=null  and  year  !=''">
+                AND YEAR(a.signdate) =#{year}
+            </if>
+            <if test="month !=null  and  month !=''">
+                AND month(a.signdate) =#{month}
+            </if>
+            <if test="day !=null  and  day !=''">
+                AND day(a.signdate) =#{day}
+            </if>
+            <if test="insuredName !=null  and  insuredName !=''">
+                AND  a.insured_name =#{insuredName}
+            </if>
+            <if test="jqStartDate  !=null  and  jqStartDate  != ''  and  jqEndDate   != null  and  jqEndDate   !=''">
+                AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
+
+            </if>
+            <if test="syStartDate  !=null  and  syStartDate  != ''  and  syEndDate   != null  and  syEndDate   !=''">
+                AND DATE(a.sy_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
+
+            </if>
+
+            <if test="yearStrat  !=null  and  yearStrat  != ''  and  yearEnd   != null  and  yearEnd   !=''">
+                AND DATE(a.signdate) BETWEEN #{yearStrat} AND #{yearEnd}
+            </if>
         </where>
     </select>
 

+ 2 - 0
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -1357,6 +1357,8 @@
                 left join ins_area_company iac on sua.suborder = iac.id
                 left join ins_orders io on iac.orderno = io.orderno
         WHERE
+            (sua.property != 1 and sua.property != 2)
+        AND
             user_id = #{userId}
           AND
             sua.create_time BETWEEN #{param.signStartDate} and #{param.signEndDate}