个人效率

master
chen 4 years ago
parent 815c5492c7
commit b5dba4b13f
  1. 22
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  4. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/TaskNodeUtil.java

@ -7,6 +7,7 @@ import com.daqing.financial.guarantee.model.request.PersonalEfficiencyListReques
import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse; import com.daqing.financial.guarantee.model.response.PersonalEfficiencyListResponse;
import com.daqing.financial.guarantee.service.IDgEfficiencyService; import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.financial.guarantee.util.DateUtils; import com.daqing.financial.guarantee.util.DateUtils;
import com.daqing.financial.guarantee.util.TaskNodeUtil;
import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.excel.EasyExcelUtil; import com.daqing.framework.utils.excel.EasyExcelUtil;
@ -22,7 +23,6 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* 流程效率 * 流程效率
@ -132,8 +132,25 @@ public class DgEfficiencyController {
//获取毫秒数 //获取毫秒数
long longStart = getLongDate(personalEfficiencyListRequest.getStartTime()); long longStart = getLongDate(personalEfficiencyListRequest.getStartTime());
long longEnd = getLongDate(personalEfficiencyListRequest.getEndTime()); long longEnd = getLongDate(personalEfficiencyListRequest.getEndTime());
Stream<Boolean> booleanStream = responseList.stream().map(p -> getLongDate(p.getApplicationDate()) > longStart && getLongDate(p.getApplicationDate()) < longEnd); //迭代器进行筛选
Iterator<PersonalEfficiencyListResponse> iterator = responseList.iterator();
while (iterator.hasNext()){
PersonalEfficiencyListResponse next = iterator.next();
String applicationDate = next.getApplicationDate();
long longDate = getLongDate(applicationDate);
//当前日期小于开始日期或当前日期大于结束日期,删除该元素
if (longDate<longStart||longDate>longEnd){
iterator.remove();
} }
}
}
//转换任务节点
responseList.forEach(personalEfficiencyListResponse -> {
String taskNode = personalEfficiencyListResponse.getTaskNode();
String converter = TaskNodeUtil.converter(taskNode);
personalEfficiencyListResponse.setTaskNode(converter);
});
return ResponseResult.SUCCESS(responseList); return ResponseResult.SUCCESS(responseList);
} }
@ -180,5 +197,4 @@ public class DgEfficiencyController {
} }
} }

@ -47,7 +47,7 @@ public class PersonalEfficiencyListResponse {
@ApiModelProperty("任务节点") @ApiModelProperty("任务节点")
@ExcelProperty(value = "任务节点",index = 6,converter = TaskNodeConverter.class) @ExcelProperty(value = "任务节点",index = 6,converter = TaskNodeConverter.class)
private Integer taskNode; private String taskNode;
@ApiModelProperty("审批状态") @ApiModelProperty("审批状态")
@ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class) @ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class)

@ -490,7 +490,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
Integer processId = statusPO.getProcessId(); Integer processId = statusPO.getProcessId();
Integer status = statusPO.getStatus(); Integer status = statusPO.getStatus();
Integer businessStatus = statusPO.getBusinessStatus(); Integer businessStatus = statusPO.getBusinessStatus();
personalEfficiencyListResponse.setTaskNode(processId); personalEfficiencyListResponse.setTaskNode(String.valueOf(processId));
personalEfficiencyListResponse.setBusinessStatus(businessStatus); personalEfficiencyListResponse.setBusinessStatus(businessStatus);
personalEfficiencyListResponse.setOperatingStatus(operatingStatus); personalEfficiencyListResponse.setOperatingStatus(operatingStatus);
personalEfficiencyListResponse.setApproveStatus(status); personalEfficiencyListResponse.setApproveStatus(status);

@ -0,0 +1,37 @@
package com.daqing.financial.guarantee.util;
import com.alibaba.excel.metadata.CellData;
/**
* @Author chen
* @DATE 2021/1/4 9:38
* @Version 1.0
*/
public class TaskNodeUtil {
public static String converter(String taskNode){
switch (taskNode){
case "1":
return "业务申请";
case "2":
return "担保部调查";
case "3":
return "资产部调查";
case "4":
return "信息部调查";
case "5":
return "合规调查";
case "6":
return "工作会";
case "7":
return "贷审会";
case "8":
return "担保函";
case "9":
return "回款确认";
case "10":
return "放款通知";
default:
return "";
}
}
}
Loading…
Cancel
Save