完善功能

master
chen 4 years ago
parent ceb46ec638
commit 4659e6c9c7
  1. 15
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  2. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
  3. 522
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  4. 4
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  5. 8
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/RoleController.java
  6. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java

@ -2,9 +2,11 @@ package com.daqing.financial.guarantee.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.service.IDgAuditProcessService; import com.daqing.financial.guarantee.service.IDgAuditProcessService;
import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.DgAuditProcess;
import com.daqing.framework.domain.guarantee.po.ProcessPO; import com.daqing.framework.domain.guarantee.po.ProcessPO;
import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -34,6 +36,9 @@ public class DgAuditProcessController {
@Autowired @Autowired
private IDgAuditProcessService auditProcessService; private IDgAuditProcessService auditProcessService;
@Autowired
private HrmsFeignService hrmsFeignService;
@ApiOperation(value = "审核流程进程列表") @ApiOperation(value = "审核流程进程列表")
@GetMapping("/auditProcessList") @GetMapping("/auditProcessList")
public ResponseResult processList( public ResponseResult processList(
@ -42,6 +47,16 @@ public class DgAuditProcessController {
@ApiParam(name = "processId", value = "流程id", required = false) @ApiParam(name = "processId", value = "流程id", required = false)
@RequestParam(required = false) String processId){ @RequestParam(required = false) String processId){
List<DgAuditProcess> processList = auditProcessService.queryProcessList(businessId,processId); List<DgAuditProcess> processList = auditProcessService.queryProcessList(businessId,processId);
ResponseResult responseResult = hrmsFeignService.roleList();
//获取角色名称信息
List<RoleEntity> list = (List<RoleEntity>) responseResult.getData();
for (DgAuditProcess process:processList){
for (RoleEntity roleEntity:list){
if (process.getRoleId().equals(roleEntity.getId())){
process.setDeptName(roleEntity.getName());
}
}
}
return ResponseResult.SUCCESS(processList); return ResponseResult.SUCCESS(processList);
} }

@ -90,4 +90,7 @@ public interface HrmsFeignService {
@GetMapping("/hrms/permission/info") @GetMapping("/hrms/permission/info")
ResponseResult info(@RequestParam("id") Long id);*/ ResponseResult info(@RequestParam("id") Long id);*/
@GetMapping("/hrms/role/roleList")
ResponseResult roleList();
} }

@ -234,287 +234,267 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
roleList.add(Integer.parseInt(id)); roleList.add(Integer.parseInt(id));
} }
} }
//查询用户处理过的业务 //获取每个业务id的三种状态
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>(); HashMap<Integer, Object> hashMap = Maps.newHashMap();
wrapper.eq("user_id", currentUser).groupBy("business_id").select("business_id"); //角色不为空
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper); //担保业务员角色、担保经理角色
if (auditProcessList != null && auditProcessList.size() != 0) { if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) {
List<Integer> businessIdList = new ArrayList<>(); //业务申请列表查询
auditProcessList.forEach(dgAuditProcess -> { IPage<BusinessApplicationListResponse> positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId());
businessIdList.add(dgAuditProcess.getBusinessId()); List<BusinessApplicationListResponse> records = positionVO.getRecords();
}); if (records!=null && records.size()!=0){
records.forEach(businessApplicationListResponse -> {
//根据业务id查询业务流程,统计耗时,完成时间 StatusPO statusPO = new StatusPO();
businessIdList.forEach(businessId -> { Integer businessId = businessApplicationListResponse.getBusinessId();
//new返回对象 String name = businessApplicationListResponse.getName();
PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse(); Integer status = businessApplicationListResponse.getStatus();
efficiencyListResponse.setBusinessId(businessId); Integer operatingStatus = businessApplicationListResponse.getOperatingStatus();
//根据业务id查询业务 Integer businessStatus = businessApplicationListResponse.getBusinessStatus();
DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(businessId); statusPO.setBusinessStatus(businessStatus);
//业务申请日期 statusPO.setName(name);
Date createTime = dgApplyAmountInfo.getCreateTime(); statusPO.setOperatingStatus(operatingStatus);
//客户公司id statusPO.setProcessId(1);
Integer companyId = dgApplyAmountInfo.getCompanyId(); statusPO.setStatus(status);
//提单人id hashMap.put(businessId, statusPO);
Integer presenterId = dgApplyAmountInfo.getPresenterId(); });
efficiencyListResponse.setApplicantId(presenterId);
efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime));
efficiencyListResponse.setClientName(String.valueOf(companyId));
//获取累计耗时,完成时间,任务节点
HashMap<String, Object> hashMap = getTime(businessId, currentUser);
Object countTime = hashMap.get("countTime");
Object endTime = hashMap.get("endTime");
efficiencyListResponse.setTimeConsuming(String.valueOf(countTime));
efficiencyListResponse.setCompleteTime(String.valueOf(endTime));
efficiencyList.add(efficiencyListResponse);
});
//获取每个业务id的三种状态
HashMap<Integer, Object> hashMap = Maps.newHashMap();
//角色不为空
//担保业务员角色、担保经理角色
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_YWY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID))) {
//业务申请列表查询
IPage<BusinessApplicationListResponse> positionVO = applyAmountListMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId());
List<BusinessApplicationListResponse> records = positionVO.getRecords();
if (records!=null && records.size()!=0){
records.forEach(businessApplicationListResponse -> {
StatusPO statusPO = new StatusPO();
Integer businessId = businessApplicationListResponse.getBusinessId();
String name = businessApplicationListResponse.getName();
Integer status = businessApplicationListResponse.getStatus();
Integer operatingStatus = businessApplicationListResponse.getOperatingStatus();
Integer businessStatus = businessApplicationListResponse.getBusinessStatus();
statusPO.setBusinessStatus(businessStatus);
statusPO.setName(name);
statusPO.setOperatingStatus(operatingStatus);
statusPO.setProcessId(1);
statusPO.setStatus(status);
hashMap.put(businessId, statusPO);
});
}
} }
//担保经理角色、担保A角角色、担保B角角色、担保领导角色 }
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_LD_ID))) { //担保经理角色、担保A角角色、担保B角角色、担保领导角色
// 担保部调查列表 if (roleIdList.contains(String.valueOf(PromptSuccess.DB_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.DB_LD_ID))) {
IPage<GuaranteeListResponse> positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); // 担保部调查列表
List<GuaranteeListResponse> records = positionVO.getRecords(); IPage<GuaranteeListResponse> positionVO = guaranteeAssignUserMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
if (records!=null && records.size()!=0) { List<GuaranteeListResponse> records = positionVO.getRecords();
records.forEach(guaranteeListResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(guaranteeListResponse -> {
Integer businessId = guaranteeListResponse.getBusinessId(); StatusPO statusPO = new StatusPO();
Integer status = guaranteeListResponse.getStatus(); Integer businessId = guaranteeListResponse.getBusinessId();
String name = guaranteeListResponse.getName(); Integer status = guaranteeListResponse.getStatus();
Integer operatingStatus = guaranteeListResponse.getOperatingStatus(); String name = guaranteeListResponse.getName();
Integer businessStatus = guaranteeListResponse.getBusinessStatus(); Integer operatingStatus = guaranteeListResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = guaranteeListResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(2); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(2);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//资产经理角色、资产专员角色、资产领导角色 }
if (roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_LD_ID))) { //资产经理角色、资产专员角色、资产领导角色
// 资产部调查列表 if (roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.ZC_LD_ID))) {
IPage<AssetsInvestigationListResponse> positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); // 资产部调查列表
List<AssetsInvestigationListResponse> records = positionVO.getRecords(); IPage<AssetsInvestigationListResponse> positionVO = assetsInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
if (records!=null && records.size()!=0) { List<AssetsInvestigationListResponse> records = positionVO.getRecords();
records.forEach(assetsInvestigationListResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(assetsInvestigationListResponse -> {
Integer businessId = assetsInvestigationListResponse.getBusinessId(); StatusPO statusPO = new StatusPO();
Integer status = assetsInvestigationListResponse.getStatus(); Integer businessId = assetsInvestigationListResponse.getBusinessId();
String name = assetsInvestigationListResponse.getName(); Integer status = assetsInvestigationListResponse.getStatus();
Integer operatingStatus = assetsInvestigationListResponse.getOperatingStatus(); String name = assetsInvestigationListResponse.getName();
Integer businessStatus = assetsInvestigationListResponse.getBusinessStatus(); Integer operatingStatus = assetsInvestigationListResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = assetsInvestigationListResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(3); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(3);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//信息经理角色、信息专员角色、信息领导角色 }
if (roleIdList.contains(String.valueOf(PromptSuccess.XX_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_LD_ID))) { //信息经理角色、信息专员角色、信息领导角色
// 信息部调查列表 if (roleIdList.contains(String.valueOf(PromptSuccess.XX_JL_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_ZY_ID)) | roleIdList.contains(String.valueOf(PromptSuccess.XX_LD_ID))) {
IPage<MessageInvestigationListResponse> positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null); // 信息部调查列表
List<MessageInvestigationListResponse> records = positionVO.getRecords(); IPage<MessageInvestigationListResponse> positionVO = messageInvestigationMapper.pageByCondition(new Page(1, size), "", roleIdList, this.getUserId(), null);
if (records!=null && records.size()!=0) { List<MessageInvestigationListResponse> records = positionVO.getRecords();
records.forEach(messageInvestigationListResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(messageInvestigationListResponse -> {
Integer businessId = messageInvestigationListResponse.getBusinessId(); StatusPO statusPO = new StatusPO();
Integer status = messageInvestigationListResponse.getStatus(); Integer businessId = messageInvestigationListResponse.getBusinessId();
String name = messageInvestigationListResponse.getName(); Integer status = messageInvestigationListResponse.getStatus();
Integer operatingStatus = messageInvestigationListResponse.getOperatingStatus(); String name = messageInvestigationListResponse.getName();
Integer businessStatus = messageInvestigationListResponse.getBusinessStatus(); Integer operatingStatus = messageInvestigationListResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = messageInvestigationListResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(4); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(4);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//担保部A/B角、法规经理角色、法规部C角、法规部分管领导 }
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_C_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_LD_ID))) { //担保部A/B角、法规经理角色、法规部C角、法规部分管领导
// 合规调查列表 if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_C_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_LD_ID))) {
DgComplianceInvestigationRequest dgComplianceInvestigationRequest = new DgComplianceInvestigationRequest(); // 合规调查列表
IPage<DgComplianceInvestigationResponse> list = complianceInvestigationMapper.list(new Page(1, size), dgComplianceInvestigationRequest, roleList, currentUser); DgComplianceInvestigationRequest dgComplianceInvestigationRequest = new DgComplianceInvestigationRequest();
List<DgComplianceInvestigationResponse> records = list.getRecords(); IPage<DgComplianceInvestigationResponse> list = complianceInvestigationMapper.list(new Page(1, size), dgComplianceInvestigationRequest, roleList, currentUser);
if (records!=null && records.size()!=0) { List<DgComplianceInvestigationResponse> records = list.getRecords();
records.forEach(dgComplianceInvestigationResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(dgComplianceInvestigationResponse -> {
Integer businessId = dgComplianceInvestigationResponse.getBusinessId(); StatusPO statusPO = new StatusPO();
String name = dgComplianceInvestigationResponse.getName(); Integer businessId = dgComplianceInvestigationResponse.getBusinessId();
Integer status = dgComplianceInvestigationResponse.getAuditStatus(); String name = dgComplianceInvestigationResponse.getName();
Integer operatingStatus = dgComplianceInvestigationResponse.getOperationStatus(); Integer status = dgComplianceInvestigationResponse.getAuditStatus();
Integer businessStatus = dgComplianceInvestigationResponse.getBusinessStatus(); Integer operatingStatus = dgComplianceInvestigationResponse.getOperationStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = dgComplianceInvestigationResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(5); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(5);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//工作会 }
if (roleIdList.contains(String.valueOf(PromptSuccess.GZU_ID))) { //工作会
IPage<DgWorkConferencePO> list = workConferenceConsiderMapper.list(new Page(1, size), "", roleList, currentUser); if (roleIdList.contains(String.valueOf(PromptSuccess.GZU_ID))) {
List<DgWorkConferencePO> records = list.getRecords(); IPage<DgWorkConferencePO> list = workConferenceConsiderMapper.list(new Page(1, size), "", roleList, currentUser);
if (records!=null && records.size()!=0) { List<DgWorkConferencePO> records = list.getRecords();
records.forEach(dgWorkConferencePO -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(dgWorkConferencePO -> {
Integer businessId = dgWorkConferencePO.getBusinessId(); StatusPO statusPO = new StatusPO();
String name = dgWorkConferencePO.getName(); Integer businessId = dgWorkConferencePO.getBusinessId();
Integer status = dgWorkConferencePO.getAuditStatus(); String name = dgWorkConferencePO.getName();
Integer operatingStatus = dgWorkConferencePO.getOperationStatus(); Integer status = dgWorkConferencePO.getAuditStatus();
Integer businessStatus = dgWorkConferencePO.getBusinessStatus(); Integer operatingStatus = dgWorkConferencePO.getOperationStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = dgWorkConferencePO.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(6); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(6);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//担保部A/B角、贷审会 }
if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DSH_ID))) { //担保部A/B角、贷审会
IPage<DgLoanCommitteeConsiderResponse> list = loanCommitteeConsiderMapper.list(new Page(1, size), "", roleList, currentUser); if (roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DSH_ID))) {
List<DgLoanCommitteeConsiderResponse> records = list.getRecords(); IPage<DgLoanCommitteeConsiderResponse> list = loanCommitteeConsiderMapper.list(new Page(1, size), "", roleList, currentUser);
if (records!=null && records.size()!=0) { List<DgLoanCommitteeConsiderResponse> records = list.getRecords();
records.forEach(dgLoanCommitteeConsiderResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(dgLoanCommitteeConsiderResponse -> {
Integer businessId = dgLoanCommitteeConsiderResponse.getBusinessId(); StatusPO statusPO = new StatusPO();
Integer status = dgLoanCommitteeConsiderResponse.getStatus(); Integer businessId = dgLoanCommitteeConsiderResponse.getBusinessId();
String name = dgLoanCommitteeConsiderResponse.getName(); Integer status = dgLoanCommitteeConsiderResponse.getStatus();
Integer operatingStatus = dgLoanCommitteeConsiderResponse.getOperatingStatus(); String name = dgLoanCommitteeConsiderResponse.getName();
Integer businessStatus = dgLoanCommitteeConsiderResponse.getBusinessStatus(); Integer operatingStatus = dgLoanCommitteeConsiderResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = dgLoanCommitteeConsiderResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(7); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(7);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//法规经理、担保部A/B角、资产部经理 }
if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) ) { //法规经理、担保部A/B角、资产部经理
//担保函 if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_A_ID))|roleIdList.contains(String.valueOf(PromptSuccess.DB_B_ID))|roleIdList.contains(String.valueOf(PromptSuccess.ZC_JL_ID)) ) {
IPage<GuaranteeLetterListResponse> iPage = guaranteeLetterAssignUserMapper.pageByCondition(new Page(1, size), currentUser, roleIdList, null, null); //担保函
List<GuaranteeLetterListResponse> records = iPage.getRecords(); IPage<GuaranteeLetterListResponse> iPage = guaranteeLetterAssignUserMapper.pageByCondition(new Page(1, size), currentUser, roleIdList, null, null);
if (records!=null && records.size()!=0) { List<GuaranteeLetterListResponse> records = iPage.getRecords();
records.forEach(guaranteeLetterListResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(guaranteeLetterListResponse -> {
String name = guaranteeLetterListResponse.getName(); StatusPO statusPO = new StatusPO();
Integer businessId = guaranteeLetterListResponse.getBusinessId(); String name = guaranteeLetterListResponse.getName();
Integer status = guaranteeLetterListResponse.getStatus(); Integer businessId = guaranteeLetterListResponse.getBusinessId();
Integer operatingStatus = guaranteeLetterListResponse.getOperatingStatus(); Integer status = guaranteeLetterListResponse.getStatus();
Integer businessStatus = guaranteeLetterListResponse.getBusinessStatus(); Integer operatingStatus = guaranteeLetterListResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = guaranteeLetterListResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(8); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(8);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//财务部、法规经理 }
if (roleIdList.contains(String.valueOf(PromptSuccess.CWB_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { //财务部、法规经理
//回款确认 if (roleIdList.contains(String.valueOf(PromptSuccess.CWB_ID))|roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) {
IPage<PaymentConfirmationListResponse> iPage = paymentConfirmationConsiderMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); //回款确认
List<PaymentConfirmationListResponse> records = iPage.getRecords(); IPage<PaymentConfirmationListResponse> iPage = paymentConfirmationConsiderMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null);
if (records!=null && records.size()!=0) { List<PaymentConfirmationListResponse> records = iPage.getRecords();
records.forEach(paymentConfirmationListResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(paymentConfirmationListResponse -> {
String name = paymentConfirmationListResponse.getName(); StatusPO statusPO = new StatusPO();
Integer businessId = paymentConfirmationListResponse.getBusinessId(); String name = paymentConfirmationListResponse.getName();
Integer status = paymentConfirmationListResponse.getStatus(); Integer businessId = paymentConfirmationListResponse.getBusinessId();
Integer operatingStatus = paymentConfirmationListResponse.getOperatingStatus(); Integer status = paymentConfirmationListResponse.getStatus();
Integer businessStatus = paymentConfirmationListResponse.getBusinessStatus(); Integer operatingStatus = paymentConfirmationListResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = paymentConfirmationListResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(9); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(9);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//法规经理 }
if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) { //法规经理
//放款通知 if (roleIdList.contains(String.valueOf(PromptSuccess.FG_JL_ID))) {
IPage<LoanNoticeListResponse> iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null); //放款通知
List<LoanNoticeListResponse> records = iPage.getRecords(); IPage<LoanNoticeListResponse> iPage = loanNoticeMapper.pageByCondition(new Page(1, size), roleIdList, currentUser, null, null);
if (records!=null && records.size()!=0) { List<LoanNoticeListResponse> records = iPage.getRecords();
records.forEach(loanNoticeListResponse -> { if (records!=null && records.size()!=0) {
StatusPO statusPO = new StatusPO(); records.forEach(loanNoticeListResponse -> {
String name = loanNoticeListResponse.getName(); StatusPO statusPO = new StatusPO();
Integer businessId = loanNoticeListResponse.getBusinessId(); String name = loanNoticeListResponse.getName();
Integer status = loanNoticeListResponse.getStatus(); Integer businessId = loanNoticeListResponse.getBusinessId();
Integer operatingStatus = loanNoticeListResponse.getOperatingStatus(); Integer status = loanNoticeListResponse.getStatus();
Integer businessStatus = loanNoticeListResponse.getBusinessStatus(); Integer operatingStatus = loanNoticeListResponse.getOperatingStatus();
statusPO.setBusinessStatus(businessStatus); Integer businessStatus = loanNoticeListResponse.getBusinessStatus();
statusPO.setOperatingStatus(operatingStatus); statusPO.setBusinessStatus(businessStatus);
statusPO.setProcessId(10); statusPO.setOperatingStatus(operatingStatus);
statusPO.setName(name); statusPO.setProcessId(10);
statusPO.setStatus(status); statusPO.setName(name);
hashMap.put(businessId, statusPO); statusPO.setStatus(status);
}); hashMap.put(businessId, statusPO);
} });
} }
//再次循环,拼接数据 }
efficiencyList.forEach(personalEfficiencyListResponse -> { //遍历map,key值为业务id
Integer businessId = personalEfficiencyListResponse.getBusinessId(); for (Integer key : hashMap.keySet()) {
Object o = hashMap.get(businessId); PersonalEfficiencyListResponse efficiencyListResponse = new PersonalEfficiencyListResponse();
//有数据 efficiencyListResponse.setBusinessId(key);
if (ObjectUtil.isNotNull(o)){ StatusPO po = (StatusPO)hashMap.get(key);
//强制转换 Integer businessStatus = po.getBusinessStatus();
if (o instanceof StatusPO){ Integer operatingStatus = po.getOperatingStatus();
StatusPO statusPO = (StatusPO)o; Integer processId = po.getProcessId();
String name = statusPO.getName(); Integer status = po.getStatus();
Integer operatingStatus = statusPO.getOperatingStatus(); String name = po.getName();
Integer processId = statusPO.getProcessId(); //根据业务id查询业务
Integer status = statusPO.getStatus(); DgApplyAmountInfo dgApplyAmountInfo = applyAmountInfoMapper.selectById(key);
Integer businessStatus = statusPO.getBusinessStatus(); //业务申请日期
personalEfficiencyListResponse.setTaskNode(String.valueOf(processId)); Date createTime = dgApplyAmountInfo.getCreateTime();
personalEfficiencyListResponse.setBusinessStatus(businessStatus); //客户公司id
personalEfficiencyListResponse.setOperatingStatus(operatingStatus); Integer companyId = dgApplyAmountInfo.getCompanyId();
personalEfficiencyListResponse.setApproveStatus(status); //提单人id
personalEfficiencyListResponse.setClientName(name); Integer presenterId = dgApplyAmountInfo.getPresenterId();
} efficiencyListResponse.setOperatingStatus(operatingStatus);
} efficiencyListResponse.setApproveStatus(status);
String timeConsuming = personalEfficiencyListResponse.getTimeConsuming(); efficiencyListResponse.setBusinessStatus(businessStatus);
String totalTimeConsuming = countTime(timeConsuming); efficiencyListResponse.setTaskNode(String.valueOf(processId));
personalEfficiencyListResponse.setTimeConsuming(totalTimeConsuming); efficiencyListResponse.setClientName(name);
}); efficiencyListResponse.setApplicantId(presenterId);
efficiencyListResponse.setApplicationDate(new SimpleDateFormat("yyyy-MM-dd").format(createTime));
efficiencyListResponse.setClientName(String.valueOf(companyId));
//用户处理过业务,统计耗时
QueryWrapper<DgAuditProcess> wrapper = new QueryWrapper<>();
wrapper.eq("user_id", currentUser).eq("business_id",key);
List<DgAuditProcess> auditProcessList = dgAuditProcessMapper.selectList(wrapper);
if (auditProcessList != null && auditProcessList.size() != 0) {
//获取累计耗时,完成时间
HashMap<String, Object> hashMapTime = getTime(key, currentUser);
Object countTime = hashMapTime.get("countTime");
Object endTime = hashMapTime.get("endTime");
efficiencyListResponse.setTimeConsuming(countTime(String.valueOf(countTime)));
efficiencyListResponse.setCompleteTime(String.valueOf(endTime));
}
efficiencyList.add(efficiencyListResponse);
} }
return efficiencyList; return efficiencyList;
} }

@ -7,17 +7,17 @@
<id column="id" property="id" /> <id column="id" property="id" />
<result column="business_id" property="businessId" /> <result column="business_id" property="businessId" />
<result column="approver" property="approver" /> <result column="approver" property="approver" />
<result column="dept_name" property="deptName"/>
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="status" property="status" /> <result column="status" property="status" />
<result column="audit_opinion" property="auditOpinion" /> <result column="audit_opinion" property="auditOpinion" />
<result column="reason" property="reason" /> <result column="reason" property="reason" />
<result column="loan_money" property="loanMoney" /> <result column="loan_money" property="loanMoney" />
<result column="loan_tern" property="loanTern" /> <result column="loan_tern" property="loanTern" />
<result column="role_id" property="roleId" />
</resultMap> </resultMap>
<select id="selectAuditProcessList" resultMap="BaseResultMap"> <select id="selectAuditProcessList" resultMap="BaseResultMap">
select dap.id,dap.business_id,dap.approver,dap.dept_name,dap.create_time,dap.audit_opinion, select dap.id,dap.business_id,dap.approver,dap.create_time,dap.audit_opinion,dap.role_id,
dbps.business_status as status,dap.reason,dap.loan_money,dap.loan_tern dbps.business_status as status,dap.reason,dap.loan_money,dap.loan_tern
from dg_audit_process dap from dg_audit_process dap
left join dg_business_process_status dbps on dbps.business_id = dap.business_id left join dg_business_process_status dbps on dbps.business_id = dap.business_id

@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
@ -35,6 +36,13 @@ public class RoleController {
return ResponseResult.SUCCESS(); return ResponseResult.SUCCESS();
} }
//查询角色名称
@GetMapping("/roleList")
public ResponseResult roleList() {
List<RoleEntity> list = roleService.list();
return ResponseResult.SUCCESS(list);
}
/** /**
* 信息 * 信息

@ -38,6 +38,9 @@ public class DgAuditProcess implements Serializable {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private Integer userId; private Integer userId;
@ApiModelProperty(value = "部门名称(实为角色名称)")
private String deptName;
@ApiModelProperty(value = "部门ids") @ApiModelProperty(value = "部门ids")
private String departmentId; private String departmentId;

Loading…
Cancel
Save