Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit fad4bfdb7c
  1. 99
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAssetsInvestigationController.java
  2. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsAssessmentAssetsLogMapper.java
  4. 11
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsInvestigationMapper.java
  5. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeAssignUserMapper.java
  6. 36
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalAssetsRequest.java
  7. 23
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsInvestigationRequest.java
  8. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsRequest.java
  9. 59
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java
  10. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java
  11. 43
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsDetailResponse.java
  12. 107
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsInvestigationListResponse.java
  13. 162
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java
  14. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAssetsInvestigationService.java
  15. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java
  16. 218
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  17. 34
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  18. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java
  19. 11
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsAssessmentAssetsLogMapper.xml
  20. 40
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml
  21. 9
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml
  22. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsLog.java
  23. 52
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java

@ -1,9 +1,21 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping; import com.daqing.financial.guarantee.model.request.*;
import com.daqing.financial.guarantee.model.response.AssetsDetailResponse;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
/** /**
* <p> * <p>
@ -11,10 +23,91 @@ import org.springframework.web.bind.annotation.RestController;
* </p> * </p>
* *
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-23
*/ */
@Api(tags = {"资产部调查信息"})
@RestController @RestController
@RequestMapping("/dg-assets-investigation") @RequestMapping("/dg-assets-investigation")
public class DgAssetsInvestigationController { public class DgAssetsInvestigationController {
@Resource
private IDgAssetsInvestigationService dgAssetsInvestigationService;
/**
* 资产部调查列表
* @param
* @return
*/
@PostMapping("/assetsList")
@ApiOperation(value = "资产部调查列表")
public ResponseResult assetsList(@RequestBody AssetsInvestigationRequest assetsInvestigationRequest){
Integer page=assetsInvestigationRequest.getPage();
Integer size=assetsInvestigationRequest.getSize();
String CustomerNumberOrName=assetsInvestigationRequest.getCustomerNumberOrName();
Integer status=assetsInvestigationRequest.getStatus();
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId = "5";
//根据角色查询资产部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null;
if(roleIds != null) {
String[] ids = roleIds.split(",");
List<String> roleIdlist = Arrays.asList(ids);
data = dgAssetsInvestigationService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId, status);
}
return new ResponseResult<PageUtils>().SUCCESS(data);
}
/**
* 指派资产部调查员
* @param
* @return
*/
@PostMapping("/assignCorners")
@ApiOperation(value = "指派资产部调查员")
@Transactional
public ResponseResult assignCorners(@RequestBody AssetsRequest assetsRequest){
Boolean b = dgAssetsInvestigationService.assignCorners(assetsRequest);
return new ResponseResult<>().SUCCESS(b);
}
/**
* 根据资产部id查询资产部记录详情
* @param id
* @return
*/
@GetMapping("/assetsDetail")
@ApiOperation(value = "查看详情")
public ResponseResult assetsDetail(Integer id){
AssetsDetailResponse response = dgAssetsInvestigationService.assetsDetail(id);
return ResponseResult.SUCCESS(response);
}
/**
* 根据资产部id调查资产部记录
* @param investigateAssetsRequest
* @return
*/
@PostMapping("/investigateAssets")
@ApiOperation(value = "调查")
public ResponseResult investigateAssets(@RequestBody InvestigateAssetsRequest investigateAssetsRequest){
int result = dgAssetsInvestigationService.investigateGuarantee(investigateAssetsRequest);
return result>0 ? ResponseResult.SUCCESS("调查成功!"):ResponseResult.FAIL(41001,"调查失败!");
}
/**
* 根据资产部id审核资产部记录包括资产部经理审核以及资产部分管领导审核
* @param approvalAssetsRequest
* @return
*/
@PostMapping("/approvalAssets")
@ApiOperation(value = "审核")
public ResponseResult approvalAssets(@RequestBody ApprovalAssetsRequest approvalAssetsRequest){
int result = dgAssetsInvestigationService.approvalAssets(approvalAssetsRequest);
return result>0 ? ResponseResult.SUCCESS("审核成功!"):ResponseResult.FAIL(41002,"审核失败!");
}
} }

@ -10,6 +10,7 @@ import com.daqing.financial.guarantee.model.response.GuaranteeDetailResponse;
import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService; import com.daqing.financial.guarantee.service.IDgGuaranteeAssignUserService;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.domain.guarantee.po.DgGuaranteePO; import com.daqing.framework.domain.guarantee.po.DgGuaranteePO;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
@ -58,10 +59,11 @@ public class DgGuaranteeAssignUserController {
@GetMapping("/guaranteeList") @GetMapping("/guaranteeList")
@ApiOperation(value = "担保部调查列表") @ApiOperation(value = "担保部调查列表")
public ResponseResult businessApplicationList(@RequestParam(value="page",required=false) Integer page, @RequestParam(value="size",required=false) Integer size, public ResponseResult businessApplicationList(@RequestParam(value="page",required=false) Integer page, @RequestParam(value="size",required=false) Integer size,
@RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName){ @RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName,
@RequestParam(value = "status", required = false) Integer status){
//获取当前登录用户userId //获取当前登录用户userId
String userId = dgApplyAmountInfoController.getUserId(); //String userId = dgApplyAmountInfoController.getUserId();
//String userId = "5"; String userId = "5";
//根据角色查询担保部调查列表 //根据角色查询担保部调查列表
String roleIds = RedisUtil.get("dq:userRole:" + userId); String roleIds = RedisUtil.get("dq:userRole:" + userId);
PageUtils data = null; PageUtils data = null;
@ -70,7 +72,7 @@ public class DgGuaranteeAssignUserController {
List<String> roleIdlist = Arrays.asList(ids); List<String> roleIdlist = Arrays.asList(ids);
data = dgGuaranteeAssignUserService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId); data = dgGuaranteeAssignUserService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId, status);
/* String A = String.valueOf(PromptSuccess.DB_A_ID); /* String A = String.valueOf(PromptSuccess.DB_A_ID);
String B = String.valueOf(PromptSuccess.DB_B_ID); String B = String.valueOf(PromptSuccess.DB_B_ID);
@ -98,12 +100,13 @@ public class DgGuaranteeAssignUserController {
@Transactional @Transactional
public ResponseResult assignCorners(@RequestBody GuaranteeRequest guaranteeRequest){ public ResponseResult assignCorners(@RequestBody GuaranteeRequest guaranteeRequest){
//根据主键id修改当前记录状态为已指派,设置审批人id为当前用户id //根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId //获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId(); //String userId = dgApplyAmountInfoController.getUserId();
String userId ="5"; String userId ="5";
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setStatus(2);//状态设置为已指派 guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
guaranteeAssignUser.setEmpId(Integer.parseInt(userId)); guaranteeAssignUser.setEmpId(Integer.parseInt(userId));
guaranteeAssignUser.setId(guaranteeRequest.getId()); guaranteeAssignUser.setId(guaranteeRequest.getId());
dgGuaranteeAssignUserMapper.updateById(guaranteeAssignUser); dgGuaranteeAssignUserMapper.updateById(guaranteeAssignUser);
@ -115,7 +118,8 @@ public class DgGuaranteeAssignUserController {
dgGuaranteeAssignUser.setEmpId(guaranteeRequest.getEmpAId());//用户A角id dgGuaranteeAssignUser.setEmpId(guaranteeRequest.getEmpAId());//用户A角id
dgGuaranteeAssignUser.setRoleId(PromptSuccess.DB_A_ID);//角色设置为A角 dgGuaranteeAssignUser.setRoleId(PromptSuccess.DB_A_ID);//角色设置为A角
dgGuaranteeAssignUser.setType(1);//A角操作 dgGuaranteeAssignUser.setType(1);//A角操作
dgGuaranteeAssignUser.setStatus(3);//状态为调查中 dgGuaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser); dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser);
//新增B角记录到担保部记录表 //新增B角记录到担保部记录表
DgGuaranteeAssignUser dgGuaranteeAssignUser2 = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser2 = new DgGuaranteeAssignUser();
@ -124,7 +128,8 @@ public class DgGuaranteeAssignUserController {
dgGuaranteeAssignUser2.setEmpId(guaranteeRequest.getEmpBId());//用户B角id dgGuaranteeAssignUser2.setEmpId(guaranteeRequest.getEmpBId());//用户B角id
dgGuaranteeAssignUser2.setRoleId(PromptSuccess.DB_B_ID);//角色设置为B角 dgGuaranteeAssignUser2.setRoleId(PromptSuccess.DB_B_ID);//角色设置为B角
dgGuaranteeAssignUser2.setType(2);//B角操作 dgGuaranteeAssignUser2.setType(2);//B角操作
dgGuaranteeAssignUser2.setStatus(3);//状态为调查中 dgGuaranteeAssignUser2.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgGuaranteeAssignUser2.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser2); dgGuaranteeAssignUserMapper.insert(dgGuaranteeAssignUser2);
List<DgGuaranteePO> list = new ArrayList(); List<DgGuaranteePO> list = new ArrayList();

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog; import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* <p> * <p>
* 价值评估记录 Mapper 接口 * 价值评估记录 Mapper 接口
@ -15,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface DgAssetsAssessmentAssetsLogMapper extends BaseMapper<DgAssetsAssessmentAssetsLog> { public interface DgAssetsAssessmentAssetsLogMapper extends BaseMapper<DgAssetsAssessmentAssetsLog> {
void insertAssetsList(List<DgAssetsAssessmentAssetsLog> assessmentList);
} }

@ -1,18 +1,27 @@
package com.daqing.financial.guarantee.mapper; package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.response.AssetsInvestigationListResponse;
import com.daqing.financial.guarantee.model.response.DgAssetsInvestigationResponse;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation; import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* <p> * <p>
* 资产调查 Mapper 接口 * 资产调查 Mapper 接口
* </p> * </p>
* *
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-23
*/ */
@Mapper @Mapper
public interface DgAssetsInvestigationMapper extends BaseMapper<DgAssetsInvestigation> { public interface DgAssetsInvestigationMapper extends BaseMapper<DgAssetsInvestigation> {
IPage<AssetsInvestigationListResponse> pageByCondition(Page page, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status);
DgAssetsInvestigationResponse selectInfoById(Integer id);
} }

@ -21,5 +21,5 @@ import java.util.List;
@Mapper @Mapper
public interface DgGuaranteeAssignUserMapper extends BaseMapper<DgGuaranteeAssignUser> { public interface DgGuaranteeAssignUserMapper extends BaseMapper<DgGuaranteeAssignUser> {
IPage<GuaranteeListResponse> pageByCondition(Page page,@Param("customerNumberOrName") String customerNumberOrName,@Param("roleIdlist") List<String> roleIdlist,@Param("userId") String userId); IPage<GuaranteeListResponse> pageByCondition(Page page,@Param("customerNumberOrName") String customerNumberOrName,@Param("roleIdlist") List<String> roleIdlist,@Param("userId") String userId,@Param("status") Integer status);
} }

@ -0,0 +1,36 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author chen
* @DATE 2020/11/12 17:14
* @Version 1.0
*/
@Data
public class ApprovalAssetsRequest {
@ApiModelProperty(value = "主键id")
private Integer id;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "审核意见")
private String applyContent;
@ApiModelProperty(value = "金额")
private BigDecimal amount;
@ApiModelProperty(value = "期限")
private String term;
@ApiModelProperty(value = "补充原因")
private String[] remark;
}

@ -0,0 +1,23 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 资产调查列表请求参数
*/
@Data
public class AssetsInvestigationRequest {
@ApiModelProperty(value = "页数")
private Integer page;
@ApiModelProperty(value = "页长")
private Integer size;
@ApiModelProperty(value = "业务编号/客户名称")
private String CustomerNumberOrName;
@ApiModelProperty(value = "流程状态")
private Integer status;
}

@ -0,0 +1,25 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author chen
* @DATE 2020/11/12 17:14
* @Version 1.0
*/
@Data
public class AssetsRequest {
@ApiModelProperty(value = "主键id")
private Integer id;
@ApiModelProperty(value = "业务id")
private Integer businessId;
@ApiModelProperty(value = "企业id")
private Integer companyId;
@ApiModelProperty(value = "被指派资产部调查专员id")
private Integer empId;
}

@ -0,0 +1,59 @@
package com.daqing.financial.guarantee.model.request;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author chen
* @DATE 2020/11/12 17:14
* @Version 1.0
*/
@Data
public class InvestigateAssetsRequest {
@ApiModelProperty(value = "主键id")
private Integer id;
@ApiModelProperty(value = "状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;")
private Integer status;
@ApiModelProperty(value = "审核意见")
private String applyContent;
@ApiModelProperty(value = "附件")
private String[] file;
@ApiModelProperty(value = "资产评估报告(名称)")
private String assetsName;
@ApiModelProperty(value = "资产评估报告编号")
private String assetsCode;
@ApiModelProperty(value = "评估日期")
private Date assetsTime;
@ApiModelProperty(value = "合计")
private BigDecimal amountSum;
@ApiModelProperty(value = "审计报告(名称)")
private String auditName;
@ApiModelProperty(value = "审计编号")
private String auditCode;
@ApiModelProperty(value = "审计日期")
private Date auditTime;
@ApiModelProperty(value = "审计价值(万元)")
private BigDecimal auditAmount;
@ApiModelProperty(value = "评估价值列表")
private List<DgAssetsAssessmentAssetsLog> assessmentList;
}

@ -16,7 +16,7 @@ public class InvestigateGuaranteeRequest {
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private Integer id; private Integer id;
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;")
private Integer status; private Integer status;
@ApiModelProperty(value = "审核意见") @ApiModelProperty(value = "审核意见")

@ -0,0 +1,43 @@
package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.List;
@Data
@ToString
public class AssetsDetailResponse implements Serializable {
/**
* 主键id
*/
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 业务申请详细
*/
@ApiModelProperty(value = "业务申请详细")
private DgApplyAmountInfoResponse dgApplyAmountInfo;
/**
* 企业详细
*/
@ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap;
/**
* 资产调查详细
*/
@ApiModelProperty(value = "资产调查详细")
private DgAssetsInvestigationResponse assetsResponse;
}

@ -0,0 +1,107 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ToString
public class AssetsInvestigationListResponse extends BaseRowModel implements Serializable {
/**
* 主键id
*/
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 业务id
*/
@ApiModelProperty(value = "业务id")
private Integer businessId;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Integer companyId;
/**
* 申请额度
*/
@ExcelProperty(value = "申请额度",index = 4)
@ApiModelProperty(value = "申请额度")
private BigDecimal applyAmount;
/**
* 申请期限
*/
@ExcelProperty(value = "申请期限",index = 5)
@ApiModelProperty(value = "申请期限")
private String applyTime;
/**
* 申请时间
*/
@ExcelProperty(value = "申请日期",index = 6)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "申请时间")
private Date createTime;
/**
* 业务类型
*/
@ExcelProperty(value = "业务类别",index = 3)
@ApiModelProperty(value = "业务类型")
private String businessType;
/**
* 业务编号
*/
@ExcelProperty(value = "业务编号",index = 0)
@ApiModelProperty(value = "业务编号")
private String businessCode;
/**
* 客户名称
*/
@ExcelProperty(value = "客户名称",index = 1)
@ApiModelProperty(value = "客户名称")
private String name;
/**
* 联系电话
*/
@ExcelProperty(value = "联系电话",index = 2)
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 审批状态
*/
@ExcelProperty(value = "审批状态",index = 7)
@ApiModelProperty(value = "审批状态")
private Integer status;
/**
* 业务状态
*/
@ExcelProperty(value = "业务状态",index = 8)
@ApiModelProperty(value = "业务状态")
private Integer businessStatus;
/**
* 操作状态
*/
@ExcelProperty(value = "操作状态",index = 9)
@ApiModelProperty(value = "操作状态")
private Integer operatingStatus;
}

@ -0,0 +1,162 @@
package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.*;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* <p>
* 资产调查
* </p>
*
* @author Qyq
* @since 2020-11-23
*/
@Data
@TableName("dg_assets_investigation")
public class DgAssetsInvestigationResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 业务id
*/
private Integer businessId;
/**
* 企业id
*/
private Integer companyId;
/**
* 调查者id
*/
private Integer empId;
/**
* 角色id
*/
private Integer roleId;
/**
* 类型1第一审批人 2指派人AB角 3经理
*/
private Integer type;
/**
* 状态 0待指派1审核中2已审核3拒绝4驳回5已撤销6草稿
*/
private Integer status;
/**
* 操作状态: 0->已发起1->待处理2->已处理
*/
private Integer operatingStatus;
/**
* 资产评估报告名称
*/
private String assetsName;
/**
* 资产评估报告编号
*/
private String assetsCode;
/**
* 评估日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date assetsTime;
/**
* 合计
*/
private BigDecimal amountSum;
/**
* 审计报告名称
*/
private String auditName;
/**
* 审计编号
*/
private String auditCode;
/**
* 审计日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date auditTime;
/**
* 审计价值万元
*/
private BigDecimal auditAmount;
/**
* 反担保措施
*/
private String guaranteeMeasures;
/**
* 附件
*/
private String file;
/**
* 附件
*/
private List<String> fileList;
/**
* 审核意见
*/
private String applyContent;
/**
* 审核金额
*/
private BigDecimal amount;
/**
* 期限
*/
private String term;
/**
* 补充调查原因
*/
private String remark;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@ApiModelProperty(value = "评估价值列表")
private List<DgAssetsAssessmentAssetsLog> assessmentList;
}

@ -1,7 +1,15 @@
package com.daqing.financial.guarantee.service; package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.ApprovalAssetsRequest;
import com.daqing.financial.guarantee.model.request.AssetsRequest;
import com.daqing.financial.guarantee.model.request.InvestigateAssetsRequest;
import com.daqing.financial.guarantee.model.response.AssetsDetailResponse;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation; import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
import com.daqing.framework.utils.PageUtils;
import java.util.List;
/** /**
* <p> * <p>
@ -9,8 +17,17 @@ import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
* </p> * </p>
* *
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-23
*/ */
public interface IDgAssetsInvestigationService extends IService<DgAssetsInvestigation> { public interface IDgAssetsInvestigationService extends IService<DgAssetsInvestigation> {
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status);
Boolean assignCorners(AssetsRequest assetsRequest);
AssetsDetailResponse assetsDetail(Integer id);
int investigateGuarantee(InvestigateAssetsRequest investigateAssetsRequest);
int approvalAssets(ApprovalAssetsRequest approvalAssetsRequest);
} }

@ -19,7 +19,7 @@ import java.util.List;
*/ */
public interface IDgGuaranteeAssignUserService extends IService<DgGuaranteeAssignUser> { public interface IDgGuaranteeAssignUserService extends IService<DgGuaranteeAssignUser> {
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId); PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status);
GuaranteeDetailResponse guaranteeDetail(Integer id); GuaranteeDetailResponse guaranteeDetail(Integer id);

@ -1,10 +1,36 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper;
import com.daqing.financial.guarantee.mapper.DgAssetsAssessmentAssetsLogMapper;
import com.daqing.financial.guarantee.mapper.DgAssetsInvestigationMapper; import com.daqing.financial.guarantee.mapper.DgAssetsInvestigationMapper;
import com.daqing.financial.guarantee.model.request.ApprovalAssetsRequest;
import com.daqing.financial.guarantee.model.request.AssetsRequest;
import com.daqing.financial.guarantee.model.request.InvestigateAssetsRequest;
import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService; import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation; import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
/** /**
* <p> * <p>
@ -12,9 +38,197 @@ import org.springframework.stereotype.Service;
* </p> * </p>
* *
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-23
*/ */
@Service @Service
public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvestigationMapper, DgAssetsInvestigation> implements IDgAssetsInvestigationService { public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvestigationMapper, DgAssetsInvestigation> implements IDgAssetsInvestigationService {
@Resource
private DgApplyAmountInfoController dgApplyAmountInfoController;
@Resource
private DgAssetsInvestigationMapper dgAssetsInvestigationMapper;
@Resource
private HrmsFeignService hrmsFeignService;
@Resource
private DgApplyAmountInfoMapper dgApplyAmountInfoMapper;
@Resource
private CrmsFeignService crmsFeignService;
@Resource
private DgAssetsAssessmentAssetsLogMapper dgAssetsAssessmentAssetsLogMapper;
@Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
IPage<AssetsInvestigationListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status);
return new PageUtils(positionVO);
}
@Transactional
@Override
public Boolean assignCorners(AssetsRequest assetsRequest) {
//根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
//获取当前登录用户userId
//String userId = dgApplyAmountInfoController.getUserId();
String userId ="5";
DgAssetsInvestigation assetsInvestigation = new DgAssetsInvestigation();
assetsInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
assetsInvestigation.setEmpId(Integer.parseInt(userId));
assetsInvestigation.setId(assetsRequest.getId());
dgAssetsInvestigationMapper.updateById(assetsInvestigation);
//新增资产部调查员记录到资产部记录表
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setBusinessId(assetsRequest.getBusinessId());//业务id
dgAssetsInvestigation.setCompanyId(assetsRequest.getCompanyId());//企业id
dgAssetsInvestigation.setEmpId(assetsRequest.getEmpId());//资产部调查员id
dgAssetsInvestigation.setRoleId(PromptSuccess.ZC_ZY_ID);//角色设置为资产部专员
dgAssetsInvestigation.setType(1);//专员操作
dgAssetsInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
dgAssetsInvestigationMapper.insert(dgAssetsInvestigation);
//绑定角色关系
hrmsFeignService.insertUserRole(assetsRequest.getEmpId().longValue(),PromptSuccess.ZC_ZY_ID.longValue());
return true;
}
@Transactional
@Override
public AssetsDetailResponse assetsDetail(Integer id) {
//根据主键id查询资产调查详情
DgAssetsInvestigationResponse assetsResponse = this.getBaseMapper().selectInfoById(id);
//根据业务id查询评估价值List
List<DgAssetsAssessmentAssetsLog> assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList(
new QueryWrapper<DgAssetsAssessmentAssetsLog>().eq("business_id",assetsResponse.getBusinessId()));
assetsResponse.setAssessmentList(assessmentlist);
String files=assetsResponse.getFile();
if(files.length()>0){
String a = files.substring(1,files.length()-1);
String arry[]=a.split(",");
List<String> demoList = Arrays.asList(arry);
assetsResponse.setFileList(demoList);
System.out.println("arry==============="+demoList);
}
//根据业务id查询业务申请详细信息
DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(assetsResponse.getBusinessId());
String measures=dgApplyAmountInfo.getEnGuaranteeMeasures();
if(measures.length()>0){
String a = measures.substring(1,measures.length()-1);
String arry[]=a.split(",");
List<String> demoList = Arrays.asList(arry);
dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
}
System.out.println("业务申请详细========="+dgApplyAmountInfo);
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData();
System.out.println("企业详细============"+linkedList);
AssetsDetailResponse assetsDetailResponse = new AssetsDetailResponse();
assetsDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
assetsDetailResponse.setLinkedHashMap(linkedList);
assetsDetailResponse.setAssetsResponse(assetsResponse);
return assetsDetailResponse;
}
@Transactional
@Override
public int investigateGuarantee(InvestigateAssetsRequest investigateAssetsRequest) {
//根据主键id查询业务id
DgAssetsInvestigation dgAssetsInvestigation = this.getBaseMapper().selectById(investigateAssetsRequest.getId());
//资产部调查员调查,修改审核意见以及状态,修改其他数据
DgAssetsInvestigation assetsInvestigation = new DgAssetsInvestigation();
assetsInvestigation.setId(investigateAssetsRequest.getId());//主键id
assetsInvestigation.setStatus(investigateAssetsRequest.getStatus());//状态
assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
assetsInvestigation.setApplyContent(investigateAssetsRequest.getApplyContent());//审核意见
assetsInvestigation.setAmountSum(investigateAssetsRequest.getAmountSum());//合计
assetsInvestigation.setAssetsName(investigateAssetsRequest.getAssetsName());
assetsInvestigation.setAssetsCode(investigateAssetsRequest.getAssetsCode());
assetsInvestigation.setAssetsTime(investigateAssetsRequest.getAssetsTime());
assetsInvestigation.setAuditName(investigateAssetsRequest.getAuditName());
assetsInvestigation.setAuditCode(investigateAssetsRequest.getAuditCode());
assetsInvestigation.setAuditTime(investigateAssetsRequest.getAuditTime());
assetsInvestigation.setAuditAmount(investigateAssetsRequest.getAuditAmount());
assetsInvestigation.setFile(ArraysUtil.toString(investigateAssetsRequest.getFile()));
this.baseMapper.updateById(assetsInvestigation);
//根据业务id批量新增数据到评估价值列表
dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
//判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理
if(investigateAssetsRequest.getStatus()==1){//状态为审核中
DgAssetsInvestigation assetsInvestigation2= new DgAssetsInvestigation();
assetsInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND);
this.baseMapper.update(assetsInvestigation2,new QueryWrapper<DgAssetsInvestigation>().
eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2));
}
return 1;
}
@Transactional
@Override
public int approvalAssets(ApprovalAssetsRequest approvalAssetsRequest) {
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setId(approvalAssetsRequest.getId());
dgAssetsInvestigation.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
dgAssetsInvestigation.setRemark(ArraysUtil.toString(approvalAssetsRequest.getRemark()));//补充原因
dgAssetsInvestigation.setStatus(approvalAssetsRequest.getStatus());
dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//状态设置为已处理
dgAssetsInvestigation.setAmount(approvalAssetsRequest.getAmount());//金额
dgAssetsInvestigation.setTerm(approvalAssetsRequest.getTerm());//期限
dgAssetsInvestigation.setApplyContent(approvalAssetsRequest.getApplyContent());//审核意见
//根据主键id修改资产部记录
this.baseMapper.updateById(dgAssetsInvestigation);
//根据主键id查询资产部记录
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectById(approvalAssetsRequest.getId());
//如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && assetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
//根据主键id查询业务id
DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId());
DgAssetsInvestigation assets = new DgAssetsInvestigation();
assets.setBusinessId(assetsInvestigation2.getBusinessId());
assets.setCompanyId(assetsInvestigation2.getCompanyId());
assets.setRoleId(PromptSuccess.ZC_LD_ID);//资产部分管领导
assets.setType(3);//分管领导审核
assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(assets);
}
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//待完善
return 1;
}
} }

@ -18,6 +18,7 @@ import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.DgEnclosureInfo; import com.daqing.framework.domain.guarantee.DgEnclosureInfo;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
@ -56,7 +57,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
private DgEnclosureInfoMapper dgEnclosureInfoMapper; private DgEnclosureInfoMapper dgEnclosureInfoMapper;
@Override @Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId) { public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
//分页参数 //分页参数
if (page <= 0) { if (page <= 0) {
page = 1; page = 1;
@ -64,7 +65,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
if (size <= 0) { if (size <= 0) {
size = 10; size = 10;
} }
IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId); IPage<GuaranteeListResponse> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status);
return new PageUtils(positionVO); return new PageUtils(positionVO);
} }
@ -161,6 +162,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态 dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见 dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser); this.baseMapper.updateById(dgGuaranteeAssignUser);
@ -183,20 +185,19 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//附件新增 //附件新增
dgEnclosureInfoMapper.insert(dgEnclosureInfo); dgEnclosureInfoMapper.insert(dgEnclosureInfo);
//判断A角和B角是否都调查通过,如果都审核通过,则往担保部经理添加一条需要审核的记录 //判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",1).eq("status",4)); .eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId()) int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",4)); .eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum = i+n; int sum = i+n;
if(sum==2){ if(sum==2){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setBusinessId(guaranteeAssignUser.getBusinessId());
assignUser.setCompanyId(guaranteeAssignUser.getCompanyId());
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
assignUser.setType(3); assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setStatus(5);//状态设置为审核中 assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(assignUser); this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",3));
} }
return 1; return 1;
@ -208,9 +209,10 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId()); dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId());
dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); dgGuaranteeAssignUser.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
dgGuaranteeAssignUser.setRemark(ArraysUtil.toString(approvalGuaranteeRequest.getRemark()));//补充调查原因 dgGuaranteeAssignUser.setRemark(ArraysUtil.toString(approvalGuaranteeRequest.getRemark()));//补充调查原因
dgGuaranteeAssignUser.setStatus(approvalGuaranteeRequest.getStatus()); dgGuaranteeAssignUser.setStatus(approvalGuaranteeRequest.getStatus());
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//状态设置为已处理
dgGuaranteeAssignUser.setAmount(approvalGuaranteeRequest.getAmount());//金额 dgGuaranteeAssignUser.setAmount(approvalGuaranteeRequest.getAmount());//金额
dgGuaranteeAssignUser.setTerm(approvalGuaranteeRequest.getTerm());//期限 dgGuaranteeAssignUser.setTerm(approvalGuaranteeRequest.getTerm());//期限
dgGuaranteeAssignUser.setApplyContent(approvalGuaranteeRequest.getApplyContent());//审核意见 dgGuaranteeAssignUser.setApplyContent(approvalGuaranteeRequest.getApplyContent());//审核意见
@ -221,7 +223,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgGuaranteeAssignUser guaranteeUser = this.baseMapper.selectById(approvalGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeUser = this.baseMapper.selectById(approvalGuaranteeRequest.getId());
//如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
if(approvalGuaranteeRequest.getStatus()==6 && guaranteeUser.getType()==3){//担保部经理审核通过 if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && guaranteeUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过
//根据主键id查询业务id //根据主键id查询业务id
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId());
@ -229,11 +231,15 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
assignUser.setBusinessId(guaranteeAssignUser.getBusinessId()); assignUser.setBusinessId(guaranteeAssignUser.getBusinessId());
assignUser.setCompanyId(guaranteeAssignUser.getCompanyId()); assignUser.setCompanyId(guaranteeAssignUser.getCompanyId());
assignUser.setRoleId(PromptSuccess.DB_LD_ID);//担保部分管领导 assignUser.setRoleId(PromptSuccess.DB_LD_ID);//担保部分管领导
assignUser.setType(4); assignUser.setType(4);//分管领导审核
assignUser.setStatus(5);//状态设置为审核中 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
this.baseMapper.insert(assignUser); this.baseMapper.insert(assignUser);
} }
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//待完善
return 1; return 1;
} }

@ -25,7 +25,7 @@ public class MyBatisPlusCodeGenerator {
public static final String PACKAGE_NAME = "com.daqing.financial.guarantee"; public static final String PACKAGE_NAME = "com.daqing.financial.guarantee";
public static void main(String[] args) { public static void main(String[] args) {
String[] tables = new String[] {"dg_bank"};//表名数组 String[] tables = new String[] {"dg_assets_investigation"};//表名数组
String[] tablePrefixs = new String[] {""};//去掉前缀 String[] tablePrefixs = new String[] {""};//去掉前缀
executeCode(PACKAGE_NAME,tables,tablePrefixs); executeCode(PACKAGE_NAME,tables,tablePrefixs);
} }
@ -58,7 +58,7 @@ public class MyBatisPlusCodeGenerator {
// 数据源配置 // 数据源配置
DataSourceConfig config= new DataSourceConfig(); DataSourceConfig config= new DataSourceConfig();
// 从试图获取 // 从试图获取
config.setUrl("jdbc:mysql://192.168.31.142:3306/dq_financial_crms?serverTimezone=UTC"); config.setUrl("jdbc:mysql://192.168.31.140:3306/dq_financial_crms?serverTimezone=UTC");
config.setDriverName("com.mysql.cj.jdbc.Driver"); config.setDriverName("com.mysql.cj.jdbc.Driver");
config.setUsername("root"); config.setUsername("root");
config.setPassword("root"); config.setPassword("root");

@ -5,9 +5,18 @@
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog"> <resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="company_id" property="companyId" /> <result column="business_id" property="businessId" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="amount" property="amount" /> <result column="amount" property="amount" />
</resultMap> </resultMap>
<insert id="insertAssetsList">
INSERT INTO dg_assets_assessment_assets_log
(business_id,`name`,amount)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.businessId},#{item.name},#{item.amount})
</foreach>
</insert>
</mapper> </mapper>

@ -5,22 +5,58 @@
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAssetsInvestigation"> <resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAssetsInvestigation">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="business_id" property="businessId" />
<result column="company_id" property="companyId" /> <result column="company_id" property="companyId" />
<result column="emp_id" property="empId" /> <result column="emp_id" property="empId" />
<result column="role_id" property="roleId" />
<result column="type" property="type" />
<result column="status" property="status" />
<result column="operating_status" property="operatingStatus" />
<result column="assets_name" property="assetsName" /> <result column="assets_name" property="assetsName" />
<result column="assets_code" property="assetsCode" /> <result column="assets_code" property="assetsCode" />
<result column="assets_time" property="assetsTime" /> <result column="assets_time" property="assetsTime" />
<result column="amount" property="amount" /> <result column="amount_sum" property="amountSum" />
<result column="audit_name" property="auditName" /> <result column="audit_name" property="auditName" />
<result column="audit_code" property="auditCode" /> <result column="audit_code" property="auditCode" />
<result column="audit_time" property="auditTime" /> <result column="audit_time" property="auditTime" />
<result column="audit_amount" property="auditAmount" /> <result column="audit_amount" property="auditAmount" />
<result column="guarantee_measures" property="guaranteeMeasures" /> <result column="guarantee_measures" property="guaranteeMeasures" />
<result column="file" property="file" /> <result column="file" property="file" />
<result column="apply_content" property="applyContent" />
<result column="amount" property="amount" />
<result column="term" property="term" />
<result column="remark" property="remark" /> <result column="remark" property="remark" />
<result column="status" property="status" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.AssetsInvestigationListResponse">
select au.id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_assets_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where>
au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id">
#{id}
</foreach>
<if test="customerNumberOrName != null and customerNumberOrName != ''">
AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%'))
</if>
<if test="status != null">
AND au.status = #{status}
</if>
<if test="userId != null and userId != ''">
AND (au.emp_id =#{userId} or au.emp_id is null)
</if>
</where>
</select>
<select id="selectInfoById" resultType="com.daqing.financial.guarantee.model.response.DgAssetsInvestigationResponse">
select * from dg_assets_investigation where id=#{id}
</select>
</mapper> </mapper>

@ -31,12 +31,15 @@
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">
#{id} #{id}
</foreach> </foreach>
<if test="userId != null and userId != ''">
AND au.emp_id =#{userId} or au.emp_id is null
</if>
<if test="customerNumberOrName != null and customerNumberOrName != ''"> <if test="customerNumberOrName != null and customerNumberOrName != ''">
AND ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%') AND ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')
</if> </if>
<if test="status != null">
AND au.status = #{status}
</if>
<if test="userId != null and userId != ''">
AND au.emp_id =#{userId} or au.emp_id is null
</if>
</where> </where>
</select> </select>

@ -25,7 +25,7 @@ public class DgAssetsAssessmentAssetsLog implements Serializable {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
private Integer companyId; private Integer businessId;
private String name; private String name;

@ -14,7 +14,7 @@ import java.util.Date;
* </p> * </p>
* *
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-23
*/ */
@Data @Data
@TableName("dg_assets_investigation") @TableName("dg_assets_investigation")
@ -28,6 +28,11 @@ public class DgAssetsInvestigation implements Serializable {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
/**
* 业务id
*/
private Integer businessId;
/** /**
* 企业id * 企业id
*/ */
@ -38,6 +43,26 @@ public class DgAssetsInvestigation implements Serializable {
*/ */
private Integer empId; private Integer empId;
/**
* 角色id
*/
private Integer roleId;
/**
* 类型1第一审批人 2指派人AB角 3经理
*/
private Integer type;
/**
* 状态 0待指派1审核中2已审核3拒绝4驳回5已撤销6草稿
*/
private Integer status;
/**
* 操作状态: 0->已发起1->待处理2->已处理
*/
private Integer operatingStatus;
/** /**
* 资产评估报告名称 * 资产评估报告名称
*/ */
@ -56,7 +81,7 @@ public class DgAssetsInvestigation implements Serializable {
/** /**
* 合计 * 合计
*/ */
private BigDecimal amount; private BigDecimal amountSum;
/** /**
* 审计报告名称 * 审计报告名称
@ -91,19 +116,34 @@ public class DgAssetsInvestigation implements Serializable {
/** /**
* 审核意见 * 审核意见
*/ */
private String remark; private String applyContent;
/** /**
* 审核状态 * 审核金额
*/ */
private Integer status; private BigDecimal amount;
/**
* 期限
*/
private String term;
/**
* 补充调查原因
*/
private String remark;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE) @TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime; private Date updateTime;
} }

Loading…
Cancel
Save