优化细节

master
chen 4 years ago
parent 6211c5b7b4
commit 020cc90778
  1. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java

@ -22,6 +22,7 @@ import com.daqing.framework.utils.excel.EasyExcelUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -154,27 +155,22 @@ public class DgEfficiencyController {
numResponse.setCopySendNum(size); numResponse.setCopySendNum(size);
//转换任务节点,并统计操作状态个数 //转换任务节点,并统计操作状态个数
responseList.forEach(personalEfficiencyListResponse -> { responseList.forEach(personalEfficiencyListResponse -> {
//提单人为空,默认赋值客户
if (StringUtils.isEmpty(personalEfficiencyListResponse.getApplicant())){
personalEfficiencyListResponse.setApplicant("客户");
}
String taskNode = personalEfficiencyListResponse.getTaskNode(); String taskNode = personalEfficiencyListResponse.getTaskNode();
if (taskNode != null) { if (taskNode != null) {
String converter = TaskNodeUtil.converter(taskNode); String converter = TaskNodeUtil.converter(taskNode);
personalEfficiencyListResponse.setTaskNode(converter); personalEfficiencyListResponse.setTaskNode(converter);
} }
if (personalEfficiencyListResponse.getOperatingStatus() != null) { if (personalEfficiencyListResponse.getOperatingStatus() != null) {
switch (personalEfficiencyListResponse.getOperatingStatus()) { if (personalEfficiencyListResponse.getOperatingStatus()==0){
case 0:
numResponse.setInitiateNum(numResponse.getInitiateNum() + 1); numResponse.setInitiateNum(numResponse.getInitiateNum() + 1);
break; }else if (personalEfficiencyListResponse.getOperatingStatus()==1){
case 1:
numResponse.setPendingNum(numResponse.getPendingNum() + 1); numResponse.setPendingNum(numResponse.getPendingNum() + 1);
break; }else if (personalEfficiencyListResponse.getOperatingStatus()==2){
case 2:
numResponse.setProcessedNum(numResponse.getProcessedNum() + 1); numResponse.setProcessedNum(numResponse.getProcessedNum() + 1);
break;
default:
numResponse.setInitiateNum(0);
numResponse.setPendingNum(0);
numResponse.setProcessedNum(0);
break;
} }
} }
}); });

Loading…
Cancel
Save