From da085b5fcd24a31689d3380434a911417a06b035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Thu, 13 Apr 2023 09:24:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=EF=BC=8C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=EF=BC=8C=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=9A=84=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectRegulationTasks/components/SentList.vue | 7 +++++-- .../projectRegulationTasks/components/dealtWith.vue | 4 ++-- .../projectRegulationTasks/components/doneList.vue | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue index 01d12004f..8b1b38271 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue @@ -83,6 +83,7 @@ align: 'left', dataIndex: 'flowTypeShow', ellipsis: true, + sorter: true, width: 241 }, { @@ -90,6 +91,7 @@ align: 'left', dataIndex: 'taskDefinitionKeyName', ellipsis: true, + sorter: true, width: 208 }, { @@ -118,6 +120,7 @@ align: 'left', dataIndex: 'endTime', ellipsis: true, + sorter: true, width: 108 }, // { @@ -349,9 +352,9 @@ tableOnChange(pagination, filters, sorter) { this.orderBy = sorter.order == 'ascend' ? '1' : '2' if (sorter.columnKey == 'flowTypeShow') { - this.orderByField = 'flowType' + this.orderByField = 'flow_type' } else if (sorter.columnKey == 'taskDefinitionKeyName') { - this.orderByField = 'taskDefinitionKey' + this.orderByField = 'task_definition_key' } else { this.orderByField = sorter.columnKey } diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue index f91ea7c11..affe7fd17 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue @@ -426,9 +426,9 @@ tableOnChange(pagination, filters, sorter) { this.orderBy = sorter.order == 'ascend' ? '1' : '2' if (sorter.columnKey == 'flowTypeShow') { - this.orderByField = 'flowType' + this.orderByField = 'flow_type' } else if (sorter.columnKey == 'taskDefinitionKeyName') { - this.orderByField = 'taskDefinitionKey' + this.orderByField = 'task_definition_key' } else { this.orderByField = sorter.columnKey } diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue index 680aff70c..193ffcaa8 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue @@ -88,6 +88,7 @@ align: 'left', dataIndex: 'flowTypeShow', ellipsis: true, + sorter: true, width: 241 }, { @@ -95,6 +96,7 @@ align: 'left', dataIndex: 'taskDefinitionKeyName', ellipsis: true, + sorter: true, width: 208 }, { @@ -116,6 +118,7 @@ align: 'left', dataIndex: 'endTime', ellipsis: true, + sorter: true, width: 108 }, // { @@ -342,9 +345,9 @@ tableOnChange(pagination, filters, sorter) { this.orderBy = sorter.order == 'ascend' ? '1' : '2' if (sorter.columnKey == 'flowTypeShow') { - this.orderByField = 'flowType' + this.orderByField = 'flow_type' } else if (sorter.columnKey == 'taskDefinitionKeyName') { - this.orderByField = 'taskDefinitionKey' + this.orderByField = 'task_definition_key' } else { this.orderByField = sorter.columnKey } From 8b4b4d7e43596abf0629f1be2e94bdcad5bb7077 Mon Sep 17 00:00:00 2001 From: wangzhijiang Date: Thu, 13 Apr 2023 09:53:08 +0800 Subject: [PATCH 2/3] =?UTF-8?q?UAT=E9=97=AE=E9=A2=98=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C71=E8=A1=8C=EF=BC=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=B3=95=E8=A7=84=E4=BB=BB=E5=8A=A1=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=A1=A8=E5=A4=B4=E6=8E=92=E5=BA=8F=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E6=AE=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProcessInfoEOServiceImpl.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java index 528087f1c..7fef4fd26 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java @@ -9,6 +9,8 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.vo.DictModel; 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.service.ILawsOpinionGatherEOService; 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.stereotype.Service; +import java.text.Collator; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; @@ -236,9 +239,88 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params); this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue()); + result = this.hearSort(params, result); return result; } + /** + * 表头排序 + * @param params + * @param resultPage + * @return + */ + private IPage hearSort(Map params, IPage resultPage) { + String orderBy = (String) params.get("orderBy"); + String orderByField = (String) params.get("orderByField"); + + if(StringUtils.isNotEmpty(orderByField)){ + List 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 public IPage projectProcessDoneProcess(Map params) { Integer pageNo = Integer.parseInt(params.get("pageNo").toString()); From d88d964fd7f7f2748791d71dc18c573989e5d8c0 Mon Sep 17 00:00:00 2001 From: wangzhijiang Date: Thu, 13 Apr 2023 10:03:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=B8=AD=E5=BF=83SQL?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml index 960c1266e..ae920fd76 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml @@ -244,7 +244,7 @@ )temp - order by temp.end_time asc + order by temp.end_time ASC,temp.project_name ASC,standard_info ASC,temp.flow_type ASC