Quellcode durchsuchen

1.結算调整优化 3.0

wuhp vor 2 Jahren
Ursprung
Commit
45564e8c00

+ 12 - 0
src/main/java/com/ydtech/modules/esm/controller/EsmInsCompanyController.java

@@ -12,6 +12,7 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageRequest;
 import com.ydtech.core.page.PageResult;
 import com.ydtech.exception.SystemException;
+import com.ydtech.modules.admin.model.SysDept;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.esm.model.vo.req.EsmInsCompanyReq;
@@ -237,4 +238,15 @@ public class EsmInsCompanyController extends BaseController {
         return HttpResult.ok(esmInsCompanyResVos);
     }
 
+    @ApiOperation(value = "查询保司机构下级")
+    @GetMapping(value = "/queryListByParentId/{parentId}")
+    public HttpResult<List<EsmInsCompany>> queryListByParentId(@PathVariable("parentId") String parentId) {
+        if(parentId==null || "".equals(parentId)) {
+            return HttpResult.error("parentId父级id不能为空");
+        }
+        List<EsmInsCompany> esmInsCompanyList = esmInsCompanyService.queryListByParentId(parentId);
+        return HttpResult.ok(esmInsCompanyList);
+    }
+
+
 }

+ 3 - 0
src/main/java/com/ydtech/modules/esm/dao/EsmInsCompanyMapper.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.esm.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ydtech.modules.esm.model.EsmInsCompany;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
 import java.util.List;
@@ -26,4 +27,6 @@ public interface EsmInsCompanyMapper extends BaseMapper<EsmInsCompany> {
     }
 
 
+    List<EsmInsCompany> queryListByParentId( @Param("parentId") String parentId);
+
 }

+ 2 - 0
src/main/java/com/ydtech/modules/esm/service/EsmInsCompanyService.java

@@ -66,6 +66,8 @@ public interface EsmInsCompanyService extends IService<EsmInsCompany> {
      * @return
      */
     List<String> getInsCompanyNextLevel(String companyId);
+
+    List<EsmInsCompany> queryListByParentId(String parentId);
 }
 
 

+ 6 - 0
src/main/java/com/ydtech/modules/esm/service/impl/EsmInsCompanyServiceImpl.java

@@ -165,6 +165,12 @@ public class EsmInsCompanyServiceImpl extends ServiceImpl<EsmInsCompanyMapper, E
         });
         return result;
     }
+
+    @Override
+    public List<EsmInsCompany> queryListByParentId(String parentId) {
+        List<EsmInsCompany>  resultList=baseMapper.queryListByParentId(parentId);
+        return resultList;
+    }
 }
 
 

+ 5 - 1
src/main/java/com/ydtech/modules/fnc/entity/SettlementDocumentaryFeesEntity.java

@@ -50,7 +50,7 @@ public class SettlementDocumentaryFeesEntity implements Serializable {
 
     @ApiModelProperty("创建时间")
     @TableField("create_time")
-    private LocalDate createTime;
+    private LocalDateTime createTime;
 
 
     @ApiModelProperty("结算日期")
@@ -134,6 +134,10 @@ public class SettlementDocumentaryFeesEntity implements Serializable {
     @TableField("settlement_image_id")
     private String settlementImageId;
 
+    @ApiModelProperty("税费")
+    @TableField("task_id")
+    private String taskId;
+
 
     @ApiModelProperty("图片路径")
     @TableField(exist = false)

+ 4 - 4
src/main/java/com/ydtech/modules/fnc/service/impl/ImportAsyncServiceImpl.java

@@ -195,7 +195,7 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
         endTask.setCompletedAt(LocalDateTime.now());
         endTask.setStatus("complete");
         if(!CollectionUtils.isEmpty(insImportResultsExcel)){
-            endTask.setUploadUrl("upload/excel/" + taskId + "/" + fileName);
+            endTask.setUploadUrl("/upload/excel/" + taskId + "/" + fileName);
         }
         endTask.setCompanyId(companyId);
         endTask.setAgreementId(agreementId);
@@ -349,7 +349,7 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
         endTask.setCompletedAt(LocalDateTime.now());
         endTask.setStatus("complete");
         if(!CollectionUtils.isEmpty(insImportResultsExcel)){
-            endTask.setUploadUrl("upload/excel/" + taskId + "/" + fileName);
+            endTask.setUploadUrl("/upload/excel/" + taskId + "/" + fileName);
         }
         endTask.setCompanyId(companyId);
         endTask.setAgreementId(agreementId);
@@ -457,7 +457,7 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
         endTask.setCompletedAt(LocalDateTime.now());
         endTask.setStatus("complete");
         if(!CollectionUtils.isEmpty(insImportResultsExcel)){
-            endTask.setUploadUrl("upload/excel/" + taskId + "/" + fileName);
+            endTask.setUploadUrl("/upload/excel/" + taskId + "/" + fileName);
         }
         endTask.setCompanyId(companyId);
         endTask.setAgreementId(agreementId);
@@ -565,7 +565,7 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
         endTask.setCompletedAt(LocalDateTime.now());
         endTask.setStatus("complete");
         if(!CollectionUtils.isEmpty(insImportResultsExcel)){
-            endTask.setUploadUrl("upload/excel/" + taskId + "/" + fileName);
+            endTask.setUploadUrl("/upload/excel/" + taskId + "/" + fileName);
         }
         endTask.setCompanyId(companyId);
         endTask.setAgreementId(agreementId);

+ 28 - 6
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -610,6 +610,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         if( StringUtils.isNotEmpty(insPlyIncomeVo.getDeptId())){
             params.put("deptId",insPlyIncomeVo.getDeptId());
         }
+        if( StringUtils.isNotEmpty(insPlyIncomeVo.getAllPartnerCompaniesId())){
+            params.put("allPartnerCompaniesId",insPlyIncomeVo.getAllPartnerCompaniesId());
+        }
+        if( StringUtils.isNotEmpty(insPlyIncomeVo.getProvincePartnerCompaniesId())){
+            params.put("provincePartnerCompaniesId",insPlyIncomeVo.getProvincePartnerCompaniesId());
+        }
         if(!CollectionUtils.isEmpty(insPlyIncomeVo.getSelectIds())){
             params.put("selectIds",insPlyIncomeVo.getSelectIds());
         }
@@ -1237,6 +1243,9 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         params.put("partnerCompaniesId",insPlyIncomeVo.getPartnerCompaniesId());
 
         PtlAgreement ptlAgreement =   ptlAgreementService.selectAgreeId(params);
+        if(ObjectUtils.isEmpty(ptlAgreement)){
+            return HttpResult.error("协议匹配不上");
+        }
         insPlyIncome.setAgreementId(ptlAgreement.getId());
         baseMapper.insert(insPlyIncome);
         insPlyIncomeVo.setId(insPlyIncome.getId());
@@ -1392,7 +1401,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount());   //进账金额
         settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
         settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
-        settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
+        settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
         settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
         settlementDocumentaryFeesVo.setAgreementType("2");  //1平台 2  保险
         settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
@@ -1451,7 +1460,16 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         ImportResult importResult = importAsyncService.getById(insPlyIncomeVo.getSelectIds().get(0));  // 查询 任务
         HashMap<String, Object> params = new HashMap<>();
         if (StringUtils.isNotEmpty(importResult.getId())) {
-            params.put("taskkId", importResult.getId());
+            params.put("companyId",importResult.getCompanyId());
+            params.put("partnerCompaniesId",importResult.getPartnerCompaniesId());
+            params.put("isOther","0");
+            if (StringUtils.isNotEmpty(importResult.getHandStatus())) {
+                if ("0".equals(importResult.getHandStatus())) {
+                    params.put("isNotCar", "0");
+                } else if ("1".equals(importResult.getHandStatus())) {
+                    params.put("isNotCar", "1");
+                }
+            }
             List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
             if (!CollectionUtils.isEmpty(insPlyIncomes)) {
                 if (insPlyIncomeVo != null) { // 确保insPlyIncomeVo不是null
@@ -1460,7 +1478,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
                         item.setInvoicId(insPlyIncomeVo.getInvoicId());
                         item.setHandlingFeesStatus("2");
                         if (StringUtils.isNotEmpty(item.getTaskId())) {
-                            return HttpResult.ok("该单据已经开票 ");
+                            return HttpResult.error("该单据已经开票 ");
                         } else {
                             item.setTaskId(importResult.getId());
                             baseMapper.updateById(item);
@@ -1478,6 +1496,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         insPlyIncomeVo.setSettlementAmount(importResult.getTotalAmount());
         insPlyIncomeVo.setContractId(insPlyIncomeVo.getInvoicId());
         insPlyIncomeVo.setCompanyId(importResult.getCompanyId());
+        insPlyIncomeVo.setTaskId(importResult.getId());
         this.batchInvoic(insPlyIncomeVo);
         return HttpResult.ok();
     }
@@ -1516,7 +1535,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         settlementDocumentaryFeesVo.setHandlingFeesStatus("0");
         settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
         settlementDocumentaryFeesVo.setSettlementImageId(insPlyIncomeVo.getSettlementImageId());
-        settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
+        settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
         settlementDocumentaryFeesVo.setAgreementType("2");  //1平台 2  保险
         settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
         return HttpResult.ok();
@@ -1592,12 +1611,15 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getOtherFeevalue());  //其他费用金额
         settlementDocumentaryFeesVo.setUnsettledAmount(insPlyIncomeVo.getNoInvoicCommissionFeevalue().subtract(insPlyIncomeVo.getSettlementAmount())); //未结算
         settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount());//已经开票
-        settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
+        settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
         settlementDocumentaryFeesVo.setSettlementStatus("1");
         settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar());
         if(StringUtils.isNotEmpty(insPlyIncomeVo.getContractId())){
             settlementDocumentaryFeesVo.setInvoiceId(insPlyIncomeVo.getContractId());  //开票号
         }
+        if(StringUtils.isNotEmpty(insPlyIncomeVo.getTaskId())){
+            settlementDocumentaryFeesVo.setTaskId(insPlyIncomeVo.getTaskId());
+        }
         settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
         settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
         settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
@@ -1821,7 +1843,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getOtherFeevalue());  //其他费用金额
         settlementDocumentaryFeesVo.setUnsettledAmount(insPlyIncomeVo.getNoInvoicCommissionFeevalue().subtract(insPlyIncomeVo.getSettlementAmount())); //未结算
         settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount());//已经开票
-        settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
+        settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
         settlementDocumentaryFeesVo.setIds(insPlyIncomeVo.getIncomeIds());
         settlementDocumentaryFeesVo.setSettlementStatus("1");
         settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar());

+ 10 - 7
src/main/java/com/ydtech/modules/fnc/service/impl/SettlementDocumentaryFeesServiceImpl.java

@@ -179,13 +179,16 @@ public class SettlementDocumentaryFeesServiceImpl extends ServiceImpl<Settlement
     @Override
     public void voidInvoicing(SettlementDocumentaryFeesVo settlementDocumentaryFeesVo) {
         SettlementDocumentaryFeesEntity oldSettlementDocumentaryFeesEntity = baseMapper.selectById(settlementDocumentaryFeesVo.getId());
-        String[] split = oldSettlementDocumentaryFeesEntity.getIds().split(",");
-        InsPlyIncome insPlyIncome = new InsPlyIncome();
-        for (String   id :split){
-            insPlyIncome.setId(id);
-            insPlyIncome.setHandlingFeesStatus("0");  //0 为未开票
-//            insPlyIncomeMapper.(split);
-            insPlyIncomeMapper.updateById(insPlyIncome);
+
+        String taskId = oldSettlementDocumentaryFeesEntity.getTaskId();
+        HashMap<String, Object> params = new HashMap<>();
+        params.put("taskId",taskId);
+        List<InsPlyIncome> insPlyIncomes = insPlyIncomeMapper.queryNew(params);
+
+        for (InsPlyIncome   item :insPlyIncomes){
+            item.setHandlingFeesStatus("0");  //0 为未开票
+            item.setTaskId(null);
+            insPlyIncomeMapper.updateById(item);
         }
 
 

+ 12 - 0
src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java

@@ -331,4 +331,16 @@ public class InsPlyIncomeVo implements Serializable {
     @ApiModelProperty(value = "县机构id")
     private String countyId;
 
+    @ApiModelProperty(value = "任务id")
+    private String taskId;
+
+    @ApiModelProperty(value = "保司总公司")
+    private String allPartnerCompaniesId;
+
+    @ApiModelProperty(value = "保司省公司")
+    private String provincePartnerCompaniesId;
+
+
+
+
 }

+ 4 - 2
src/main/java/com/ydtech/modules/fnc/vo/SettlementDocumentaryFeesVo.java

@@ -5,13 +5,13 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import  java.time.LocalDateTime;
 
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 
 @Data
 @ApiModel("跟单费用结算")
@@ -31,7 +31,7 @@ public class SettlementDocumentaryFeesVo implements Serializable {
     private BigDecimal totalAmount;
 
     @ApiModelProperty("创建时间")
-    private LocalDate createTime;
+    private LocalDateTime createTime;
 
     @ApiModelProperty("结算金额")
     @TableField("settlement_amount")
@@ -114,4 +114,6 @@ public class SettlementDocumentaryFeesVo implements Serializable {
 
     @ApiModelProperty("结算凭证")
     private String settlementImageId;
+    @ApiModelProperty("任务id")
+    private String taskId;
 }

+ 15 - 0
src/main/resources/mapper/modules/esm/EsmInsCompanyMapper.xml

@@ -53,5 +53,20 @@
         WHERE id = #{companyId}
     </select>
 
+    <select id="queryListByParentId" resultType="com.ydtech.modules.esm.model.EsmInsCompany">
+        select
+            a.name as "name",
+            a.id as "id"
+        from
+            esm_ins_company   a
+        <where>
+            <if test="parentId  !=null  and  parentId  !=''">
+                a.parent_id=#{parentId}
+            </if>
+        </where>
+
+
+    </select>
+
 
 </mapper>

+ 1 - 3
src/main/resources/mapper/modules/fnc/ImportAsyncMapper.xml

@@ -43,10 +43,8 @@
             <if test="handStatus !=null  and  handStatus  !=''">
                a.hand_status =#{handStatus}
             </if>
-        </where>
-        <where>
             <if test="createTime !=null  and  createTime  !=''">
-                a.create_time =#{createTime}
+             AND   DATE(a.create_time) =#{createTime}
             </if>
         </where>
     </select>

+ 26 - 6
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -167,6 +167,7 @@
                 LEFT  JOIN  ptl_agreement  pa  on  a.agreement_id  = pa.id
                 LEFT  JOIN  sys_user   su  on su.id=a.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
             <where>
                 <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')
@@ -183,6 +184,13 @@
                     and a.handling_fees_status =#{handlingFeesStatus}
                 </if>
 
+               <if test="allPartnerCompaniesId !=null  and  allPartnerCompaniesId  !=''">
+                    and eic.parent_id =#{allPartnerCompaniesId}
+                </if>
+               <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
+                    and eic.parent_id =#{provincePartnerCompaniesId}
+                </if>
+
                 <if test="dockingPerson !=null  and  dockingPerson  !=''">
                     and  pa.docking_person  =#{dockingPerson}
                 </if>
@@ -198,7 +206,9 @@
                 <if test="countyId != null and countyId != ''">
                     and a.deptid like "${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>
@@ -1006,6 +1016,7 @@
         FROM
         ins_ply_income a
         LEFT JOIN ptl_agreement pa ON a.agreement_id = pa.id
+        LEFT  JOIN   esm_ins_company  eic   on  eic.id=a.partner_companies_id
         LEFT JOIN ( SELECT a.partner_companies_id AS "partnerCompaniesId" ,sum(
         settlement_amount ) AS "settleMentAmount" FROM settlement_documentary_fees a
         WHERE ( a.settlement_status = '1' or a.settlement_status = '2')
@@ -1059,6 +1070,12 @@
             <if test="partnerCompaniesName !=null  and  partnerCompaniesName  !=''">
                 AND   a.partner_companies_name =#{partnerCompaniesName}
             </if>
+            <if test="allPartnerCompaniesId !=null  and  allPartnerCompaniesId  !=''">
+                and eic.parent_id =#{allPartnerCompaniesId}
+            </if>
+            <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
+                and eic.parent_id =#{provincePartnerCompaniesId}
+            </if>
             <if test="companyName !=null  and  companyName  !=''">
                 and a.company_id =#{companyName}
             </if>
@@ -1102,11 +1119,7 @@
         MAX( a.company_name ) AS "companyName",
         MAX( a.company_id ) AS "companyId",
         MAX( a.partner_companies_name ) AS "partnerCompaniesName",
-        CASE
-        WHEN (IFNULL(MAX(d.settleMentAmount), 0.00) - IFNULL(MAX(f.settleMentAmount), 0.00)) = 0.00
-        THEN   IFNULL ( MAX(d.settleMentAmount) ,0.00)
-        ELSE (IFNULL(MAX(d.settleMentAmount), 0.00) - IFNULL(MAX(f.settleMentAmount), 0.00))
-        END AS "allInvoicCommissionFeevalue",
+        IFNULL(max(f.settleMentAmount) , 0.00) +IFNULL ( max(d.settleMentAmount),0.00)-IFNULL(max(f.settleMentAmount) , 0.00)  AS "allInvoicCommissionFeevalue",
         IFNULL(max(f.settleMentAmount) , 0.00)  as  "readyCommissionFeevalue",
         IFNULL ( max(d.settleMentAmount),0.00)-IFNULL(max(f.settleMentAmount) , 0.00)  as "invoicCommissionFeevalue",
         sum(COALESCE( a.other_feevalue,0.00) )-IFNULL ( max(d.settleMentAmount),0.00)  as "noInvoicCommissionFeevalue",
@@ -1117,6 +1130,7 @@
         FROM
         ins_ply_income a
         LEFT JOIN ptl_agreement pa ON a.agreement_id = pa.id
+        LEFT  JOIN   esm_ins_company  eic   on  eic.id=a.partner_companies_id
         LEFT JOIN ( SELECT a.partner_companies_id AS "partnerCompaniesId" ,sum(
         settlement_amount ) AS "settleMentAmount" FROM settlement_documentary_fees a
         WHERE ( a.settlement_status = '1' or a.settlement_status = '2')
@@ -1189,6 +1203,12 @@
             <if test="isOther !=null  and  isOther  !=''">
                 and a.is_not_documentary   =#{isOther}
             </if>
+            <if test="allPartnerCompaniesId !=null  and  allPartnerCompaniesId  !=''">
+                and eic.parent_id =#{allPartnerCompaniesId}
+            </if>
+            <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
+                and eic.parent_id =#{provincePartnerCompaniesId}
+            </if>
             <if test="licenseno != null and licenseno != ''">
                 and a.licenseno  =#{licenseno}
             </if>

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

@@ -29,6 +29,7 @@
         <result column="agreement_type" property="agreementType"/>
         <result column="settlement_status" property="settlementStatus"/>
         <result column="settlement_image_id" property="settlementImageId"/>
+        <result column="task_id" property="taskId"/>
     </resultMap>
 
 
@@ -53,6 +54,7 @@
             a.agreement_type as "agreementType",
             a.settlement_time as "settlementTime",
             a.settlement_image_id as "settlementImageId",
+            a.task_id as "taskId",
             upf.url as "imageUrl",
             a.unsettled_amount as "unsettledAmount"
             from  settlement_documentary_fees  a

+ 1 - 1
src/main/resources/mapper/modules/protocol/PtlAgreementMapper.xml

@@ -127,7 +127,7 @@
         from  ptl_agreement a
         <where>
             <if test="companyId  !=null  and   companyId  !=''" >
-                    a.association_companies_id =#{companyId}
+                    a.insurance_company_id =#{companyId}
             </if>
             <if test="partnerCompaniesId  !=null  and   partnerCompaniesId  !=''" >
                   and   a.partner_companies_id =#{partnerCompaniesId}