
28 changed files with 2346 additions and 1148 deletions
@ -1,117 +0,0 @@ |
|||||
package com.yxt.supervise.system.flow; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import com.yxt.supervise.system.flow.app.FlowTaskDoQuery; |
|
||||
import com.yxt.supervise.system.flow.app.FlowTaskDoVo; |
|
||||
import com.yxt.supervise.system.flow.app.FlowTaskFinishVo; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
@Component |
|
||||
public class FlowableFallback implements FlowableFeign{ |
|
||||
/* @Override |
|
||||
public ResultBean businessStart(String procDefId, String userSid, Map<String, Object> variables) { |
|
||||
return null; |
|
||||
} |
|
||||
*/ |
|
||||
@Override |
|
||||
public ResultBean processPagerList(Integer pageNum, Integer pageSize) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean myprocess( String userSid, PagerQuery<FlowTaskQuery> taskQueryPagerQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
@Override |
|
||||
public ResultBean todoTaskList(String userSid, PagerQuery<TaskQuery> pQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean readXml(String deployId) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean getFlowViewer(String procInsId) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean doneTaskList(String userSid, PagerQuery<TaskQuery> pQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@Override |
|
||||
public ResultBean revokeProcess(String userSid, String businessSid, FlowTaskVo flowTaskVo) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<FlowRecordVo> flowRecord(String procInsId, String deployId) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<List<PCHistTaskListAndCommentList>> flowRecordAndComment(String procInsId, String deployId) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean taskReject(String businessSid, FlowTaskVo flowTaskVo) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean stopProcess(FlowTaskVo flowTaskVo) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean deleteProcess(String procInsId) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<Page<FlowTaskDto>> todoAllTaskList(String userSid, PagerQuery<FlowTaskAllQuery> pQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<Integer> getTodoNum(String userSid) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<Integer> getTodoNum(String userSid, String orgPath) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<Page<FlowTaskDto>> doneAllTaskList(String userSid, PagerQuery<FlowTaskAllQuery> pQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean getNextTasks(String taskId) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<PagerVo<FlowTaskDoVo>> todoApp(PagerQuery<FlowTaskDoQuery> pagerQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public ResultBean<PagerVo<FlowTaskFinishVo>> finishApp(PagerQuery<FlowTaskDoQuery> pagerQuery) { |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
@ -0,0 +1,80 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.feign.flowable.BusinessVariables; |
||||
|
import com.yxt.supervise.feign.flowable.flowtask.FlowTask; |
||||
|
import com.yxt.supervise.system.sysuser.SysUser; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/16 17:16 |
||||
|
* @description 流程定义 |
||||
|
*/ |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-flowable-FlowDefinition", |
||||
|
name = "supervise-flowable", |
||||
|
path = "/v1/flowable/definition") |
||||
|
public interface FlowDefinitionFeign { |
||||
|
|
||||
|
@ApiOperation(value = "导入流程文件", notes = "上传bpmn20的xml文件") |
||||
|
@PostMapping("/import") |
||||
|
@ResponseBody |
||||
|
public ResultBean importFile(@RequestParam( name ="name", required = false) String name, |
||||
|
@RequestParam(name ="category",required = false) String category, |
||||
|
MultipartFile file); |
||||
|
|
||||
|
@ApiOperation(value = "流程定义分页列表") |
||||
|
@PostMapping("/pagerList") |
||||
|
@ResponseBody |
||||
|
public ResultBean pagerList(@ApiParam(value = "当前页码", required = true) @RequestParam("pageNum") Integer pageNum, |
||||
|
@ApiParam(value = "每页条数", required = true) @RequestParam("pageSize") Integer pageSize); |
||||
|
|
||||
|
/** |
||||
|
* 挂起后,就不可以再开启一个流程实例了,也就是 runtimeService.startProcessInstanceByKey("流程定义ID");会抛出异常 |
||||
|
* 流程定义的挂起,不影响已经启动的流程实例继续 |
||||
|
*/ |
||||
|
@ApiOperation(value = "激活或挂起流程定义") |
||||
|
@PostMapping(value = "/updateState") |
||||
|
public ResultBean updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam("state") Integer state, |
||||
|
@ApiParam(value = "流程部署ID", required = true) @RequestParam("deployId") String deployId); |
||||
|
|
||||
|
@ApiOperation(value = "删除流程") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
@ResponseBody |
||||
|
public ResultBean delete(@ApiParam(value = "流程部署ID", required = true) @RequestParam("deployId") String deployId); |
||||
|
|
||||
|
@ApiOperation(value = "读取xml文件") |
||||
|
@GetMapping("/readXml/{deployId}") |
||||
|
@ResponseBody |
||||
|
public ResultBean readXml(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId); |
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "指定流程办理人员列表") |
||||
|
@GetMapping("/userList") |
||||
|
@ResponseBody |
||||
|
public ResultBean userList(SysUser user); |
||||
|
|
||||
|
@ApiOperation(value = "指定流程办理候选组(角色)") |
||||
|
@GetMapping("/roleList") |
||||
|
@ResponseBody |
||||
|
public ResultBean roleList(); |
||||
|
|
||||
|
@ApiOperation(value = "根据流程定义id启动流程实例") |
||||
|
@PostMapping("/start/{procDefId}") |
||||
|
@ResponseBody |
||||
|
public ResultBean start(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId, |
||||
|
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables); |
||||
|
|
||||
|
@ApiOperation(value = "业务系统发起流程根据流程定义id启动流程实例") |
||||
|
@PostMapping("/businessStart") |
||||
|
@ResponseBody |
||||
|
public ResultBean<FlowTask> businessStart(@ApiParam(value = "请求参数") @RequestBody |
||||
|
BusinessVariables dto); |
||||
|
} |
@ -0,0 +1,117 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.feign.flowable.BusinessVariables; |
||||
|
import com.yxt.supervise.feign.flowable.UpdateFlowFieldVo; |
||||
|
import com.yxt.supervise.feign.flowable.UserAndOrgPath; |
||||
|
import com.yxt.supervise.system.flow.FlowTaskQuery; |
||||
|
import com.yxt.supervise.system.flow.feign.form.FlowTaskVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@Api(tags = "Flowable") |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-flowable-Flowable", |
||||
|
name = "supervise-flowable", |
||||
|
path = "v1/flow") |
||||
|
public interface FlowableFeign { |
||||
|
/** |
||||
|
* 业务系统发起流程申请 |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/businessStart") |
||||
|
public ResultBean businessStart(@RequestBody BusinessVariables bv); |
||||
|
|
||||
|
/** |
||||
|
* 流程定义列表 一般业务中不需要查询该列表 |
||||
|
* |
||||
|
* @param pageNum 页数 |
||||
|
* @param pageSize 容量 |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/processPagerList/{userSid}") |
||||
|
public ResultBean processPagerList(@ApiParam(value = "当前页码", required = true) @RequestParam("pageNum") Integer pageNum, |
||||
|
@ApiParam(value = "每页条数", required = true) @RequestParam("pageSize") Integer pageSize); |
||||
|
|
||||
|
/** |
||||
|
* 我的流程 我发起的流程 |
||||
|
* |
||||
|
* @param userSid 用户sid |
||||
|
* @param taskQueryPagerQuery 查询参数 |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/myprocess/{userSid}") |
||||
|
public ResultBean myprocess(@ApiParam(value = "用户sid") @PathVariable(value = "userSid") String userSid, |
||||
|
@ApiParam(value = "变量集合,json对象") @RequestBody PagerQuery<FlowTaskQuery> taskQueryPagerQuery); |
||||
|
|
||||
|
/** |
||||
|
* 取消申请 |
||||
|
* |
||||
|
* @param flowTaskVo |
||||
|
* @return |
||||
|
*/ |
||||
|
@ApiOperation(value = "取消申请") |
||||
|
@PostMapping(value = "/task/stopProcess") |
||||
|
@ResponseBody |
||||
|
ResultBean stopProcess(@ApiParam(value = "工作流任务相关--请求参数") @RequestBody FlowTaskVo flowTaskVo); |
||||
|
|
||||
|
/** |
||||
|
* 删除流程实例 |
||||
|
* |
||||
|
* @param procInsId 流程实例id |
||||
|
* @return |
||||
|
*/ |
||||
|
@ApiOperation(value = "删除流程实例") |
||||
|
@DeleteMapping(value = "/task/deleteProcess/{procInsId}") |
||||
|
@ResponseBody |
||||
|
ResultBean deleteProcess(@ApiParam(value = "流程实例id") @PathVariable(value = "procInsId") String procInsId); |
||||
|
|
||||
|
/** |
||||
|
* 创建流程实例时取下一环节的用户sid |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
@ApiOperation(value = "创建流程实例时取下一环节的用户sid") |
||||
|
@GetMapping(value = "/getNextNodeUserSidsOfCreate") |
||||
|
@ResponseBody |
||||
|
ResultBean<UserAndOrgPath> getNextNodeUserSidsOfCreate(@RequestBody BusinessVariables bv); |
||||
|
/** |
||||
|
* 提交流程实例时取下一环节的用户sid |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
@ApiOperation(value = "提交流程实例时取下一环节的用户sid") |
||||
|
@GetMapping(value = "/getNextNodeUserSidsOfSubmit") |
||||
|
@ResponseBody |
||||
|
ResultBean<UserAndOrgPath> getNextNodeUserSidsOfSubmit(@RequestBody BusinessVariables bv); |
||||
|
|
||||
|
@ApiOperation(value = "启动流程") |
||||
|
@PostMapping(value = "/startProcess") |
||||
|
@ResponseBody |
||||
|
ResultBean<UpdateFlowFieldVo> startProcess(@RequestBody BusinessVariables dto); |
||||
|
|
||||
|
@ApiOperation(value = "处理流程") |
||||
|
@PostMapping(value = "/handleProsess") |
||||
|
@ResponseBody |
||||
|
ResultBean<UpdateFlowFieldVo> handleProsess(@RequestBody BusinessVariables bv); |
||||
|
|
||||
|
@ApiOperation(value = "撤回流程") |
||||
|
@PostMapping(value = "/revokeProcess") |
||||
|
@ResponseBody |
||||
|
ResultBean<UpdateFlowFieldVo> revokeProcess(@RequestBody FlowTaskVo fl); |
||||
|
|
||||
|
@ApiOperation(value = "驳回流程") |
||||
|
@PostMapping(value = "/taskReject") |
||||
|
@ResponseBody |
||||
|
ResultBean<UpdateFlowFieldVo> taskReject(@RequestBody FlowTaskVo fl); |
||||
|
|
||||
|
@ApiOperation(value = "终止流程") |
||||
|
@PostMapping(value = "/breakProcess") |
||||
|
@ResponseBody |
||||
|
ResultBean<UpdateFlowFieldVo> breakProcess(@RequestBody FlowTaskVo fl); |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.system.flow.feign.form.ProcessCommentDetailsVo; |
||||
|
import com.yxt.supervise.system.flow.feign.form.ProcessCommentDto; |
||||
|
import com.yxt.supervise.system.flow.feign.form.ProcessCommentQuery; |
||||
|
import com.yxt.supervise.system.flow.feign.form.ProcessCommentVo; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* Project: processcomment(流程评论) <br/> |
||||
|
* File: ProcessCommentFeign.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.processcomment.api.processcomment.ProcessCommentFeign <br/> |
||||
|
* Description: process_comment. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2023-01-30 14:40:37 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@FeignClient( |
||||
|
contextId = "processcomment-ProcessComment", |
||||
|
name = "supervise-flowable", |
||||
|
path = "v1/processcomment") |
||||
|
public interface ProcessCommentFeign { |
||||
|
|
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
@ResponseBody |
||||
|
public ResultBean<PagerVo<ProcessCommentVo>> listPage(@RequestBody PagerQuery<ProcessCommentQuery> pq); |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
@ResponseBody |
||||
|
public ResultBean save(@RequestBody ProcessCommentDto dto); |
||||
|
|
||||
|
@ApiOperation("根据sid删除记录") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
@ResponseBody |
||||
|
public ResultBean delBySids(@RequestBody String[] sids); |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
@ResponseBody |
||||
|
public ResultBean<ProcessCommentDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
||||
|
@ApiOperation("根据流程实列的id获取流程相关的评论") |
||||
|
@GetMapping("/getCommentList/{processId}") |
||||
|
@ResponseBody |
||||
|
ResultBean<List<ProcessCommentVo>> getCommentList(@PathVariable("processId")String processId); |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.system.flow.feign.form.SysFormLinkDto; |
||||
|
import com.yxt.supervise.system.flow.feign.form.SysFormStateVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-flowable(流程引擎) <br/> |
||||
|
* File: SysFormLinkFeign.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.sysformlink.SysFormLinkFeign <br/> |
||||
|
* Description: 流程业务关联表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-03-15 16:55:39 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "流程业务关联表") |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-flowable-SysFormLink", |
||||
|
name = "supervise-flowable", |
||||
|
path = "v1/sysformlink") |
||||
|
public interface SysFormLinkFeign { |
||||
|
|
||||
|
@ApiOperation("保存流程业务关联表(任务发起时)") |
||||
|
@PostMapping("/save") |
||||
|
ResultBean save(@Valid @RequestBody SysFormLinkDto dto); |
||||
|
|
||||
|
@ApiOperation("根据业务sid查询节点状态") |
||||
|
@GetMapping("/selectStateByBusinessSid/{business}") |
||||
|
ResultBean<SysFormStateVo> selectStateByBusinessSid(@PathVariable("business") String business); |
||||
|
|
||||
|
@ApiOperation("更新关联表节点状态属性") |
||||
|
@PostMapping("/updateFiled") |
||||
|
ResultBean updateFiled(@RequestBody Map<String, Object> map); |
||||
|
|
||||
|
@ApiOperation("更新关联表节点状态属性") |
||||
|
@PostMapping("/selectByBusinessSid/{sid}") |
||||
|
ResultBean selectByBusinessSid(@PathVariable("sid") String sid); |
||||
|
} |
@ -0,0 +1,90 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.system.flow.SysProUrlVo; |
||||
|
import com.yxt.supervise.system.flow.feign.form.*; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@FeignClient( |
||||
|
contextId = "supervise-flowable-SysProUrlFeign", |
||||
|
name = "supervise-flowable", |
||||
|
path = "v1/flowable/proUrl") |
||||
|
public interface SysProUrlFeign { |
||||
|
/** |
||||
|
* 查询流程业务表单url对 象 |
||||
|
*/ |
||||
|
@PostMapping("/list") |
||||
|
public ResultBean<PagerVo<SysProUrlVo>> list(@RequestBody PagerQuery<SysProUrlQuery> pq); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取流程业务表单url对象 |
||||
|
*/ |
||||
|
@GetMapping(value = "/getSysProUrl/{formId}") |
||||
|
public ResultBean getSysProUrl(@PathVariable("formId") int formId); |
||||
|
|
||||
|
/** |
||||
|
* 根据流程实例id获取form信息 |
||||
|
*/ |
||||
|
@GetMapping(value = "/getForm/{proId}") |
||||
|
public ResultBean getForm(@PathVariable("proId") String proId); |
||||
|
|
||||
|
/** |
||||
|
* 新增流程业务表单url对象 |
||||
|
*/ |
||||
|
@PostMapping(value = "/add") |
||||
|
public ResultBean<String> add(@SpringQueryMap SysProUrlDto dto); |
||||
|
|
||||
|
/** |
||||
|
* 删除流程业务表单url对象 |
||||
|
*/ |
||||
|
@DeleteMapping("/{formIds}") |
||||
|
public ResultBean<String> remove(@PathVariable("formIds") Long[] formIds); |
||||
|
|
||||
|
@ApiOperation("pc根据流程定义id,节点id,终端及类型查询流程与业务表单url") |
||||
|
@PostMapping("/selectPcUrlByTaskDefKey") |
||||
|
ResultBean<PcUrlVo> selectPcUrlByTaskDefKey(@Valid @RequestBody SysProUrlQuery query); |
||||
|
|
||||
|
@ApiOperation("app根据流程定义id,节点id,终端及类型查询流程与业务表单url") |
||||
|
@PostMapping("/selectAppUrlByTaskDefKey") |
||||
|
ResultBean<AppUrlVo> selectAppUrlByTaskDefKey(@Valid @RequestBody AppSysProUrlQuery query); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* pc根据流程定义id,节点id,终端及类型查询流程与业务表单url |
||||
|
* |
||||
|
* @param procDefId 流程定义id |
||||
|
* @param taskDefKey 节点id |
||||
|
* @param type 类型:1办理,2详情 |
||||
|
* @return |
||||
|
*/ |
||||
|
@ApiOperation("查询流程与业务表单的url") |
||||
|
@GetMapping("/selectUrlByKey") |
||||
|
ResultBean<List<SysProUrlVo>> selectUrlByKey(@ApiParam(value = "流程定义id") @RequestParam(value = "procDefId") String procDefId, |
||||
|
@ApiParam(value = "节点id") @RequestParam(value = "taskDefKey") String taskDefKey, |
||||
|
@ApiParam(value = "类型:1办理,2详情") @RequestParam(value = "type") String type); |
||||
|
/** |
||||
|
* pc根据流程定义id,节点id,终端及类型查询流程与业务表单url |
||||
|
* |
||||
|
* @param procDefId 流程定义id |
||||
|
* @param taskDefKey 节点id |
||||
|
* @param type 类型:1办理,2详情 |
||||
|
* @return |
||||
|
*/ |
||||
|
@ApiOperation("查询流程与业务表单的url") |
||||
|
@GetMapping("/selectUrlByKeyWithTerminal") |
||||
|
ResultBean<SysProUrlVo> selectUrlByKey(@ApiParam(value = "流程定义id") @RequestParam(value = "procDefId") String procDefId, |
||||
|
@ApiParam(value = "节点id") @RequestParam(value = "taskDefKey") String taskDefKey, |
||||
|
@ApiParam(value = "类型:1办理,2详情") @RequestParam(value = "type") String type |
||||
|
,@ApiParam(value = "终端:1pc,2移动") @RequestParam(value = "terminal") String terminal); |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @author liuguohui |
||||
|
* @version 1.0 |
||||
|
* @description |
||||
|
* @date 2022/03/18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AppSysProUrlQuery extends SysProUrlQuery{ |
||||
|
|
||||
|
@NotBlank(message = "业务sid不能为空") |
||||
|
private String businessSid; |
||||
|
|
||||
|
@NotBlank(message = "任务id不能为空") |
||||
|
private String taskId; |
||||
|
|
||||
|
@NotBlank(message = "流程部署编号不能为空") |
||||
|
private String deployId; |
||||
|
|
||||
|
@NotBlank(message = "流程实例id不能为空") |
||||
|
private String procInsId; |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author liuguohui |
||||
|
* @version 1.0 |
||||
|
* @description |
||||
|
* @date 2022/03/18 |
||||
|
*/ |
||||
|
@ApiModel("app端待办、已办返回url") |
||||
|
@Data |
||||
|
public class AppUrlVo implements Vo { |
||||
|
|
||||
|
@ApiModelProperty(name = "app路径") |
||||
|
private String path; |
||||
|
|
||||
|
@ApiModelProperty(name = "插件名称") |
||||
|
private String modulePluginName; |
||||
|
|
||||
|
@ApiModelProperty(name = "插件版本") |
||||
|
private Integer moduleVersion; |
||||
|
|
||||
|
@ApiModelProperty(name = "msgSid") |
||||
|
private String msgSid; |
||||
|
|
||||
|
@ApiModelProperty(name = "json 串(procInsId,businessSid,deployId,taskId)") |
||||
|
private String json; |
||||
|
|
||||
|
@ApiModelProperty(name = "类型,0.内置Activity 1.内置WebView 2.RePlugin插件") |
||||
|
private String type; |
||||
|
|
||||
|
@ApiModelProperty(name = "跳转实体类路径") |
||||
|
private String moduleAction; |
||||
|
|
||||
|
@ApiModelProperty(name = "moduleSid") |
||||
|
private String moduleSid; |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
import java.util.HashMap; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-parent <br/> |
||||
|
* File: FlowDefinitionFeignDTO.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.flowdefinition.FlowDefinitionFeignDTO <br/> |
||||
|
* Description: <描述类的功能>. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2021/10/25 上午11:47 <br/> |
||||
|
* |
||||
|
* @author popo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
public class FlowDefinitionFeignBusinessStartDTO { |
||||
|
|
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String procDefId; |
||||
|
@ApiModelProperty("用户sid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private Map<String, Object> variables = new HashMap<>(); |
||||
|
|
||||
|
public String getProcDefId() { |
||||
|
return procDefId; |
||||
|
} |
||||
|
|
||||
|
public void setProcDefId(String procDefId) { |
||||
|
this.procDefId = procDefId; |
||||
|
} |
||||
|
|
||||
|
public String getUserSid() { |
||||
|
return userSid; |
||||
|
} |
||||
|
|
||||
|
public void setUserSid(String userSid) { |
||||
|
this.userSid = userSid; |
||||
|
} |
||||
|
|
||||
|
public Map<String, Object> getVariables() { |
||||
|
return variables; |
||||
|
} |
||||
|
|
||||
|
public void setVariables(Map<String, Object> variables) { |
||||
|
this.variables = variables; |
||||
|
} |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* <p>流程任务<p> |
||||
|
* |
||||
|
* @author XuanXuan |
||||
|
* @date 2021-04-03 |
||||
|
*/ |
||||
|
@ApiModel("工作流任务相关--请求参数") |
||||
|
@Data |
||||
|
public class FlowTaskVo { |
||||
|
|
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("业务sid") |
||||
|
private String businessSid; |
||||
|
@ApiModelProperty("用户Id") |
||||
|
private String userId; |
||||
|
@ApiModelProperty("用户Sid") |
||||
|
private String userSid; |
||||
|
|
||||
|
@ApiModelProperty("任务意见") |
||||
|
private String comment; |
||||
|
|
||||
|
@ApiModelProperty("流程实例Id") |
||||
|
private String instanceId; |
||||
|
|
||||
|
@ApiModelProperty("节点") |
||||
|
private String targetKey; |
||||
|
|
||||
|
@ApiModelProperty("流程变量信息") |
||||
|
private Map<String, Object> values=new HashMap<>(); |
||||
|
|
||||
|
@ApiModelProperty("审批人") |
||||
|
private String assignee; |
||||
|
|
||||
|
@ApiModelProperty("候选人") |
||||
|
private List<String> candidateUsers; |
||||
|
|
||||
|
@ApiModelProperty("审批组") |
||||
|
private List<String> candidateGroups; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author liuguohui |
||||
|
* @version 1.0 |
||||
|
* @description |
||||
|
* @date 2022/03/18 |
||||
|
*/ |
||||
|
@ApiModel("pc端待办、已办返回url") |
||||
|
@Data |
||||
|
public class PcUrlVo implements Vo { |
||||
|
|
||||
|
@ApiModelProperty(name = "url") |
||||
|
private String url; |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* Project: processcomment(流程评论) <br/> |
||||
|
* File: ProcessComment.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.processcomment.api.processcomment.ProcessComment <br/> |
||||
|
* Description: process_comment. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2023-01-30 14:40:37 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "process_comment", description = "process_comment") |
||||
|
@TableName("process_comment") |
||||
|
public class ProcessComment extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("评论人") |
||||
|
private String reviewer; // 评论人
|
||||
|
@ApiModelProperty("评论人sid") |
||||
|
private String reviewerSid; // 评论人sid
|
||||
|
@ApiModelProperty("评论时间") |
||||
|
private Date time; // 评论时间
|
||||
|
@ApiModelProperty("评论内容") |
||||
|
private String content; // 评论内容
|
||||
|
@ApiModelProperty("评论的流程id") |
||||
|
private String processId; // 评论的流程id
|
||||
|
@ApiModelProperty("评论的流程实列的sid") |
||||
|
private String processInstSid; // 评论的流程实列的sid
|
||||
|
|
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* Project: processcomment(流程评论) <br/> |
||||
|
* File: ProcessCommentVo.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.processcomment.api.processcomment.ProcessCommentVo <br/> |
||||
|
* Description: process_comment 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2023-01-30 14:40:37 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "process_comment 视图数据详情", description = "process_comment 视图数据详情") |
||||
|
public class ProcessCommentDetailsVo implements Vo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("评论人") |
||||
|
private String reviewer; // 评论人
|
||||
|
@ApiModelProperty("评论人sid") |
||||
|
private String reviewerSid; // 评论人sid
|
||||
|
@ApiModelProperty("评论时间") |
||||
|
private Date time; // 评论时间
|
||||
|
@ApiModelProperty("评论内容") |
||||
|
private String content; // 评论内容
|
||||
|
@ApiModelProperty("评论的流程id") |
||||
|
private String processId; // 评论的流程id
|
||||
|
@ApiModelProperty("评论的流程实列的sid") |
||||
|
private String processInstSid; // 评论的流程实列的sid
|
||||
|
|
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* Project: processcomment(流程评论) <br/> |
||||
|
* File: ProcessCommentDto.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.processcomment.api.processcomment.ProcessCommentDto <br/> |
||||
|
* Description: process_comment 数据传输对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2023-01-30 14:40:37 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "process_comment 数据传输对象", description = "process_comment 数据传输对象") |
||||
|
public class ProcessCommentDto implements Dto { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("评论人") |
||||
|
private String reviewer; // 评论人
|
||||
|
@ApiModelProperty("评论人sid") |
||||
|
private String reviewerSid; // 评论人sid
|
||||
|
@ApiModelProperty("评论时间") |
||||
|
private Date time; // 评论时间
|
||||
|
@ApiModelProperty("评论内容") |
||||
|
private String content; // 评论内容
|
||||
|
@ApiModelProperty("评论的流程id") |
||||
|
private String processId; // 评论的流程id
|
||||
|
@ApiModelProperty("评论的流程实列的sid") |
||||
|
private String processInstSid; // 评论的流程实列的sid
|
||||
|
|
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* Project: processcomment(流程评论) <br/> |
||||
|
* File: ProcessCommentQuery.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.processcomment.api.processcomment.ProcessCommentQuery <br/> |
||||
|
* Description: process_comment 查询条件. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2023-01-30 14:40:37 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "process_comment 查询条件", description = "process_comment 查询条件") |
||||
|
public class ProcessCommentQuery implements Query { |
||||
|
|
||||
|
@ApiModelProperty("评论人") |
||||
|
private String reviewer; // 评论人
|
||||
|
@ApiModelProperty("评论人sid") |
||||
|
private String reviewerSid; // 评论人sid
|
||||
|
@ApiModelProperty("评论时间") |
||||
|
private Date time; // 评论时间
|
||||
|
@ApiModelProperty("评论内容") |
||||
|
private String content; // 评论内容
|
||||
|
@ApiModelProperty("评论的流程id") |
||||
|
private String processId; // 评论的流程id
|
||||
|
@ApiModelProperty("评论的流程实列的sid") |
||||
|
private String processInstSid; // 评论的流程实列的sid
|
||||
|
|
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import com.yxt.supervise.feign.flowable.flowtask.AppUserVo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* Project: processcomment(流程评论) <br/> |
||||
|
* File: ProcessCommentVo.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.processcomment.api.processcomment.ProcessCommentVo <br/> |
||||
|
* Description: process_comment 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2023-01-30 14:40:37 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "process_comment 视图数据对象", description = "process_comment 视图数据对象") |
||||
|
public class ProcessCommentVo implements Vo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("评论人") |
||||
|
private String reviewer; // 评论人
|
||||
|
@ApiModelProperty("评论人sid") |
||||
|
private String reviewerSid; // 评论人sid
|
||||
|
@ApiModelProperty("评论时间") |
||||
|
private Date time; // 评论时间
|
||||
|
@ApiModelProperty("评论内容") |
||||
|
private String content; // 评论内容
|
||||
|
@ApiModelProperty("评论的流程id") |
||||
|
private String processId; // 评论的流程id
|
||||
|
@ApiModelProperty("评论的流程实列的sid") |
||||
|
private String processInstSid; // 评论的流程实列的sid
|
||||
|
@ApiModelProperty("taskUserInfo") |
||||
|
private AppUserVo taskUserInfo; // AppUserVo
|
||||
|
|
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-flowable(流程引擎) <br/> |
||||
|
* File: SysFormLinkDto.java <br/> |
||||
|
* Class: com.yxt.anrui.flowable.api.sysformlink.SysFormLinkDto <br/> |
||||
|
* Description: 流程业务关联表 数据传输对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-03-15 16:55:39 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "流程业务关联表 数据传输对象", description = "流程业务关联表 数据传输对象") |
||||
|
@Data |
||||
|
public class SysFormLinkDto implements Dto { |
||||
|
|
||||
|
|
||||
|
@ApiModelProperty("业务sid") |
||||
|
@NotBlank(message = "业务sid不能为空") |
||||
|
private String businessSid; |
||||
|
|
||||
|
@ApiModelProperty("流程实例id") |
||||
|
@NotBlank(message = "流程实例不能为空") |
||||
|
private String procInsId; |
||||
|
|
||||
|
@ApiModelProperty("节点id") |
||||
|
private String taskDefKey; |
||||
|
|
||||
|
@ApiModelProperty("节点状态") |
||||
|
@NotBlank(message = "节点状态不能为空") |
||||
|
private String nodeState; |
||||
|
|
||||
|
@ApiModelProperty("状态判断:0未提交,1办理中, 2已办结, -1退回到发起人,-2终止") |
||||
|
private Integer flowState; |
||||
|
|
||||
|
@ApiModelProperty("业务类型") |
||||
|
@NotBlank(message = "业务类型") |
||||
|
private String formType; |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author liuguohui |
||||
|
* @version 1.0 |
||||
|
* @description |
||||
|
* @date 2022/03/15 |
||||
|
*/ |
||||
|
@ApiModel("流程状态") |
||||
|
@Data |
||||
|
public class SysFormStateVo implements Vo { |
||||
|
|
||||
|
@ApiModelProperty("节点状态") |
||||
|
private String nodeState; |
||||
|
|
||||
|
@ApiModelProperty("状态判断:0未提交,1办理中, 2已办结, -1退回到发起人,-2终止") |
||||
|
private Integer flowState; |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* <p>流程业务表单url对象<p> |
||||
|
*/ |
||||
|
@ApiModel("流程业务表单url对象") |
||||
|
@Data |
||||
|
public class SysProUrlDto implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -2191041848170198498L; |
||||
|
@ApiModelProperty(value = "sid") |
||||
|
private String sid; |
||||
|
/** |
||||
|
* url |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "办理或详情的url") |
||||
|
private String url; |
||||
|
|
||||
|
/** |
||||
|
* 类型办理或者详情 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "办理:1,详情2") |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 终端:pc/mobile |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "pc端:1,移动端2") |
||||
|
private String terminal; |
||||
|
/** |
||||
|
* 名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String title; |
||||
|
/** |
||||
|
* 流程定义id |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "流程定义id") |
||||
|
private String proc_def_id; |
||||
|
|
||||
|
/** |
||||
|
* 节点 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
private String taskDefKey; |
||||
|
|
||||
|
/** |
||||
|
* app插件名称(模块名称) |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "app版本sid#类型(1框架2插件)") |
||||
|
private String modulePluginName; |
||||
|
|
||||
|
@ApiModelProperty(value = "环节名称") |
||||
|
private String taskName; |
||||
|
|
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.yxt.supervise.system.flow.feign.form; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 流程表单对象 sys_task_form |
||||
|
* |
||||
|
* @author XuanXuan Xuan |
||||
|
* @date 2021-03-30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SysProUrlQuery implements Query { |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 表单主键 |
||||
|
*/ |
||||
|
private String url; |
||||
|
|
||||
|
/** |
||||
|
* 类型办理或者详情 |
||||
|
*/ |
||||
|
@NotBlank(message = "类型不能为空") |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 终端:pc/mobile |
||||
|
*/ |
||||
|
private String terminal; |
||||
|
/** |
||||
|
* 表单id |
||||
|
*/ |
||||
|
private String formId; |
||||
|
/** |
||||
|
* 名称 |
||||
|
*/ |
||||
|
private String title; |
||||
|
/** |
||||
|
* 流程定义id |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "流程定义id") |
||||
|
@NotBlank(message = "流程定义id不能为空") |
||||
|
private String proc_def_id; |
||||
|
|
||||
|
/** |
||||
|
* 节点 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "节点id") |
||||
|
@NotBlank(message = "节点id不能为空") |
||||
|
private String taskDefKey; |
||||
|
|
||||
|
/** |
||||
|
* app插件名称(模块名称) |
||||
|
*/ |
||||
|
private String modulePluginName; |
||||
|
} |
@ -1,100 +1,100 @@ |
|||||
//package com.yxt.supervise.system.purchasingrequisition;
|
package com.yxt.supervise.system.purchasingrequisition; |
||||
//
|
|
||||
//import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil; |
||||
//import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
|
import com.yxt.common.core.query.PagerQuery; |
||||
//import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
|
import com.yxt.common.core.result.ResultBean; |
||||
//import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.vo.PagerVo; |
||||
//import com.yxt.common.core.result.ResultBean;
|
import com.yxt.supervise.feign.flowable.BusinessVariables; |
||||
//import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.supervise.feign.flowable.utils.ProcDefEnum; |
||||
//import com.yxt.supervise.system.flow.GetNodeQuery;
|
import com.yxt.supervise.system.flow.GetNodeQuery; |
||||
//import com.yxt.supervise.system.flow.GetNodeVo;
|
import com.yxt.supervise.system.flow.GetNodeVo; |
||||
//import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api; |
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
//import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller; |
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
//
|
|
||||
//import java.util.List;
|
import java.util.List; |
||||
//
|
|
||||
///**
|
/** |
||||
// * @Author dimengzhe
|
* @Author dimengzhe |
||||
// * @Date 2023/1/30 14:23
|
* @Date 2023/1/30 14:23 |
||||
// * @Description
|
* @Description |
||||
// */
|
*/ |
||||
//@Controller
|
@Controller |
||||
//@RequestMapping("v1/pr")
|
@RequestMapping("v1/pr") |
||||
//@Api(tags = "采购信息")
|
@Api(tags = "采购信息") |
||||
//public class PurchasingRequisitionRest implements PurchasingRequisitionFeign {
|
public class PurchasingRequisitionRest implements PurchasingRequisitionFeign { |
||||
//
|
|
||||
// @Autowired
|
@Autowired |
||||
// private PurchasingRequisitionService purchasingRequisitionService;
|
private PurchasingRequisitionService purchasingRequisitionService; |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean<PagerVo<PurchasingRequisitionVo>> listPage(PagerQuery<PurchasingRequisitionQuery> pq) {
|
public ResultBean<PagerVo<PurchasingRequisitionVo>> listPage(PagerQuery<PurchasingRequisitionQuery> pq) { |
||||
// ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail(); |
||||
// PagerVo<PurchasingRequisitionVo> pv = purchasingRequisitionService.listPageVo(pq);
|
PagerVo<PurchasingRequisitionVo> pv = purchasingRequisitionService.listPageVo(pq); |
||||
// return rb.success().setData(pv);
|
return rb.success().setData(pv); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean save(PurchasingRequisitionDto dto) {
|
public ResultBean save(PurchasingRequisitionDto dto) { |
||||
// ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail(); |
||||
// purchasingRequisitionService.saveOrUpdateDto(dto);
|
purchasingRequisitionService.saveOrUpdateDto(dto); |
||||
// return rb.success();
|
return rb.success(); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean submit(PurchasingRequisitionDto dto) {
|
public ResultBean submit(PurchasingRequisitionDto dto) { |
||||
// ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail(); |
||||
// purchasingRequisitionService.submit(dto);
|
purchasingRequisitionService.submit(dto); |
||||
// return rb.success();
|
return rb.success(); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean delBySids(String[] sids) {
|
public ResultBean delBySids(String[] sids) { |
||||
// ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail(); |
||||
// if (sids == null || sids.length == 0) {
|
if (sids == null || sids.length == 0) { |
||||
// return rb.setMsg("删除失败,虚拟订单sid不能为空!");
|
return rb.setMsg("删除失败,虚拟订单sid不能为空!"); |
||||
// }
|
} |
||||
// return purchasingRequisitionService.deleteBySids(sids);
|
return purchasingRequisitionService.deleteBySids(sids); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean<PurchasingRequisitionDetailsVo> fetchDetailsBySid(String sid) {
|
public ResultBean<PurchasingRequisitionDetailsVo> fetchDetailsBySid(String sid) { |
||||
// ResultBean<PurchasingRequisitionDetailsVo> resultBean = ResultBean.fireFail();
|
ResultBean<PurchasingRequisitionDetailsVo> resultBean = ResultBean.fireFail(); |
||||
// PurchasingRequisitionDetailsVo vo = purchasingRequisitionService.fetchDetailsBySid(sid);
|
PurchasingRequisitionDetailsVo vo = purchasingRequisitionService.fetchDetailsBySid(sid); |
||||
// return resultBean.success().setData(vo);
|
return resultBean.success().setData(vo); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean complete(PrVariables bv) {
|
public ResultBean complete(PrVariables bv) { |
||||
// bv.setModelId(ProcDefEnum.PR.getProDefId());
|
bv.setModelId(ProcDefEnum.PR.getProDefId()); |
||||
// BusinessVariables b=new BusinessVariables();
|
BusinessVariables b=new BusinessVariables(); |
||||
// BeanUtil.copyProperties(bv,b);
|
BeanUtil.copyProperties(bv,b); |
||||
// return purchasingRequisitionService.complete(b);
|
return purchasingRequisitionService.complete(b); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) {
|
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) { |
||||
// return purchasingRequisitionService.getPreviousNodesForReject(query);
|
return purchasingRequisitionService.getPreviousNodesForReject(query); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) {
|
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) { |
||||
// return purchasingRequisitionService.getNextNodesForSubmit(query);
|
return purchasingRequisitionService.getNextNodesForSubmit(query); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean taskReject(PurchasingRequisitionQuery query) {
|
public ResultBean taskReject(PurchasingRequisitionQuery query) { |
||||
// return purchasingRequisitionService.taskReject(query);
|
return purchasingRequisitionService.taskReject(query); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean revokeProcess(PurchasingRequisitionQuery query) {
|
public ResultBean revokeProcess(PurchasingRequisitionQuery query) { |
||||
// return purchasingRequisitionService.revokeProcess(query);
|
return purchasingRequisitionService.revokeProcess(query); |
||||
// }
|
} |
||||
//
|
|
||||
// @Override
|
@Override |
||||
// public ResultBean breakProcess(PurchasingRequisitionQuery query) {
|
public ResultBean breakProcess(PurchasingRequisitionQuery query) { |
||||
// return purchasingRequisitionService.breakProcess(query);
|
return purchasingRequisitionService.breakProcess(query); |
||||
// }
|
} |
||||
//}
|
} |
||||
|
@ -1,410 +1,409 @@ |
|||||
//package com.yxt.supervise.system.purchasingrequisition;
|
package com.yxt.supervise.system.purchasingrequisition; |
||||
//
|
|
||||
//import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil; |
||||
//import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil; |
||||
//import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON; |
||||
//import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject; |
||||
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
//import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
||||
//import com.yxt.anrui.flowable.api.flow.FlowableFeign;
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
//import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
|
import com.yxt.common.base.utils.PagerUtil; |
||||
//import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign;
|
import com.yxt.common.core.query.PagerQuery; |
||||
//import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo;
|
import com.yxt.common.core.result.ResultBean; |
||||
//import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo;
|
import com.yxt.common.core.vo.PagerVo; |
||||
//import com.yxt.anrui.flowable.api.sysformlink.SysFormLinkFeign;
|
import com.yxt.supervise.feign.flowable.BusinessVariables; |
||||
//import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
|
import com.yxt.supervise.feign.flowable.UpdateFlowFieldVo; |
||||
//import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
|
import com.yxt.supervise.feign.flowable.flowtask.FlowTaskFeign; |
||||
//import com.yxt.common.base.service.MybatisBaseService;
|
import com.yxt.supervise.feign.flowable.utils.ProcDefEnum; |
||||
//import com.yxt.common.base.utils.PagerUtil;
|
import com.yxt.supervise.system.flow.GetNodeQuery; |
||||
//import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.supervise.system.flow.GetNodeVo; |
||||
//import com.yxt.common.core.result.ResultBean;
|
import com.yxt.supervise.system.flow.feign.FlowableFeign; |
||||
//import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.supervise.system.flow.feign.SysFormLinkFeign; |
||||
//import com.yxt.supervise.system.flow.GetNodeQuery;
|
import com.yxt.supervise.system.flow.feign.form.FlowTaskVo; |
||||
//import com.yxt.supervise.system.flow.GetNodeVo;
|
import com.yxt.supervise.system.region.Region; |
||||
//import com.yxt.supervise.system.region.Region;
|
import com.yxt.supervise.system.region.RegionListVo; |
||||
//import com.yxt.supervise.system.region.RegionListVo;
|
import com.yxt.supervise.system.sysstaffinfo.SysStaffinfoService; |
||||
//import com.yxt.supervise.system.sysstaffinfo.SysStaffinfoService;
|
import com.yxt.supervise.system.sysuser.SysUserService; |
||||
//import com.yxt.supervise.system.sysuser.SysUserService;
|
import com.yxt.supervise.system.sysuser.SysUserVo; |
||||
//import com.yxt.supervise.system.sysuser.SysUserVo;
|
import lombok.extern.slf4j.Slf4j; |
||||
//import lombok.extern.slf4j.Slf4j;
|
import org.apache.commons.lang3.StringUtils; |
||||
//import org.apache.commons.lang3.StringUtils;
|
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
||||
//import org.apache.tomcat.util.threads.ThreadPoolExecutor;
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service; |
||||
//import org.springframework.stereotype.Service;
|
|
||||
//
|
import java.util.*; |
||||
//import java.util.*;
|
import java.util.concurrent.*; |
||||
//import java.util.concurrent.*;
|
import java.util.stream.Collectors; |
||||
//import java.util.stream.Collectors;
|
|
||||
//
|
/** |
||||
///**
|
* @Author dimengzhe |
||||
// * @Author dimengzhe
|
* @Date 2023/1/30 14:24 |
||||
// * @Date 2023/1/30 14:24
|
* @Description |
||||
// * @Description
|
*/ |
||||
// */
|
@Slf4j |
||||
//@Slf4j
|
@Service |
||||
//@Service
|
public class PurchasingRequisitionService extends MybatisBaseService<PurchasingRequisitionMapper, PurchasingRequisition> { |
||||
//public class PurchasingRequisitionService extends MybatisBaseService<PurchasingRequisitionMapper, PurchasingRequisition> {
|
|
||||
//
|
@Autowired |
||||
// @Autowired
|
private FlowTaskFeign flowTaskFeign; |
||||
// private FlowTaskFeign flowTaskFeign;
|
|
||||
//
|
@Autowired |
||||
// @Autowired
|
private FlowableFeign flowableFeign; |
||||
// private FlowableFeign flowableFeign;
|
@Autowired |
||||
// @Autowired
|
private SysStaffinfoService sysStaffinfoService; |
||||
// private SysStaffinfoService sysStaffinfoService;
|
@Autowired |
||||
// @Autowired
|
private SysUserService sysUserService; |
||||
// private SysUserService sysUserService;
|
@Autowired |
||||
// @Autowired
|
private SysFormLinkFeign sysFormLinkFeign; |
||||
// private SysFormLinkFeign sysFormLinkFeign;
|
public ResultBean saveOrUpdateDto(PurchasingRequisitionDto dto) { |
||||
// public ResultBean saveOrUpdateDto(PurchasingRequisitionDto dto) {
|
ResultBean rb = ResultBean.fireFail(); |
||||
// ResultBean rb = ResultBean.fireFail();
|
String sid = dto.getSid(); |
||||
// String sid = dto.getSid();
|
if (StringUtils.isBlank(sid)) { |
||||
// if (StringUtils.isBlank(sid)) {
|
PurchasingRequisition productInformation = new PurchasingRequisition(); |
||||
// PurchasingRequisition productInformation = new PurchasingRequisition();
|
BeanUtil.copyProperties(dto, productInformation, "sid"); |
||||
// BeanUtil.copyProperties(dto, productInformation, "sid");
|
baseMapper.insert(productInformation); |
||||
// baseMapper.insert(productInformation);
|
} else { |
||||
// } else {
|
PurchasingRequisition productInformation = fetchBySid(sid); |
||||
// PurchasingRequisition productInformation = fetchBySid(sid);
|
if (productInformation == null) { |
||||
// if (productInformation == null) {
|
return rb.setMsg("该商品档案不存在"); |
||||
// return rb.setMsg("该商品档案不存在");
|
} |
||||
// }
|
BeanUtil.copyProperties(dto, productInformation, "sid"); |
||||
// BeanUtil.copyProperties(dto, productInformation, "sid");
|
baseMapper.updateById(productInformation); |
||||
// baseMapper.updateById(productInformation);
|
} |
||||
// }
|
return rb.success(); |
||||
// return rb.success();
|
} |
||||
// }
|
public ResultBean submit(PurchasingRequisitionDto dto) { |
||||
// public ResultBean submit(PurchasingRequisitionDto dto) {
|
ResultBean rb = ResultBean.fireFail(); |
||||
// ResultBean rb = ResultBean.fireFail();
|
String sid = dto.getSid(); |
||||
// String sid = dto.getSid();
|
String taskid=""; |
||||
// String taskid="";
|
if (StringUtils.isBlank(sid)) { |
||||
// if (StringUtils.isBlank(sid)) {
|
PurchasingRequisition productInformation = new PurchasingRequisition(); |
||||
// PurchasingRequisition productInformation = new PurchasingRequisition();
|
BeanUtil.copyProperties(dto, productInformation, "sid"); |
||||
// BeanUtil.copyProperties(dto, productInformation, "sid");
|
dto.setSid(productInformation.getSid()); |
||||
// dto.setSid(productInformation.getSid());
|
baseMapper.insert(productInformation); |
||||
// baseMapper.insert(productInformation);
|
} else { |
||||
// } else {
|
PurchasingRequisition productInformation = fetchBySid(sid); |
||||
// PurchasingRequisition productInformation = fetchBySid(sid);
|
taskid=productInformation.getTaskId(); |
||||
// taskid=productInformation.getTaskId();
|
if (productInformation == null) { |
||||
// if (productInformation == null) {
|
return rb.setMsg("该商品档案不存在"); |
||||
// return rb.setMsg("该商品档案不存在");
|
} |
||||
// }
|
BeanUtil.copyProperties(dto, productInformation, "sid"); |
||||
// BeanUtil.copyProperties(dto, productInformation, "sid");
|
baseMapper.updateById(productInformation); |
||||
// baseMapper.updateById(productInformation);
|
} |
||||
// }
|
if (StringUtils.isBlank(taskid)) { |
||||
// if (StringUtils.isBlank(taskid)) {
|
startProcess(dto); |
||||
// startProcess(dto);
|
} else { |
||||
// } else {
|
PurchasingRequisition pr = fetchBySid(sid); |
||||
// PurchasingRequisition pr = fetchBySid(sid);
|
BusinessVariables bv = new BusinessVariables(); |
||||
// BusinessVariables bv = new BusinessVariables();
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
Map<String, Object> variables = new HashMap<>(); |
||||
// Map<String, Object> variables = new HashMap<>();
|
//用户的部门全路径sid
|
||||
// //用户的部门全路径sid
|
bv.setOrgSidPath("fd6435f2-0005-11ec-a033-48452053aa33/3042d730-64e8-4e34-b08a-44adca4da3a5/548c9469-f5e8-4a1a-b69f-cb54b152c5d1"); |
||||
// bv.setOrgSidPath("fd6435f2-0005-11ec-a033-48452053aa33/3042d730-64e8-4e34-b08a-44adca4da3a5/548c9469-f5e8-4a1a-b69f-cb54b152c5d1");
|
//业务sid
|
||||
// //业务sid
|
bv.setBusinessSid(sid); |
||||
// bv.setBusinessSid(sid);
|
//用户sid
|
||||
// //用户sid
|
bv.setUserSid("0331e5b5-9d60-11ed-87ce-525401028fe7"); |
||||
// bv.setUserSid("0331e5b5-9d60-11ed-87ce-525401028fe7");
|
//若app移动端有此功能,则传递appMap参数
|
||||
// //若app移动端有此功能,则传递appMap参数
|
Map<String, Object> appMap = new HashMap<>(); |
||||
// Map<String, Object> appMap = new HashMap<>();
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
||||
// //需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
variables.put("app", appMap); |
||||
// variables.put("app", appMap);
|
variables.put("money", pr.getMoney()); |
||||
// variables.put("money", pr.getMoney());
|
bv.setFormVariables(variables); |
||||
// bv.setFormVariables(variables);
|
//流程定义id
|
||||
// //流程定义id
|
bv.setModelId(ProcDefEnum.PR.getProDefId()); |
||||
// bv.setModelId(ProcDefEnum.PR.getProDefId());
|
bv.setTaskId(dto.getTaskId()); |
||||
// bv.setTaskId(dto.getTaskId());
|
bv.setTaskDefKey(pr.getNodeSid()); |
||||
// bv.setTaskDefKey(pr.getNodeSid());
|
bv.setComment(com.yxt.common.base.utils.StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交"); |
||||
// bv.setComment(com.yxt.common.base.utils.StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交");
|
bv.setInstanceId(pr.getProcInstSid()); |
||||
// bv.setInstanceId(pr.getProcInstSid());
|
//更新已选择的车架号的状态为审批中
|
||||
// //更新已选择的车架号的状态为审批中
|
//System.out.println(JSON.toJSONString(bv));
|
||||
// //System.out.println(JSON.toJSONString(bv));
|
complete(bv); |
||||
// complete(bv);
|
} |
||||
// }
|
return rb.success(); |
||||
// return rb.success();
|
} |
||||
// }
|
|
||||
//
|
private void startProcess(PurchasingRequisitionDto dto) { |
||||
// private void startProcess(PurchasingRequisitionDto dto) {
|
BusinessVariables bv = new BusinessVariables(); |
||||
// BusinessVariables bv = new BusinessVariables();
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
Map<String, Object> variables = new HashMap<>(); |
||||
// Map<String, Object> variables = new HashMap<>();
|
//用户的部门全路径sid
|
||||
// //用户的部门全路径sid
|
bv.setOrgSidPath("fd6435f2-0005-11ec-a033-48452053aa33/3042d730-64e8-4e34-b08a-44adca4da3a5/548c9469-f5e8-4a1a-b69f-cb54b152c5d1"); |
||||
// bv.setOrgSidPath("fd6435f2-0005-11ec-a033-48452053aa33/3042d730-64e8-4e34-b08a-44adca4da3a5/548c9469-f5e8-4a1a-b69f-cb54b152c5d1");
|
//业务sid
|
||||
// //业务sid
|
bv.setBusinessSid(dto.getSid()); |
||||
// bv.setBusinessSid(dto.getSid());
|
//用户sid
|
||||
// //用户sid
|
bv.setUserSid("0331e5b5-9d60-11ed-87ce-525401028fe7"); |
||||
// bv.setUserSid("0331e5b5-9d60-11ed-87ce-525401028fe7");
|
bv.setFormVariables(variables); |
||||
// bv.setFormVariables(variables);
|
//若app移动端有此功能,则传递appMap参数
|
||||
// //若app移动端有此功能,则传递appMap参数
|
Map<String, Object> appMap = new HashMap<>(); |
||||
// Map<String, Object> appMap = new HashMap<>();
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
||||
// //需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
variables.put("money", dto.getMoney()); |
||||
// variables.put("money", dto.getMoney());
|
variables.put("app", appMap); |
||||
// variables.put("app", appMap);
|
//流程定义id
|
||||
// //流程定义id
|
bv.setModelId(ProcDefEnum.PR.getProDefId()); |
||||
// bv.setModelId(ProcDefEnum.PR.getProDefId());
|
// String nextNodeUserSids_ = "0331e5b5-9d60-11ed-87ce-525401028fe8";//sysOrganization.getManagerSid();
|
||||
//// String nextNodeUserSids_ = "0331e5b5-9d60-11ed-87ce-525401028fe8";//sysOrganization.getManagerSid();
|
// bv.setNextNodeUserSids(nextNodeUserSids_);
|
||||
//// bv.setNextNodeUserSids(nextNodeUserSids_);
|
|
||||
//
|
int r = submitBusinessVehicleData(dto); |
||||
// int r = submitBusinessVehicleData(dto);
|
if (r == 1) { |
||||
// if (r == 1) {
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv); |
||||
// ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv);
|
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
||||
// UpdateFlowFieldVo ufVo = voResultBean.getData();
|
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
||||
// updateFlowFiled(BeanUtil.beanToMap(ufVo));
|
try { |
||||
// try {
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
||||
// ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
|
.setNameFormat("demo-pool-%d").build(); |
||||
// .setNameFormat("demo-pool-%d").build();
|
ExecutorService pool = new ThreadPoolExecutor(2, 100, |
||||
// ExecutorService pool = new ThreadPoolExecutor(2, 100,
|
0L, TimeUnit.MILLISECONDS, |
||||
// 0L, TimeUnit.MILLISECONDS,
|
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
||||
// new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
|
} catch (Exception e) { |
||||
// } catch (Exception e) {
|
e.printStackTrace(); |
||||
// e.printStackTrace();
|
} |
||||
// }
|
} |
||||
// }
|
if (r == 2) { |
||||
// if (r == 2) {
|
// ToDo:驳回到发起人后再次提交
|
||||
// // ToDo:驳回到发起人后再次提交
|
if (StringUtils.isBlank(dto.getInstanceId())) { |
||||
// if (StringUtils.isBlank(dto.getInstanceId())) {
|
} |
||||
// }
|
bv.setTaskId(dto.getTaskId()); |
||||
// bv.setTaskId(dto.getTaskId());
|
bv.setTaskDefKey(dto.getTaskDefKey()); |
||||
// bv.setTaskDefKey(dto.getTaskDefKey());
|
bv.setComment(com.yxt.common.base.utils.StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交"); |
||||
// bv.setComment(com.yxt.common.base.utils.StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交");
|
bv.setInstanceId(dto.getInstanceId()); |
||||
// bv.setInstanceId(dto.getInstanceId());
|
//更新已选择的车架号的状态为审批中
|
||||
// //更新已选择的车架号的状态为审批中
|
complete(bv); |
||||
// complete(bv);
|
} |
||||
// }
|
} |
||||
// }
|
/** |
||||
// /**
|
* 判断提交的流程是否被允许 |
||||
// * 判断提交的流程是否被允许
|
* |
||||
// *
|
* @param dto |
||||
// * @param dto
|
* @return |
||||
// * @return
|
*/ |
||||
// */
|
private synchronized int submitBusinessVehicleData(PurchasingRequisitionDto dto ) { |
||||
// private synchronized int submitBusinessVehicleData(PurchasingRequisitionDto dto ) {
|
log.info("PurchasingRequisitionDto:{}", JSONObject.toJSONString(dto)); |
||||
// log.info("PurchasingRequisitionDto:{}", JSONObject.toJSONString(dto));
|
int r = 0; |
||||
// int r = 0;
|
if (StringUtils.isBlank(dto.getSid())&&StringUtils.isBlank(dto.getTaskId())) { |
||||
// if (StringUtils.isBlank(dto.getSid())&&StringUtils.isBlank(dto.getTaskId())) {
|
log.info("PurchasingRequisitionDto1:{}", JSONObject.toJSONString(dto)); |
||||
// log.info("PurchasingRequisitionDto1:{}", JSONObject.toJSONString(dto));
|
r = 1; |
||||
// r = 1;
|
}else if (StringUtils.isNotBlank(dto.getSid())&&StringUtils.isBlank(dto.getTaskId())){ |
||||
// }else if (StringUtils.isNotBlank(dto.getSid())&&StringUtils.isBlank(dto.getTaskId())){
|
log.info("PurchasingRequisitionDto2:{}", JSONObject.toJSONString(dto)); |
||||
// log.info("PurchasingRequisitionDto2:{}", JSONObject.toJSONString(dto));
|
r = 1; |
||||
// r = 1;
|
} else { |
||||
// } else {
|
log.info("PurchasingRequisitionDto3:{}", JSONObject.toJSONString(dto)); |
||||
// log.info("PurchasingRequisitionDto3:{}", JSONObject.toJSONString(dto));
|
r = 2; |
||||
// r = 2;
|
} |
||||
// }
|
return r; |
||||
// return r;
|
} |
||||
// }
|
/** |
||||
// /**
|
* 更新流程相关的状态 |
||||
// * 更新流程相关的状态
|
* |
||||
// *
|
* @param map |
||||
// * @param map
|
* @return |
||||
// * @return
|
*/ |
||||
// */
|
private int updateFlowFiled(Map<String, Object> map) { |
||||
// private int updateFlowFiled(Map<String, Object> map) {
|
return baseMapper.updateFlowFiled(map); |
||||
// return baseMapper.updateFlowFiled(map);
|
} |
||||
// }
|
public ResultBean complete(BusinessVariables bv) { |
||||
// public ResultBean complete(BusinessVariables bv) {
|
String userSid = bv.getUserSid(); |
||||
// String userSid = bv.getUserSid();
|
SysUserVo sysUserVo = sysUserService.fetchBySidVo(userSid); |
||||
// SysUserVo sysUserVo = sysUserService.fetchBySidVo(userSid);
|
ResultBean rb = ResultBean.fireFail(); |
||||
// ResultBean rb = ResultBean.fireFail();
|
PurchasingRequisition pr = fetchBySid(bv.getBusinessSid()); |
||||
// PurchasingRequisition pr = fetchBySid(bv.getBusinessSid());
|
Map<String, Object> variables = new HashMap<>(); |
||||
// Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> appMap = new HashMap<>(); |
||||
// Map<String, Object> appMap = new HashMap<>();
|
variables.put("money", pr.getMoney()); |
||||
// variables.put("money", pr.getMoney());
|
variables.put("app", appMap); |
||||
// variables.put("app", appMap);
|
bv.setFormVariables(variables); |
||||
// bv.setFormVariables(variables);
|
bv.setOrgSidPath(sysUserVo.getOrgSidPath()); |
||||
// bv.setOrgSidPath(sysUserVo.getOrgSidPath());
|
if (bv.getTaskId().equals(pr.getTaskId())) { |
||||
// if (bv.getTaskId().equals(pr.getTaskId())) {
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); |
||||
// ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv);
|
if (!resultBean.getSuccess()) { |
||||
// if (!resultBean.getSuccess()) {
|
return rb.setMsg(resultBean.getMsg()); |
||||
// return rb.setMsg(resultBean.getMsg());
|
} |
||||
// }
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
// UpdateFlowFieldVo ufVo = resultBean.getData();
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
// updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
|
if (!"Event_end".equals(ufVo.getTaskDefKey())) { |
||||
// if (!"Event_end".equals(ufVo.getTaskDefKey())) {
|
|
||||
//
|
} else { |
||||
// } else {
|
|
||||
//
|
|
||||
//
|
} |
||||
// }
|
return rb.success().setData(resultBean.getData()); |
||||
// return rb.success().setData(resultBean.getData());
|
} else { |
||||
// } else {
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
// return rb.setMsg("操作失败!提交的数据不一致");
|
} |
||||
// }
|
} |
||||
// }
|
public PagerVo<PurchasingRequisitionVo> listPageVo(PagerQuery<PurchasingRequisitionQuery> pq) { |
||||
// public PagerVo<PurchasingRequisitionVo> listPageVo(PagerQuery<PurchasingRequisitionQuery> pq) {
|
PurchasingRequisitionQuery query = pq.getParams(); |
||||
// PurchasingRequisitionQuery query = pq.getParams();
|
QueryWrapper<PurchasingRequisition> qw = createQueryWrapper(query); |
||||
// QueryWrapper<PurchasingRequisition> qw = createQueryWrapper(query);
|
IPage<PurchasingRequisition> page = PagerUtil.queryToPage(pq); |
||||
// IPage<PurchasingRequisition> page = PagerUtil.queryToPage(pq);
|
IPage<PurchasingRequisition> pagging = baseMapper.selectPage(page, qw); |
||||
// IPage<PurchasingRequisition> pagging = baseMapper.selectPage(page, qw);
|
PagerVo<PurchasingRequisitionVo> p = PagerUtil.pageToVo(pagging, null); |
||||
// PagerVo<PurchasingRequisitionVo> p = PagerUtil.pageToVo(pagging, null);
|
return p; |
||||
// return p;
|
} |
||||
// }
|
private QueryWrapper<PurchasingRequisition> createQueryWrapper(PurchasingRequisitionQuery query) { |
||||
// private QueryWrapper<PurchasingRequisition> createQueryWrapper(PurchasingRequisitionQuery query) {
|
// todo: 这里根据具体业务调整查询条件
|
||||
// // todo: 这里根据具体业务调整查询条件
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
||||
// // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
QueryWrapper<PurchasingRequisition> qw = new QueryWrapper<>(); |
||||
// QueryWrapper<PurchasingRequisition> qw = new QueryWrapper<>();
|
qw.orderByDesc("id"); |
||||
// qw.orderByDesc("id");
|
return qw; |
||||
// return qw;
|
} |
||||
// }
|
|
||||
//
|
public PurchasingRequisitionDetailsVo fetchDetailsBySid(String sid) { |
||||
// public PurchasingRequisitionDetailsVo fetchDetailsBySid(String sid) {
|
QueryWrapper<PurchasingRequisition> qw = new QueryWrapper<>(); |
||||
// QueryWrapper<PurchasingRequisition> qw = new QueryWrapper<>();
|
qw.eq("sid",sid); |
||||
// qw.eq("sid",sid);
|
PurchasingRequisition purchasingRequisition = baseMapper.selectOne(qw); |
||||
// PurchasingRequisition purchasingRequisition = baseMapper.selectOne(qw);
|
PurchasingRequisitionDetailsVo vo=new PurchasingRequisitionDetailsVo(); |
||||
// PurchasingRequisitionDetailsVo vo=new PurchasingRequisitionDetailsVo();
|
BeanUtil.copyProperties(purchasingRequisition,vo); |
||||
// BeanUtil.copyProperties(purchasingRequisition,vo);
|
return vo; |
||||
// return vo;
|
} |
||||
// }
|
|
||||
//
|
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) { |
||||
// public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) {
|
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
||||
// ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail();
|
BusinessVariables bv = new BusinessVariables(); |
||||
// BusinessVariables bv = new BusinessVariables();
|
BeanUtil.copyProperties(query, bv); |
||||
// BeanUtil.copyProperties(query, bv);
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
Map<String, Object> variables = new HashMap<>(); |
||||
// Map<String, Object> variables = new HashMap<>();
|
//根据业务sid查询排产信息
|
||||
// //根据业务sid查询排产信息
|
PurchasingRequisition pr = fetchBySid(query.getBusinessSid()); |
||||
// PurchasingRequisition pr = fetchBySid(query.getBusinessSid());
|
variables.put("money", pr.getMoney()); |
||||
// variables.put("money", pr.getMoney());
|
//判断是否是储备订单,若是,则isTrue网关参数为true=============添加
|
||||
// //判断是否是储备订单,若是,则isTrue网关参数为true=============添加
|
bv.setFormVariables(variables); |
||||
// bv.setFormVariables(variables);
|
bv.setModelId(ProcDefEnum.PR.getProDefId()); |
||||
// bv.setModelId(ProcDefEnum.PR.getProDefId());
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
||||
// ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
||||
// //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
||||
// List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
|
return rb.success().setData(voList); |
||||
// return rb.success().setData(voList);
|
} |
||||
// }
|
|
||||
//
|
public ResultBean revokeProcess(PurchasingRequisitionQuery query) { |
||||
// public ResultBean revokeProcess(PurchasingRequisitionQuery query) {
|
ResultBean rb = ResultBean.fireFail(); |
||||
// ResultBean rb = ResultBean.fireFail();
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
// if (StringUtils.isBlank(query.getUserSid())) {
|
return rb.setMsg("参数错误:userSid"); |
||||
// return rb.setMsg("参数错误:userSid");
|
} |
||||
// }
|
//根据业务sid查询排产申请
|
||||
// //根据业务sid查询排产申请
|
PurchasingRequisition pr = fetchBySid(query.getBusinessSid()); |
||||
// PurchasingRequisition pr = fetchBySid(query.getBusinessSid());
|
String businessTaskId = pr.getTaskId(); |
||||
// String businessTaskId = pr.getTaskId();
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
// if (StringUtils.isNotBlank(businessTaskId)) {
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
// if (businessTaskId.equals(query.getTaskId())) {
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
// FlowTaskVo flowTaskVo = new FlowTaskVo();
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
// BeanUtil.copyProperties(query, flowTaskVo);
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
||||
// ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo);
|
if (!resultBean.getSuccess()) { |
||||
// if (!resultBean.getSuccess()) {
|
return rb.setMsg(resultBean.getMsg()); |
||||
// return rb.setMsg(resultBean.getMsg());
|
} |
||||
// }
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
// updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
|
return rb.success().setData(resultBean.getData()); |
||||
// return rb.success().setData(resultBean.getData());
|
} |
||||
// }
|
} |
||||
// }
|
return rb.setMsg("操作失败,提交的数据不一致!"); |
||||
// return rb.setMsg("操作失败,提交的数据不一致!");
|
} |
||||
// }
|
|
||||
//
|
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) { |
||||
// public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) {
|
ResultBean<List<GetNodeVo>> rb = new ResultBean<>(); |
||||
// ResultBean<List<GetNodeVo>> rb = new ResultBean<>();
|
BusinessVariables bv = new BusinessVariables(); |
||||
// BusinessVariables bv = new BusinessVariables();
|
BeanUtil.copyProperties(query, bv); |
||||
// BeanUtil.copyProperties(query, bv);
|
bv.setModelId(ProcDefEnum.PR.getProDefId()); |
||||
// bv.setModelId(ProcDefEnum.PR.getProDefId());
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
||||
// ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
||||
// //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
||||
// List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList());
|
return rb.success().setData(voList); |
||||
// return rb.success().setData(voList);
|
} |
||||
// }
|
|
||||
//
|
public ResultBean taskReject(PurchasingRequisitionQuery query) { |
||||
// public ResultBean taskReject(PurchasingRequisitionQuery query) {
|
ResultBean rb = ResultBean.fireFail(); |
||||
// ResultBean rb = ResultBean.fireFail();
|
String businessSid = query.getBusinessSid(); |
||||
// String businessSid = query.getBusinessSid();
|
PurchasingRequisition busVehicleApply = fetchBySid(businessSid); |
||||
// PurchasingRequisition busVehicleApply = fetchBySid(businessSid);
|
if (busVehicleApply == null) { |
||||
// if (busVehicleApply == null) {
|
return rb.setMsg("该申请不存在"); |
||||
// return rb.setMsg("该申请不存在");
|
} |
||||
// }
|
String businessTaskId = busVehicleApply.getTaskId(); |
||||
// String businessTaskId = busVehicleApply.getTaskId();
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
// if (StringUtils.isNotBlank(businessTaskId)) {
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
// if (businessTaskId.equals(query.getTaskId())) {
|
if (StringUtils.isBlank(query.getComment())) { |
||||
// if (StringUtils.isBlank(query.getComment())) {
|
return rb.setMsg("请填写意见"); |
||||
// return rb.setMsg("请填写意见");
|
} |
||||
// }
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
// if (StringUtils.isBlank(query.getUserSid())) {
|
return rb.setMsg("参数错误:userSid"); |
||||
// return rb.setMsg("参数错误:userSid");
|
} |
||||
// }
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
// FlowTaskVo flowTaskVo = new FlowTaskVo();
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
// BeanUtil.copyProperties(query, flowTaskVo);
|
Map<String, Object> variables = new HashMap<>(); |
||||
// Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> appMap = new HashMap<>(); |
||||
// Map<String, Object> appMap = new HashMap<>();
|
variables.put("app", appMap); |
||||
// variables.put("app", appMap);
|
//根据业务sid查询排产信息
|
||||
// //根据业务sid查询排产信息
|
variables.put("money", query.getMoney()); |
||||
// variables.put("money", query.getMoney());
|
//判断是否是储备订单,若是,则isTrue网关参数为true=============添加
|
||||
// //判断是否是储备订单,若是,则isTrue网关参数为true=============添加
|
flowTaskVo.setValues(variables); |
||||
// flowTaskVo.setValues(variables);
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
||||
// ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
|
if (!resultBean.getSuccess()) { |
||||
// if (!resultBean.getSuccess()) {
|
return rb.setMsg(resultBean.getMsg()); |
||||
// return rb.setMsg(resultBean.getMsg());
|
} |
||||
// }
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
// UpdateFlowFieldVo ufVo = resultBean.getData();
|
Map<String, Object> map = BeanUtil.beanToMap(ufVo); |
||||
// Map<String, Object> map = BeanUtil.beanToMap(ufVo);
|
//更新业务中的流程相关的参数
|
||||
// //更新业务中的流程相关的参数
|
updateFlowFiled(map); |
||||
// updateFlowFiled(map);
|
//极光推送
|
||||
// //极光推送
|
|
||||
//
|
return rb.success(); |
||||
// return rb.success();
|
} |
||||
// }
|
} |
||||
// }
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
// return rb.setMsg("操作失败!提交的数据不一致!");
|
} |
||||
// }
|
|
||||
//
|
/** |
||||
// /**
|
* 终止流程 |
||||
// * 终止流程
|
* |
||||
// *
|
* @param query |
||||
// * @param query
|
* @return |
||||
// * @return
|
*/ |
||||
// */
|
public ResultBean breakProcess(PurchasingRequisitionQuery query) { |
||||
// public ResultBean breakProcess(PurchasingRequisitionQuery query) {
|
ResultBean rb = ResultBean.fireFail(); |
||||
// ResultBean rb = ResultBean.fireFail();
|
if (StringUtils.isBlank(query.getInstanceId())) { |
||||
// if (StringUtils.isBlank(query.getInstanceId())) {
|
return rb.setMsg("参数错误:instanceId"); |
||||
// return rb.setMsg("参数错误:instanceId");
|
} |
||||
// }
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
// if (StringUtils.isBlank(query.getUserSid())) {
|
return rb.setMsg("参数错误:userSid"); |
||||
// return rb.setMsg("参数错误:userSid");
|
} |
||||
// }
|
if (StringUtils.isBlank(query.getComment())) { |
||||
// if (StringUtils.isBlank(query.getComment())) {
|
return rb.setMsg("请填写意见"); |
||||
// return rb.setMsg("请填写意见");
|
} |
||||
// }
|
PurchasingRequisition pr = fetchBySid(query.getBusinessSid()); |
||||
// PurchasingRequisition pr = fetchBySid(query.getBusinessSid());
|
String businessTaskId = pr.getTaskId(); |
||||
// String businessTaskId = pr.getTaskId();
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
// if (StringUtils.isNotBlank(businessTaskId)) {
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
// if (businessTaskId.equals(query.getTaskId())) {
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
// FlowTaskVo flowTaskVo = new FlowTaskVo();
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
// BeanUtil.copyProperties(query, flowTaskVo);
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
||||
// ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
|
if (!resultBean.getSuccess()) { |
||||
// if (!resultBean.getSuccess()) {
|
return rb.setMsg(resultBean.getMsg()); |
||||
// return rb.setMsg(resultBean.getMsg());
|
} |
||||
// }
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
||||
// Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
|
updateFlowFiled(map); |
||||
// updateFlowFiled(map);
|
return rb.success().setData(resultBean.getData()); |
||||
// return rb.success().setData(resultBean.getData());
|
} |
||||
// }
|
} |
||||
// }
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
// return rb.setMsg("操作失败!提交的数据不一致!");
|
} |
||||
// }
|
|
||||
//
|
public ResultBean deleteBySids(String[] sids) { |
||||
// public ResultBean deleteBySids(String[] sids) {
|
for (int i = 0; i < sids.length; i++) { |
||||
// for (int i = 0; i < sids.length; i++) {
|
if (checkCouldChange(sids[i])) { |
||||
// if (checkCouldChange(sids[i])) {
|
return new ResultBean().fail().setMsg("删除的数据中包含已经提交审批的数据,删除失败"); |
||||
// return new ResultBean().fail().setMsg("删除的数据中包含已经提交审批的数据,删除失败");
|
} |
||||
// }
|
deleteBySid(sids[i]); |
||||
// deleteBySid(sids[i]);
|
} |
||||
// }
|
return new ResultBean().success().setMsg("删除成功"); |
||||
// return new ResultBean().success().setMsg("删除成功");
|
} |
||||
// }
|
/** |
||||
// /**
|
* 判断是否可以更改、删除(判断节点状态) |
||||
// * 判断是否可以更改、删除(判断节点状态)
|
* |
||||
// *
|
* @param sid |
||||
// * @param sid
|
* @return |
||||
// * @return
|
*/ |
||||
// */
|
private boolean checkCouldChange(String sid) { |
||||
// private boolean checkCouldChange(String sid) {
|
PurchasingRequisition pr = fetchBySid(sid); |
||||
// PurchasingRequisition pr = fetchBySid(sid);
|
// 判断是否可以更改(是否走了流程,更改了状态)
|
||||
// // 判断是否可以更改(是否走了流程,更改了状态)
|
if (StringUtils.isNotBlank(pr.getNodeState())) { |
||||
// if (StringUtils.isNotBlank(pr.getNodeState())) {
|
return true; |
||||
// return true;
|
} |
||||
// }
|
return false; |
||||
// return false;
|
} |
||||
// }
|
} |
||||
//}
|
|
||||
|
Loading…
Reference in new issue