完善功能

master
chen 4 years ago
parent 9820e9aa56
commit bdedfebbb9
  1. 11
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  2. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBusinessProcessStatusController.java
  3. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  4. 0
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessController.java
  5. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
  6. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
  7. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
  8. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java
  9. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
  10. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
  11. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  12. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java
  13. 17
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  14. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  15. 49
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
  16. 2
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java

@ -1,9 +1,8 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse;
import com.daqing.financial.guarantee.service.IDgAuditProcessService;
import com.daqing.financial.guarantee.service.IDgProcessService;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
* 审核流程进程 前端控制器
@ -29,13 +30,13 @@ public class DgAuditProcessController {
@Autowired
private IDgAuditProcessService auditProcessService;
@ApiOperation(value = "审核流程进程列表")
@ApiOperation(value = "审核流程进程列表",response = DgAuditProcess.class)
@GetMapping("/auditProcessList")
public ResponseResult processList(
@ApiParam(name = "businessId", value = "业务id", required = true)
@RequestParam String businessId){
return ResponseResult.SUCCESS();
List<DgAuditProcess> auditProcessList = auditProcessService.auditProcessList(businessId);
return ResponseResult.SUCCESS(auditProcessList);
}
}

@ -1,10 +1,18 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.daqing.financial.guarantee.service.IDgBusinessProcessStatusService;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
@ -18,4 +26,16 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/dg-business-process-status")
public class DgBusinessProcessStatusController {
@Autowired
private IDgBusinessProcessStatusService businessProcessStatusService;
@ApiOperation(value = "添加业务流程状态")
@PostMapping("/businessProcessStatus")
public ResponseResult businessProcessStatus(
@ApiParam(name = "businessId", value = "业务id", required = true)
@RequestBody DgBusinessProcessStatus businessProcessStatus){
boolean save = businessProcessStatusService.save(businessProcessStatus);
return save ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
}

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
@ -48,15 +49,12 @@ public class DgGuaranteeLetterAssignUserController {
@ApiOperation(value = "导出担保函列表数据")
@PostMapping("/guaranteeLetterListExport")
@GetMapping("/guaranteeLetterListExport")
public void guaranteeLetterListExport(
@ApiParam(name = "guaranteeLetterListRequest", value = "担保函列表数据", required = true)
@RequestBody GuaranteeLetterListRequest guaranteeLetterListRequest, HttpServletResponse response){
//获取担保函列表数据
List<GuaranteeLetterListResponse> guaranteeLetterListResponseList = guaranteeLetterListRequest.getGuaranteeLetterListResponseList();
@ApiParam(name = "ids", value = "多个id", required = true)
@RequestParam("ids") List<String> ids,HttpServletResponse response){
try {
//导出excel文件
EasyExcelUtil.download(response, GuaranteeLetterListResponse.class, guaranteeLetterListResponseList,"担保函列表","第一页");
guaranteeLetterAssignUserService.batchExport(response,ids);
} catch (IOException e) {
e.printStackTrace();
}

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* <p>
* 审核流程进程 Mapper 接口
@ -15,4 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> {
List<DgAuditProcess> selectAuditProcessList(String businessId);
}

@ -23,4 +23,6 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuarante
IPage<GuaranteeLetterListResponse> pageByCondition(Page page, Integer userId, List<String> roleIdList, Integer status, String customerNumberOrName);
List<GuaranteeLetterListResponse> selectBatchData(List<String> ids);
}

@ -1,5 +1,6 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
@ -19,20 +20,29 @@ import java.util.Date;
@Data
public class GuaranteeLetterListResponse {
@ExcelIgnore
@ApiModelProperty("法规经理唯一标识")
private Integer isFgJl;
@ExcelIgnore
@ApiModelProperty("唯一标识")
private Integer id;
@ExcelIgnore
@ApiModelProperty("银行名称")
private String bank;
@ExcelIgnore
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
@ExcelIgnore
@ApiModelProperty("贷审会同意时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date passingTime;
@ApiModelProperty("附件(会议记录)")
@ExcelIgnore
private String file;
@ApiModelProperty("业务编号")
@ -51,12 +61,12 @@ public class GuaranteeLetterListResponse {
@ExcelProperty(value = "业务类别",index = 3)
private String businessType;
@ApiModelProperty("金额")
@ExcelProperty(value = "金额",index = 4)
@ApiModelProperty("申请额度")
@ExcelProperty(value = "申请额度",index = 4)
private Double loanMoney;
@ApiModelProperty("期限")
@ExcelProperty(value = "期数",index = 5)
@ApiModelProperty("申请期限")
@ExcelProperty(value = "申请期限",index = 5)
private String loanTern;
@ApiModelProperty("申请日期")

@ -3,6 +3,8 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import java.util.List;
/**
* <p>
* 审核流程进程 服务类
@ -13,4 +15,6 @@ import com.daqing.framework.domain.guarantee.DgAuditProcess;
*/
public interface IDgAuditProcessService extends IService<DgAuditProcess> {
List<DgAuditProcess> auditProcessList(String businessId);
}

@ -6,6 +6,10 @@ import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusR
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* <p>
* 担保函记录 服务类
@ -21,4 +25,6 @@ public interface IDgGuaranteeLetterAssignUserService extends IService<DgGuarante
boolean saveGuaranteeLetter(DgGuaranteeLetterAssignUser guaranteeLetterAssignUser);
boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest);
void batchExport(HttpServletResponse response, List<String> ids) throws IOException;
}

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 审核流程进程 服务实现类
@ -17,4 +19,10 @@ import org.springframework.stereotype.Service;
@Service
public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper, DgAuditProcess> implements IDgAuditProcessService {
@Override
public List<DgAuditProcess> auditProcessList(String businessId) {
List<DgAuditProcess> auditProcessList = baseMapper.selectAuditProcessList(businessId);
return auditProcessList;
}
}

@ -18,6 +18,7 @@ import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,9 +27,11 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.spi.CurrencyNameProvider;
/**
* <p>
@ -58,6 +61,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
return RedisUtil.get("dq:token:"+token);
}
@Override
public void batchExport(HttpServletResponse response, List<String> ids) throws IOException {
List<GuaranteeLetterListResponse> excelDataList = baseMapper.selectBatchData(ids);
EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"GuaranteeLetterList","第一页");
}
@Override
public PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest) {
//取出条件
@ -76,8 +85,14 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
List<String> roleIdList = Arrays.asList(ids);
//分页条件查询
guaranteeLetterVO = baseMapper.pageByCondition(new Page(page,size),userId,roleIdList,status,customerNumberOrName);
List<GuaranteeLetterListResponse> records = guaranteeLetterVO.getRecords();
records.forEach(guaranteeLetterListResponse -> {
//角色为法规部经理则设置值
if (roleIdList.contains(PromptSuccess.FG_JL_ID)){
guaranteeLetterListResponse.setIsFgJl(1);
}
});
}
return new PageUtils(guaranteeLetterVO);
}

@ -0,0 +1,37 @@
package com.daqing.financial.guarantee.util;
import com.daqing.financial.guarantee.mapper.DgAuditProcessMapper;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
/**
* @Author chen
* @DATE 2020/11/26 15:45
* @Version 1.0
*/
@Data
@Configuration
public class AuditProcessUtil {
private Integer businessId;
private String approver;
private String deptName;
private String auditOpinion;
@Autowired
private DgAuditProcessMapper auditProcessMapper;
public AuditProcessUtil(Integer businessId, String approver, String deptName, String auditOpinion) {
DgAuditProcess auditProcess = new DgAuditProcess();
auditProcess.setApprover(approver);
auditProcess.setAuditOpinion(auditOpinion);
auditProcess.setBusinessId(businessId);
auditProcess.setDeptName(deptName);
auditProcessMapper.insert(auditProcess);
}
public AuditProcessUtil() {
}
}

@ -5,14 +5,19 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAuditProcess">
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="emp_id" property="empId" />
<result column="dg_apply_amount_info_id" property="dgApplyAmountInfoId"/>
<result column="business_id" property="businessId" />
<result column="approver" property="approver" />
<result column="dept_name" property="deptName"/>
<result column="date_time" property="dateTime" />
<result column="create_time" property="createTime" />
<result column="status" property="status" />
<result column="emp_name" property="empName" />
<result column="remark" property="remark" />
<result column="audit_opinion" property="auditOpinion" />
</resultMap>
<select id="selectAuditProcessList" resultMap="BaseResultMap">
select dap.id,dap.business_id,dap.approver,dap.dept_name,dap.create_time,dap.audit_opinion,dbps.business_status as status
from dg_audit_process dap
left join dg_business_process_status dbps on dbps.business_id = dap.business_id
where dap.business_id = #{businessId}
</select>
</mapper>

@ -57,4 +57,20 @@
</where>
</select>
<select id="selectBatchData" resultType="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse">
select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,
lau.status,lau.operating_status,bps.business_status
from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id
left join crms_company_customer ccc on lau.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id
left join dg_business_process_status bps on lau.business_id = bps.business_id
where lau.id in
<foreach collection="list" close=")" open="(" item="id" separator=",">
#{id}
</foreach>
</select>
</mapper>

@ -1,8 +1,6 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -23,52 +21,27 @@ public class DgAuditProcess implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "业务id")
private Integer businessId;
/**
* 企业id
*/
private Integer companyId;
/**
* 审批人id
*/
private Integer empId;
/**
* 贷款信息表id
*/
private Integer dgApplyAmountInfoId;
@ApiModelProperty(value = "审批人")
private String approver;
/**
* 部门名称
*/
@ApiModelProperty(value = "部门名称")
private String deptName;
/**
* 时间
*/
private Date dateTime;
@ApiModelProperty(value = "通过时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 状态
*/
@ApiModelProperty(value = "状态")
private String status;
/**
* 审批人
*/
private String empName;
/**
* 审批意见
*/
private String remark;
@ApiModelProperty(value = "审批意见")
private String auditOpinion;
}

@ -15,7 +15,7 @@ public class EasyExcelUtil {
public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename="+fileName+"");
response.setHeader("Content-disposition", "attachment;filename="+fileName+".xlsx");
EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list);
}
}

Loading…
Cancel
Save