diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java index bb2aea39..23e3ae13 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java @@ -106,9 +106,9 @@ public class AlCollectionController { */ @ApiOperation(value = "催收列表导出", notes = "催收列表导出") @GetMapping("/collection/list/export/excel") - public ResponseResult collectionListExportExcel(@RequestParam("ids") List ids, HttpServletResponse response) throws IOException { + public ResponseResult collectionListExportExcel(@RequestParam("ids") List ids,@RequestParam("insuranceId")Integer insuranceId, HttpServletResponse response) throws IOException { - alCollectionService.collectionListExportExcel(ids, response); + alCollectionService.collectionListExportExcel(ids,insuranceId, response); return ResponseResult.SUCCESS(); } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java index 36c1ed9e..93f8a52c 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java @@ -110,9 +110,9 @@ public class AlRepaymentEntryController { @Log(detail = "导出还款记录列表",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) @GetMapping("/excelExport") @ApiOperation(value = "导出还款记录列表") - public ResponseResult excelExport(@RequestParam("ids") List ids, HttpServletResponse response) { + public ResponseResult excelExport(@RequestParam("ids") List ids,@RequestParam("insuranceId") Integer insuranceId, HttpServletResponse response) { - Boolean result = alRepaymentEntryService.excelExport(ids,response); + Boolean result = alRepaymentEntryService.excelExport(ids,insuranceId,response); return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL(); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java index 6fad01c4..93b157a0 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java @@ -42,5 +42,5 @@ public interface AlCollectionMapper extends BaseMapper { IPage collectionList(@Param("page") Page page, @Param("acr") AlCollectionListRequest alCollectionListRequest); - List collectionListExcel(@Param("ids") List ids); + List collectionListExcel(@Param("ids") List ids,@Param("insuranceId")Integer insuranceId); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java index 4ff3d289..bfed027c 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java @@ -26,7 +26,7 @@ public interface AlRepaymentEntryMapper extends BaseMapper { IPage pageByCondition(Page page, String customerNumberOrName, Integer status, Integer insuranceId); - List selectListByIds(@Param("ids")List ids); + List selectListByIds(@Param("ids")List ids,@Param("insuranceId")Integer insuranceId); List listAlRepayment(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java index 85eeab28..f4be97e8 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java @@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.model.response; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; +import com.daqing.framework.utils.excel.CollectionListConverter; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -50,8 +51,8 @@ public class AlCollectionListResponse extends BaseRowModel implements Serializab @ApiModelProperty("逾期次数") private Integer overduePeriods; - @ExcelProperty(value = "催收方法", index = 6) - @ApiModelProperty("催收方法") + @ExcelProperty(value = "催收方法", index = 6,converter = CollectionListConverter.class) + @ApiModelProperty("催收方式:1->电话催收;2->上门/外访;") private Integer collectionMethod; @ExcelProperty(value = "催收人", index = 7) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java index 6ed54b41..113d3bf6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java @@ -3,9 +3,12 @@ package com.daqing.financial.guarantee.model.response; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; +import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.*; import com.daqing.framework.utils.excel.RepaymentStatusConverter; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import lombok.ToString; import java.io.Serializable; import java.math.BigDecimal; @@ -19,6 +22,7 @@ import java.util.Date; * @author Qyq * @since 2021-03-17 */ +@ToString @Data @TableName("al_repayment_entry") public class AlRepaymentRes extends BaseRowModel implements Serializable { @@ -116,14 +120,14 @@ public class AlRepaymentRes extends BaseRowModel implements Serializable { /** * 创建时间 */ - @ExcelIgnore + @ExcelProperty(value = "提交时间",index = 11) @TableField(fill= FieldFill.INSERT) private Date createTime; /** * 修改时间 */ - @ExcelProperty(value = "提交时间",index = 11) + @ExcelIgnore @TableField(fill= FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlCollectionService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlCollectionService.java index e1d72974..079d11f7 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlCollectionService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlCollectionService.java @@ -35,5 +35,5 @@ public interface IAlCollectionService extends IService { void listExportExcel(List insuranceIds, HttpServletResponse response) throws IOException; - void collectionListExportExcel(List ids, HttpServletResponse response) throws IOException; + void collectionListExportExcel(List ids,Integer insuranceId, HttpServletResponse response) throws IOException; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java index a5811a31..f69d0934 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java @@ -31,7 +31,7 @@ public interface IAlRepaymentEntryService extends IService { int delRepayment(List ids); - Boolean excelExport(List ids, HttpServletResponse response); + Boolean excelExport(List ids,Integer insuranceId, HttpServletResponse response); Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java index 1d63fe5f..96971d88 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java @@ -292,9 +292,9 @@ public class AlCollectionServiceImpl extends ServiceImpl ids, HttpServletResponse response) throws IOException { + public void collectionListExportExcel(List ids,Integer insuranceId, HttpServletResponse response) throws IOException { // 导出的数据集合 List list = new ArrayList<>(); // 根据id查询出数据 - List alCollectionListPOS = this.getBaseMapper().collectionListExcel(ids); + List alCollectionListPOS = this.getBaseMapper().collectionListExcel(ids,insuranceId); if (alCollectionListPOS != null && alCollectionListPOS.size() != 0) { Integer[] userIds = new Integer[alCollectionListPOS.size()]; for (int i = 0; i < userIds.length; i++) { diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java index 571f345b..1b475d8b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java @@ -111,9 +111,9 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl ids, HttpServletResponse response) { + public Boolean excelExport(List ids,Integer insuranceId, HttpServletResponse response) { - ListrepaymentList = this.baseMapper.selectListByIds(ids); + ListrepaymentList = this.baseMapper.selectListByIds(ids,insuranceId); try { ExcelUtil.writeExcelWithSheets(response, repaymentList, "还款记录一览表", "repaymentEntry", new AlRepaymentRes()) .finish(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index afb8281f..1eb80a5b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -561,7 +561,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl ids, Integer userId, HttpServletResponse response) { + public Boolean excelExport(List ids, Integer userId, HttpServletResponse response3) { //根据ids查询业务申请列表信息 ListapplyList = this.baseMapper.selectListByIds(ids,userId); System.out.println("applyList==========================="+applyList); @@ -578,19 +578,43 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl) responseResult.getData(); } - for (BusinessApplicationListResponse response2:applyList) { - for(LinkedHashMap res : employeeMessage){ - if(response2.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 - response2.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"","")); - response2.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"","")); + if(employeeMessage!= null && employeeMessage.size()>0){ + for (BusinessApplicationListResponse response:applyList) { + for(LinkedHashMap res : employeeMessage){ + if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 + response.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"","")); + response.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"","")); + } + if(response != null){ + if(response.getAccount()==null){ + response.setAccount("客户"); + } + } + } + } + }else{ + for (BusinessApplicationListResponse response:applyList) { + if(response != null){ + if(response.getAccount()==null){ + response.setAccount("客户"); + } } } } + +// for (BusinessApplicationListResponse response2:applyList) { +// for(LinkedHashMap res : employeeMessage){ +// if(response2.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 +// response2.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"","")); +// response2.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"","")); +// } +// } +// } } } try { - ExcelUtil.writeExcelWithSheets(response, applyList, "业务贷款一览表", "businessApplication", new BusinessApplicationListResponse()) + ExcelUtil.writeExcelWithSheets(response3, applyList, "业务贷款一览表", "businessApplication", new BusinessApplicationListResponse()) .finish(); return true; } catch (Exception e) { diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java index 351e29d8..a905dfc3 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java @@ -405,7 +405,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl - #{id} - + + c.insurance_id = #{insuranceId} + + AND c.id IN + + #{id} + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml index b52084d2..290821a6 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml @@ -39,10 +39,12 @@ diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml index 34204424..298ab1d1 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml @@ -41,10 +41,15 @@ from al_repayment_entry re left join al_insurance_list il on il.id=re.insurance_id - re.id IN - - #{id} - + + AND re.insurance_id = #{insuranceId} + + + AND re.id IN + + #{id} + + order by re.create_time desc diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java index 3c57c171..bd3cb449 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java @@ -142,7 +142,7 @@ public class UserLoginController implements UserLoginControllerApi { //account = new String(username.getBytes("GBK"),"iso-8859-1"); System.out.println("account==========="+account+"headerImg============="+headerImg+"userId===="+userId); response.sendRedirect("https://test.feifanhitech.com/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg+"&userId="+userId); -// response.sendRedirect("https://www.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg); +// response.sendRedirect("https://www.feifanhitech.com/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg+"&id="+userId); } }else { userService.weChatBinding(code,response,state); diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeAndUserVO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeAndUserVO.java index d26e096d..5a97e31b 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeAndUserVO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeAndUserVO.java @@ -33,7 +33,7 @@ public class EmployeeAndUserVO implements Serializable { @ApiModelProperty("员工姓名") private String name; - @NotNull(message = "性别不能为空") +// @NotNull(message = "性别不能为空") @ApiModelProperty("性别") private Integer gender; @@ -41,7 +41,7 @@ public class EmployeeAndUserVO implements Serializable { @ApiModelProperty("生日") private Date birthday; - @NotNull(message = "办公电话不能为空") +// @NotNull(message = "办公电话不能为空") @ApiModelProperty("办公电话") private String officePhone; @@ -53,7 +53,7 @@ public class EmployeeAndUserVO implements Serializable { @ApiModelProperty("公司邮箱") private String companyMail; - @NotNull(message = "备用邮箱不能为空") +// @NotNull(message = "备用邮箱不能为空") @ApiModelProperty("备用邮箱") private String spareMail; diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/CollectionListConverter.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/CollectionListConverter.java new file mode 100644 index 00000000..3c82f91a --- /dev/null +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/CollectionListConverter.java @@ -0,0 +1,44 @@ +package com.daqing.framework.utils.excel; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; + +/** + * 催收管理状态转换器 + * + * @auther River + * @date 2021/3/24 9:52 + */ +public class CollectionListConverter implements Converter { + + @Override + public Class supportJavaTypeKey() { + return Integer.class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.STRING; + } + + @Override + public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { + return 0; + } + + @Override + public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { + + switch (value) { + case 1: + return new CellData("电话催收"); + case 2: + return new CellData("上门/外访"); + default: + return new CellData(String.valueOf(value)); + } + } +}