diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java index 4296eb83..139e1147 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.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.service.IDgEfficiencyService; 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.response.ResponseResult; import com.daqing.framework.utils.excel.EasyExcelUtil; @@ -22,7 +23,6 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * 流程效率 @@ -132,8 +132,25 @@ public class DgEfficiencyController { //获取毫秒数 long longStart = getLongDate(personalEfficiencyListRequest.getStartTime()); long longEnd = getLongDate(personalEfficiencyListRequest.getEndTime()); - Stream booleanStream = responseList.stream().map(p -> getLongDate(p.getApplicationDate()) > longStart && getLongDate(p.getApplicationDate()) < longEnd); + //迭代器进行筛选 + Iterator iterator = responseList.iterator(); + while (iterator.hasNext()){ + PersonalEfficiencyListResponse next = iterator.next(); + String applicationDate = next.getApplicationDate(); + long longDate = getLongDate(applicationDate); + //当前日期小于开始日期或当前日期大于结束日期,删除该元素 + if (longDatelongEnd){ + iterator.remove(); + } + } } + //转换任务节点 + responseList.forEach(personalEfficiencyListResponse -> { + String taskNode = personalEfficiencyListResponse.getTaskNode(); + String converter = TaskNodeUtil.converter(taskNode); + personalEfficiencyListResponse.setTaskNode(converter); + }); + return ResponseResult.SUCCESS(responseList); } @@ -180,5 +197,4 @@ public class DgEfficiencyController { } - } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java index 81b245ab..bddd6151 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java @@ -47,7 +47,7 @@ public class PersonalEfficiencyListResponse { @ApiModelProperty("任务节点") @ExcelProperty(value = "任务节点",index = 6,converter = TaskNodeConverter.class) - private Integer taskNode; + private String taskNode; @ApiModelProperty("审批状态") @ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java index 8f8753fb..4a14c634 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java @@ -490,7 +490,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl