From e79074720206f5ef0aee9c810816188b212d5af2 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Wed, 25 Nov 2020 20:11:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=AE=9A=E4=B9=89=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgApplyAmountInfoController.java | 33 ++++++++------- .../DgGuaranteeAssignUserController.java | 6 +-- .../DgMessageInvestigationController.java | 6 ++- .../request/ApprovalBusinessRequest.java | 26 ++++++++++++ .../request/InvestigateAssetsRequest.java | 5 +++ .../impl/DgApplyAmountInfoServiceImpl.java | 42 +++++++++++++++---- .../DgAssetsInvestigationServiceImpl.java | 14 +++++-- .../DgGuaranteeAssignUserServiceImpl.java | 2 +- .../DgMessageInvestigationServiceImpl.java | 10 +++-- 9 files changed, 108 insertions(+), 36 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalBusinessRequest.java diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 1bc097e0..e3fcda94 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -4,6 +4,7 @@ package com.daqing.financial.guarantee.controller; import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi; import com.daqing.financial.guarantee.feign.CrmsFeignService; import com.daqing.financial.guarantee.feign.HrmsFeignService; +import com.daqing.financial.guarantee.model.request.ApprovalBusinessRequest; import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; @@ -17,6 +18,7 @@ import com.daqing.framework.util.RedisUtil; import com.daqing.framework.utils.PageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -159,8 +161,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA public ResponseResult businessApplicationList(@RequestParam(value="page",required=false) Integer page,@RequestParam(value="size",required=false) Integer size, @RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName){ //获取当前登录用户id - //String userId = getUserId(); - String userId = "5"; + String userId = getUserId(); //根据角色查询资产部调查列表 String roleIds = RedisUtil.get("dq:userRole:" + userId); @@ -172,18 +173,19 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA } - //PageUtils data = applyAmountInfoService.queryPage(page, size,CustomerNumberOrName); //遍历data里面的数据提单人id,找出匹配id,将用户名以及部门名称赋值进去 List list = (List) data.getList(); - Integer presenterId = list.get(0).getPresenterId(); - //根据提单人id查询其部门名称 - ResponseResult employeeMessage = hrmsFeignService.getAccountAndDeptNameById(presenterId.longValue()); + if(list.size()>0){ + Integer presenterId = list.get(0).getPresenterId(); + //根据提单人id查询其部门名称 + ResponseResult employeeMessage = hrmsFeignService.getAccountAndDeptNameById(presenterId.longValue()); - for (BusinessApplicationListResponse response:list) { - if(employeeMessage.getData() != null){ - if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果提单人id相同情况下,就往对象里面赋值 - response.setAccount(employeeMessage.getData().getAccount()); - response.setDeptName(employeeMessage.getData().getDeptName()); + for (BusinessApplicationListResponse response:list) { + if(employeeMessage.getData() != null){ + if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果提单人id相同情况下,就往对象里面赋值 + response.setAccount(employeeMessage.getData().getAccount()); + response.setDeptName(employeeMessage.getData().getDeptName()); + } } } } @@ -240,13 +242,16 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA /** * 根据业务id审核业务申请内容 - * @param id + * @param approvalBusinessReq * @return */ @PostMapping("/approvalBusinessApplication") @ApiOperation(value = "根据业务id审核业务申请内容") - public ResponseResult approvalBusinessApplication(@RequestParam("id") Integer id,@RequestParam("status") Integer status, - @RequestParam(value = "remark", required = false) String remark, @RequestParam("companyId") Integer companyId){ + public ResponseResult approvalBusinessApplication(@RequestBody ApprovalBusinessRequest approvalBusinessReq){ + Integer id=approvalBusinessReq.getId(); + Integer status=approvalBusinessReq.getStatus(); + String remark=approvalBusinessReq.getRemark(); + Integer companyId=approvalBusinessReq.getCompanyId(); int result = applyAmountInfoService.approvalBusinessApplication(id,status,remark,companyId); return result>0 ? ResponseResult.SUCCESS("审核成功!"):ResponseResult.FAIL(40006,"审核失败!"); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java index 47e50cbd..6f61df4a 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeAssignUserController.java @@ -62,8 +62,7 @@ public class DgGuaranteeAssignUserController { @RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName, @RequestParam(value = "status", required = false) Integer status){ //获取当前登录用户userId - //String userId = dgApplyAmountInfoController.getUserId(); - String userId = "5"; + String userId = dgApplyAmountInfoController.getUserId(); //根据角色查询担保部调查列表 String roleIds = RedisUtil.get("dq:userRole:" + userId); PageUtils data = null; @@ -102,8 +101,7 @@ public class DgGuaranteeAssignUserController { //根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id //获取当前登录用户userId - //String userId = dgApplyAmountInfoController.getUserId(); - String userId ="5"; + String userId = dgApplyAmountInfoController.getUserId(); DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); guaranteeAssignUser.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中 guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java index 0ae29604..d063441f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java @@ -33,6 +33,9 @@ public class DgMessageInvestigationController { @Resource private IDgMessageInvestigationService dgMessageInvestigationService; + @Resource + private DgApplyAmountInfoController dgApplyAmountInfoController; + /** * 信息部调查列表 * @param @@ -47,8 +50,7 @@ public class DgMessageInvestigationController { Integer status=messageInvestigationRequest.getStatus(); //获取当前登录用户userId - //String userId = dgApplyAmountInfoController.getUserId(); - String userId = "5"; + String userId = dgApplyAmountInfoController.getUserId(); //根据角色查询担保部调查列表 String roleIds = RedisUtil.get("dq:userRole:" + userId); PageUtils data = null; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalBusinessRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalBusinessRequest.java new file mode 100644 index 00000000..d96f27cc --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalBusinessRequest.java @@ -0,0 +1,26 @@ +package com.daqing.financial.guarantee.model.request; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * @Author chen + * @DATE 2020/11/12 17:14 + * @Version 1.0 + */ +@Data +public class ApprovalBusinessRequest { + + @ApiModelProperty(value = "主键id") + private Integer id; + + @ApiModelProperty(value = "状态") + private Integer status; + + @ApiModelProperty(value = "审核意见") + private String remark; + + @ApiModelProperty(value = "企业id") + private Integer companyId; +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java index f536272f..37d5557a 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java @@ -55,5 +55,10 @@ public class InvestigateAssetsRequest { @ApiModelProperty(value = "评估价值列表") private List assessmentList; + @ApiModelProperty(value = "反担保措施(中划线隔开)") + private String[] enGuaranteeMeasures; + + @ApiModelProperty(value = "反担保措施描述") + private String description; } 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 b736d86b..ca269397 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 @@ -100,7 +100,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() - .eq("business_id",applyAmountList.getBusinessId()).eq("type",applyAmountList.getType())); + .eq("business_id",applyAmountList.getBusinessId()) + .eq("type",applyAmountList.getType())); //将业务流程状态设置为已撤销 - return 1; + DgBusinessProcessStatus status = new DgBusinessProcessStatus(); + status.setBusinessId(dgApplyAmountList1.getBusinessId()); + status.setBusinessStatus(StatusCode.YW_RESCINDED);//业务状态设置为已撤销 + return dgBusinessProcessStatusMapper.update(status,new QueryWrapper() + .eq("business_id",status.getBusinessId())); } @Transactional @@ -412,14 +417,31 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl().eq("id",id)); + //根据id查询业务id + DgApplyAmountList dgApplyAmountList1 = dgApplyAmountListMapper.selectById(id); + //修改专员那一条记录审核状态 + DgApplyAmountList applyAmountList = new DgApplyAmountList(); + applyAmountList.setStatus(status); + dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper() + .eq("business_id",dgApplyAmountList1.getBusinessId())); + + if(status.equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 + DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); + processStatus.setBusinessId(dgApplyAmountList1.getBusinessId()); + processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决 + dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper() + .eq("business_id",processStatus.getBusinessId())); + } + + //如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审 if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){ //新增一条记录到担保部 DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); - guaranteeAssignUser.setBusinessId(id);//业务id + guaranteeAssignUser.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id guaranteeAssignUser.setCompanyId(companyId);//企业id guaranteeAssignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理角色id guaranteeAssignUser.setType(3);//角色类型 @@ -429,7 +451,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl roleIdlist, String userId, Integer status) { //分页参数 @@ -76,8 +80,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl