瀏覽代碼

判断有无下一步,0无,1有

LLL 1 年之前
父節點
當前提交
57e2579ec4

+ 26 - 34
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/controller/ItdmFlowPathStepController.java

@@ -1,42 +1,26 @@
 package org.jeecg.modules.flowpath.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.flowpath.entity.ItdmFlowPathStep;
-import org.jeecg.modules.flowpath.service.IItdmFlowPathStepService;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.flowpath.entity.ItdmFlowPathStep;
+import org.jeecg.modules.flowpath.service.IItdmFlowPathStepService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.jeecg.common.aspect.annotation.AutoLog;
 
- /**
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+
+/**
  * @Description: 流程步骤表
  * @Author: jeecg-boot
  * @Date:   2023-07-20
@@ -49,7 +33,15 @@ import org.jeecg.common.aspect.annotation.AutoLog;
 public class ItdmFlowPathStepController extends JeecgController<ItdmFlowPathStep, IItdmFlowPathStepService> {
 	@Autowired
 	private IItdmFlowPathStepService itdmFlowPathStepService;
-	
+
+	 /**根据运行流程表的流程步骤id查对应流程步骤表的步骤顺序*/
+	 @GetMapping("/getSortByFlowPathId")
+	 public Integer getSortByFlowPathStepId(String dqStep){
+		 String sort = itdmFlowPathStepService.getSortByFlowPathStepId(dqStep);
+		 if("12".equals(sort))  return 0; //当前步骤是最后一步,无需选择下一步的人
+		 else return 1;
+	 }
+
 	/**
 	 * 分页列表查询
 	 *
@@ -71,7 +63,7 @@ public class ItdmFlowPathStepController extends JeecgController<ItdmFlowPathStep
 		IPage<ItdmFlowPathStep> pageList = itdmFlowPathStepService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}
-	
+
 	/**
 	 *   添加
 	 *
@@ -86,7 +78,7 @@ public class ItdmFlowPathStepController extends JeecgController<ItdmFlowPathStep
 		itdmFlowPathStepService.save(itdmFlowPathStep);
 		return Result.OK("添加成功!");
 	}
-	
+
 	/**
 	 *  编辑
 	 *
@@ -101,7 +93,7 @@ public class ItdmFlowPathStepController extends JeecgController<ItdmFlowPathStep
 		itdmFlowPathStepService.updateById(itdmFlowPathStep);
 		return Result.OK("编辑成功!");
 	}
-	
+
 	/**
 	 *   通过id删除
 	 *
@@ -116,7 +108,7 @@ public class ItdmFlowPathStepController extends JeecgController<ItdmFlowPathStep
 		itdmFlowPathStepService.removeById(id);
 		return Result.OK("删除成功!");
 	}
-	
+
 	/**
 	 *  批量删除
 	 *
@@ -131,7 +123,7 @@ public class ItdmFlowPathStepController extends JeecgController<ItdmFlowPathStep
 		this.itdmFlowPathStepService.removeByIds(Arrays.asList(ids.split(",")));
 		return Result.OK("批量删除成功!");
 	}
-	
+
 	/**
 	 * 通过id查询
 	 *

+ 6 - 4
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/mapper/ItdmFlowPathStepMapper.java

@@ -1,10 +1,8 @@
 package org.jeecg.modules.flowpath.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.flowpath.entity.ItdmFlowPathStep;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Select;
+import org.jeecg.modules.flowpath.entity.ItdmFlowPathStep;
 
 /**
  * @Description: 流程步骤表
@@ -14,4 +12,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ItdmFlowPathStepMapper extends BaseMapper<ItdmFlowPathStep> {
 
+    /**根据运行流程表的流程步骤id查对应流程步骤表的步骤顺序*/
+    @Select("select sort from itdm_flow_path_step where id = #{dqStep}")
+    public String getSortByFlowPathStepId(String dqStep);
+
 }

+ 3 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/service/IItdmFlowPathStepService.java

@@ -13,6 +13,9 @@ import java.util.List;
  */
 public interface IItdmFlowPathStepService extends IService<ItdmFlowPathStep> {
 
+    /**根据运行流程表的流程步骤id查对应流程步骤表的步骤顺序*/
+    public String getSortByFlowPathStepId(String dqStep);
+
     /**新增运行流程——选择下一步操作的人*/
     public List<String> AddSelectNextStepUser();
 

+ 11 - 0
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/flowpath/service/impl/ItdmFlowPathStepServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.modules.flowpath.entity.ItdmFlowPathStep;
 import org.jeecg.modules.flowpath.mapper.ItdmFlowPathStepMapper;
 import org.jeecg.modules.flowpath.service.IItdmFlowPathStepService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
@@ -20,6 +21,16 @@ import java.util.List;
 @Service
 public class ItdmFlowPathStepServiceImpl extends ServiceImpl<ItdmFlowPathStepMapper, ItdmFlowPathStep> implements IItdmFlowPathStepService {
 
+    @Autowired
+    @SuppressWarnings("all")
+    private ItdmFlowPathStepMapper flowPathStepMapper;
+
+
+    /**根据运行流程表的流程步骤id查对应流程步骤表的步骤顺序*/
+    public String getSortByFlowPathStepId(String dqStep){
+        return flowPathStepMapper.getSortByFlowPathStepId(dqStep);
+    }
+
     /**新增运行流程——选择下一步操作的人*/
     public List<String> AddSelectNextStepUser() {
         ItdmFlowPathStep itdmFlowPathStep = this.baseMapper.selectOne(Wrappers.lambdaQuery(ItdmFlowPathStep.class)