贷后模块导出

master
shijie 4 years ago
parent 82a2baf72a
commit 7418665157
  1. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlCollectionController.java
  2. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/AlRepaymentEntryController.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlCollectionMapper.java
  4. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlRepaymentEntryMapper.java
  5. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlCollectionListResponse.java
  6. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentRes.java
  7. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlCollectionService.java
  8. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IAlRepaymentEntryService.java
  9. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlCollectionServiceImpl.java
  10. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  11. 38
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  12. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  13. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlCollectionMapper.xml
  14. 10
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml
  15. 13
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml
  16. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java
  17. 6
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeAndUserVO.java
  18. 44
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/CollectionListConverter.java

@ -106,9 +106,9 @@ public class AlCollectionController {
*/ */
@ApiOperation(value = "催收列表导出", notes = "催收列表导出") @ApiOperation(value = "催收列表导出", notes = "催收列表导出")
@GetMapping("/collection/list/export/excel") @GetMapping("/collection/list/export/excel")
public ResponseResult collectionListExportExcel(@RequestParam("ids") List<Integer> ids, HttpServletResponse response) throws IOException { public ResponseResult collectionListExportExcel(@RequestParam("ids") List<Integer> ids,@RequestParam("insuranceId")Integer insuranceId, HttpServletResponse response) throws IOException {
alCollectionService.collectionListExportExcel(ids, response); alCollectionService.collectionListExportExcel(ids,insuranceId, response);
return ResponseResult.SUCCESS(); return ResponseResult.SUCCESS();
} }
} }

@ -110,9 +110,9 @@ public class AlRepaymentEntryController {
@Log(detail = "导出还款记录列表",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT) @Log(detail = "导出还款记录列表",level = 4,operationUnit = OperationUnit.INSURANCE,operationType = OperationType.SELECT)
@GetMapping("/excelExport") @GetMapping("/excelExport")
@ApiOperation(value = "导出还款记录列表") @ApiOperation(value = "导出还款记录列表")
public ResponseResult excelExport(@RequestParam("ids") List<String> ids, HttpServletResponse response) { public ResponseResult excelExport(@RequestParam("ids") List<String> 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(); return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
} }

@ -42,5 +42,5 @@ public interface AlCollectionMapper extends BaseMapper<AlCollection> {
IPage<AlCollectionListPO> collectionList(@Param("page") Page page, @Param("acr") AlCollectionListRequest alCollectionListRequest); IPage<AlCollectionListPO> collectionList(@Param("page") Page page, @Param("acr") AlCollectionListRequest alCollectionListRequest);
List<AlCollectionListPO> collectionListExcel(@Param("ids") List<Integer> ids); List<AlCollectionListPO> collectionListExcel(@Param("ids") List<Integer> ids,@Param("insuranceId")Integer insuranceId);
} }

@ -26,7 +26,7 @@ public interface AlRepaymentEntryMapper extends BaseMapper<AlRepaymentEntry> {
IPage<AlRepaymentEntryListRes> pageByCondition(Page page, String customerNumberOrName, Integer status, Integer insuranceId); IPage<AlRepaymentEntryListRes> pageByCondition(Page page, String customerNumberOrName, Integer status, Integer insuranceId);
List<AlRepaymentRes> selectListByIds(@Param("ids")List<String> ids); List<AlRepaymentRes> selectListByIds(@Param("ids")List<String> ids,@Param("insuranceId")Integer insuranceId);
List<AlRepaymentEntry> listAlRepayment(); List<AlRepaymentEntry> listAlRepayment();

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.daqing.framework.utils.excel.CollectionListConverter;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -50,8 +51,8 @@ public class AlCollectionListResponse extends BaseRowModel implements Serializab
@ApiModelProperty("逾期次数") @ApiModelProperty("逾期次数")
private Integer overduePeriods; private Integer overduePeriods;
@ExcelProperty(value = "催收方法", index = 6) @ExcelProperty(value = "催收方法", index = 6,converter = CollectionListConverter.class)
@ApiModelProperty("催收方") @ApiModelProperty("催收方式:1->电话催收;2->上门/外访;")
private Integer collectionMethod; private Integer collectionMethod;
@ExcelProperty(value = "催收人", index = 7) @ExcelProperty(value = "催收人", index = 7)

@ -3,9 +3,12 @@ package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.daqing.framework.utils.excel.RepaymentStatusConverter; import com.daqing.framework.utils.excel.RepaymentStatusConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -19,6 +22,7 @@ import java.util.Date;
* @author Qyq * @author Qyq
* @since 2021-03-17 * @since 2021-03-17
*/ */
@ToString
@Data @Data
@TableName("al_repayment_entry") @TableName("al_repayment_entry")
public class AlRepaymentRes extends BaseRowModel implements Serializable { 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) @TableField(fill= FieldFill.INSERT)
private Date createTime; private Date createTime;
/** /**
* 修改时间 * 修改时间
*/ */
@ExcelProperty(value = "提交时间",index = 11) @ExcelIgnore
@TableField(fill= FieldFill.INSERT_UPDATE) @TableField(fill= FieldFill.INSERT_UPDATE)
private Date updateTime; private Date updateTime;
} }

@ -35,5 +35,5 @@ public interface IAlCollectionService extends IService<AlCollection> {
void listExportExcel(List<Integer> insuranceIds, HttpServletResponse response) throws IOException; void listExportExcel(List<Integer> insuranceIds, HttpServletResponse response) throws IOException;
void collectionListExportExcel(List<Integer> ids, HttpServletResponse response) throws IOException; void collectionListExportExcel(List<Integer> ids,Integer insuranceId, HttpServletResponse response) throws IOException;
} }

@ -31,7 +31,7 @@ public interface IAlRepaymentEntryService extends IService<AlRepaymentEntry> {
int delRepayment(List<Integer> ids); int delRepayment(List<Integer> ids);
Boolean excelExport(List<String> ids, HttpServletResponse response); Boolean excelExport(List<String> ids,Integer insuranceId, HttpServletResponse response);
Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount); Map repaymentStatistics(Integer insuranceId,Double guaranteeAmount);

@ -292,9 +292,9 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
flag = true; flag = true;
} }
} }
if (!flag) { /* if (!flag) {
iterator.remove(); iterator.remove();
} }*/
} }
} }
} }
@ -322,11 +322,11 @@ public class AlCollectionServiceImpl extends ServiceImpl<AlCollectionMapper, AlC
* @param ids 催收id集合 * @param ids 催收id集合
*/ */
@Override @Override
public void collectionListExportExcel(List<Integer> ids, HttpServletResponse response) throws IOException { public void collectionListExportExcel(List<Integer> ids,Integer insuranceId, HttpServletResponse response) throws IOException {
// 导出的数据集合 // 导出的数据集合
List<AlCollectionListResponse> list = new ArrayList<>(); List<AlCollectionListResponse> list = new ArrayList<>();
// 根据id查询出数据 // 根据id查询出数据
List<AlCollectionListPO> alCollectionListPOS = this.getBaseMapper().collectionListExcel(ids); List<AlCollectionListPO> alCollectionListPOS = this.getBaseMapper().collectionListExcel(ids,insuranceId);
if (alCollectionListPOS != null && alCollectionListPOS.size() != 0) { if (alCollectionListPOS != null && alCollectionListPOS.size() != 0) {
Integer[] userIds = new Integer[alCollectionListPOS.size()]; Integer[] userIds = new Integer[alCollectionListPOS.size()];
for (int i = 0; i < userIds.length; i++) { for (int i = 0; i < userIds.length; i++) {

@ -111,9 +111,9 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
} }
@Override @Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) { public Boolean excelExport(List<String> ids,Integer insuranceId, HttpServletResponse response) {
List<AlRepaymentRes>repaymentList = this.baseMapper.selectListByIds(ids); List<AlRepaymentRes>repaymentList = this.baseMapper.selectListByIds(ids,insuranceId);
try { try {
ExcelUtil.writeExcelWithSheets(response, repaymentList, "还款记录一览表", "repaymentEntry", new AlRepaymentRes()) ExcelUtil.writeExcelWithSheets(response, repaymentList, "还款记录一览表", "repaymentEntry", new AlRepaymentRes())
.finish(); .finish();

@ -561,7 +561,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
@Transactional @Transactional
@Override @Override
public Boolean excelExport(List<String> ids, Integer userId, HttpServletResponse response) { public Boolean excelExport(List<String> ids, Integer userId, HttpServletResponse response3) {
//根据ids查询业务申请列表信息 //根据ids查询业务申请列表信息
List<BusinessApplicationListResponse>applyList = this.baseMapper.selectListByIds(ids,userId); List<BusinessApplicationListResponse>applyList = this.baseMapper.selectListByIds(ids,userId);
System.out.println("applyList==========================="+applyList); System.out.println("applyList==========================="+applyList);
@ -578,19 +578,43 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
employeeMessage = (List<LinkedHashMap>) responseResult.getData(); employeeMessage = (List<LinkedHashMap>) responseResult.getData();
} }
for (BusinessApplicationListResponse response2:applyList) { if(employeeMessage!= null && employeeMessage.size()>0){
for(LinkedHashMap res : employeeMessage){ for (BusinessApplicationListResponse response:applyList) {
if(response2.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 for(LinkedHashMap res : employeeMessage){
response2.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"","")); if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值
response2.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"","")); 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 { try {
ExcelUtil.writeExcelWithSheets(response, applyList, "业务贷款一览表", "businessApplication", new BusinessApplicationListResponse()) ExcelUtil.writeExcelWithSheets(response3, applyList, "业务贷款一览表", "businessApplication", new BusinessApplicationListResponse())
.finish(); .finish();
return true; return true;
} catch (Exception e) { } catch (Exception e) {

@ -405,7 +405,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
} }
} }
try { try {
EasyExcelUtil.download(response, DgWorkConferenceResponse.class,excelList,"财务确认列表","第一页"); EasyExcelUtil.download(response, DgWorkConferenceResponse.class,excelList,"工作会数据一览表","第一页");
/* ExcelUtil.writeExcelWithSheets(response, excelList, "工作会数据一览表", "NO.1", new DgWorkConferenceResponse()) /* ExcelUtil.writeExcelWithSheets(response, excelList, "工作会数据一览表", "NO.1", new DgWorkConferenceResponse())
.finish();*/ .finish();*/

@ -94,10 +94,15 @@
FROM al_collection AS c FROM al_collection AS c
INNER JOIN al_insurance_list AS i INNER JOIN al_insurance_list AS i
ON i.id = c.insurance_id ON i.id = c.insurance_id
WHERE c.id IN <where>
<foreach collection="ids" open="(" separator="," close=")" item="id"> c.insurance_id = #{insuranceId}
#{id} <if test="ids != null and ids.size>0">
</foreach> AND c.id IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</if>
</where>
</select> </select>
</mapper> </mapper>

@ -39,10 +39,12 @@
<select id="selectListByIds" resultType="com.daqing.financial.guarantee.model.response.AlInsuranceListRes"> <select id="selectListByIds" resultType="com.daqing.financial.guarantee.model.response.AlInsuranceListRes">
select * from al_insurance_list select * from al_insurance_list
<where> <where>
id IN <if test="ids != null and ids.size>0">
<foreach collection="ids" open="(" separator="," close=")" item="id"> id IN
#{id} <foreach collection="ids" open="(" separator="," close=")" item="id">
</foreach> #{id}
</foreach>
</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>

@ -41,10 +41,15 @@
from al_repayment_entry re from al_repayment_entry re
left join al_insurance_list il on il.id=re.insurance_id left join al_insurance_list il on il.id=re.insurance_id
<where> <where>
re.id IN <if test="insuranceId != null">
<foreach collection="ids" open="(" separator="," close=")" item="id"> AND re.insurance_id = #{insuranceId}
#{id} </if>
</foreach> <if test="ids != null and ids.size>0">
AND re.id IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</if>
</where> </where>
order by re.create_time desc order by re.create_time desc
</select> </select>

@ -142,7 +142,7 @@ public class UserLoginController implements UserLoginControllerApi {
//account = new String(username.getBytes("GBK"),"iso-8859-1"); //account = new String(username.getBytes("GBK"),"iso-8859-1");
System.out.println("account==========="+account+"headerImg============="+headerImg+"userId===="+userId); 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://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 { }else {
userService.weChatBinding(code,response,state); userService.weChatBinding(code,response,state);

@ -33,7 +33,7 @@ public class EmployeeAndUserVO implements Serializable {
@ApiModelProperty("员工姓名") @ApiModelProperty("员工姓名")
private String name; private String name;
@NotNull(message = "性别不能为空") // @NotNull(message = "性别不能为空")
@ApiModelProperty("性别") @ApiModelProperty("性别")
private Integer gender; private Integer gender;
@ -41,7 +41,7 @@ public class EmployeeAndUserVO implements Serializable {
@ApiModelProperty("生日") @ApiModelProperty("生日")
private Date birthday; private Date birthday;
@NotNull(message = "办公电话不能为空") // @NotNull(message = "办公电话不能为空")
@ApiModelProperty("办公电话") @ApiModelProperty("办公电话")
private String officePhone; private String officePhone;
@ -53,7 +53,7 @@ public class EmployeeAndUserVO implements Serializable {
@ApiModelProperty("公司邮箱") @ApiModelProperty("公司邮箱")
private String companyMail; private String companyMail;
@NotNull(message = "备用邮箱不能为空") // @NotNull(message = "备用邮箱不能为空")
@ApiModelProperty("备用邮箱") @ApiModelProperty("备用邮箱")
private String spareMail; private String spareMail;

@ -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<Integer> {
@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));
}
}
}
Loading…
Cancel
Save