From 2418be9e4402b7cefe7461996adcf2f95f61e682 Mon Sep 17 00:00:00 2001 From: luozukai Date: Mon, 21 Jan 2019 15:24:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A1=E6=89=B9=E6=B5=81&?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=BD=A6=E8=BE=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/domain/po/WxFlowRecord.java | 12 ++++++++++++ .../iformall/service/impl/WxFlowServiceImpl.java | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java b/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java index de865f52f..2f8ce572a 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java @@ -30,6 +30,10 @@ public class WxFlowRecord implements Serializable { @Transient protected List ids; + //是否最后一个启动节点 + @Transient + private Integer isLastStart; + public WxFlowRecord(){} public WxFlowRecord(Long businessId){ this.businessId = businessId; @@ -39,6 +43,14 @@ public class WxFlowRecord implements Serializable { this.tenantId = tenantId; } + public Integer getIsLastStart() { + return isLastStart; + } + + public void setIsLastStart(Integer isLastStart) { + this.isLastStart = isLastStart; + } + public List getIds() { return ids; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 9fc67037e..58e2dfd19 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -1,5 +1,7 @@ package com.iformall.service.impl; +import com.alibaba.druid.support.json.JSONUtils; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.iformall.common.Result; import com.iformall.common.ResultData; @@ -191,10 +193,12 @@ public class WxFlowServiceImpl implements WxFlowService { result.add(taskInfoMap); } } + PageHelper.startPage(pageNum, pageSize); PageInfo> pageInfo = new PageInfo<>(result,pageSize); return new ResultData(pageInfo); } + @Override public ResultData applyHistory(Long businessId,String tenantId) { List result = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId)); @@ -214,7 +218,16 @@ public class WxFlowServiceImpl implements WxFlowService { wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode()); result.add(0,wxFlowRecord); } + + for (WxFlowRecord wxFlowRecord:result) { + if(wxFlowRecord.getStatus() == 1){ + wxFlowRecord.setIsLastStart(1); + break; + } + } } + + return new ResultData(result); }