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

1.车险结算添加任务查询保司机构
2.通过任务状态查询任务的保司机构列表

hxl13994548489 1 год назад
Родитель
Сommit
ebcfea7d0f

+ 21 - 4
src/main/java/com/ydtech/modules/fnc/controller/ImportAsyncController.java

@@ -2,6 +2,8 @@ package com.ydtech.modules.fnc.controller;
 
 
 
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import com.ydtech.modules.fnc.entity.InsPlyIncome;
 import com.ydtech.modules.fnc.entity.InsPlyIncome;
 import com.ydtech.modules.fnc.service.ImportAsyncService;
 import com.ydtech.modules.fnc.service.ImportAsyncService;
@@ -10,13 +12,12 @@ import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
 import com.ydtech.modules.order.entity.BasePageResult;
 import com.ydtech.modules.order.entity.BasePageResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import javax.validation.Valid;
 import javax.validation.Valid;
+import java.util.List;
 
 
 @Api(tags = "异步导出")
 @Api(tags = "异步导出")
 @RequestMapping("/fnc/importAsync")
 @RequestMapping("/fnc/importAsync")
@@ -33,4 +34,20 @@ public class ImportAsyncController {
         return result;
         return result;
     }
     }
 
 
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/27 19:01
+     *  @Description: 查询任务列表中的公司机构列表
+     */
+    @GetMapping("/queryPartnerCompaniesList")
+    @ApiOperation(value = "查询任务列表中的公司机构列表")
+    public HttpResult<List<EsmInsCompany>> queryPartnerCompaniesList(String status) {
+        if(StringUtils.isBlank(status)){
+            throw  new SystemException("类型不能为空!!!");
+        }
+
+        List<EsmInsCompany> result=importAsyncService.queryPartnerCompaniesList(status);
+        return HttpResult.ok(result);
+    }
 }
 }

+ 9 - 0
src/main/java/com/ydtech/modules/fnc/dao/ImportAsyncMapper.java

@@ -1,8 +1,10 @@
 package com.ydtech.modules.fnc.dao;
 package com.ydtech.modules.fnc.dao;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
@@ -12,4 +14,11 @@ public interface ImportAsyncMapper  extends BaseMapper<ImportResult> {
     List<ImportResult> queryNew(HashMap<String, Object> params);
     List<ImportResult> queryNew(HashMap<String, Object> params);
 
 
     List<ImportResult> selectByIncomeId(String incomeId);
     List<ImportResult> selectByIncomeId(String incomeId);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/27 19:03
+     *  @Description:  查询任务列表中的公司机构列表
+     */
+    List<EsmInsCompany> queryPartnerCompaniesList(@Param("status")  String status);
 }
 }

+ 8 - 0
src/main/java/com/ydtech/modules/fnc/service/ImportAsyncService.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.fnc.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import com.ydtech.modules.fnc.vo.ImportResultVo;
 import com.ydtech.modules.fnc.vo.ImportResultVo;
 import com.ydtech.modules.inv.model.dto.InsBxNoPlyIncomeExcelDto;
 import com.ydtech.modules.inv.model.dto.InsBxNoPlyIncomeExcelDto;
@@ -26,4 +27,11 @@ public interface ImportAsyncService   extends IService<ImportResult> {
 
 
 
 
     List<ImportResult> selectByIncomeId(String incomeId);
     List<ImportResult> selectByIncomeId(String incomeId);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/27 19:02
+     *  @Description: 查询任务列表中的公司机构列表
+     */
+    List<EsmInsCompany> queryPartnerCompaniesList(String status);
 }
 }

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

@@ -6,6 +6,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.PageInfo;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
 import com.ydtech.exception.SystemException;
+import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.fnc.dao.ImportAsyncMapper;
 import com.ydtech.modules.fnc.dao.ImportAsyncMapper;
 import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
 import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
 import com.ydtech.modules.fnc.entity.ImportResult;
 import com.ydtech.modules.fnc.entity.ImportResult;
@@ -194,6 +195,9 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
             if(StringUtils.isNotEmpty(importResultVo.getCreateTime())){
             if(StringUtils.isNotEmpty(importResultVo.getCreateTime())){
                 params.put("createTime",importResultVo.getCreateTime());
                 params.put("createTime",importResultVo.getCreateTime());
             }
             }
+            if(StringUtils.isNotBlank(importResultVo.getPartnerCompaniesId())){
+                params.put("partnerCompaniesId",importResultVo.getPartnerCompaniesId());
+            }
             List<ImportResult> list= this.baseMapper.queryNew(params);
             List<ImportResult> list= this.baseMapper.queryNew(params);
 
 
             pageHelper=new PageInfo(list);
             pageHelper=new PageInfo(list);
@@ -583,4 +587,15 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
     public List<ImportResult> selectByIncomeId(String incomeId) {
     public List<ImportResult> selectByIncomeId(String incomeId) {
         return   baseMapper.selectByIncomeId(incomeId);
         return   baseMapper.selectByIncomeId(incomeId);
     }
     }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/27 19:02
+     *  @Description:  查询任务列表中的公司机构列表
+     */
+    @Override
+    public List<EsmInsCompany> queryPartnerCompaniesList(String status) {
+        return baseMapper.queryPartnerCompaniesList(status);
+    }
 }
 }

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

@@ -55,4 +55,7 @@ public class ImportResultVo {
 
 
     @ApiModelProperty("创建时间")
     @ApiModelProperty("创建时间")
     private String createTime;
     private String createTime;
+
+    @ApiModelProperty("保司机构id")
+    private String partnerCompaniesId;
 }
 }

+ 18 - 0
src/main/resources/mapper/modules/fnc/ImportAsyncMapper.xml

@@ -49,6 +49,9 @@
             <if test="incomeId !=null  and  incomeId  !=''">
             <if test="incomeId !=null  and  incomeId  !=''">
              AND    a.income_id  =#{incomeId}
              AND    a.income_id  =#{incomeId}
             </if>
             </if>
+            <if test="partnerCompaniesId !=null  and  partnerCompaniesId  !=''">
+                AND  a.partner_companies_id  =#{partnerCompaniesId}
+            </if>
         </where>
         </where>
         order  by  a.create_time  desc
         order  by  a.create_time  desc
     </select>
     </select>
@@ -87,4 +90,19 @@
         </where>
         </where>
         order  by  a.create_time  desc
         order  by  a.create_time  desc
     </select>
     </select>
+    <select id="queryPartnerCompaniesList" resultType="com.ydtech.modules.esm.model.EsmInsCompany">
+        select
+            DISTINCT
+            a.partner_companies_id as "id",
+            eic.namesimple as "name"
+        from
+            import_task  a
+         LEFT  JOIN  esm_ins_company  eic  on  eic.id  = a.partner_companies_id
+        <where>
+              IFNULL(eic.namesimple,'') != ''
+            <if test="status !=null  and  status  !=''">
+               and  a.hand_status =#{status}
+            </if>
+        </where>
+    </select>
 </mapper>
 </mapper>