正在显示
16 个修改的文件
包含
544 行增加
和
38 行删除
| @@ -17,6 +17,7 @@ import com.ruoyi.workflow.service.IWfCopyService; | @@ -17,6 +17,7 @@ import com.ruoyi.workflow.service.IWfCopyService; | ||
| 17 | import com.ruoyi.workflow.service.IWfProcessService; | 17 | import com.ruoyi.workflow.service.IWfProcessService; |
| 18 | import lombok.RequiredArgsConstructor; | 18 | import lombok.RequiredArgsConstructor; |
| 19 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
| 20 | +import org.flowable.engine.runtime.ProcessInstance; | ||
| 20 | import org.springframework.validation.annotation.Validated; | 21 | import org.springframework.validation.annotation.Validated; |
| 21 | import org.springframework.web.bind.annotation.*; | 22 | import org.springframework.web.bind.annotation.*; |
| 22 | 23 | ||
| @@ -200,10 +201,10 @@ public class WfProcessController extends BaseController { | @@ -200,10 +201,10 @@ public class WfProcessController extends BaseController { | ||
| 200 | */ | 201 | */ |
| 201 | @SaCheckPermission("workflow:process:start") | 202 | @SaCheckPermission("workflow:process:start") |
| 202 | @PostMapping("/start/{processDefId}") | 203 | @PostMapping("/start/{processDefId}") |
| 203 | - public R<Void> start(@PathVariable(value = "processDefId") String processDefId, @RequestBody Map<String, Object> variables) { | ||
| 204 | - processService.startProcessByDefId(processDefId, variables); | ||
| 205 | - return R.ok("流程启动成功"); | ||
| 206 | - | 204 | + public R<ProcessInstance> start(@PathVariable(value = "processDefId") String processDefId, @RequestBody Map<String, Object> variables) { |
| 205 | + ProcessInstance processInstance = processService.startProcessByDefId(processDefId, variables); | ||
| 206 | +// return R.ok("流程启动成功"); | ||
| 207 | + return R.ok(processInstance); | ||
| 207 | } | 208 | } |
| 208 | 209 | ||
| 209 | /** | 210 | /** |
| @@ -4,15 +4,19 @@ import java.util.HashMap; | @@ -4,15 +4,19 @@ 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 | ||
| 9 | -import com.ruoyi.flowable.entity.Matter; | 8 | +import com.baomidou.mybatisplus.annotation.TableName; |
| 9 | +import com.ruoyi.compliancemanagement.domain.TblContract; | ||
| 10 | +import com.ruoyi.compliancemanagement.domain.bo.TblBusinessWorkflowBo; | ||
| 11 | +import com.ruoyi.compliancemanagement.model.TblContractModel; | ||
| 12 | +import com.ruoyi.compliancemanagement.service.ITblBusinessWorkflowService; | ||
| 10 | import com.ruoyi.workflow.service.IWfProcessService; | 13 | import com.ruoyi.workflow.service.IWfProcessService; |
| 11 | import lombok.RequiredArgsConstructor; | 14 | import lombok.RequiredArgsConstructor; |
| 12 | import javax.servlet.http.HttpServletResponse; | 15 | import javax.servlet.http.HttpServletResponse; |
| 13 | import javax.validation.constraints.*; | 16 | import javax.validation.constraints.*; |
| 14 | import cn.dev33.satoken.annotation.SaCheckPermission; | 17 | import cn.dev33.satoken.annotation.SaCheckPermission; |
| 15 | -import org.apache.ibatis.annotations.Param; | 18 | +import org.flowable.engine.runtime.ProcessInstance; |
| 19 | +import org.springframework.transaction.annotation.Transactional; | ||
| 16 | import org.springframework.web.bind.annotation.*; | 20 | import org.springframework.web.bind.annotation.*; |
| 17 | import org.springframework.validation.annotation.Validated; | 21 | import org.springframework.validation.annotation.Validated; |
| 18 | import com.ruoyi.common.annotation.RepeatSubmit; | 22 | import com.ruoyi.common.annotation.RepeatSubmit; |
| @@ -22,7 +26,6 @@ import com.ruoyi.common.core.domain.PageQuery; | @@ -22,7 +26,6 @@ import com.ruoyi.common.core.domain.PageQuery; | ||
| 22 | import com.ruoyi.common.core.domain.R; | 26 | import com.ruoyi.common.core.domain.R; |
| 23 | import com.ruoyi.common.core.validate.AddGroup; | 27 | import com.ruoyi.common.core.validate.AddGroup; |
| 24 | import com.ruoyi.common.core.validate.EditGroup; | 28 | import com.ruoyi.common.core.validate.EditGroup; |
| 25 | -import com.ruoyi.common.core.validate.QueryGroup; | ||
| 26 | import com.ruoyi.common.enums.BusinessType; | 29 | import com.ruoyi.common.enums.BusinessType; |
| 27 | import com.ruoyi.common.utils.poi.ExcelUtil; | 30 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 28 | import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; | 31 | import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; |
| @@ -44,13 +47,14 @@ public class TblContractController extends BaseController { | @@ -44,13 +47,14 @@ public class TblContractController extends BaseController { | ||
| 44 | 47 | ||
| 45 | private final ITblContractService iTblContractService; | 48 | private final ITblContractService iTblContractService; |
| 46 | private final IWfProcessService iWfProcessService; | 49 | private final IWfProcessService iWfProcessService; |
| 50 | + private final ITblBusinessWorkflowService iTblBusinessWorkflowService; | ||
| 47 | 51 | ||
| 48 | /** | 52 | /** |
| 49 | * 查询【请填写功能名称】列表 | 53 | * 查询【请填写功能名称】列表 |
| 50 | */ | 54 | */ |
| 51 | @SaCheckPermission("system:contract:list") | 55 | @SaCheckPermission("system:contract:list") |
| 52 | @GetMapping("/list") | 56 | @GetMapping("/list") |
| 53 | - public TableDataInfo<TblContractVo> list(TblContractBo bo, PageQuery pageQuery) { | 57 | + public TableDataInfo<TblContractModel> list(TblContractBo bo, PageQuery pageQuery) { |
| 54 | return iTblContractService.queryPageList(bo, pageQuery); | 58 | return iTblContractService.queryPageList(bo, pageQuery); |
| 55 | } | 59 | } |
| 56 | 60 | ||
| @@ -99,14 +103,15 @@ public class TblContractController extends BaseController { | @@ -99,14 +103,15 @@ public class TblContractController extends BaseController { | ||
| 99 | // return toAjax(iTblContractService.insertByBo(bo)); | 103 | // return toAjax(iTblContractService.insertByBo(bo)); |
| 100 | // } | 104 | // } |
| 101 | 105 | ||
| 106 | + @Transactional(rollbackFor = Exception.class) | ||
| 102 | @SaCheckPermission("system:contract:addAndStart") | 107 | @SaCheckPermission("system:contract:addAndStart") |
| 103 | @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) | 108 | @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) |
| 104 | @RepeatSubmit() | 109 | @RepeatSubmit() |
| 105 | @PostMapping() | 110 | @PostMapping() |
| 106 | public R<Void> addAndStart( | 111 | public R<Void> addAndStart( |
| 107 | @Validated(AddGroup.class) @RequestBody TblContractBo bo) { | 112 | @Validated(AddGroup.class) @RequestBody TblContractBo bo) { |
| 108 | - Matter matter = new Matter(); | ||
| 109 | - String matterKey = "Process_18tcmzu:1:216d90ff-3f8a-11ef-b7e7-70b5e84e8ddf"; | 113 | +// Matter matter = new Matter(); |
| 114 | + String procDefId = "Process_18tcmzu:1:040fd586-433c-11ef-b955-421c839c76ba"; | ||
| 110 | iTblContractService.insertByBo(bo); | 115 | iTblContractService.insertByBo(bo); |
| 111 | Long id = bo.getId(); | 116 | Long id = bo.getId(); |
| 112 | //Long id = sLeaveService.create(studentLeave,matterKey); | 117 | //Long id = sLeaveService.create(studentLeave,matterKey); |
| @@ -141,11 +146,22 @@ public class TblContractController extends BaseController { | @@ -141,11 +146,22 @@ public class TblContractController extends BaseController { | ||
| 141 | // CollegeMatters mat = iCollegeMattersService.getMatter(matterKey); | 146 | // CollegeMatters mat = iCollegeMattersService.getMatter(matterKey); |
| 142 | // matter.setMatterDept(mat.getMatterDepartmentId()); | 147 | // matter.setMatterDept(mat.getMatterDepartmentId()); |
| 143 | // variables.put("department", mat.getMatterDepartmentId()); | 148 | // variables.put("department", mat.getMatterDepartmentId()); |
| 144 | - matter.setMatterKey(matterKey); | ||
| 145 | - matter.setBusinessKey(matterKey + "." + id); | ||
| 146 | - matter.setVariables(variables); | ||
| 147 | - matter.setProcessId("Process_18tcmzu:1:216d90ff-3f8a-11ef-b7e7-70b5e84e8ddf"); | ||
| 148 | - iWfProcessService.startProcess(matter); | 149 | +// matter.setMatterKey(procDefId); |
| 150 | +// matter.setBusinessKey(procDefId + "." + id); | ||
| 151 | +// matter.setVariables(variables); | ||
| 152 | +// matter.setProcessId("Process_18tcmzu:1:216d90ff-3f8a-11ef-b7e7-70b5e84e8ddf"); | ||
| 153 | +// iWfProcessService.startProcess(matter); | ||
| 154 | + ProcessInstance processInstance = iWfProcessService.startProcessByDefId(procDefId, variables); | ||
| 155 | + | ||
| 156 | + if(null != processInstance){ | ||
| 157 | + TblBusinessWorkflowBo tblBusinessWorkflowBo = new TblBusinessWorkflowBo(); | ||
| 158 | + tblBusinessWorkflowBo.setBusinessId(id); | ||
| 159 | + tblBusinessWorkflowBo.setProcInsId(processInstance.getProcessInstanceId()); | ||
| 160 | + TableName table = TblContract.class.getAnnotation(TableName.class); | ||
| 161 | + tblBusinessWorkflowBo.setTableName(table.value()); | ||
| 162 | + iTblBusinessWorkflowService.insertByBo(tblBusinessWorkflowBo); | ||
| 163 | +// iTblContractService.updateProcInsIdById(processInstance.getProcessInstanceId(),id); | ||
| 164 | + } | ||
| 149 | return R.ok("成功"); | 165 | return R.ok("成功"); |
| 150 | }else{ | 166 | }else{ |
| 151 | return R.fail("系统故障!"); | 167 | return R.fail("系统故障!"); |
ruoyi-system/src/main/java/com/ruoyi/compliancemanagement/domain/TblBusinessWorkflow.java
0 → 100644
| 1 | +package com.ruoyi.compliancemanagement.domain; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.*; | ||
| 4 | +import lombok.Data; | ||
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import java.io.Serializable; | ||
| 7 | +import java.util.Date; | ||
| 8 | +import java.math.BigDecimal; | ||
| 9 | + | ||
| 10 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 业务和工作流关联对象 tbl_business_workflow | ||
| 14 | + * | ||
| 15 | + * @author ruoyi | ||
| 16 | + * @date 2024-07-17 | ||
| 17 | + */ | ||
| 18 | +@Data | ||
| 19 | +@EqualsAndHashCode(callSuper = true) | ||
| 20 | +@TableName("tbl_business_workflow") | ||
| 21 | +public class TblBusinessWorkflow extends BaseEntity { | ||
| 22 | + | ||
| 23 | + private static final long serialVersionUID=1L; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * | ||
| 27 | + */ | ||
| 28 | + private String tableName; | ||
| 29 | + /** | ||
| 30 | + * | ||
| 31 | + */ | ||
| 32 | + private Long businessId; | ||
| 33 | + /** | ||
| 34 | + * | ||
| 35 | + */ | ||
| 36 | + private String procInsId; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * | ||
| 40 | + */ | ||
| 41 | + @TableId(value = "id") | ||
| 42 | + private Long id; | ||
| 43 | + | ||
| 44 | +} |
ruoyi-system/src/main/java/com/ruoyi/compliancemanagement/domain/bo/TblBusinessWorkflowBo.java
0 → 100644
| 1 | +package com.ruoyi.compliancemanagement.domain.bo; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.common.core.validate.AddGroup; | ||
| 4 | +import com.ruoyi.common.core.validate.EditGroup; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import javax.validation.constraints.*; | ||
| 8 | + | ||
| 9 | +import java.util.Date; | ||
| 10 | + | ||
| 11 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 业务和工作流关联业务对象 tbl_business_workflow | ||
| 15 | + * | ||
| 16 | + * @author ruoyi | ||
| 17 | + * @date 2024-07-17 | ||
| 18 | + */ | ||
| 19 | + | ||
| 20 | +@Data | ||
| 21 | +@EqualsAndHashCode(callSuper = true) | ||
| 22 | +public class TblBusinessWorkflowBo extends BaseEntity { | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * | ||
| 26 | + */ | ||
| 27 | + @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class }) | ||
| 28 | + private String tableName; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * | ||
| 32 | + */ | ||
| 33 | + @NotNull(message = "不能为空", groups = { EditGroup.class }) | ||
| 34 | + private Long businessId; | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * | ||
| 38 | + */ | ||
| 39 | + @NotBlank(message = "不能为空", groups = { EditGroup.class }) | ||
| 40 | + private String procInsId; | ||
| 41 | + /** | ||
| 42 | + * | ||
| 43 | + */ | ||
| 44 | + @NotNull(message = "不能为空", groups = { EditGroup.class }) | ||
| 45 | + private Long id; | ||
| 46 | + | ||
| 47 | +} |
ruoyi-system/src/main/java/com/ruoyi/compliancemanagement/domain/vo/TblBusinessWorkflowVo.java
0 → 100644
| 1 | +package com.ruoyi.compliancemanagement.domain.vo; | ||
| 2 | + | ||
| 3 | +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||
| 4 | +import com.alibaba.excel.annotation.ExcelProperty; | ||
| 5 | +import com.ruoyi.common.annotation.ExcelDictFormat; | ||
| 6 | +import com.ruoyi.common.convert.ExcelDictConvert; | ||
| 7 | +import lombok.Data; | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 业务和工作流关联视图对象 tbl_business_workflow | ||
| 14 | + * | ||
| 15 | + * @author ruoyi | ||
| 16 | + * @date 2024-07-17 | ||
| 17 | + */ | ||
| 18 | +@Data | ||
| 19 | +@ExcelIgnoreUnannotated | ||
| 20 | +public class TblBusinessWorkflowVo { | ||
| 21 | + | ||
| 22 | + private static final long serialVersionUID = 1L; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * | ||
| 26 | + */ | ||
| 27 | + @ExcelProperty(value = "") | ||
| 28 | + private String tableName; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * | ||
| 32 | + */ | ||
| 33 | + @ExcelProperty(value = "") | ||
| 34 | + private Long businessId; | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * | ||
| 38 | + */ | ||
| 39 | + @ExcelProperty(value = "") | ||
| 40 | + private String procInsId; | ||
| 41 | + /** | ||
| 42 | + * | ||
| 43 | + */ | ||
| 44 | + @ExcelProperty(value = "") | ||
| 45 | + private Long id; | ||
| 46 | + | ||
| 47 | +} |
ruoyi-system/src/main/java/com/ruoyi/compliancemanagement/mapper/TblBusinessWorkflowMapper.java
0 → 100644
| 1 | +package com.ruoyi.compliancemanagement.mapper; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow; | ||
| 4 | +import com.ruoyi.compliancemanagement.domain.vo.TblBusinessWorkflowVo; | ||
| 5 | +import com.ruoyi.common.core.mapper.BaseMapperPlus; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 业务和工作流关联Mapper接口 | ||
| 9 | + * | ||
| 10 | + * @author ruoyi | ||
| 11 | + * @date 2024-07-17 | ||
| 12 | + */ | ||
| 13 | +public interface TblBusinessWorkflowMapper extends BaseMapperPlus<TblBusinessWorkflowMapper, TblBusinessWorkflow, TblBusinessWorkflowVo> { | ||
| 14 | + | ||
| 15 | +} |
| 1 | package com.ruoyi.compliancemanagement.mapper; | 1 | package com.ruoyi.compliancemanagement.mapper; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 4 | import com.ruoyi.common.core.mapper.BaseMapperPlus; | 5 | import com.ruoyi.common.core.mapper.BaseMapperPlus; |
| 5 | import com.ruoyi.compliancemanagement.domain.TblContract; | 6 | import com.ruoyi.compliancemanagement.domain.TblContract; |
| 7 | +import com.ruoyi.compliancemanagement.domain.bo.TblContractBo; | ||
| 6 | import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; | 8 | import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; |
| 9 | +import com.ruoyi.compliancemanagement.model.TblContractModel; | ||
| 10 | +import org.apache.ibatis.annotations.Param; | ||
| 7 | 11 | ||
| 8 | /** | 12 | /** |
| 9 | * 【请填写功能名称】Mapper接口 | 13 | * 【请填写功能名称】Mapper接口 |
| @@ -13,4 +17,6 @@ import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; | @@ -13,4 +17,6 @@ import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; | ||
| 13 | */ | 17 | */ |
| 14 | public interface TblContractMapper extends BaseMapperPlus<TblContractMapper, TblContract, TblContractVo> { | 18 | public interface TblContractMapper extends BaseMapperPlus<TblContractMapper, TblContract, TblContractVo> { |
| 15 | 19 | ||
| 20 | + Page<TblContractModel> selectList(Page<TblContractModel> page, @Param("qc") TblContractBo tblOrderForm); | ||
| 21 | + | ||
| 16 | } | 22 | } |
| 1 | +package com.ruoyi.compliancemanagement.model; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.*; | ||
| 4 | +import lombok.Data; | ||
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import java.io.Serializable; | ||
| 7 | +import java.util.Date; | ||
| 8 | +import java.math.BigDecimal; | ||
| 9 | + | ||
| 10 | +import java.util.Date; | ||
| 11 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 12 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 13 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * 【请填写功能名称】对象 tbl_contract | ||
| 17 | + * | ||
| 18 | + * @author ruoyi | ||
| 19 | + * @date 2024-07-05 | ||
| 20 | + */ | ||
| 21 | +@Data | ||
| 22 | +//@EqualsAndHashCode(callSuper = true) | ||
| 23 | +public class TblContractModel extends BaseEntity { | ||
| 24 | + | ||
| 25 | + private static final long serialVersionUID=1L; | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 合同编号 | ||
| 29 | + */ | ||
| 30 | + private String contractno; | ||
| 31 | + /** | ||
| 32 | + * 合同名称 | ||
| 33 | + */ | ||
| 34 | + private String contractName; | ||
| 35 | + /** | ||
| 36 | + * 合同类型 | ||
| 37 | + */ | ||
| 38 | + private String contractType; | ||
| 39 | + /** | ||
| 40 | + * 合同金额 | ||
| 41 | + */ | ||
| 42 | + private String contractAmount; | ||
| 43 | + /** | ||
| 44 | + * 生效日期 | ||
| 45 | + */ | ||
| 46 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 47 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 48 | + private Date effectiveDate; | ||
| 49 | + /** | ||
| 50 | + * 到期日期 | ||
| 51 | + */ | ||
| 52 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 53 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 54 | + private Date expirationDate; | ||
| 55 | + /** | ||
| 56 | + * 甲方 | ||
| 57 | + */ | ||
| 58 | + private String partyA; | ||
| 59 | + /** | ||
| 60 | + * 乙方 | ||
| 61 | + */ | ||
| 62 | + private String partyB; | ||
| 63 | + /** | ||
| 64 | + * 付款方式 | ||
| 65 | + */ | ||
| 66 | + private String paymentMethod; | ||
| 67 | + /** | ||
| 68 | + * 签订日期 | ||
| 69 | + */ | ||
| 70 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 71 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 72 | + private Date signingDate; | ||
| 73 | + /** | ||
| 74 | + * 标的物信息 | ||
| 75 | + */ | ||
| 76 | + private String subjectInformation; | ||
| 77 | + /** | ||
| 78 | + * 附件 | ||
| 79 | + */ | ||
| 80 | + private String attachments; | ||
| 81 | + /** | ||
| 82 | + * | ||
| 83 | + */ | ||
| 84 | + private Long id; | ||
| 85 | + | ||
| 86 | + private String procInsId; | ||
| 87 | + | ||
| 88 | +} |
ruoyi-system/src/main/java/com/ruoyi/compliancemanagement/service/ITblBusinessWorkflowService.java
0 → 100644
| 1 | +package com.ruoyi.compliancemanagement.service; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow; | ||
| 4 | +import com.ruoyi.compliancemanagement.domain.vo.TblBusinessWorkflowVo; | ||
| 5 | +import com.ruoyi.compliancemanagement.domain.bo.TblBusinessWorkflowBo; | ||
| 6 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 7 | +import com.ruoyi.common.core.domain.PageQuery; | ||
| 8 | + | ||
| 9 | +import java.util.Collection; | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 业务和工作流关联Service接口 | ||
| 14 | + * | ||
| 15 | + * @author ruoyi | ||
| 16 | + * @date 2024-07-17 | ||
| 17 | + */ | ||
| 18 | +public interface ITblBusinessWorkflowService { | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 查询业务和工作流关联 | ||
| 22 | + */ | ||
| 23 | + TblBusinessWorkflowVo queryById(Long businessId); | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 查询业务和工作流关联列表 | ||
| 27 | + */ | ||
| 28 | + TableDataInfo<TblBusinessWorkflowVo> queryPageList(TblBusinessWorkflowBo bo, PageQuery pageQuery); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 查询业务和工作流关联列表 | ||
| 32 | + */ | ||
| 33 | + List<TblBusinessWorkflowVo> queryList(TblBusinessWorkflowBo bo); | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 新增业务和工作流关联 | ||
| 37 | + */ | ||
| 38 | + Boolean insertByBo(TblBusinessWorkflowBo bo); | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 修改业务和工作流关联 | ||
| 42 | + */ | ||
| 43 | + Boolean updateByBo(TblBusinessWorkflowBo bo); | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * 校验并批量删除业务和工作流关联信息 | ||
| 47 | + */ | ||
| 48 | + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||
| 49 | +} |
| @@ -5,6 +5,8 @@ import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; | @@ -5,6 +5,8 @@ import com.ruoyi.compliancemanagement.domain.vo.TblContractVo; | ||
| 5 | import com.ruoyi.compliancemanagement.domain.bo.TblContractBo; | 5 | import com.ruoyi.compliancemanagement.domain.bo.TblContractBo; |
| 6 | import com.ruoyi.common.core.page.TableDataInfo; | 6 | import com.ruoyi.common.core.page.TableDataInfo; |
| 7 | import com.ruoyi.common.core.domain.PageQuery; | 7 | import com.ruoyi.common.core.domain.PageQuery; |
| 8 | +import com.ruoyi.compliancemanagement.model.TblContractModel; | ||
| 9 | +import org.apache.ibatis.annotations.Param; | ||
| 8 | 10 | ||
| 9 | import java.util.Collection; | 11 | import java.util.Collection; |
| 10 | import java.util.List; | 12 | import java.util.List; |
| @@ -25,7 +27,7 @@ public interface ITblContractService { | @@ -25,7 +27,7 @@ public interface ITblContractService { | ||
| 25 | /** | 27 | /** |
| 26 | * 查询【请填写功能名称】列表 | 28 | * 查询【请填写功能名称】列表 |
| 27 | */ | 29 | */ |
| 28 | - TableDataInfo<TblContractVo> queryPageList(TblContractBo bo, PageQuery pageQuery); | 30 | + TableDataInfo<TblContractModel> queryPageList(TblContractBo bo, PageQuery pageQuery); |
| 29 | 31 | ||
| 30 | /** | 32 | /** |
| 31 | * 查询【请填写功能名称】列表 | 33 | * 查询【请填写功能名称】列表 |
| @@ -46,4 +48,5 @@ public interface ITblContractService { | @@ -46,4 +48,5 @@ public interface ITblContractService { | ||
| 46 | * 校验并批量删除【请填写功能名称】信息 | 48 | * 校验并批量删除【请填写功能名称】信息 |
| 47 | */ | 49 | */ |
| 48 | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | 50 | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| 51 | + | ||
| 49 | } | 52 | } |
| 1 | +package com.ruoyi.compliancemanagement.service.impl; | ||
| 2 | + | ||
| 3 | +import cn.hutool.core.bean.BeanUtil; | ||
| 4 | +import com.ruoyi.common.utils.StringUtils; | ||
| 5 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 6 | +import com.ruoyi.common.core.domain.PageQuery; | ||
| 7 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 8 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 9 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 10 | +import lombok.RequiredArgsConstructor; | ||
| 11 | +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 | + | ||
| 18 | +import java.util.List; | ||
| 19 | +import java.util.Map; | ||
| 20 | +import java.util.Collection; | ||
| 21 | + | ||
| 22 | +/** | ||
| 23 | + * 业务和工作流关联Service业务层处理 | ||
| 24 | + * | ||
| 25 | + * @author ruoyi | ||
| 26 | + * @date 2024-07-17 | ||
| 27 | + */ | ||
| 28 | +@RequiredArgsConstructor | ||
| 29 | +@Service | ||
| 30 | +public class TblBusinessWorkflowServiceImpl implements ITblBusinessWorkflowService { | ||
| 31 | + | ||
| 32 | + private final TblBusinessWorkflowMapper baseMapper; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 查询业务和工作流关联 | ||
| 36 | + */ | ||
| 37 | + @Override | ||
| 38 | + public TblBusinessWorkflowVo queryById(Long businessId){ | ||
| 39 | + return baseMapper.selectVoById(businessId); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * 查询业务和工作流关联列表 | ||
| 44 | + */ | ||
| 45 | + @Override | ||
| 46 | + public TableDataInfo<TblBusinessWorkflowVo> queryPageList(TblBusinessWorkflowBo bo, PageQuery pageQuery) { | ||
| 47 | + LambdaQueryWrapper<TblBusinessWorkflow> lqw = buildQueryWrapper(bo); | ||
| 48 | + Page<TblBusinessWorkflowVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||
| 49 | + return TableDataInfo.build(result); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 查询业务和工作流关联列表 | ||
| 54 | + */ | ||
| 55 | + @Override | ||
| 56 | + public List<TblBusinessWorkflowVo> queryList(TblBusinessWorkflowBo bo) { | ||
| 57 | + LambdaQueryWrapper<TblBusinessWorkflow> lqw = buildQueryWrapper(bo); | ||
| 58 | + return baseMapper.selectVoList(lqw); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + private LambdaQueryWrapper<TblBusinessWorkflow> buildQueryWrapper(TblBusinessWorkflowBo bo) { | ||
| 62 | + Map<String, Object> params = bo.getParams(); | ||
| 63 | + LambdaQueryWrapper<TblBusinessWorkflow> lqw = Wrappers.lambdaQuery(); | ||
| 64 | + lqw.like(StringUtils.isNotBlank(bo.getTableName()), TblBusinessWorkflow::getTableName, bo.getTableName()); | ||
| 65 | + return lqw; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 新增业务和工作流关联 | ||
| 70 | + */ | ||
| 71 | + @Override | ||
| 72 | + public Boolean insertByBo(TblBusinessWorkflowBo bo) { | ||
| 73 | + TblBusinessWorkflow add = BeanUtil.toBean(bo, TblBusinessWorkflow.class); | ||
| 74 | + validEntityBeforeSave(add); | ||
| 75 | + boolean flag = baseMapper.insert(add) > 0; | ||
| 76 | + if (flag) { | ||
| 77 | + bo.setBusinessId(add.getBusinessId()); | ||
| 78 | + } | ||
| 79 | + return flag; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 修改业务和工作流关联 | ||
| 84 | + */ | ||
| 85 | + @Override | ||
| 86 | + public Boolean updateByBo(TblBusinessWorkflowBo bo) { | ||
| 87 | + TblBusinessWorkflow update = BeanUtil.toBean(bo, TblBusinessWorkflow.class); | ||
| 88 | + validEntityBeforeSave(update); | ||
| 89 | + return baseMapper.updateById(update) > 0; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 保存前的数据校验 | ||
| 94 | + */ | ||
| 95 | + private void validEntityBeforeSave(TblBusinessWorkflow entity){ | ||
| 96 | + //TODO 做一些数据校验,如唯一约束 | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 批量删除业务和工作流关联 | ||
| 101 | + */ | ||
| 102 | + @Override | ||
| 103 | + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||
| 104 | + if(isValid){ | ||
| 105 | + //TODO 做一些业务上的校验,判断是否需要校验 | ||
| 106 | + } | ||
| 107 | + return baseMapper.deleteBatchIds(ids) > 0; | ||
| 108 | + } | ||
| 109 | +} |
| @@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.PageQuery; | @@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.PageQuery; | ||
| 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 8 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 8 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 9 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 9 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 10 | +import com.ruoyi.compliancemanagement.model.TblContractModel; | ||
| 10 | import lombok.RequiredArgsConstructor; | 11 | import lombok.RequiredArgsConstructor; |
| 11 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
| 12 | import com.ruoyi.compliancemanagement.domain.bo.TblContractBo; | 13 | import com.ruoyi.compliancemanagement.domain.bo.TblContractBo; |
| @@ -43,9 +44,12 @@ public class TblContractServiceImpl implements ITblContractService { | @@ -43,9 +44,12 @@ public class TblContractServiceImpl implements ITblContractService { | ||
| 43 | * 查询【请填写功能名称】列表 | 44 | * 查询【请填写功能名称】列表 |
| 44 | */ | 45 | */ |
| 45 | @Override | 46 | @Override |
| 46 | - public TableDataInfo<TblContractVo> queryPageList(TblContractBo bo, PageQuery pageQuery) { | ||
| 47 | - LambdaQueryWrapper<TblContract> lqw = buildQueryWrapper(bo); | ||
| 48 | - Page<TblContractVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | 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); | ||
| 49 | return TableDataInfo.build(result); | 53 | return TableDataInfo.build(result); |
| 50 | } | 54 | } |
| 51 | 55 |
| @@ -8,6 +8,7 @@ import com.ruoyi.flowable.entity.Matter; | @@ -8,6 +8,7 @@ import com.ruoyi.flowable.entity.Matter; | ||
| 8 | import com.ruoyi.workflow.domain.vo.WfDefinitionVo; | 8 | import com.ruoyi.workflow.domain.vo.WfDefinitionVo; |
| 9 | import com.ruoyi.workflow.domain.vo.WfDetailVo; | 9 | import com.ruoyi.workflow.domain.vo.WfDetailVo; |
| 10 | import com.ruoyi.workflow.domain.vo.WfTaskVo; | 10 | import com.ruoyi.workflow.domain.vo.WfTaskVo; |
| 11 | +import org.flowable.engine.runtime.ProcessInstance; | ||
| 11 | 12 | ||
| 12 | import java.util.List; | 13 | import java.util.List; |
| 13 | import java.util.Map; | 14 | import java.util.Map; |
| @@ -86,7 +87,7 @@ public interface IWfProcessService { | @@ -86,7 +87,7 @@ public interface IWfProcessService { | ||
| 86 | * @param procDefId 流程定义ID | 87 | * @param procDefId 流程定义ID |
| 87 | * @param variables 扩展参数 | 88 | * @param variables 扩展参数 |
| 88 | */ | 89 | */ |
| 89 | - void startProcessByDefId(String procDefId, Map<String, Object> variables); | 90 | + ProcessInstance startProcessByDefId(String procDefId, Map<String, Object> variables); |
| 90 | 91 | ||
| 91 | /** | 92 | /** |
| 92 | * 通过DefinitionKey启动流程 | 93 | * 通过DefinitionKey启动流程 |
| @@ -583,11 +583,12 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | @@ -583,11 +583,12 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | ||
| 583 | */ | 583 | */ |
| 584 | @Override | 584 | @Override |
| 585 | @Transactional(rollbackFor = Exception.class) | 585 | @Transactional(rollbackFor = Exception.class) |
| 586 | - public void startProcessByDefId(String procDefId, Map<String, Object> variables) { | 586 | + public ProcessInstance startProcessByDefId(String procDefId, Map<String, Object> variables) { |
| 587 | try { | 587 | try { |
| 588 | ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery() | 588 | ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery() |
| 589 | .processDefinitionId(procDefId).singleResult(); | 589 | .processDefinitionId(procDefId).singleResult(); |
| 590 | - startProcess(processDefinition, variables); | 590 | + ProcessInstance processInstance= startProcess(processDefinition, variables); |
| 591 | + return processInstance; | ||
| 591 | } catch (Exception e) { | 592 | } catch (Exception e) { |
| 592 | e.printStackTrace(); | 593 | e.printStackTrace(); |
| 593 | throw new ServiceException("流程启动错误"); | 594 | throw new ServiceException("流程启动错误"); |
| @@ -704,7 +705,7 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | @@ -704,7 +705,7 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | ||
| 704 | /** | 705 | /** |
| 705 | * 启动流程实例 | 706 | * 启动流程实例 |
| 706 | */ | 707 | */ |
| 707 | - private void startProcess(ProcessDefinition procDef, Map<String, Object> variables) { | 708 | + private ProcessInstance startProcess(ProcessDefinition procDef, Map<String, Object> variables) { |
| 708 | if (ObjectUtil.isNotNull(procDef) && procDef.isSuspended()) { | 709 | if (ObjectUtil.isNotNull(procDef) && procDef.isSuspended()) { |
| 709 | throw new ServiceException("流程已被挂起,请先激活流程"); | 710 | throw new ServiceException("流程已被挂起,请先激活流程"); |
| 710 | } | 711 | } |
| @@ -718,6 +719,8 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | @@ -718,6 +719,8 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | ||
| 718 | ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDef.getId(), variables); | 719 | ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDef.getId(), variables); |
| 719 | // 第一个用户任务为发起人,则自动完成任务 | 720 | // 第一个用户任务为发起人,则自动完成任务 |
| 720 | wfTaskService.startFirstTask(processInstance, variables); | 721 | wfTaskService.startFirstTask(processInstance, variables); |
| 722 | + | ||
| 723 | + return processInstance; | ||
| 721 | } | 724 | } |
| 722 | 725 | ||
| 723 | 726 |
ruoyi-system/src/main/resources/mapper/compliancemanagement/TblBusinessWorkflowMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.ruoyi.compliancemanagement.mapper.TblBusinessWorkflowMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="com.ruoyi.compliancemanagement.domain.TblBusinessWorkflow" id="TblBusinessWorkflowResult"> | ||
| 8 | + <result property="tableName" column="table_name"/> | ||
| 9 | + <result property="businessId" column="business_id"/> | ||
| 10 | + <result property="procInsId" column="proc_ins_id"/> | ||
| 11 | + <result property="id" column="id"/> | ||
| 12 | + <result property="createBy" column="create_by"/> | ||
| 13 | + <result property="createTime" column="create_time"/> | ||
| 14 | + <result property="updateBy" column="update_by"/> | ||
| 15 | + <result property="updateTime" column="update_time"/> | ||
| 16 | + </resultMap> | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +</mapper> |
| @@ -5,20 +5,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -5,20 +5,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 5 | <mapper namespace="com.ruoyi.compliancemanagement.mapper.TblContractMapper"> | 5 | <mapper namespace="com.ruoyi.compliancemanagement.mapper.TblContractMapper"> |
| 6 | 6 | ||
| 7 | <resultMap type="com.ruoyi.compliancemanagement.domain.TblContract" id="TblContractResult"> | 7 | <resultMap type="com.ruoyi.compliancemanagement.domain.TblContract" id="TblContractResult"> |
| 8 | - <result property="Contractno" column="Contractno"/> | ||
| 9 | - <result property="ContractName" column="ContractName"/> | ||
| 10 | - <result property="ContractType" column="ContractType"/> | ||
| 11 | - <result property="ContractAmount" column="ContractAmount"/> | ||
| 12 | - <result property="EffectiveDate" column="EffectiveDate"/> | ||
| 13 | - <result property="ExpirationDate" column="ExpirationDate"/> | ||
| 14 | - <result property="PartyA" column="PartyA"/> | ||
| 15 | - <result property="PartyB" column="PartyB"/> | ||
| 16 | - <result property="PaymentMethod" column="PaymentMethod"/> | ||
| 17 | - <result property="SigningDate" column="SigningDate"/> | ||
| 18 | - <result property="SubjectInformation" column="SubjectInformation"/> | ||
| 19 | - <result property="Attachments" column="Attachments"/> | ||
| 20 | <result property="id" column="id"/> | 8 | <result property="id" column="id"/> |
| 9 | + <result property="contractno" column="contractno"/> | ||
| 10 | + <result property="contractName" column="contract_name"/> | ||
| 11 | + <result property="contractType" column="contract_type"/> | ||
| 12 | + <result property="contractAmount" column="contract_amount"/> | ||
| 13 | + <result property="effectiveDate" column="effective_date"/> | ||
| 14 | + <result property="expirationDate" column="expiration_date"/> | ||
| 15 | + <result property="partyA" column="party_a"/> | ||
| 16 | + <result property="partyB" column="party_b"/> | ||
| 17 | + <result property="paymentMethod" column="payment_method"/> | ||
| 18 | + <result property="signingDate" column="signing_date"/> | ||
| 19 | + <result property="subjectInformation" column="subject_information"/> | ||
| 20 | + <result property="attachments" column="attachments"/> | ||
| 21 | + <result property="createBy" column="create_by"/> | ||
| 22 | + <result property="createTime" column="create_time"/> | ||
| 23 | + <result property="updateBy" column="update_by"/> | ||
| 24 | + <result property="updateTime" column="update_time"/> | ||
| 25 | + <result property="procInsId" column="proc_ins_id"/> | ||
| 21 | </resultMap> | 26 | </resultMap> |
| 22 | - | ||
| 23 | - | 27 | + <resultMap type="com.ruoyi.compliancemanagement.model.TblContractModel" id="TblContractModelResult"> |
| 28 | + <result property="id" column="id"/> | ||
| 29 | + <result property="contractno" column="contractno"/> | ||
| 30 | + <result property="contractName" column="contract_name"/> | ||
| 31 | + <result property="contractType" column="contract_type"/> | ||
| 32 | + <result property="contractAmount" column="contract_amount"/> | ||
| 33 | + <result property="effectiveDate" column="effective_date"/> | ||
| 34 | + <result property="expirationDate" column="expiration_date"/> | ||
| 35 | + <result property="partyA" column="party_a"/> | ||
| 36 | + <result property="partyB" column="party_b"/> | ||
| 37 | + <result property="paymentMethod" column="payment_method"/> | ||
| 38 | + <result property="signingDate" column="signing_date"/> | ||
| 39 | + <result property="subjectInformation" column="subject_information"/> | ||
| 40 | + <result property="attachments" column="attachments"/> | ||
| 41 | + <result property="createBy" column="create_by"/> | ||
| 42 | + <result property="createTime" column="create_time"/> | ||
| 43 | + <result property="updateBy" column="update_by"/> | ||
| 44 | + <result property="updateTime" column="update_time"/> | ||
| 45 | + <result property="procInsId" column="proc_ins_id"/> | ||
| 46 | + </resultMap> | ||
| 47 | + <select id="selectList" resultMap="TblContractModelResult"> | ||
| 48 | + SELECT | ||
| 49 | + a.id, | ||
| 50 | + a.contractno, | ||
| 51 | + a.contract_name, | ||
| 52 | + a.contract_type, | ||
| 53 | + a.contract_amount, | ||
| 54 | + a.effective_date, | ||
| 55 | + expiration_date, | ||
| 56 | + a.party_a, | ||
| 57 | + a.party_b, | ||
| 58 | + a.payment_method, | ||
| 59 | + a.signing_date, | ||
| 60 | + a.subject_information, | ||
| 61 | + a.attachments, | ||
| 62 | + a.create_by, | ||
| 63 | + a.create_time, | ||
| 64 | + a.update_by, | ||
| 65 | + a.update_time,b.proc_ins_id | ||
| 66 | + FROM | ||
| 67 | + tbl_contract a | ||
| 68 | + LEFT JOIN tbl_business_workflow b ON a.id = b.business_id | ||
| 69 | + where 1=1 | ||
| 70 | + <if test="qc.contractno!=null and qc.contractno !=''"> | ||
| 71 | + and a.contractno like concat('%',#{qc.contractno},'%') | ||
| 72 | + </if> | ||
| 73 | + <if test="qc.contractName!=null and qc.contractName !=''"> | ||
| 74 | + and a.contract_name like concat('%',#{qc.contractName},'%') | ||
| 75 | + </if> | ||
| 76 | + order by a.create_time desc | ||
| 77 | + </select> | ||
| 24 | </mapper> | 78 | </mapper> |
-
请 注册 或 登录 后发表评论