UAT问题清单修改,71行,项目法规任务待办中心表头排序三个字段。
This commit is contained in:
+82
@@ -9,6 +9,8 @@ import com.jero.common.constant.enums.CutEnum;
|
|||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.DictModel;
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.common.util.DateUtils;
|
||||||
|
import com.jero.modules.dummy.enums.OrderEnum;
|
||||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||||
@@ -47,6 +49,7 @@ import org.apache.shiro.SecurityUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.Collator;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -236,9 +239,88 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue());
|
this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue());
|
||||||
|
result = this.hearSort(params, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表头排序
|
||||||
|
* @param params
|
||||||
|
* @param resultPage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private IPage<ProcessInfoVO> hearSort(Map<String, Object> params, IPage<ProcessInfoVO> resultPage) {
|
||||||
|
String orderBy = (String) params.get("orderBy");
|
||||||
|
String orderByField = (String) params.get("orderByField");
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(orderByField)){
|
||||||
|
List<ProcessInfoVO> result = resultPage.getRecords();
|
||||||
|
|
||||||
|
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||||
|
// 流程类型 flow_type
|
||||||
|
if("flow_type".equals(orderByField)){
|
||||||
|
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(result,(e1, e2)->{
|
||||||
|
if(e1.getFlowTypeShow() != null && e2.getFlowTypeShow() != null){
|
||||||
|
return comparator.compare(e1.getFlowTypeShow(),e2.getFlowTypeShow());
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
});
|
||||||
|
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(result,(e1,e2)->{
|
||||||
|
if(e1.getFlowTypeShow() != null && e2.getFlowTypeShow() != null){
|
||||||
|
return comparator.compare(e2.getFlowTypeShow(),e1.getFlowTypeShow());
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 任务节点 task_definition_key
|
||||||
|
if("task_definition_key".equals(orderByField)){
|
||||||
|
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(result,(e1, e2)->{
|
||||||
|
if(e1.getTaskDefinitionKeyName() != null && e2.getTaskDefinitionKeyName() != null){
|
||||||
|
return comparator.compare(e1.getTaskDefinitionKeyName(),e2.getTaskDefinitionKeyName());
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
});
|
||||||
|
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(result,(e1,e2)->{
|
||||||
|
if(e1.getTaskDefinitionKeyName() != null && e2.getTaskDefinitionKeyName() != null){
|
||||||
|
return comparator.compare(e2.getTaskDefinitionKeyName(),e1.getTaskDefinitionKeyName());
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 截止时间 endTime
|
||||||
|
if("endTime".equals(orderByField)){
|
||||||
|
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(result,(e1, e2)->{
|
||||||
|
if(e1.getEndTime() != null && e2.getEndTime() != null){
|
||||||
|
String e1EndTime = DateUtils.formatDate(e1.getEndTime());
|
||||||
|
String e2EndTime = DateUtils.formatDate(e2.getEndTime());
|
||||||
|
return comparator.compare(e1EndTime,e2EndTime);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
});
|
||||||
|
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(result,(e1,e2)->{
|
||||||
|
if(e1.getEndTime() != null && e2.getEndTime() != null){
|
||||||
|
String e1EndTime = DateUtils.formatDate(e1.getEndTime());
|
||||||
|
String e2EndTime = DateUtils.formatDate(e2.getEndTime());
|
||||||
|
return comparator.compare(e2EndTime,e1EndTime);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultPage;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage projectProcessDoneProcess(Map<String, Object> params) {
|
public IPage projectProcessDoneProcess(Map<String, Object> params) {
|
||||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user