Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+1
-1
@@ -244,7 +244,7 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
)temp
|
)temp
|
||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
order by temp.end_time asc
|
order by temp.end_time ASC,temp.project_name ASC,standard_info ASC,temp.flow_type ASC
|
||||||
</select>
|
</select>
|
||||||
<select id="queryLawsAssessPageList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
<select id="queryLawsAssessPageList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
||||||
select temp.* from (
|
select temp.* from (
|
||||||
|
|||||||
+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());
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'flowTypeShow',
|
dataIndex: 'flowTypeShow',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter: true,
|
||||||
width: 241
|
width: 241
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -90,6 +91,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'taskDefinitionKeyName',
|
dataIndex: 'taskDefinitionKeyName',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter: true,
|
||||||
width: 208
|
width: 208
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -118,6 +120,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'endTime',
|
dataIndex: 'endTime',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter: true,
|
||||||
width: 108
|
width: 108
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -349,9 +352,9 @@
|
|||||||
tableOnChange(pagination, filters, sorter) {
|
tableOnChange(pagination, filters, sorter) {
|
||||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
if (sorter.columnKey == 'flowTypeShow') {
|
if (sorter.columnKey == 'flowTypeShow') {
|
||||||
this.orderByField = 'flowType'
|
this.orderByField = 'flow_type'
|
||||||
} else if (sorter.columnKey == 'taskDefinitionKeyName') {
|
} else if (sorter.columnKey == 'taskDefinitionKeyName') {
|
||||||
this.orderByField = 'taskDefinitionKey'
|
this.orderByField = 'task_definition_key'
|
||||||
} else {
|
} else {
|
||||||
this.orderByField = sorter.columnKey
|
this.orderByField = sorter.columnKey
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,9 +426,9 @@
|
|||||||
tableOnChange(pagination, filters, sorter) {
|
tableOnChange(pagination, filters, sorter) {
|
||||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
if (sorter.columnKey == 'flowTypeShow') {
|
if (sorter.columnKey == 'flowTypeShow') {
|
||||||
this.orderByField = 'flowType'
|
this.orderByField = 'flow_type'
|
||||||
} else if (sorter.columnKey == 'taskDefinitionKeyName') {
|
} else if (sorter.columnKey == 'taskDefinitionKeyName') {
|
||||||
this.orderByField = 'taskDefinitionKey'
|
this.orderByField = 'task_definition_key'
|
||||||
} else {
|
} else {
|
||||||
this.orderByField = sorter.columnKey
|
this.orderByField = sorter.columnKey
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'flowTypeShow',
|
dataIndex: 'flowTypeShow',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter: true,
|
||||||
width: 241
|
width: 241
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'taskDefinitionKeyName',
|
dataIndex: 'taskDefinitionKeyName',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter: true,
|
||||||
width: 208
|
width: 208
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -116,6 +118,7 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'endTime',
|
dataIndex: 'endTime',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter: true,
|
||||||
width: 108
|
width: 108
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -342,9 +345,9 @@
|
|||||||
tableOnChange(pagination, filters, sorter) {
|
tableOnChange(pagination, filters, sorter) {
|
||||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
if (sorter.columnKey == 'flowTypeShow') {
|
if (sorter.columnKey == 'flowTypeShow') {
|
||||||
this.orderByField = 'flowType'
|
this.orderByField = 'flow_type'
|
||||||
} else if (sorter.columnKey == 'taskDefinitionKeyName') {
|
} else if (sorter.columnKey == 'taskDefinitionKeyName') {
|
||||||
this.orderByField = 'taskDefinitionKey'
|
this.orderByField = 'task_definition_key'
|
||||||
} else {
|
} else {
|
||||||
this.orderByField = sorter.columnKey
|
this.orderByField = sorter.columnKey
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user