Ver Fonte

流程待办完成

wangliang há 1 ano atrás
pai
commit
4486bc27c8

+ 4 - 1
sop-business/src/main/java/com/qmth/sop/business/activiti/service/ActivitiService.java

@@ -70,10 +70,13 @@ public interface ActivitiService {
      *
      * @param iPage
      * @param userId
+     * @param type
+     * @param serviceId
+     * @param customName
      * @param flowTaskTypeEnum
      * @return
      */
-    public IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, FlowTaskTypeEnum flowTaskTypeEnum);
+    public IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, TFCustomTypeEnum type, Long serviceId, String customName, FlowTaskTypeEnum flowTaskTypeEnum);
 
     /**
      * 流程节点转他人审批

+ 5 - 2
sop-business/src/main/java/com/qmth/sop/business/activiti/service/impl/ActivitiServiceImpl.java

@@ -434,13 +434,16 @@ public class ActivitiServiceImpl implements ActivitiService {
      *
      * @param iPage
      * @param userId
+     * @param type
+     * @param serviceId
+     * @param customName
      * @param flowTaskTypeEnum
      * @return
      */
     @Override
-    public IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, FlowTaskTypeEnum flowTaskTypeEnum) {
+    public IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, TFCustomTypeEnum type, Long serviceId, String customName, FlowTaskTypeEnum flowTaskTypeEnum) {
         Map<String, Object> map = new HashMap<>();
-        IPage<WorkTaskResult> workTaskResultIPage = sysUserService.getFlowTaskList(iPage, userId, flowTaskTypeEnum);
+        IPage<WorkTaskResult> workTaskResultIPage = sysUserService.getFlowTaskList(iPage, userId, type, serviceId, customName, flowTaskTypeEnum);
         if (Objects.nonNull(workTaskResultIPage) && !CollectionUtils.isEmpty(workTaskResultIPage.getRecords())) {
             for (WorkTaskResult w : workTaskResultIPage.getRecords()) {
                 List<Task> taskList = taskService.createTaskQuery().taskId(String.valueOf(w.getTaskId())).list();

+ 5 - 1
sop-business/src/main/java/com/qmth/sop/business/mapper/SysUserMapper.java

@@ -9,6 +9,7 @@ import com.qmth.sop.business.bean.result.SysUserResult;
 import com.qmth.sop.business.bean.result.UserRoleNameResult;
 import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.common.enums.RoleTypeEnum;
+import com.qmth.sop.common.enums.TFCustomTypeEnum;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -37,10 +38,13 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
      *
      * @param iPage
      * @param userId
+     * @param type
+     * @param serviceId
+     * @param customName
      * @param flowTaskTypeEnum
      * @return
      */
-    IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, @Param("userId") Long userId, @Param("flowTaskTypeEnum") String flowTaskTypeEnum);
+    IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, @Param("userId") Long userId, @Param("type") String type, @Param("serviceId") Long serviceId, @Param("customName") String customName, @Param("flowTaskTypeEnum") String flowTaskTypeEnum);
 
     /**
      * 根据机构id查询用户

+ 5 - 1
sop-business/src/main/java/com/qmth/sop/business/service/SysUserService.java

@@ -11,6 +11,7 @@ import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.common.enums.AppSourceEnum;
 import com.qmth.sop.common.enums.FlowTaskTypeEnum;
 import com.qmth.sop.common.enums.RoleTypeEnum;
+import com.qmth.sop.common.enums.TFCustomTypeEnum;
 
 import java.security.NoSuchAlgorithmException;
 import java.util.List;
@@ -130,10 +131,13 @@ public interface SysUserService extends IService<SysUser> {
      *
      * @param iPage
      * @param userId
+     * @param type
+     * @param serviceId
+     * @param customName
      * @param flowTaskTypeEnum
      * @return
      */
-    IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, FlowTaskTypeEnum flowTaskTypeEnum);
+    IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, TFCustomTypeEnum type, Long serviceId, String customName, FlowTaskTypeEnum flowTaskTypeEnum);
 
     /**
      * 根据角色类型查询用户

+ 5 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysUserServiceImpl.java

@@ -446,12 +446,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
      *
      * @param iPage
      * @param userId
+     * @param type
+     * @param serviceId
+     * @param customName
      * @param flowTaskTypeEnum
      * @return
      */
     @Override
-    public IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, FlowTaskTypeEnum flowTaskTypeEnum) {
-        return this.baseMapper.getFlowTaskList(iPage, userId, Objects.nonNull(flowTaskTypeEnum) ? flowTaskTypeEnum.name() : null);
+    public IPage<WorkTaskResult> getFlowTaskList(IPage<Map> iPage, Long userId, TFCustomTypeEnum type, Long serviceId, String customName, FlowTaskTypeEnum flowTaskTypeEnum) {
+        return this.baseMapper.getFlowTaskList(iPage, userId, Objects.nonNull(type) ? type.name() : null, serviceId, customName, Objects.nonNull(flowTaskTypeEnum) ? flowTaskTypeEnum.name() : null);
     }
 
     @Override

+ 17 - 0
sop-business/src/main/resources/mapper/SysUserMapper.xml

@@ -51,6 +51,12 @@
                     <if test="flowTaskTypeEnum != null and flowTaskTypeEnum != '' and flowTaskTypeEnum == 'DRAFT'">
                         and tffa.status = #{flowTaskTypeEnum}
                     </if>
+                    <if test="type != null and type != ''">
+                        and tfcf.type = #{type}
+                    </if>
+                    <if test="customName != null and customName != ''">
+                        and sc.name like concat('%', #{customName}, '%')
+                    </if>
                 </where>
                 UNION all
                 select
@@ -97,8 +103,19 @@
                   <if test="flowTaskTypeEnum != null and flowTaskTypeEnum != '' and flowTaskTypeEnum == 'DRAFT'">
                       and tffa.status = #{flowTaskTypeEnum}
                   </if>
+                  <if test="type != null and type != ''">
+                      and tfcf.type = #{type}
+                  </if>
+                  <if test="customName != null and customName != ''">
+                      and sc.name like concat('%', #{customName}, '%')
+                  </if>
                 </where>
                 ) t
+        <where>
+            <if test="flowTaskTypeEnum != null and flowTaskTypeEnum != '' and flowTaskTypeEnum == 'OVER_TIME'">
+                and t.diffTime <![CDATA[ >= ]]> 1
+            </if>
+        </where>
     </select>
 
     <select id="findSysUserResultList" resultType="com.qmth.sop.business.bean.result.SysUserResult">

+ 2 - 2
sop-common/src/main/java/com/qmth/sop/common/enums/TFCustomTypeEnum.java

@@ -15,9 +15,9 @@ public enum TFCustomTypeEnum {
 
     DING_EXCEPTION_FLOW("考勤异常审核流程", "dingExceptionFlow", "dingExceptionFlow.zip","DE"),
 
-    PROJECT_EXCHANGE_FLOW("项目计划变更流程 ", "projectExchangeFlow", "projectExchangeFlow.zip","SOP_E"),
+    PROJECT_EXCHANGE_FLOW("项目计划变更流程", "projectExchangeFlow", "projectExchangeFlow.zip","SOP_E"),
 
-    QUALITY_PROBLEM_FLOW("质量问题反馈流程 ", "qualityProblemFlow", "qualityProblemFlow.zip","QF");
+    QUALITY_PROBLEM_FLOW("质量问题反馈流程", "qualityProblemFlow", "qualityProblemFlow.zip","QF");
 
     private String title;
 

+ 7 - 4
sop-server/src/main/java/com/qmth/sop/server/api/TFCustomFlowController.java

@@ -94,10 +94,13 @@ public class TFCustomFlowController {
     @RequestMapping(value = "/task/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = WorkTaskResult.class)})
     public Result getFlowTaskList(@ApiParam(value = "用户id", required = true) @RequestParam Long userId,
-                                        @ApiParam(value = "待办任务类型", required = true) @RequestParam FlowTaskTypeEnum flowTaskTypeEnum,
-                                        @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                                        @ApiParam(value = "页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        return ResultUtil.ok(activitiService.getFlowTaskList(new Page<>(pageNumber, pageSize), userId, flowTaskTypeEnum));
+                                  @ApiParam(value = "流程类型") @RequestParam(required = false) TFCustomTypeEnum type,
+                                  @ApiParam(value = "服务单元id") @RequestParam(required = false) Long serviceId,
+                                  @ApiParam(value = "客户名称") @RequestParam(required = false) String customName,
+                                  @ApiParam(value = "待办任务类型", required = true) @RequestParam FlowTaskTypeEnum flowTaskTypeEnum,
+                                  @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                                  @ApiParam(value = "页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        return ResultUtil.ok(activitiService.getFlowTaskList(new Page<>(pageNumber, pageSize), userId, type, serviceId, customName, flowTaskTypeEnum));
     }
 
     @ApiOperation(value = "结束流程接口")