dzx 1 рік тому
батько
коміт
fc34867d9f

+ 11 - 2
src/main/java/com/xjrsoft/module/workflow/controller/WorkflowExecuteController.java

@@ -1,9 +1,14 @@
 package com.xjrsoft.module.workflow.controller;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.model.result.R;
 import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo;
 import com.xjrsoft.module.workflow.dto.AddOrSubSignDto;
 import com.xjrsoft.module.workflow.dto.ApproveDto;
 import com.xjrsoft.module.workflow.dto.ApproveMultiDto;
@@ -19,6 +24,7 @@ import com.xjrsoft.module.workflow.dto.GetAssigneeDto;
 import com.xjrsoft.module.workflow.dto.LaunchDto;
 import com.xjrsoft.module.workflow.dto.MonitorPageDto;
 import com.xjrsoft.module.workflow.dto.MoveRecycleDto;
+import com.xjrsoft.module.workflow.dto.MyExaminePageDto;
 import com.xjrsoft.module.workflow.dto.MyProcessPageDto;
 import com.xjrsoft.module.workflow.dto.PendingTaskPageDto;
 import com.xjrsoft.module.workflow.dto.ReLaunchDto;
@@ -35,6 +41,7 @@ import com.xjrsoft.module.workflow.dto.TransferDto;
 import com.xjrsoft.module.workflow.dto.UpdateDraftDto;
 import com.xjrsoft.module.workflow.dto.WithdrawDto;
 import com.xjrsoft.module.workflow.service.IWorkflowExecuteService;
+import com.xjrsoft.module.workflow.vo.PendingTaskVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -351,8 +358,10 @@ public class WorkflowExecuteController {
 
     @GetMapping("/my-examine")
     @ApiOperation(value = "我的审批")
-    public RT myExamine(){
-        return RT.ok();
+    public RT myExamine(@Valid MyExaminePageDto dto){
+        Page<PendingTaskVo> voPage = workflowExecuteService.myExamine(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<MyExaminePageDto> pageOutput = ConventPage.getPageOutput(voPage, MyExaminePageDto.class);
+        return RT.ok(pageOutput);
     }
 
 

+ 63 - 0
src/main/java/com/xjrsoft/module/workflow/dto/MyExaminePageDto.java

@@ -0,0 +1,63 @@
+package com.xjrsoft.module.workflow.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 待办任务分页查询参数
+ *
+ * @Author: tzx
+ * @Date: 2022/10/11 16:54
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MyExaminePageDto extends PageInput {
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty("开始时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty("结束时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;
+
+    /**
+     * 模板名称
+     */
+    @ApiModelProperty("模板名称")
+    private String name;
+
+    /**
+     * 任务名称
+     */
+    @ApiModelProperty("任务名称")
+    private String taskName;
+
+    /**
+     * 发起人
+     */
+    @ApiModelProperty("发起人")
+    private String originator;
+
+    /**
+     * 流水号
+     */
+    @ApiModelProperty("流水号")
+    private String serialNumber;
+
+    @ApiModelProperty("状态:1 已审批, 0 未审批")
+    private Integer status;
+
+    List<String> taskIds;
+}

+ 30 - 0
src/main/java/com/xjrsoft/module/workflow/mapper/XjrWorkflowExtraMapper.java

@@ -0,0 +1,30 @@
+package com.xjrsoft.module.workflow.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto;
+import com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo;
+import com.xjrsoft.module.workflow.dto.MyExaminePageDto;
+import com.xjrsoft.module.workflow.entity.WorkflowExtra;
+import com.xjrsoft.module.workflow.vo.PendingTaskVo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author tzx
+ * @since 2022-10-11
+ */
+@Mapper
+public interface XjrWorkflowExtraMapper extends MPJBaseMapper<WorkflowExtra> {
+    /**
+     * 列表查询
+     * @param page
+     * @param dto
+     * @return
+     */
+    Page<PendingTaskVo> myApproveRecord(Page<PendingTaskVo> page, MyExaminePageDto dto);
+}

+ 9 - 0
src/main/java/com/xjrsoft/module/workflow/service/IWorkflowExecuteService.java

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.workflow.service;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.workflow.dto.AddOrSubSignDto;
 import com.xjrsoft.module.workflow.dto.ApproveDto;
@@ -16,6 +17,7 @@ import com.xjrsoft.module.workflow.dto.GetAssigneeDto;
 import com.xjrsoft.module.workflow.dto.LaunchDto;
 import com.xjrsoft.module.workflow.dto.MonitorPageDto;
 import com.xjrsoft.module.workflow.dto.MoveRecycleDto;
+import com.xjrsoft.module.workflow.dto.MyExaminePageDto;
 import com.xjrsoft.module.workflow.dto.MyProcessPageDto;
 import com.xjrsoft.module.workflow.dto.PendingTaskPageDto;
 import com.xjrsoft.module.workflow.dto.ReLaunchDto;
@@ -152,6 +154,13 @@ public interface IWorkflowExecuteService {
      */
     PageOutput<PendingTaskVo> pending(PendingTaskPageDto dto);
 
+    /**
+     * 当前人员待处理
+     *
+     * @param dto
+     * @return
+     */
+    Page<PendingTaskVo> myExamine(Page<PendingTaskVo> page, MyExaminePageDto dto);
 
     /**
      * 审批

+ 181 - 12
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -18,12 +18,23 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.github.yulichang.toolkit.MPJWrappers;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.enums.*;
+import com.xjrsoft.common.enums.EnabledMark;
+import com.xjrsoft.common.enums.FormTemplateType;
+import com.xjrsoft.common.enums.WorkflowApproveType;
+import com.xjrsoft.common.enums.WorkflowAutoAgreeType;
+import com.xjrsoft.common.enums.WorkflowIsPrevChooseNextType;
+import com.xjrsoft.common.enums.WorkflowIsRecycleType;
+import com.xjrsoft.common.enums.WorkflowMultiInstanceFinishType;
+import com.xjrsoft.common.enums.WorkflowMultiInstanceType;
+import com.xjrsoft.common.enums.WorkflowNoHandlerType;
+import com.xjrsoft.common.enums.WorkflowRelationAuthType;
+import com.xjrsoft.common.enums.YesOrNoEnum;
 import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
@@ -44,16 +55,105 @@ import com.xjrsoft.module.system.entity.Stamp;
 import com.xjrsoft.module.system.service.IFileService;
 import com.xjrsoft.module.system.service.IStampService;
 import com.xjrsoft.module.workflow.constant.WorkflowConstant;
-import com.xjrsoft.module.workflow.dto.*;
-import com.xjrsoft.module.workflow.entity.*;
+import com.xjrsoft.module.workflow.dto.AddOrSubSignDto;
+import com.xjrsoft.module.workflow.dto.ApproveDto;
+import com.xjrsoft.module.workflow.dto.ApproveMultiDto;
+import com.xjrsoft.module.workflow.dto.ApproveMultiInfoDto;
+import com.xjrsoft.module.workflow.dto.ApproveUserDto;
+import com.xjrsoft.module.workflow.dto.ApproveUserMultiDto;
+import com.xjrsoft.module.workflow.dto.CirculatedTaskPageDto;
+import com.xjrsoft.module.workflow.dto.DeployDto;
+import com.xjrsoft.module.workflow.dto.DraftPageDto;
+import com.xjrsoft.module.workflow.dto.FinishedTaskPageDto;
+import com.xjrsoft.module.workflow.dto.FormFinishedTaskDto;
+import com.xjrsoft.module.workflow.dto.GetAssigneeDto;
+import com.xjrsoft.module.workflow.dto.LaunchDto;
+import com.xjrsoft.module.workflow.dto.LaunchRelationTaskDto;
+import com.xjrsoft.module.workflow.dto.MonitorPageDto;
+import com.xjrsoft.module.workflow.dto.MoveRecycleDto;
+import com.xjrsoft.module.workflow.dto.MyExaminePageDto;
+import com.xjrsoft.module.workflow.dto.MyProcessPageDto;
+import com.xjrsoft.module.workflow.dto.PendingTaskPageDto;
+import com.xjrsoft.module.workflow.dto.ReLaunchDto;
+import com.xjrsoft.module.workflow.dto.RecycleDeleteDto;
+import com.xjrsoft.module.workflow.dto.RecycleProcessPageDto;
+import com.xjrsoft.module.workflow.dto.RejectNodeDto;
+import com.xjrsoft.module.workflow.dto.RelationTaskInfoDto;
+import com.xjrsoft.module.workflow.dto.RelationTaskPageDto;
+import com.xjrsoft.module.workflow.dto.RestartDto;
+import com.xjrsoft.module.workflow.dto.SaveDraftDto;
+import com.xjrsoft.module.workflow.dto.SetAssigneeDto;
+import com.xjrsoft.module.workflow.dto.SetSuspendedDto;
+import com.xjrsoft.module.workflow.dto.TransferDto;
+import com.xjrsoft.module.workflow.dto.UpdateDraftDto;
+import com.xjrsoft.module.workflow.dto.WithdrawDto;
+import com.xjrsoft.module.workflow.entity.WorkflowApproveRecord;
+import com.xjrsoft.module.workflow.entity.WorkflowCirculated;
+import com.xjrsoft.module.workflow.entity.WorkflowDelegate;
+import com.xjrsoft.module.workflow.entity.WorkflowDraft;
+import com.xjrsoft.module.workflow.entity.WorkflowExtra;
+import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
+import com.xjrsoft.module.workflow.entity.WorkflowRecord;
+import com.xjrsoft.module.workflow.entity.WorkflowSchema;
 import com.xjrsoft.module.workflow.mapper.WorkflowDelegateMapper;
 import com.xjrsoft.module.workflow.mapper.WorkflowExtraMapper;
 import com.xjrsoft.module.workflow.mapper.WorkflowRecordMapper;
 import com.xjrsoft.module.workflow.mapper.WorkflowSchemaMapper;
-import com.xjrsoft.module.workflow.model.*;
-import com.xjrsoft.module.workflow.service.*;
+import com.xjrsoft.module.workflow.mapper.XjrWorkflowExtraMapper;
+import com.xjrsoft.module.workflow.model.ApiConfig;
+import com.xjrsoft.module.workflow.model.ApiRequestParamsConfig;
+import com.xjrsoft.module.workflow.model.AuthConfig;
+import com.xjrsoft.module.workflow.model.ButtonConfig;
+import com.xjrsoft.module.workflow.model.FormAssignmentConfig;
+import com.xjrsoft.module.workflow.model.FormConfig;
+import com.xjrsoft.module.workflow.model.MemberConfig;
+import com.xjrsoft.module.workflow.model.ProcessParamConfig;
+import com.xjrsoft.module.workflow.model.RelationProcessConfig;
+import com.xjrsoft.module.workflow.model.StartNodeConfig;
+import com.xjrsoft.module.workflow.model.UserTaskConfig;
+import com.xjrsoft.module.workflow.model.WorkflowSchemaConfig;
+import com.xjrsoft.module.workflow.service.IWorkflowApproveRecordService;
+import com.xjrsoft.module.workflow.service.IWorkflowCirculatedService;
+import com.xjrsoft.module.workflow.service.IWorkflowDraftService;
+import com.xjrsoft.module.workflow.service.IWorkflowExecuteService;
+import com.xjrsoft.module.workflow.service.IWorkflowExtraService;
+import com.xjrsoft.module.workflow.service.IWorkflowFormRelationService;
+import com.xjrsoft.module.workflow.service.IWorkflowRecordService;
 import com.xjrsoft.module.workflow.utils.WorkFlowUtil;
-import com.xjrsoft.module.workflow.vo.*;
+import com.xjrsoft.module.workflow.vo.AllRecordListVo;
+import com.xjrsoft.module.workflow.vo.ApproveMultiInfoVo;
+import com.xjrsoft.module.workflow.vo.ApproveMultiVo;
+import com.xjrsoft.module.workflow.vo.CirculatedTaskPageVo;
+import com.xjrsoft.module.workflow.vo.DraftInfoVo;
+import com.xjrsoft.module.workflow.vo.DraftPageVo;
+import com.xjrsoft.module.workflow.vo.FinishedTaskPageVo;
+import com.xjrsoft.module.workflow.vo.FinishedTaskVo;
+import com.xjrsoft.module.workflow.vo.FormFinishedTaskVo;
+import com.xjrsoft.module.workflow.vo.GetAssigneeVo;
+import com.xjrsoft.module.workflow.vo.GetCountVo;
+import com.xjrsoft.module.workflow.vo.HistoryTaskVo;
+import com.xjrsoft.module.workflow.vo.LaunchAndApproveVo;
+import com.xjrsoft.module.workflow.vo.MonitorPageVo;
+import com.xjrsoft.module.workflow.vo.MyProcessPageVo;
+import com.xjrsoft.module.workflow.vo.PendingTaskVo;
+import com.xjrsoft.module.workflow.vo.ProcessInfoVo;
+import com.xjrsoft.module.workflow.vo.ProcessRecordListVo;
+import com.xjrsoft.module.workflow.vo.RecycleProcessInfoVo;
+import com.xjrsoft.module.workflow.vo.RecycleProcessPageVo;
+import com.xjrsoft.module.workflow.vo.RejectNodeVo;
+import com.xjrsoft.module.workflow.vo.RelationFormInfoVo;
+import com.xjrsoft.module.workflow.vo.RelationTaskInfoVo;
+import com.xjrsoft.module.workflow.vo.RelationTaskPageVo;
+import com.xjrsoft.module.workflow.vo.RestartVo;
+import com.xjrsoft.module.workflow.vo.StartNodeFormInfoVo;
+import com.xjrsoft.module.workflow.vo.StartProcessInfoVo;
+import com.xjrsoft.module.workflow.vo.StartProcessRelationTaskVo;
+import com.xjrsoft.module.workflow.vo.TaskInfoRelationTaskVo;
+import com.xjrsoft.module.workflow.vo.TaskInfoVo;
+import com.xjrsoft.module.workflow.vo.UserTaskFormInfoVo;
+import com.xjrsoft.module.workflow.vo.UserTaskInfoVo;
+import com.xjrsoft.module.workflow.vo.UserTaskRelationTaskVo;
+import com.xjrsoft.module.workflow.vo.WorkflowSchemaInfoVo;
 import lombok.AllArgsConstructor;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -63,7 +163,12 @@ import org.camunda.bpm.engine.HistoryService;
 import org.camunda.bpm.engine.RepositoryService;
 import org.camunda.bpm.engine.RuntimeService;
 import org.camunda.bpm.engine.TaskService;
-import org.camunda.bpm.engine.history.*;
+import org.camunda.bpm.engine.history.HistoricActivityInstance;
+import org.camunda.bpm.engine.history.HistoricProcessInstance;
+import org.camunda.bpm.engine.history.HistoricProcessInstanceQuery;
+import org.camunda.bpm.engine.history.HistoricTaskInstance;
+import org.camunda.bpm.engine.history.HistoricTaskInstanceQuery;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
 import org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity;
 import org.camunda.bpm.engine.impl.persistence.entity.TaskEntity;
 import org.camunda.bpm.engine.repository.Deployment;
@@ -85,7 +190,17 @@ import org.springframework.transaction.annotation.Transactional;
 import org.ssssssss.magicapi.core.service.MagicAPIService;
 
 import java.time.LocalDateTime;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
 import java.util.stream.Collectors;
 
 /**
@@ -129,6 +244,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
 
     private final IWorkflowExtraService extraService;
 
+
     private final IFileService fileService;
 
     private final IWorkflowFormRelationService formRelationService;
@@ -136,6 +252,8 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
     private final IUserService userService;
 
     private final ObjectMapper objectMapper;
+
+    private final XjrWorkflowExtraMapper xjrWorkflowExtraMapper;
     /**
      * 数据库存储xml字段的后缀
      */
@@ -1076,8 +1194,6 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
     @SneakyThrows
     @Transactional(rollbackFor = Exception.class)
     public List<LaunchAndApproveVo> newLaunch(LaunchDto dto) {
-
-
         WorkflowSchema workflowSchema = workflowSchemaMapper.selectById(dto.getSchemaId());
 
         if (workflowSchema == null) {
@@ -1527,6 +1643,61 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
         return output;
     }
 
+    @Override
+    public Page<PendingTaskVo> myExamine(Page<PendingTaskVo> page, MyExaminePageDto dto) {
+        //获取登录者信息
+        SaSession tokenSession = StpUtil.getTokenSession();
+        User user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new User());
+        List<String> taskIds = new ArrayList<>();
+        if(dto.getStatus() != null && dto.getStatus() == 1){
+            List<WorkflowApproveRecord> list = approveRecordService.list(
+                new QueryWrapper<WorkflowApproveRecord>().lambda()
+                .eq(WorkflowApproveRecord::getApproveUserId, user.getId())
+            );
+            taskIds = list.stream().map(WorkflowApproveRecord::getTaskId).collect(Collectors.toList());
+        }else if(dto.getStatus() != null && dto.getStatus() == 0){
+            TaskQuery taskQuery = taskService.createTaskQuery()
+                    .active()
+                    .taskVariableValueEquals(WorkflowConstant.TASK_IS_APPOINT_APPROVE, YesOrNoEnum.NO.getCode())
+                    .processVariableValueEquals(WorkflowConstant.PROCESS_ISRECYCLE_FLAG_KEY, WorkflowIsRecycleType.NO.getCode())
+                    .taskVariableValueLike(WorkflowConstant.TASK_ASSIGNEE_VAR_KEY, StringPool.PERCENT + user.getId() + StringPool.PERCENT);
+            //
+            if (dto.getStartTime() != null) {
+                taskQuery.taskCreatedAfter(WorkFlowUtil.getStartOfDay(dto.getStartTime()));
+            }
+            if (dto.getEndTime() != null) {
+                taskQuery.taskCreatedBefore(WorkFlowUtil.getEndOfDay(dto.getEndTime()));
+            }
+
+            if (StrUtil.isNotBlank(dto.getKeyword())) {
+                taskQuery.or()
+                        .processVariableValueLike(WorkflowConstant.PROCESS_NAME, StringPool.PERCENT + dto.getKeyword() + StringPool.PERCENT)
+                        .endOr();
+            } else {
+                if (StrUtil.isNotBlank(dto.getSerialNumber()) && StrUtil.isNumeric(dto.getSerialNumber())) {//数字类型,直接查询
+                    taskQuery.processVariableValueEquals(WorkflowConstant.PROCESS_SERIAL_NUMBER_KEY, Long.valueOf(dto.getSerialNumber()));
+                }
+                if (StrUtil.isNotBlank(dto.getName())) {
+                    taskQuery.processVariableValueLike(WorkflowConstant.PROCESS_SCHEMA_NAME_KEY, StringPool.PERCENT + dto.getName() + StringPool.PERCENT);
+                }
+                if (StrUtil.isNotBlank(dto.getOriginator())) {
+                    taskQuery.or()
+                            .processVariableValueEquals(WorkflowConstant.PROCESS_START_USER_NAME_KEY, dto.getOriginator())
+                            .processVariableValueEquals(WorkflowConstant.PROCESS_START_USER_ID_KEY, dto.getOriginator())
+                            .endOr();
+                }
+                if (StrUtil.isNotBlank(dto.getTaskName())) {
+                    taskQuery.taskNameLike(StringPool.PERCENT + dto.getTaskName() + StringPool.PERCENT);
+                }
+            }
+
+            List<Task> tasks = taskQuery.orderByTaskCreateTime().desc().listPage(Convert.toInt((dto.getLimit() - 1) * dto.getSize()), dto.getSize());
+            taskIds = tasks.stream().map(Task::getId).collect(Collectors.toList());
+        }
+        dto.setTaskIds(taskIds);
+        return xjrWorkflowExtraMapper.myApproveRecord(page, dto);
+    }
+
 
     @Override
     @SneakyThrows
@@ -1635,8 +1806,6 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                 param.put("content", buttonConfig.getScriptContent());
                 redisUtil.set(WorkflowConstant.BUTTON_EVENT_CACHE_PRE + task.getId(), param, 10);
             }
-
-
         }
 
         LambdaQueryWrapper<WorkflowFormRelation> eq = Wrappers.lambdaQuery(WorkflowFormRelation.class).eq(WorkflowFormRelation::getProcessId, task.getProcessInstanceId());

+ 33 - 0
src/main/resources/mapper/workflow/WorkflowApproveRecordMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.workflow.mapper.WorkflowApproveRecordMapper">
+    <select id="myApproveRecord" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
+    </select>
+
+    <select id="getList" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752, t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where 1 = 1
+        <if test="dto.orgId != null">
+            and t1.id = #{dto.orgId}
+        </if>
+        <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
+            and t1.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
+        </if>
+        <if test="dto.userName != null and dto.userName != ''">
+            and t3.name like concat('%', #{dto.userName}, '%')
+        </if>
+        order by t1.shen_qing_ri_qi4752 desc
+    </select>
+
+    <select id="getInfoById" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where t1.id = #{id}
+    </select>
+
+</mapper>

+ 47 - 0
src/main/resources/mapper/workflow/WorkflowExtraMapper.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.workflow.mapper.XjrWorkflowExtraMapper">
+    <select id="myApproveRecord" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where 1 = 1
+        <if test="dto.orgId != null">
+            and t1.id = #{dto.orgId}
+        </if>
+        <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
+            and t1.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
+        </if>
+        <if test="dto.userName != null and dto.userName != ''">
+            and t3.name like concat('%', #{dto.userName}, '%')
+        </if>
+        order by t1.shen_qing_ri_qi4752 desc
+    </select>
+
+    <select id="getList" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752, t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where 1 = 1
+        <if test="dto.orgId != null">
+            and t1.id = #{dto.orgId}
+        </if>
+        <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
+            and t1.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
+        </if>
+        <if test="dto.userName != null and dto.userName != ''">
+            and t3.name like concat('%', #{dto.userName}, '%')
+        </if>
+        order by t1.shen_qing_ri_qi4752 desc
+    </select>
+
+    <select id="getInfoById" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo">
+        select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id from wf_subscription t1
+        left join xjr_department t2 on t1.application_department = t2.id
+        left join xjr_user t3 on t1.user_id = t3.id
+        where t1.id = #{id}
+    </select>
+
+</mapper>