正在显示
21 个修改的文件
包含
334 行增加
和
43 行删除
| 1 | -package com.ruoyi.compliancemanagement.domain; | 1 | +package com.ruoyi.common.businessworkflow.domain; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.annotation.*; | 3 | import com.baomidou.mybatisplus.annotation.*; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| @@ -43,6 +43,8 @@ public class TblBusinessWorkflow extends BaseEntity { | @@ -43,6 +43,8 @@ public class TblBusinessWorkflow extends BaseEntity { | ||
| 43 | */ | 43 | */ |
| 44 | private String deployId; | 44 | private String deployId; |
| 45 | 45 | ||
| 46 | + private String processStatus; | ||
| 47 | + | ||
| 46 | /** | 48 | /** |
| 47 | * | 49 | * |
| 48 | */ | 50 | */ |
| 1 | -package com.ruoyi.compliancemanagement.domain.bo; | 1 | +package com.ruoyi.common.businessworkflow.domain.bo; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.core.validate.AddGroup; | 3 | import com.ruoyi.common.core.validate.AddGroup; |
| 4 | import com.ruoyi.common.core.validate.EditGroup; | 4 | import com.ruoyi.common.core.validate.EditGroup; |
| @@ -53,6 +53,11 @@ public class TblBusinessWorkflowBo extends BaseEntity { | @@ -53,6 +53,11 @@ public class TblBusinessWorkflowBo extends BaseEntity { | ||
| 53 | /** | 53 | /** |
| 54 | * | 54 | * |
| 55 | */ | 55 | */ |
| 56 | + @NotBlank(message = "不能为空", groups = { EditGroup.class }) | ||
| 57 | + private String processStatus; | ||
| 58 | + /** | ||
| 59 | + * | ||
| 60 | + */ | ||
| 56 | @NotNull(message = "不能为空", groups = { EditGroup.class }) | 61 | @NotNull(message = "不能为空", groups = { EditGroup.class }) |
| 57 | private Long id; | 62 | private Long id; |
| 58 | 63 |
| 1 | -package com.ruoyi.compliancemanagement.domain.vo; | 1 | +package com.ruoyi.common.businessworkflow.domain.vo; |
| 2 | 2 | ||
| 3 | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | 3 | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| 4 | import com.alibaba.excel.annotation.ExcelProperty; | 4 | import com.alibaba.excel.annotation.ExcelProperty; |
| @@ -50,6 +50,8 @@ public class TblBusinessWorkflowVo { | @@ -50,6 +50,8 @@ public class TblBusinessWorkflowVo { | ||
| 50 | */ | 50 | */ |
| 51 | @ExcelProperty(value = "") | 51 | @ExcelProperty(value = "") |
| 52 | private String deployId; | 52 | private String deployId; |
| 53 | + | ||
| 54 | + private String processStatus; | ||
| 53 | /** | 55 | /** |
| 54 | * | 56 | * |
| 55 | */ | 57 | */ |
| 1 | -package com.ruoyi.compliancemanagement.mapper; | 1 | +package com.ruoyi.common.businessworkflow.mapper; |
| 2 | 2 | ||
| 3 | -import com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow; | ||
| 4 | -import com.ruoyi.compliancemanagement.domain.vo.TblBusinessWorkflowVo; | 3 | +import com.ruoyi.common.businessworkflow.domain.TblBusinessWorkflow; |
| 4 | +import com.ruoyi.common.businessworkflow.domain.vo.TblBusinessWorkflowVo; | ||
| 5 | import com.ruoyi.common.core.mapper.BaseMapperPlus; | 5 | import com.ruoyi.common.core.mapper.BaseMapperPlus; |
| 6 | +import org.apache.ibatis.annotations.Param; | ||
| 6 | 7 | ||
| 7 | /** | 8 | /** |
| 8 | * 业务和工作流关联Mapper接口 | 9 | * 业务和工作流关联Mapper接口 |
| @@ -12,4 +13,5 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus; | @@ -12,4 +13,5 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus; | ||
| 12 | */ | 13 | */ |
| 13 | public interface TblBusinessWorkflowMapper extends BaseMapperPlus<TblBusinessWorkflowMapper, TblBusinessWorkflow, TblBusinessWorkflowVo> { | 14 | public interface TblBusinessWorkflowMapper extends BaseMapperPlus<TblBusinessWorkflowMapper, TblBusinessWorkflow, TblBusinessWorkflowVo> { |
| 14 | 15 | ||
| 16 | + boolean updateByProcInsId(@Param("procInsId") String procInsId, @Param("processStatus") String processStatus); | ||
| 15 | } | 17 | } |
| 1 | -package com.ruoyi.compliancemanagement.service; | 1 | +package com.ruoyi.common.businessworkflow.service; |
| 2 | 2 | ||
| 3 | -import com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow; | ||
| 4 | -import com.ruoyi.compliancemanagement.domain.vo.TblBusinessWorkflowVo; | ||
| 5 | -import com.ruoyi.compliancemanagement.domain.bo.TblBusinessWorkflowBo; | 3 | +import com.ruoyi.common.businessworkflow.domain.bo.TblBusinessWorkflowBo; |
| 4 | +import com.ruoyi.common.businessworkflow.domain.vo.TblBusinessWorkflowVo; | ||
| 6 | import com.ruoyi.common.core.page.TableDataInfo; | 5 | import com.ruoyi.common.core.page.TableDataInfo; |
| 7 | import com.ruoyi.common.core.domain.PageQuery; | 6 | import com.ruoyi.common.core.domain.PageQuery; |
| 8 | 7 | ||
| @@ -46,4 +45,6 @@ public interface ITblBusinessWorkflowService { | @@ -46,4 +45,6 @@ public interface ITblBusinessWorkflowService { | ||
| 46 | * 校验并批量删除业务和工作流关联信息 | 45 | * 校验并批量删除业务和工作流关联信息 |
| 47 | */ | 46 | */ |
| 48 | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | 47 | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| 48 | + | ||
| 49 | + Boolean updateByProcInsId(String procInsId,String processStatus); | ||
| 49 | } | 50 | } |
| 1 | -package com.ruoyi.compliancemanagement.service.impl; | 1 | +package com.ruoyi.common.businessworkflow.service.impl; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.bean.BeanUtil; | 3 | import cn.hutool.core.bean.BeanUtil; |
| 4 | +import com.ruoyi.common.businessworkflow.domain.TblBusinessWorkflow; | ||
| 5 | +import com.ruoyi.common.businessworkflow.domain.bo.TblBusinessWorkflowBo; | ||
| 6 | +import com.ruoyi.common.businessworkflow.domain.vo.TblBusinessWorkflowVo; | ||
| 7 | +import com.ruoyi.common.businessworkflow.mapper.TblBusinessWorkflowMapper; | ||
| 8 | +import com.ruoyi.common.businessworkflow.service.ITblBusinessWorkflowService; | ||
| 4 | import com.ruoyi.common.utils.StringUtils; | 9 | import com.ruoyi.common.utils.StringUtils; |
| 5 | import com.ruoyi.common.core.page.TableDataInfo; | 10 | import com.ruoyi.common.core.page.TableDataInfo; |
| 6 | import com.ruoyi.common.core.domain.PageQuery; | 11 | import com.ruoyi.common.core.domain.PageQuery; |
| @@ -9,11 +14,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | @@ -9,11 +14,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 9 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 10 | import lombok.RequiredArgsConstructor; | 15 | import lombok.RequiredArgsConstructor; |
| 11 | import org.springframework.stereotype.Service; | 16 | import org.springframework.stereotype.Service; |
| 12 | -import com.ruoyi.compliancemanagement.domain.bo.TblBusinessWorkflowBo; | ||
| 13 | -import com.ruoyi.compliancemanagement.domain.vo.TblBusinessWorkflowVo; | ||
| 14 | -import com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow; | ||
| 15 | -import com.ruoyi.compliancemanagement.mapper.TblBusinessWorkflowMapper; | ||
| 16 | -import com.ruoyi.compliancemanagement.service.ITblBusinessWorkflowService; | ||
| 17 | 17 | ||
| 18 | import java.util.List; | 18 | import java.util.List; |
| 19 | import java.util.Map; | 19 | import java.util.Map; |
| @@ -106,4 +106,9 @@ public class TblBusinessWorkflowServiceImpl implements ITblBusinessWorkflowServi | @@ -106,4 +106,9 @@ public class TblBusinessWorkflowServiceImpl implements ITblBusinessWorkflowServi | ||
| 106 | } | 106 | } |
| 107 | return baseMapper.deleteBatchIds(ids) > 0; | 107 | return baseMapper.deleteBatchIds(ids) > 0; |
| 108 | } | 108 | } |
| 109 | + | ||
| 110 | + @Override | ||
| 111 | + public Boolean updateByProcInsId(String procInsId, String processStatus) { | ||
| 112 | + return baseMapper.updateByProcInsId(procInsId, processStatus); | ||
| 113 | + } | ||
| 109 | } | 114 | } |
| @@ -2,20 +2,22 @@ | @@ -2,20 +2,22 @@ | ||
| 2 | <!DOCTYPE mapper | 2 | <!DOCTYPE mapper |
| 3 | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | 3 | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 5 | -<mapper namespace="com.ruoyi.compliancemanagement.mapper.TblBusinessWorkflowMapper"> | 5 | +<mapper namespace="com.ruoyi.common.businessworkflow.mapper.TblBusinessWorkflowMapper"> |
| 6 | 6 | ||
| 7 | - <resultMap type="com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow" id="TblBusinessWorkflowResult"> | 7 | + <resultMap type="com.ruoyi.common.businessworkflow.domain.TblBusinessWorkflow" id="TblBusinessWorkflowResult"> |
| 8 | <result property="tableName" column="table_name"/> | 8 | <result property="tableName" column="table_name"/> |
| 9 | <result property="businessId" column="business_id"/> | 9 | <result property="businessId" column="business_id"/> |
| 10 | <result property="procInsId" column="proc_ins_id"/> | 10 | <result property="procInsId" column="proc_ins_id"/> |
| 11 | <result property="deployId" column="deploy_id"/> | 11 | <result property="deployId" column="deploy_id"/> |
| 12 | <result property="procDefId" column="proc_def_id"/> | 12 | <result property="procDefId" column="proc_def_id"/> |
| 13 | + <result property="processStatus" column="process_status"/> | ||
| 13 | <result property="id" column="id"/> | 14 | <result property="id" column="id"/> |
| 14 | <result property="createBy" column="create_by"/> | 15 | <result property="createBy" column="create_by"/> |
| 15 | <result property="createTime" column="create_time"/> | 16 | <result property="createTime" column="create_time"/> |
| 16 | <result property="updateBy" column="update_by"/> | 17 | <result property="updateBy" column="update_by"/> |
| 17 | <result property="updateTime" column="update_time"/> | 18 | <result property="updateTime" column="update_time"/> |
| 18 | </resultMap> | 19 | </resultMap> |
| 19 | - | ||
| 20 | - | 20 | + <update id="updateByProcInsId" parameterType="String"> |
| 21 | + update tbl_business_workflow set process_status = #{processStatus} where proc_ins_id = #{procInsId} | ||
| 22 | + </update> | ||
| 21 | </mapper> | 23 | </mapper> |
| @@ -2,6 +2,7 @@ package com.ruoyi.flowable.listener; | @@ -2,6 +2,7 @@ package com.ruoyi.flowable.listener; | ||
| 2 | 2 | ||
| 3 | import cn.hutool.core.convert.Convert; | 3 | import cn.hutool.core.convert.Convert; |
| 4 | import cn.hutool.core.util.ObjectUtil; | 4 | import cn.hutool.core.util.ObjectUtil; |
| 5 | +import com.ruoyi.common.businessworkflow.service.ITblBusinessWorkflowService; | ||
| 5 | import com.ruoyi.flowable.common.constant.ProcessConstants; | 6 | import com.ruoyi.flowable.common.constant.ProcessConstants; |
| 6 | import com.ruoyi.flowable.common.enums.ProcessStatus; | 7 | import com.ruoyi.flowable.common.enums.ProcessStatus; |
| 7 | import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; | 8 | import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; |
| @@ -22,6 +23,9 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener { | @@ -22,6 +23,9 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener { | ||
| 22 | @Autowired | 23 | @Autowired |
| 23 | private RuntimeService runtimeService; | 24 | private RuntimeService runtimeService; |
| 24 | 25 | ||
| 26 | + @Autowired | ||
| 27 | + private ITblBusinessWorkflowService businessWorkflowService; | ||
| 28 | + | ||
| 25 | /** | 29 | /** |
| 26 | * 流程结束监听器 | 30 | * 流程结束监听器 |
| 27 | */ | 31 | */ |
| @@ -32,6 +36,7 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener { | @@ -32,6 +36,7 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener { | ||
| 32 | ProcessStatus status = ProcessStatus.getProcessStatus(Convert.toStr(variable)); | 36 | ProcessStatus status = ProcessStatus.getProcessStatus(Convert.toStr(variable)); |
| 33 | if (ObjectUtil.isNotNull(status) && ProcessStatus.RUNNING == status) { | 37 | if (ObjectUtil.isNotNull(status) && ProcessStatus.RUNNING == status) { |
| 34 | runtimeService.setVariable(processInstanceId, ProcessConstants.PROCESS_STATUS_KEY, ProcessStatus.COMPLETED.getStatus()); | 38 | runtimeService.setVariable(processInstanceId, ProcessConstants.PROCESS_STATUS_KEY, ProcessStatus.COMPLETED.getStatus()); |
| 39 | + businessWorkflowService.updateByProcInsId(processInstanceId,ProcessStatus.COMPLETED.getStatus()); | ||
| 35 | } | 40 | } |
| 36 | super.processCompleted(event); | 41 | super.processCompleted(event); |
| 37 | } | 42 | } |
| @@ -4,21 +4,28 @@ import java.util.HashMap; | @@ -4,21 +4,28 @@ import java.util.HashMap; | ||
| 4 | import java.util.List; | 4 | import java.util.List; |
| 5 | import java.util.Arrays; | 5 | import java.util.Arrays; |
| 6 | import java.util.Map; | 6 | import java.util.Map; |
| 7 | -import java.util.concurrent.TimeUnit; | ||
| 8 | 7 | ||
| 8 | +import cn.hutool.core.convert.Convert; | ||
| 9 | +import cn.hutool.core.util.ObjectUtil; | ||
| 9 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
| 11 | +import com.ruoyi.common.businessworkflow.domain.bo.TblBusinessWorkflowBo; | ||
| 12 | +import com.ruoyi.common.businessworkflow.service.ITblBusinessWorkflowService; | ||
| 10 | import com.ruoyi.compliancemanagement.domain.TblComplianceReview; | 13 | import com.ruoyi.compliancemanagement.domain.TblComplianceReview; |
| 11 | -import com.ruoyi.compliancemanagement.domain.TblContract; | ||
| 12 | -import com.ruoyi.compliancemanagement.domain.bo.TblBusinessWorkflowBo; | ||
| 13 | -import com.ruoyi.compliancemanagement.domain.bo.TblContractBo; | ||
| 14 | import com.ruoyi.compliancemanagement.model.TblComplianceReviewModel; | 14 | import com.ruoyi.compliancemanagement.model.TblComplianceReviewModel; |
| 15 | -import com.ruoyi.compliancemanagement.service.ITblBusinessWorkflowService; | 15 | +import com.ruoyi.flowable.common.constant.ProcessConstants; |
| 16 | +import com.ruoyi.flowable.common.enums.ProcessStatus; | ||
| 16 | import com.ruoyi.workflow.service.IWfProcessService; | 17 | import com.ruoyi.workflow.service.IWfProcessService; |
| 17 | import lombok.RequiredArgsConstructor; | 18 | import lombok.RequiredArgsConstructor; |
| 19 | + | ||
| 20 | +import javax.annotation.Resource; | ||
| 18 | import javax.servlet.http.HttpServletResponse; | 21 | import javax.servlet.http.HttpServletResponse; |
| 19 | import javax.validation.constraints.*; | 22 | import javax.validation.constraints.*; |
| 20 | import cn.dev33.satoken.annotation.SaCheckPermission; | 23 | import cn.dev33.satoken.annotation.SaCheckPermission; |
| 24 | +import org.flowable.engine.HistoryService; | ||
| 25 | +import org.flowable.engine.history.HistoricProcessInstance; | ||
| 26 | +import org.flowable.engine.history.HistoricProcessInstanceQuery; | ||
| 21 | import org.flowable.engine.runtime.ProcessInstance; | 27 | import org.flowable.engine.runtime.ProcessInstance; |
| 28 | +import org.flowable.variable.api.history.HistoricVariableInstance; | ||
| 22 | import org.springframework.transaction.annotation.Transactional; | 29 | import org.springframework.transaction.annotation.Transactional; |
| 23 | import org.springframework.web.bind.annotation.*; | 30 | import org.springframework.web.bind.annotation.*; |
| 24 | import org.springframework.validation.annotation.Validated; | 31 | import org.springframework.validation.annotation.Validated; |
| @@ -29,7 +36,6 @@ import com.ruoyi.common.core.domain.PageQuery; | @@ -29,7 +36,6 @@ import com.ruoyi.common.core.domain.PageQuery; | ||
| 29 | import com.ruoyi.common.core.domain.R; | 36 | import com.ruoyi.common.core.domain.R; |
| 30 | import com.ruoyi.common.core.validate.AddGroup; | 37 | import com.ruoyi.common.core.validate.AddGroup; |
| 31 | import com.ruoyi.common.core.validate.EditGroup; | 38 | import com.ruoyi.common.core.validate.EditGroup; |
| 32 | -import com.ruoyi.common.core.validate.QueryGroup; | ||
| 33 | import com.ruoyi.common.enums.BusinessType; | 39 | import com.ruoyi.common.enums.BusinessType; |
| 34 | import com.ruoyi.common.utils.poi.ExcelUtil; | 40 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 35 | import com.ruoyi.compliancemanagement.domain.vo.TblComplianceReviewVo; | 41 | import com.ruoyi.compliancemanagement.domain.vo.TblComplianceReviewVo; |
| @@ -53,6 +59,8 @@ public class TblComplianceReviewController extends BaseController { | @@ -53,6 +59,8 @@ public class TblComplianceReviewController extends BaseController { | ||
| 53 | private final IWfProcessService iWfProcessService; | 59 | private final IWfProcessService iWfProcessService; |
| 54 | private final ITblBusinessWorkflowService iTblBusinessWorkflowService; | 60 | private final ITblBusinessWorkflowService iTblBusinessWorkflowService; |
| 55 | 61 | ||
| 62 | + @Resource | ||
| 63 | + protected HistoryService historyService; | ||
| 56 | /** | 64 | /** |
| 57 | * 查询合规审查列表 | 65 | * 查询合规审查列表 |
| 58 | */ | 66 | */ |
| @@ -136,11 +144,31 @@ public class TblComplianceReviewController extends BaseController { | @@ -136,11 +144,31 @@ public class TblComplianceReviewController extends BaseController { | ||
| 136 | ProcessInstance processInstance = iWfProcessService.startProcessByDefId(procDefId, variables); | 144 | ProcessInstance processInstance = iWfProcessService.startProcessByDefId(procDefId, variables); |
| 137 | 145 | ||
| 138 | if(null != processInstance){ | 146 | if(null != processInstance){ |
| 147 | + | ||
| 148 | + // 获取流程状态 | ||
| 149 | + HistoricVariableInstance processStatusVariable = historyService.createHistoricVariableInstanceQuery() | ||
| 150 | + .processInstanceId(processInstance.getProcessInstanceId()) | ||
| 151 | + .variableName(ProcessConstants.PROCESS_STATUS_KEY) | ||
| 152 | + .singleResult(); | ||
| 153 | + String processStatus = null; | ||
| 154 | + if (ObjectUtil.isNotNull(processStatusVariable)) { | ||
| 155 | + processStatus = Convert.toStr(processStatusVariable.getValue()); | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery() | ||
| 159 | + .processDefinitionId(procDefId); | ||
| 160 | + List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.list(); | ||
| 161 | + // 兼容旧流程 | ||
| 162 | + if (processStatus == null) { | ||
| 163 | + processStatus = ObjectUtil.isNull(historicProcessInstances.get(0).getEndTime()) ? ProcessStatus.RUNNING.getStatus() : ProcessStatus.COMPLETED.getStatus(); | ||
| 164 | + } | ||
| 165 | + | ||
| 139 | TblBusinessWorkflowBo tblBusinessWorkflowBo = new TblBusinessWorkflowBo(); | 166 | TblBusinessWorkflowBo tblBusinessWorkflowBo = new TblBusinessWorkflowBo(); |
| 140 | tblBusinessWorkflowBo.setBusinessId(id); | 167 | tblBusinessWorkflowBo.setBusinessId(id); |
| 141 | tblBusinessWorkflowBo.setProcInsId(processInstance.getProcessInstanceId()); | 168 | tblBusinessWorkflowBo.setProcInsId(processInstance.getProcessInstanceId()); |
| 142 | tblBusinessWorkflowBo.setProcDefId(procDefId); | 169 | tblBusinessWorkflowBo.setProcDefId(procDefId); |
| 143 | tblBusinessWorkflowBo.setDeployId(processInstance.getDeploymentId()); | 170 | tblBusinessWorkflowBo.setDeployId(processInstance.getDeploymentId()); |
| 171 | + tblBusinessWorkflowBo.setProcessStatus(processStatus); | ||
| 144 | TableName table = TblComplianceReview.class.getAnnotation(TableName.class); | 172 | TableName table = TblComplianceReview.class.getAnnotation(TableName.class); |
| 145 | tblBusinessWorkflowBo.setTableName(table.value()); | 173 | tblBusinessWorkflowBo.setTableName(table.value()); |
| 146 | iTblBusinessWorkflowService.insertByBo(tblBusinessWorkflowBo); | 174 | iTblBusinessWorkflowService.insertByBo(tblBusinessWorkflowBo); |
| @@ -5,17 +5,27 @@ import java.util.List; | @@ -5,17 +5,27 @@ import java.util.List; | ||
| 5 | import java.util.Arrays; | 5 | import java.util.Arrays; |
| 6 | import java.util.Map; | 6 | import java.util.Map; |
| 7 | 7 | ||
| 8 | +import cn.hutool.core.convert.Convert; | ||
| 9 | +import cn.hutool.core.util.ObjectUtil; | ||
| 8 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
| 11 | +import com.ruoyi.common.businessworkflow.domain.bo.TblBusinessWorkflowBo; | ||
| 12 | +import com.ruoyi.common.businessworkflow.service.ITblBusinessWorkflowService; | ||
| 9 | import com.ruoyi.compliancemanagement.domain.TblContract; | 13 | import com.ruoyi.compliancemanagement.domain.TblContract; |
| 10 | -import com.ruoyi.compliancemanagement.domain.bo.TblBusinessWorkflowBo; | ||
| 11 | import com.ruoyi.compliancemanagement.model.TblContractModel; | 14 | import com.ruoyi.compliancemanagement.model.TblContractModel; |
| 12 | -import com.ruoyi.compliancemanagement.service.ITblBusinessWorkflowService; | 15 | +import com.ruoyi.flowable.common.constant.ProcessConstants; |
| 16 | +import com.ruoyi.flowable.common.enums.ProcessStatus; | ||
| 13 | import com.ruoyi.workflow.service.IWfProcessService; | 17 | import com.ruoyi.workflow.service.IWfProcessService; |
| 14 | import lombok.RequiredArgsConstructor; | 18 | import lombok.RequiredArgsConstructor; |
| 19 | + | ||
| 20 | +import javax.annotation.Resource; | ||
| 15 | import javax.servlet.http.HttpServletResponse; | 21 | import javax.servlet.http.HttpServletResponse; |
| 16 | import javax.validation.constraints.*; | 22 | import javax.validation.constraints.*; |
| 17 | import cn.dev33.satoken.annotation.SaCheckPermission; | 23 | import cn.dev33.satoken.annotation.SaCheckPermission; |
| 24 | +import org.flowable.engine.HistoryService; | ||
| 25 | +import org.flowable.engine.history.HistoricProcessInstance; | ||
| 26 | +import org.flowable.engine.history.HistoricProcessInstanceQuery; | ||
| 18 | import org.flowable.engine.runtime.ProcessInstance; | 27 | import org.flowable.engine.runtime.ProcessInstance; |
| 28 | +import org.flowable.variable.api.history.HistoricVariableInstance; | ||
| 19 | import org.springframework.transaction.annotation.Transactional; | 29 | import org.springframework.transaction.annotation.Transactional; |
| 20 | import org.springframework.web.bind.annotation.*; | 30 | import org.springframework.web.bind.annotation.*; |
| 21 | import org.springframework.validation.annotation.Validated; | 31 | import org.springframework.validation.annotation.Validated; |
| @@ -49,8 +59,10 @@ public class TblContractController extends BaseController { | @@ -49,8 +59,10 @@ public class TblContractController extends BaseController { | ||
| 49 | private final IWfProcessService iWfProcessService; | 59 | private final IWfProcessService iWfProcessService; |
| 50 | private final ITblBusinessWorkflowService iTblBusinessWorkflowService; | 60 | private final ITblBusinessWorkflowService iTblBusinessWorkflowService; |
| 51 | 61 | ||
| 62 | + @Resource | ||
| 63 | + protected HistoryService historyService; | ||
| 52 | /** | 64 | /** |
| 53 | - * 查询【请填写功能名称】列表 | 65 | + * 查询【合同审批】列表 |
| 54 | */ | 66 | */ |
| 55 | @SaCheckPermission("system:contract:list") | 67 | @SaCheckPermission("system:contract:list") |
| 56 | @GetMapping("/list") | 68 | @GetMapping("/list") |
| @@ -59,6 +71,15 @@ public class TblContractController extends BaseController { | @@ -59,6 +71,15 @@ public class TblContractController extends BaseController { | ||
| 59 | } | 71 | } |
| 60 | 72 | ||
| 61 | /** | 73 | /** |
| 74 | + * 查询【归档合同】列表 | ||
| 75 | + */ | ||
| 76 | + @SaCheckPermission("system:contract:listSealContract") | ||
| 77 | + @GetMapping("/listSealContract") | ||
| 78 | + public TableDataInfo<TblContractModel> listSealContract(TblContractBo bo, PageQuery pageQuery) { | ||
| 79 | + return iTblContractService.queryPageListSealContract(bo, pageQuery); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + /** | ||
| 62 | * 导出【请填写功能名称】列表 | 83 | * 导出【请填写功能名称】列表 |
| 63 | */ | 84 | */ |
| 64 | @SaCheckPermission("system:contract:export") | 85 | @SaCheckPermission("system:contract:export") |
| @@ -151,22 +172,34 @@ public class TblContractController extends BaseController { | @@ -151,22 +172,34 @@ public class TblContractController extends BaseController { | ||
| 151 | // 变更内容 | 172 | // 变更内容 |
| 152 | variables.put("reasonText", bo.getReasonText()); | 173 | variables.put("reasonText", bo.getReasonText()); |
| 153 | // 启动流程 | 174 | // 启动流程 |
| 154 | - // CollegeMatters mat = iCollegeMattersService.getMatter(matterKey); | ||
| 155 | -// matter.setMatterDept(mat.getMatterDepartmentId()); | ||
| 156 | -// variables.put("department", mat.getMatterDepartmentId()); | ||
| 157 | -// matter.setMatterKey(procDefId); | ||
| 158 | -// matter.setBusinessKey(procDefId + "." + id); | ||
| 159 | -// matter.setVariables(variables); | ||
| 160 | -// matter.setProcessId("Process_18tcmzu:1:216d90ff-3f8a-11ef-b7e7-70b5e84e8ddf"); | ||
| 161 | -// iWfProcessService.startProcess(matter); | ||
| 162 | ProcessInstance processInstance = iWfProcessService.startProcessByDefId(procDefId, variables); | 175 | ProcessInstance processInstance = iWfProcessService.startProcessByDefId(procDefId, variables); |
| 163 | 176 | ||
| 164 | if(null != processInstance){ | 177 | if(null != processInstance){ |
| 178 | + | ||
| 179 | + // 获取流程状态 | ||
| 180 | + HistoricVariableInstance processStatusVariable = historyService.createHistoricVariableInstanceQuery() | ||
| 181 | + .processInstanceId(processInstance.getProcessInstanceId()) | ||
| 182 | + .variableName(ProcessConstants.PROCESS_STATUS_KEY) | ||
| 183 | + .singleResult(); | ||
| 184 | + String processStatus = null; | ||
| 185 | + if (ObjectUtil.isNotNull(processStatusVariable)) { | ||
| 186 | + processStatus = Convert.toStr(processStatusVariable.getValue()); | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery() | ||
| 190 | + .processDefinitionId(procDefId); | ||
| 191 | + List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.list(); | ||
| 192 | + // 兼容旧流程 | ||
| 193 | + if (processStatus == null) { | ||
| 194 | + processStatus = ObjectUtil.isNull(historicProcessInstances.get(0).getEndTime()) ? ProcessStatus.RUNNING.getStatus() : ProcessStatus.COMPLETED.getStatus(); | ||
| 195 | + } | ||
| 196 | + | ||
| 165 | TblBusinessWorkflowBo tblBusinessWorkflowBo = new TblBusinessWorkflowBo(); | 197 | TblBusinessWorkflowBo tblBusinessWorkflowBo = new TblBusinessWorkflowBo(); |
| 166 | tblBusinessWorkflowBo.setBusinessId(id); | 198 | tblBusinessWorkflowBo.setBusinessId(id); |
| 167 | tblBusinessWorkflowBo.setProcInsId(processInstance.getProcessInstanceId()); | 199 | tblBusinessWorkflowBo.setProcInsId(processInstance.getProcessInstanceId()); |
| 168 | tblBusinessWorkflowBo.setProcDefId(procDefId); | 200 | tblBusinessWorkflowBo.setProcDefId(procDefId); |
| 169 | tblBusinessWorkflowBo.setDeployId(processInstance.getDeploymentId()); | 201 | tblBusinessWorkflowBo.setDeployId(processInstance.getDeploymentId()); |
| 202 | + tblBusinessWorkflowBo.setProcessStatus(processStatus); | ||
| 170 | TableName table = TblContract.class.getAnnotation(TableName.class); | 203 | TableName table = TblContract.class.getAnnotation(TableName.class); |
| 171 | tblBusinessWorkflowBo.setTableName(table.value()); | 204 | tblBusinessWorkflowBo.setTableName(table.value()); |
| 172 | iTblBusinessWorkflowService.insertByBo(tblBusinessWorkflowBo); | 205 | iTblBusinessWorkflowService.insertByBo(tblBusinessWorkflowBo); |
| @@ -190,6 +223,15 @@ public class TblContractController extends BaseController { | @@ -190,6 +223,15 @@ public class TblContractController extends BaseController { | ||
| 190 | return toAjax(iTblContractService.updateByBo(bo)); | 223 | return toAjax(iTblContractService.updateByBo(bo)); |
| 191 | } | 224 | } |
| 192 | 225 | ||
| 226 | + @RepeatSubmit() | ||
| 227 | + @PostMapping("/updateSealByContractno") | ||
| 228 | + public R<Void> updateSealByContractno( @RequestBody TblContractBo bo) { | ||
| 229 | + String contractno = bo.getContractno(); | ||
| 230 | + String sealContract = bo.getSealContract(); | ||
| 231 | + return toAjax(iTblContractService.updateSealByContractno(contractno,sealContract)); | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + | ||
| 193 | /** | 235 | /** |
| 194 | * 删除【请填写功能名称】 | 236 | * 删除【请填写功能名称】 |
| 195 | * | 237 | * |
| @@ -18,5 +18,7 @@ import org.apache.ibatis.annotations.Param; | @@ -18,5 +18,7 @@ import org.apache.ibatis.annotations.Param; | ||
| 18 | public interface TblContractMapper extends BaseMapperPlus<TblContractMapper, TblContract, TblContractVo> { | 18 | public interface TblContractMapper extends BaseMapperPlus<TblContractMapper, TblContract, TblContractVo> { |
| 19 | 19 | ||
| 20 | Page<TblContractModel> selectList(Page<TblContractModel> page, @Param("qc") TblContractBo tblOrderForm); | 20 | Page<TblContractModel> selectList(Page<TblContractModel> page, @Param("qc") TblContractBo tblOrderForm); |
| 21 | + Page<TblContractModel> selectListSealContract(Page<TblContractModel> page, @Param("qc") TblContractBo tblOrderForm); | ||
| 21 | 22 | ||
| 23 | + Boolean updateSealByContractno(@Param("contractno") String contractno,@Param("sealContract") String sealContract); | ||
| 22 | } | 24 | } |
| @@ -92,5 +92,6 @@ public class TblComplianceReviewModel extends BaseEntity { | @@ -92,5 +92,6 @@ public class TblComplianceReviewModel extends BaseEntity { | ||
| 92 | private String procInsId; | 92 | private String procInsId; |
| 93 | private String procDefId; | 93 | private String procDefId; |
| 94 | private String deployId; | 94 | private String deployId; |
| 95 | + private String processStatus; | ||
| 95 | 96 | ||
| 96 | } | 97 | } |
| @@ -98,6 +98,7 @@ public class TblContractModel extends BaseEntity { | @@ -98,6 +98,7 @@ public class TblContractModel extends BaseEntity { | ||
| 98 | * 合同状态 | 98 | * 合同状态 |
| 99 | */ | 99 | */ |
| 100 | private String status; | 100 | private String status; |
| 101 | + private String sealContract; | ||
| 101 | /** | 102 | /** |
| 102 | * | 103 | * |
| 103 | */ | 104 | */ |
| @@ -106,5 +107,6 @@ public class TblContractModel extends BaseEntity { | @@ -106,5 +107,6 @@ public class TblContractModel extends BaseEntity { | ||
| 106 | private String procInsId; | 107 | private String procInsId; |
| 107 | private String procDefId; | 108 | private String procDefId; |
| 108 | private String deployId; | 109 | private String deployId; |
| 110 | + private String processStatus; | ||
| 109 | 111 | ||
| 110 | } | 112 | } |
ruoyi-system/src/main/java/com/ruoyi/compliancemanagement/model/TblSealContractModel.java
0 → 100644
| 1 | +package com.ruoyi.compliancemanagement.model; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 4 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 7 | + | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 【请填写功能名称】对象 tbl_contract | ||
| 12 | + * | ||
| 13 | + * @author ruoyi | ||
| 14 | + * @date 2024-07-05 | ||
| 15 | + */ | ||
| 16 | +@Data | ||
| 17 | +//@EqualsAndHashCode(callSuper = true) | ||
| 18 | +public class TblSealContractModel extends BaseEntity { | ||
| 19 | + | ||
| 20 | + private static final long serialVersionUID=1L; | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 合同编号 | ||
| 24 | + */ | ||
| 25 | + private String contractno; | ||
| 26 | + /** | ||
| 27 | + * 合同名称 | ||
| 28 | + */ | ||
| 29 | + private String contractName; | ||
| 30 | + /** | ||
| 31 | + * 合同类型 | ||
| 32 | + */ | ||
| 33 | + private String contractType; | ||
| 34 | + /** | ||
| 35 | + * 合同金额 | ||
| 36 | + */ | ||
| 37 | + private String contractAmount; | ||
| 38 | + /** | ||
| 39 | + * 生效日期 | ||
| 40 | + */ | ||
| 41 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 42 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 43 | + private Date effectiveDate; | ||
| 44 | + /** | ||
| 45 | + * 到期日期 | ||
| 46 | + */ | ||
| 47 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 48 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 49 | + private Date expirationDate; | ||
| 50 | + /** | ||
| 51 | + * 甲方 | ||
| 52 | + */ | ||
| 53 | + private String partyA; | ||
| 54 | + /** | ||
| 55 | + * 甲方链接地址 | ||
| 56 | + */ | ||
| 57 | + private String partyAAddress; | ||
| 58 | + /** | ||
| 59 | + * 乙方 | ||
| 60 | + */ | ||
| 61 | + private String partyB; | ||
| 62 | + /** | ||
| 63 | + * 乙方链接地址 | ||
| 64 | + */ | ||
| 65 | + private String partyBAddress; | ||
| 66 | + /** | ||
| 67 | + * 付款方式 | ||
| 68 | + */ | ||
| 69 | + private String paymentMethod; | ||
| 70 | + /** | ||
| 71 | + * 签订日期 | ||
| 72 | + */ | ||
| 73 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 74 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 75 | + private Date signingDate; | ||
| 76 | + /** | ||
| 77 | + * 标的物信息 | ||
| 78 | + */ | ||
| 79 | + private String subjectInformation; | ||
| 80 | + /** | ||
| 81 | + * 附件C | ||
| 82 | + */ | ||
| 83 | + private String sealContract; | ||
| 84 | + /** | ||
| 85 | + * 变更原因 | ||
| 86 | + */ | ||
| 87 | + private String reasonChange; | ||
| 88 | + /** | ||
| 89 | + * 变更内容 | ||
| 90 | + */ | ||
| 91 | + private String reasonText; | ||
| 92 | + /** | ||
| 93 | + * 合同状态 | ||
| 94 | + */ | ||
| 95 | + private String status; | ||
| 96 | + /** | ||
| 97 | + * | ||
| 98 | + */ | ||
| 99 | + private Long id; | ||
| 100 | + | ||
| 101 | + private String procInsId; | ||
| 102 | + private String procDefId; | ||
| 103 | + private String deployId; | ||
| 104 | + private String processStatus; | ||
| 105 | + | ||
| 106 | +} |
| @@ -28,6 +28,7 @@ public interface ITblContractService { | @@ -28,6 +28,7 @@ public interface ITblContractService { | ||
| 28 | * 查询【请填写功能名称】列表 | 28 | * 查询【请填写功能名称】列表 |
| 29 | */ | 29 | */ |
| 30 | TableDataInfo<TblContractModel> queryPageList(TblContractBo bo, PageQuery pageQuery); | 30 | TableDataInfo<TblContractModel> queryPageList(TblContractBo bo, PageQuery pageQuery); |
| 31 | + TableDataInfo<TblContractModel> queryPageListSealContract(TblContractBo bo, PageQuery pageQuery); | ||
| 31 | 32 | ||
| 32 | /** | 33 | /** |
| 33 | * 查询【请填写功能名称】列表 | 34 | * 查询【请填写功能名称】列表 |
| @@ -49,4 +50,5 @@ public interface ITblContractService { | @@ -49,4 +50,5 @@ public interface ITblContractService { | ||
| 49 | */ | 50 | */ |
| 50 | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | 51 | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| 51 | 52 | ||
| 53 | + Boolean updateSealByContractno(String contractno,String sealContract); | ||
| 52 | } | 54 | } |
| @@ -45,13 +45,17 @@ public class TblContractServiceImpl implements ITblContractService { | @@ -45,13 +45,17 @@ public class TblContractServiceImpl implements ITblContractService { | ||
| 45 | */ | 45 | */ |
| 46 | @Override | 46 | @Override |
| 47 | public TableDataInfo<TblContractModel> queryPageList(TblContractBo bo, PageQuery pageQuery) { | 47 | public TableDataInfo<TblContractModel> queryPageList(TblContractBo bo, PageQuery pageQuery) { |
| 48 | -// LambdaQueryWrapper<TblContract> lqw = buildQueryWrapper(bo); | ||
| 49 | -// Page<TblContractVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||
| 50 | -// return TableDataInfo.build(result); | ||
| 51 | -// LambdaQueryWrapper<TblContract> lqw = buildQueryWrapper(bo); | ||
| 52 | Page<TblContractModel> result = baseMapper.selectList(pageQuery.build(),bo); | 48 | Page<TblContractModel> result = baseMapper.selectList(pageQuery.build(),bo); |
| 53 | return TableDataInfo.build(result); | 49 | return TableDataInfo.build(result); |
| 54 | } | 50 | } |
| 51 | + /** | ||
| 52 | + * 查询【请填写功能名称】列表 | ||
| 53 | + */ | ||
| 54 | + @Override | ||
| 55 | + public TableDataInfo<TblContractModel> queryPageListSealContract(TblContractBo bo, PageQuery pageQuery) { | ||
| 56 | + Page<TblContractModel> result = baseMapper.selectListSealContract(pageQuery.build(),bo); | ||
| 57 | + return TableDataInfo.build(result); | ||
| 58 | + } | ||
| 55 | 59 | ||
| 56 | /** | 60 | /** |
| 57 | * 查询【请填写功能名称】列表 | 61 | * 查询【请填写功能名称】列表 |
| @@ -121,4 +125,9 @@ public class TblContractServiceImpl implements ITblContractService { | @@ -121,4 +125,9 @@ public class TblContractServiceImpl implements ITblContractService { | ||
| 121 | } | 125 | } |
| 122 | return baseMapper.deleteBatchIds(ids) > 0; | 126 | return baseMapper.deleteBatchIds(ids) > 0; |
| 123 | } | 127 | } |
| 128 | + | ||
| 129 | + @Override | ||
| 130 | + public Boolean updateSealByContractno(String contractno, String sealContract) { | ||
| 131 | + return baseMapper.updateSealByContractno(contractno, sealContract); | ||
| 132 | + } | ||
| 124 | } | 133 | } |
| @@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 46 | <result property="procInsId" column="proc_ins_id"/> | 46 | <result property="procInsId" column="proc_ins_id"/> |
| 47 | <result property="procDefId" column="proc_def_id"/> | 47 | <result property="procDefId" column="proc_def_id"/> |
| 48 | <result property="deployId" column="deploy_id"/> | 48 | <result property="deployId" column="deploy_id"/> |
| 49 | + <result property="processStatus" column="process_status"/> | ||
| 49 | </resultMap> | 50 | </resultMap> |
| 50 | <select id="selectList" resultMap="TblComplianceReviewModelResult"> | 51 | <select id="selectList" resultMap="TblComplianceReviewModelResult"> |
| 51 | SELECT | 52 | SELECT |
| @@ -69,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -69,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 69 | a.update_time, | 70 | a.update_time, |
| 70 | b.proc_ins_id, | 71 | b.proc_ins_id, |
| 71 | b.proc_def_id, | 72 | b.proc_def_id, |
| 72 | - b.deploy_id | 73 | + b.deploy_id,b.process_status |
| 73 | FROM | 74 | FROM |
| 74 | tbl_compliance_review a | 75 | tbl_compliance_review a |
| 75 | LEFT JOIN tbl_business_workflow b ON a.id = b.business_id | 76 | LEFT JOIN tbl_business_workflow b ON a.id = b.business_id |
| @@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 47 | <result property="signingDate" column="signing_date"/> | 47 | <result property="signingDate" column="signing_date"/> |
| 48 | <result property="subjectInformation" column="subject_information"/> | 48 | <result property="subjectInformation" column="subject_information"/> |
| 49 | <result property="attachments" column="attachments"/> | 49 | <result property="attachments" column="attachments"/> |
| 50 | + <result property="sealContract" column="seal_contract"/> | ||
| 50 | <result property="reasonChange" column="reason_change"/> | 51 | <result property="reasonChange" column="reason_change"/> |
| 51 | <result property="reasonText" column="reason_text"/> | 52 | <result property="reasonText" column="reason_text"/> |
| 52 | <result property="status" column="status"/> | 53 | <result property="status" column="status"/> |
| @@ -57,6 +58,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -57,6 +58,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 57 | <result property="procInsId" column="proc_ins_id"/> | 58 | <result property="procInsId" column="proc_ins_id"/> |
| 58 | <result property="procDefId" column="proc_def_id"/> | 59 | <result property="procDefId" column="proc_def_id"/> |
| 59 | <result property="deployId" column="deploy_id"/> | 60 | <result property="deployId" column="deploy_id"/> |
| 61 | + <result property="processStatus" column="process_status"/> | ||
| 62 | + </resultMap> | ||
| 63 | + <resultMap type="com.ruoyi.compliancemanagement.model.TblSealContractModel" id="TblSealContractModelResult"> | ||
| 64 | + <result property="id" column="id"/> | ||
| 65 | + <result property="contractno" column="contractno"/> | ||
| 66 | + <result property="contractName" column="contract_name"/> | ||
| 67 | + <result property="contractType" column="contract_type"/> | ||
| 68 | + <result property="contractAmount" column="contract_amount"/> | ||
| 69 | + <result property="effectiveDate" column="effective_date"/> | ||
| 70 | + <result property="expirationDate" column="expiration_date"/> | ||
| 71 | + <result property="partyA" column="party_a"/> | ||
| 72 | + <result property="partyAAddress" column="party_a_address"/> | ||
| 73 | + <result property="partyB" column="party_b"/> | ||
| 74 | + <result property="partyBAddress" column="party_b_address"/> | ||
| 75 | + <result property="paymentMethod" column="payment_method"/> | ||
| 76 | + <result property="signingDate" column="signing_date"/> | ||
| 77 | + <result property="subjectInformation" column="subject_information"/> | ||
| 78 | + <result property="sealContract" column="seal_contract"/> | ||
| 79 | + <result property="reasonChange" column="reason_change"/> | ||
| 80 | + <result property="reasonText" column="reason_text"/> | ||
| 81 | + <result property="status" column="status"/> | ||
| 82 | + <result property="createBy" column="create_by"/> | ||
| 83 | + <result property="createTime" column="create_time"/> | ||
| 84 | + <result property="updateBy" column="update_by"/> | ||
| 85 | + <result property="updateTime" column="update_time"/> | ||
| 86 | + <result property="procInsId" column="proc_ins_id"/> | ||
| 87 | + <result property="procDefId" column="proc_def_id"/> | ||
| 88 | + <result property="deployId" column="deploy_id"/> | ||
| 89 | + <result property="processStatus" column="process_status"/> | ||
| 60 | </resultMap> | 90 | </resultMap> |
| 61 | <select id="selectList" resultMap="TblContractModelResult"> | 91 | <select id="selectList" resultMap="TblContractModelResult"> |
| 62 | SELECT | 92 | SELECT |
| @@ -81,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -81,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 81 | a.create_by, | 111 | a.create_by, |
| 82 | a.create_time, | 112 | a.create_time, |
| 83 | a.update_by, | 113 | a.update_by, |
| 84 | - a.update_time,b.proc_ins_id,b.proc_def_id,b.deploy_id | 114 | + a.update_time,b.proc_ins_id,b.proc_def_id,b.deploy_id,b.process_status,a.seal_contract |
| 85 | FROM | 115 | FROM |
| 86 | tbl_contract a | 116 | tbl_contract a |
| 87 | LEFT JOIN tbl_business_workflow b ON a.id = b.business_id | 117 | LEFT JOIN tbl_business_workflow b ON a.id = b.business_id |
| @@ -94,4 +124,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -94,4 +124,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 94 | </if> | 124 | </if> |
| 95 | order by a.create_time desc | 125 | order by a.create_time desc |
| 96 | </select> | 126 | </select> |
| 127 | + <select id="selectListSealContract" resultMap="TblSealContractModelResult"> | ||
| 128 | + SELECT | ||
| 129 | + a.id, | ||
| 130 | + a.contractno, | ||
| 131 | + a.contract_name, | ||
| 132 | + a.contract_type, | ||
| 133 | + a.contract_amount, | ||
| 134 | + a.effective_date, | ||
| 135 | + expiration_date, | ||
| 136 | + a.party_a, | ||
| 137 | + a.party_a_address, | ||
| 138 | + a.party_b, | ||
| 139 | + a.party_b_address, | ||
| 140 | + a.payment_method, | ||
| 141 | + a.signing_date, | ||
| 142 | + a.subject_information, | ||
| 143 | + a.attachments, | ||
| 144 | + a.reason_change, | ||
| 145 | + a.reason_text, | ||
| 146 | + a.status, | ||
| 147 | + a.create_by, | ||
| 148 | + a.create_time, | ||
| 149 | + a.update_by, | ||
| 150 | + a.update_time,b.proc_ins_id,b.proc_def_id,b.deploy_id,b.process_status,a.seal_contract | ||
| 151 | + FROM | ||
| 152 | + tbl_contract a | ||
| 153 | + LEFT JOIN tbl_business_workflow b ON a.id = b.business_id | ||
| 154 | + where 1=1 and a.seal_contract is not null | ||
| 155 | + <if test="qc.contractno!=null and qc.contractno !=''"> | ||
| 156 | + and a.contractno like concat('%',#{qc.contractno},'%') | ||
| 157 | + </if> | ||
| 158 | + <if test="qc.contractName!=null and qc.contractName !=''"> | ||
| 159 | + and a.contract_name like concat('%',#{qc.contractName},'%') | ||
| 160 | + </if> | ||
| 161 | + order by a.create_time desc | ||
| 162 | + </select> | ||
| 163 | + <update id="updateSealByContractno" parameterType="String"> | ||
| 164 | + update tbl_contract set seal_contract = #{sealContract} where contractno = #{contractno} | ||
| 165 | + </update> | ||
| 97 | </mapper> | 166 | </mapper> |
-
请 注册 或 登录 后发表评论