From 21e7895dbb17557f8b82204883c72c6070242c82 Mon Sep 17 00:00:00 2001
From: cuikaidong <ckd2942379034@163.com>
Date: 星期三, 21 五月 2025 17:54:29 +0800
Subject: [PATCH] 借出归还-审批流程修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentLeanOutController.java    |    3 
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamEquipmentLeanOutRequest.java          |  177 +++++++++++++++++++++++++
 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EquipmentLeanOutStatusEnum.java  |    9 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentLeanOutService.java         |    3 
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java |  177 ++++++++++++++++++------
 5 files changed, 322 insertions(+), 47 deletions(-)

diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EquipmentLeanOutStatusEnum.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EquipmentLeanOutStatusEnum.java
index 9cadba2..787a0c6 100644
--- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EquipmentLeanOutStatusEnum.java
+++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EquipmentLeanOutStatusEnum.java
@@ -7,4 +7,13 @@
     WAIT_CONFIRM, //寰呯‘璁�
     COMPLETE, //宸插畬鎴�
     ;
+    public static EquipmentLeanOutStatusEnum getInstance(String code) {
+        EquipmentLeanOutStatusEnum[] values = EquipmentLeanOutStatusEnum.values();
+        for (EquipmentLeanOutStatusEnum value : values) {
+            if (value.name().equals(code)) {
+                return value;
+            }
+        }
+        return null;
+    }
 }
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentLeanOutController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentLeanOutController.java
index 0c84df2..06784e5 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentLeanOutController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentLeanOutController.java
@@ -18,6 +18,7 @@
 import org.jeecg.modules.eam.constant.EquipmentLeanOutStatusEnum;
 import org.jeecg.modules.eam.entity.EamEquipmentLeanOut;
 import org.jeecg.modules.eam.request.EamEquipmentLeanOutQuery;
+import org.jeecg.modules.eam.request.EamEquipmentLeanOutRequest;
 import org.jeecg.modules.eam.service.IEamEquipmentLeanOutService;
 import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -201,7 +202,7 @@
     @AutoLog(value = "璁惧鍊熷嚭褰掕繕-瀹℃壒娴�")
     @ApiOperation(value = "璁惧鍊熷嚭褰掕繕-瀹℃壒娴�", notes = "璁惧鍊熷嚭褰掕繕-瀹℃壒娴�")
     @RequestMapping(value = "/approval", method = {RequestMethod.PUT, RequestMethod.POST})
-    public Result<?> approval(@RequestBody EamEquipmentLeanOut request) {
+    public Result<?> approval(@RequestBody EamEquipmentLeanOutRequest request) {
         if (request == null) {
             return Result.error("娣诲姞鐨勫璞′笉鑳戒负绌猴紒");
         }
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamEquipmentLeanOutRequest.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamEquipmentLeanOutRequest.java
new file mode 100644
index 0000000..d928cd7
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamEquipmentLeanOutRequest.java
@@ -0,0 +1,177 @@
+package org.jeecg.modules.eam.request;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecg.modules.flowable.domain.vo.FlowTaskVo;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 璁惧鍊熷嚭褰掕繕
+ * @Author: jeecg-boot
+ * @Date: 2025-05-21
+ * @Version: V1.0
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class EamEquipmentLeanOutRequest extends FlowTaskVo implements Serializable {
+
+    /**
+     * 涓婚敭
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "涓婚敭")
+    private String id;
+    /**
+     * 鍒涘缓浜�
+     */
+    @ApiModelProperty(value = "鍒涘缓浜�")
+    private String createBy;
+    /**
+     * 鍒涘缓鏃堕棿
+     */
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    private Date createTime;
+    /**
+     * 鏇存柊浜�
+     */
+    @ApiModelProperty(value = "鏇存柊浜�")
+    private String updateBy;
+    /**
+     * 鏇存柊鏃堕棿
+     */
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    private Date updateTime;
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    @ApiModelProperty(value = "鍒犻櫎鏍囪")
+    private Integer delFlag;
+    /**
+     * 璁惧ID
+     */
+    @ApiModelProperty(value = "璁惧ID")
+    private String equipmentId;
+    /**
+     * 鍗曟嵁鍙�
+     */
+    @Excel(name = "鍗曟嵁鍙�", width = 15)
+    @ApiModelProperty(value = "鍗曟嵁鍙�")
+    private String code;
+    /**
+     * 鍊熷叆閮ㄩ棬
+     */
+    @Excel(name = "鍊熷叆閮ㄩ棬", width = 15, dictTable = "mdc_production", dicText = "production_name", dicCode = "id")
+    @ApiModelProperty(value = "鍊熷叆閮ㄩ棬")
+    @Dict(dicCode = "mdc_production, production_name, id")
+    private String leanDepartId;
+    /**
+     * 鍊熷叆璐d换浜�
+     */
+    @Excel(name = "鍊熷叆璐d换浜�", width = 15)
+    @ApiModelProperty(value = "鍊熷叆璐d换浜�")
+    @Dict(dicCode = "sys_user, realname, username")
+    private String leanPerson;
+    /**
+     * 鍊熺敤鍘熷洜
+     */
+    @ApiModelProperty(value = "鍊熺敤鍘熷洜")
+    private String leanReason;
+    /**
+     * 瀹℃壒绫诲瀷
+     */
+    @ApiModelProperty(value = "瀹℃壒绫诲瀷")
+    @Dict(dicCode = "approved_rejected")
+    private String approvalDealType;
+    /**
+     * 鍊熷嚭鐘舵��
+     */
+    @Excel(name = "鍊熷嚭鐘舵��", width = 15)
+    @ApiModelProperty(value = "鍊熷嚭鐘舵��")
+    @Dict(dicCode = "equipment_lean_out_status")
+    private String leanStatus;
+    /**
+     * 鍊熷嚭寮�濮嬫椂闂�
+     */
+    @ApiModelProperty(value = "鍊熷嚭鏃堕棿")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date leanStartTime;
+    /**
+     * 鍊熷嚭褰掕繕鏃堕棿
+     */
+    @ApiModelProperty(value = "褰掕繕鏃堕棿")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date leanEndTime;
+    /**
+     * 瀹℃牳浜�
+     */
+    @Excel(name = "瀹℃牳浜�", width = 15)
+    @ApiModelProperty(value = "瀹℃牳浜�")
+    @Dict(dicCode = "sys_user, realname, username")
+    private String approvalUser;
+    /**
+     * 瀹℃牳鎰忚
+     */
+    @Excel(name = "瀹℃牳鎰忚", width = 15)
+    @ApiModelProperty(value = "瀹℃牳鎰忚")
+    private String approvalComment;
+    /**
+     * 瀹℃牳鏃堕棿
+     */
+    @ApiModelProperty(value = "瀹℃牳鏃堕棿")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date approvalTime;
+    /**
+     * 纭浜�
+     */
+    @Excel(name = "纭浜�", width = 15)
+    @ApiModelProperty(value = "纭浜�")
+    @Dict(dicCode = "sys_user, realname, username")
+    private String confirmUser;
+    /**
+     * 纭鎰忚
+     */
+    @Excel(name = "纭鎰忚", width = 15)
+    @ApiModelProperty(value = "纭鎰忚")
+    private String confirmComment;
+    /**
+     * 纭鏃堕棿
+     */
+    @ApiModelProperty(value = "纭鏃堕棿")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date confirmTime;
+    /**
+     * 澶囨敞
+     */
+    @Excel(name = "澶囨敞", width = 15)
+    @ApiModelProperty(value = "澶囨敞")
+    private String remark;
+    /**
+     * 澶囨敞
+     */
+    @Excel(name = "褰掕繕澶囨敞", width = 15)
+    @ApiModelProperty(value = "褰掕繕澶囨敞")
+    private String returnComment;
+
+    //鍒楄〃灞曠ず
+    @TableField(exist = false)
+    private String equipmentCode;
+    @TableField(exist = false)
+    private String equipmentName;
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentLeanOutService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentLeanOutService.java
index 687497b..62acdb9 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentLeanOutService.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentLeanOutService.java
@@ -5,6 +5,7 @@
 import org.jeecg.modules.eam.entity.EamEquipmentLeanOut;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.eam.request.EamEquipmentLeanOutQuery;
+import org.jeecg.modules.eam.request.EamEquipmentLeanOutRequest;
 
 /**
  * @Description: 璁惧鍊熷嚭褰掕繕
@@ -50,5 +51,5 @@
      * @param request
      * @return
      */
-    EamEquipmentLeanOut approval(EamEquipmentLeanOut request);
+    EamEquipmentLeanOut approval(EamEquipmentLeanOutRequest request);
 }
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java
index 1f075cc..3484425 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java
@@ -1,6 +1,7 @@
 package org.jeecg.modules.eam.service.impl;
 
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,12 +16,12 @@
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.eam.constant.AssetStatusEnum;
-import org.jeecg.modules.eam.constant.EquipmentLeanOutStatusEnum;
+import org.jeecg.modules.eam.constant.*;
 import org.jeecg.modules.eam.entity.EamEquipment;
 import org.jeecg.modules.eam.entity.EamEquipmentLeanOut;
 import org.jeecg.modules.eam.mapper.EamEquipmentLeanOutMapper;
 import org.jeecg.modules.eam.request.EamEquipmentLeanOutQuery;
+import org.jeecg.modules.eam.request.EamEquipmentLeanOutRequest;
 import org.jeecg.modules.eam.service.IEamEquipmentLeanOutService;
 import org.jeecg.modules.eam.service.IEamEquipmentService;
 import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
@@ -229,6 +230,10 @@
         variables.put("NextAssignee", usernames);
         Result result = flowDefinitionService.startProcessInstanceByKey("equipment_lean_out", variables);
         if (result != null) {
+            entity.setLeanStartTime(new Date());
+            entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_APPROVAL.name());
+            //淇濆瓨宸ュ崟
+            equipmentLeanOutMapper.updateById(entity);
             return result.isSuccess();
         }
         return true;
@@ -236,41 +241,112 @@
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public EamEquipmentLeanOut approval(EamEquipmentLeanOut eamEquipmentLeanOut) {
-        try {
-            // 妫�鏌ヨ姹傚弬鏁�
-            if (!isValidRequest(eamEquipmentLeanOut)) {
-                throw new JeecgBootException("闈炴硶鍙傛暟");
-            }
-            if (EquipmentLeanOutStatusEnum.WAIT_APPROVAL.name().equals(eamEquipmentLeanOut.getLeanStatus())) {
-                eamEquipmentLeanOut.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_RETURN.name());
-                // 寰呭綊杩�
-            } else if (EquipmentLeanOutStatusEnum.WAIT_RETURN.name().equals(eamEquipmentLeanOut.getLeanStatus())) {
-                // 寰呯‘璁�
-                eamEquipmentLeanOut.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_CONFIRM.name());
-            } else if (EquipmentLeanOutStatusEnum.WAIT_CONFIRM.name().equals(eamEquipmentLeanOut.getLeanStatus())) {
-                // 宸插畬鎴�
-                eamEquipmentLeanOut.setLeanStatus(EquipmentLeanOutStatusEnum.COMPLETE.name());
-            }
-            // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛
-            LoginUser sysUser = getCurrentUser();
-            if (sysUser == null || StrUtil.isBlank(sysUser.getId())) {
-                throw new JeecgBootException("璐﹀彿涓嶅瓨鍦�");
-            }
-            // 瀹℃壒浜�
-            eamEquipmentLeanOut.setApprovalUser(sysUser.getUsername());
-            //妫�鏌ヨ澶�
-            EamEquipment equipment = eamEquipmentService.getById(eamEquipmentLeanOut.getEquipmentId());
-            if (equipment == null) {
-                throw new JeecgBootException("璁惧涓嶅瓨鍦紒");
-            }
-            eamEquipmentLeanOut.setLeanPerson(sysUser.getUsername());
-            this.updateById(eamEquipmentLeanOut);
-            // 鑾峰彇娴佺▼涓氬姟璁板綍
-            return eamEquipmentLeanOut;
-        } catch (Exception e) {
-            throw new JeecgBootException("鎿嶄綔澶辫触锛�" + e.getMessage());
+    public EamEquipmentLeanOut approval(EamEquipmentLeanOutRequest request) {
+        EamEquipmentLeanOut entity = equipmentLeanOutMapper.selectById(request.getId());
+        if (entity == null) {
+            throw new JeecgBootException("瀹℃壒鐨勬暟鎹凡鍒犻櫎锛岃鍒锋柊閲嶈瘯锛�");
         }
+        // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        if (user == null || StrUtil.isBlank(user.getId())) {
+            throw new JeecgBootException("鏈幏鍙栧埌鐧诲綍鐢ㄦ埛锛岃閲嶆柊鐧诲綍鍚庡啀璇曪紒");
+        }
+        request.setApprovalUser(user.getUsername());
+        // 鑾峰彇娴佺▼涓氬姟璁板綍
+        FlowMyBusiness flowMyBusiness = flowMyBusinessService.getFlowMyBusiness(request.getInstanceId());
+        if (flowMyBusiness == null) {
+            throw new JeecgBootException("娴佺▼瀹炰緥涓嶅瓨鍦紝璇峰埛鏂板悗閲嶈瘯锛�");
+        }
+
+        boolean userAuthorized = isUserAuthorized(flowMyBusiness, user);
+        if (!userAuthorized) {
+            throw new JeecgBootException("鐢ㄦ埛鏃犳潈鎿嶄綔姝や换鍔★紝璇峰埛鏂板悗閲嶈瘯锛�");
+        }
+        // 璁ら浠诲姟
+        if (!claimTask(flowMyBusiness.getTaskId(), user)) {
+            throw new JeecgBootException("浠诲姟涓嶅瓨鍦ㄣ�佸凡瀹屾垚鎴栧凡琚粬浜鸿棰嗭紒");
+        }
+
+        EamEquipment equipment = eamEquipmentService.getById(entity.getEquipmentId());
+        if (equipment == null) {
+            throw new JeecgBootException("璁惧涓嶅瓨鍦紝璇锋鏌ワ紒");
+        }
+
+        EquipmentLeanOutStatusEnum status = EquipmentLeanOutStatusEnum.getInstance(entity.getLeanStatus());
+        if (status == null) {
+            return null;
+        }
+        //娴佺▼鍙橀噺
+        Map<String, Object> values = new HashMap<>();
+        switch (status) {
+            // 瀹℃壒
+            case WAIT_APPROVAL:
+                //鎵ц瀹屾垚
+                values.put("dataId", entity.getId());
+                values.put("organization", request.getApprovalComment());
+                values.put("comment", request.getApprovalComment());
+                values.put("approvalDealType", request.getApprovalDealType());
+                request.setComment(request.getApprovalComment());
+                entity.setApprovalUser(user.getUsername());// 瀹℃牳浜�
+                entity.setApprovalComment(request.getApprovalComment());// 瀹℃牳鎰忚
+                entity.setApprovalTime(new Date());// 瀹℃牳鏃堕棿
+                entity.setApprovalDealType(request.getApprovalDealType()); // 瀹℃壒绫诲瀷
+                // 楠岃瘉閫氳繃杩樻槸椹冲洖
+                if (request.getApprovalDealType().equals("1")) {
+                    //璁剧疆entity
+                    entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_RETURN.name());
+                    List<String> userApprovalList = new ArrayList<>(Collections.singletonList(entity.getLeanPerson()));
+                    values.put("NextAssignee", userApprovalList);
+                } else {
+                    //璁剧疆entity
+                    entity.setLeanStatus(EquipmentLeanOutStatusEnum.COMPLETE.name());
+                }
+                break;
+            // 褰掕繕
+            case WAIT_RETURN:
+                if (StringUtils.isBlank(equipment.getEquipmentManager())) {
+                    throw new JeecgBootException("璁惧鏈垎閰嶈澶囩鐞嗗憳锛屾棤娉曡繘鍏ヤ笅绾у鎵癸紒");
+                }
+                List<String> userApprovalList = new ArrayList<>(Collections.singletonList(entity.getLeanPerson()));
+                userApprovalList.add(equipment.getEquipmentManager());
+                values.put("dataId", entity.getId());
+                values.put("organization", request.getReturnComment());
+                values.put("comment", request.getReturnComment());
+                values.put("NextAssignee", userApprovalList);
+                request.setComment(request.getReturnComment());
+                entity.setLeanEndTime(new Date()); //褰掕繕鏃堕棿
+                //璁剧疆entity
+                entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_CONFIRM.name());
+                entity.setApprovalUser(user.getUsername());// 瀹℃牳浜�
+                entity.setLeanEndTime(new Date());// 褰掕繕鏃堕棿
+                entity.setReturnComment(request.getReturnComment());// 褰掕繕澶囨敞
+                break;
+            // 褰掕繕纭
+            case WAIT_CONFIRM:
+                values.put("dataId", entity.getId());
+                values.put("organization", request.getConfirmComment());
+                values.put("comment", request.getConfirmComment());
+                request.setComment(request.getConfirmComment());
+                //璁剧疆entity
+                entity.setLeanStatus(EquipmentLeanOutStatusEnum.COMPLETE.name());
+                entity.setConfirmUser(user.getUsername());
+                entity.setConfirmComment(request.getConfirmComment());
+                entity.setConfirmTime(new Date());
+                // 淇敼璁惧鐘舵��
+                equipment.setAssetStatus(AssetStatusEnum.NORMAL.name());
+                eamEquipmentService.updateById(equipment);
+                break;
+        }
+        request.setValues(values);
+
+        // 瀹屾垚娴佺▼浠诲姟
+        Result result = flowTaskService.complete(request);
+        if (!result.isSuccess()) {
+            throw new JeecgBootException("瀹℃壒澶辫触锛岃鍒锋柊鏌ョ湅锛�");
+        }
+        //淇濆瓨宸ュ崟
+        equipmentLeanOutMapper.updateById(entity);
+        return entity;
     }
 
 
@@ -281,17 +357,28 @@
         business.getActStatus();
     }
 
-
-    private boolean isValidRequest(EamEquipmentLeanOut request) {
-        return StrUtil.isNotBlank(request.getCode()) && StrUtil.isNotBlank(request.getEquipmentId());
+    private boolean claimTask(String taskId, LoginUser user) {
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+        if (task == null) {
+            return false;
+        }
+        if (task.getAssignee() != null && !task.getAssignee().equals(user.getUsername())) {
+            return false;
+        }
+        taskService.claim(taskId, user.getUsername());
+        return true;
     }
 
-    private LoginUser getCurrentUser() {
-        try {
-            return (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        } catch (Exception e) {
-            return null;
-        }
+    /**
+     * 鍒ゆ柇鐢ㄦ埛鏄惁鎷ユ湁姝ゆ潈闄�
+     *
+     * @param flowMyBusiness
+     * @param user
+     * @return
+     */
+    private boolean isUserAuthorized(FlowMyBusiness flowMyBusiness, LoginUser user) {
+        List<String> todoUsers = JSON.parseArray(flowMyBusiness.getTodoUsers(), String.class);
+        return todoUsers != null && todoUsers.contains(user.getUsername());
     }
 
     @Override

--
Gitblit v1.9.3