From 6e8c95d31d85b53857e4e3ce12ea303eb0ea42eb Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 19 八月 2021 00:47:48 +0800
Subject: [PATCH] 优化代码

---
 service-common/src/main/java/com/java110/common/smo/impl/ResourceEntryStoreInnerServiceSMOImpl.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/service-common/src/main/java/com/java110/common/smo/impl/ResourceEntryStoreInnerServiceSMOImpl.java b/service-common/src/main/java/com/java110/common/smo/impl/ResourceEntryStoreInnerServiceSMOImpl.java
old mode 100644
new mode 100755
index dae0131..965dd7a
--- a/service-common/src/main/java/com/java110/common/smo/impl/ResourceEntryStoreInnerServiceSMOImpl.java
+++ b/service-common/src/main/java/com/java110/common/smo/impl/ResourceEntryStoreInnerServiceSMOImpl.java
@@ -98,7 +98,7 @@
         query.orderByTaskCreateTime().desc();
         List<Task> list = null;
         if (user.getPage() >= 1) {
-            user.setPage(user.getPage() - 1);
+            user.setPage((user.getPage() - 1) * user.getRow());
         }
         if (user.getPage() != PageDto.DEFAULT_PAGE) {
             list = query.listPage(user.getPage(), user.getRow());
@@ -185,7 +185,7 @@
         workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_PURCHASE);
         workflowDto.setStoreId(storeId);
         List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto);
-        Assert.listOnlyOne(workflowDtos, "鏈壘鍒� 閲囪喘娴佺▼鎴栨壘鍒板鏉�");
+        Assert.listOnlyOne(workflowDtos, "鏈壘鍒� 鎶曡瘔寤鸿娴佺▼鎴栨壘鍒板鏉★紝璇峰湪鐗╀笟璐﹀彿绯荤粺绠$悊涓嬫祦绋嬬鐞嗕腑閰嶇疆娴佺▼");
 
         WorkflowDto tmpWorkflowDto = workflowDtos.get(0);
         if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) {
@@ -208,7 +208,8 @@
 
         HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery()
                 .processDefinitionKey(getWorkflowDto(user.getStoreId()))
-                .taskAssignee(user.getUserId());
+                .taskAssignee(user.getUserId())
+                .finished();
         if (!StringUtil.isEmpty(user.getAuditLink()) && "START".equals(user.getAuditLink())) {
             historicTaskInstanceQuery.taskName("complaint");
         } else if (!StringUtil.isEmpty(user.getAuditLink()) && "AUDIT".equals(user.getAuditLink())) {
@@ -229,7 +230,8 @@
 
         HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery()
                 .processDefinitionKey(getWorkflowDto(user.getStoreId()))
-                .taskAssignee(user.getUserId());
+                .taskAssignee(user.getUserId())
+                .finished();
 //        if (!StringUtil.isEmpty(user.getAuditLink()) && "START".equals(user.getAuditLink())) {
 //            historicTaskInstanceQuery.taskName("complaint");
 //        } else if (!StringUtil.isEmpty(user.getAuditLink()) && "AUDIT".equals(user.getAuditLink())) {
@@ -258,7 +260,6 @@
             taskBusinessKeyMap.put(business_key, task.getId());
         }
 
-        //鏌ヨ 鎶曡瘔淇℃伅
         PurchaseApplyDto purchaseApplyDto = new PurchaseApplyDto();
         purchaseApplyDto.setStoreId(user.getStoreId());
         purchaseApplyDto.setApplyOrderIds(applyOrderIds.toArray(new String[applyOrderIds.size()]));

--
Gitblit v1.8.0