Просмотр исходного кода

1.结算调整添加结算记录

wuhp 2 лет назад
Родитель
Сommit
8450628858

+ 4 - 0
src/main/java/com/ydtech/modules/fnc/entity/SettlementDocumentaryFeesEntity.java

@@ -118,5 +118,9 @@ public class SettlementDocumentaryFeesEntity implements Serializable {
     private String handlingFeesStatus;
 
 
+    @ApiModelProperty("协议类型")
+    @TableField("agreement_type")
+    private String agreementType;
+
 
 }

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

@@ -1219,6 +1219,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
         settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
         settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
+        settlementDocumentaryFeesVo.setAgreementType("2");  //1平台 2  保险
         settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
         return HttpResult.ok();
     }
@@ -1317,6 +1318,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         settlementDocumentaryFeesVo.setHandlingFeesStatus("0");
         settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
         settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
+        settlementDocumentaryFeesVo.setAgreementType("2");  //1平台 2  保险
         settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
         return HttpResult.ok();
     }
@@ -1341,7 +1343,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         List<InsPlyIncome> result = baseMapper.allOtherAmount(params);
         List<HashMap<String, Object>> otherIds = baseMapper.getOtherIds(params);
         List<HashMap<String, Object>> invoicIds = settlementDocumentaryFeesService.getInvoicIds(params);
-        this.splicingOtherIds(result,otherIds,invoicIds );
+//        this.splicingOtherIds(result,otherIds,invoicIds );
         return HttpResult.ok(result);
     }
 

+ 14 - 0
src/main/java/com/ydtech/modules/fnc/service/impl/SettlementDocumentaryFeesServiceImpl.java

@@ -43,6 +43,20 @@ public class SettlementDocumentaryFeesServiceImpl extends ServiceImpl<Settlement
             HashMap<String, Object> params = new HashMap<>();
             params.put("pageNum", settlementDocumentaryFeesVo.getPageNum());
             params.put("pageSize", settlementDocumentaryFeesVo.getPageSize());
+            if(StringUtils.isNotEmpty(settlementDocumentaryFeesVo.getHandlingFeesStatus())){
+                params.put("handlingFeesStatus",settlementDocumentaryFeesVo.getHandlingFeesStatus());
+            }
+            if(StringUtils.isNotEmpty(settlementDocumentaryFeesVo.getAgreementType())){
+                params.put("agreementType",settlementDocumentaryFeesVo.getAgreementType());
+            }
+
+            if(StringUtils.isNotEmpty(settlementDocumentaryFeesVo.getIsNotCar())){
+                params.put("isNotCar",settlementDocumentaryFeesVo.getIsNotCar());
+            }
+
+            if(StringUtils.isNotEmpty(settlementDocumentaryFeesVo.getPartnerCompaniesId())){
+                params.put("partnerCompaniesId",settlementDocumentaryFeesVo.getPartnerCompaniesId());
+            }
             PageInfo<List<SettlementDocumentaryFeesEntity>> pageHelper = null;
             List<SettlementDocumentaryFeesEntity> list = this.baseMapper.querySettle(params);
             pageHelper = new PageInfo(list);

+ 3 - 0
src/main/java/com/ydtech/modules/fnc/vo/SettlementDocumentaryFeesVo.java

@@ -105,4 +105,7 @@ public class SettlementDocumentaryFeesVo implements Serializable {
 
     @ApiModelProperty("是否是手续费")
     private String handlingFeesStatus;
+
+    @ApiModelProperty("协议类型")
+    private String agreementType;
 }

+ 76 - 8
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -871,26 +871,94 @@
         ) f ON f.partnerCompaniesId = a.partner_companies_id
         <where>
             1=1
-            <if test="agreementType !=null  and agreementType!='' ">
-                AND pa.agreement_type =#{agreementType}
+            <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="year !=null  and  year  !=''">
-                AND YEAR(a.signdate) =#{year}
+            <if test="agreementType !=null  and  agreementType  !=''">
+                and pa.agreement_type =#{agreementType}
             </if>
-            <if test="isOther !=null  and  isOther  !=''">
-                and a.is_not_documentary   =#{isOther}
+
+            <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="dockingPerson !=null  and  dockingPerson  !=''">
+                and  pa.docking_person  =#{dockingPerson}
             </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="policyno !=null  and  policyno  !=''">
+                and a.policyno =#{policyno}
+            </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="isOther !=null  and  isOther  !=''">
+                and a.is_not_documentary   =#{isOther}
+            </if>
+            <if test="licenseno != null and licenseno != ''">
+                and a.licenseno  =#{licenseno}
+            </if>
+            <if test="syPolicyno != null and syPolicyno != ''">
+                and a.sy_policyno  =#{syPolicyno}
+            </if>
+
+            <if test="noPolicyno != null and noPolicyno != ''">
+                and a.no_policyno =#{noPolicyno}
+            </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="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="documentaryFeesStatus != null  and documentaryFeesStatus != '' ">
-                AND   a.documentary_fees_status = #{documentaryFeesStatus}
+            <if test="insuredName !=null  and  insuredName !=''">
+                AND  a.insured_name =#{insuredName}
             </if>
         </where>
         GROUP BY

+ 22 - 0
src/main/resources/mapper/modules/fnc/SettlementDocumentaryFeesMapper.xml

@@ -26,6 +26,7 @@
         <result column="expend_amount" property="expendAmount"/>
         <result column="parent_id" property="parentId"/>
         <result column="handling_fees_status" property="handlingFeesStatus"/>
+        <result column="agreement_type" property="agreementType"/>
     </resultMap>
 
 
@@ -47,8 +48,25 @@
             a.expend_amount as "expendAmount",
             a.parent_id as "parentId",
             a.handling_fees_status as "handlingFeesStatus",
+            a.agreement_type as "agreementType",
+            a.settlement_time as "settlementTime",
             a.unsettled_amount as "unsettledAmount"
             from  settlement_documentary_fees  a
+        <where>
+            1=1
+            <if test="partnerCompaniesId !=null  and  partnerCompaniesId  !=''">
+                and a.partner_companies_id =#{partnerCompaniesId}
+            </if>
+            <if test="handlingFeesStatus !=null  and  handlingFeesStatus  !=''">
+                and a.handling_fees_status =#{handlingFeesStatus}
+            </if>
+            <if test="isNotCar !=null  and  isNotCar  !=''">
+                and a.is_not_car =#{isNotCar}
+            </if>
+            <if test="agreementType !=null  and  agreementType  !=''">
+                and a.agreement_type =#{agreementType}
+            </if>
+        </where>
     </select>
 
     <select id="getOtherSettldetail" resultType="java.util.HashMap">
@@ -58,6 +76,7 @@
         a.invoice_id AS  "invoicId",
         a.tax_points AS  "taxPoints",
         a.settlement_amount - COALESCE(b.settlementAmount, 0) AS "invoicCommissionFeevalue",
+        a.agreement_type as "agreementType",
         a.invoicing_method AS  "invoicingMethod"
         FROM
         settlement_documentary_fees a
@@ -77,6 +96,9 @@
             <if test="handlingFeesStatus !=null  and  handlingFeesStatus  !=''">
                 and a.handling_fees_status =#{handlingFeesStatus}
             </if>
+            <if test="isNotCar !=null  and  isNotCar  !=''">
+                and a.is_not_car =#{isNotCar}
+            </if>
             <if test="invoiceIds !=null and  invoiceIds !=''  and invoiceIds.length>0">
                 and a.id IN
                 <foreach item="item" index="index" collection="invoiceIds" open="(" separator="," close=")">