diff --git a/hzims-service/hzims-middle/pom.xml b/hzims-service/hzims-middle/pom.xml index 30a855c..95e026b 100644 --- a/hzims-service/hzims-middle/pom.xml +++ b/hzims-service/hzims-middle/pom.xml @@ -24,7 +24,6 @@ org.springblade blade-common - ${bladex.projet.common.version} @@ -139,4 +138,4 @@ - \ No newline at end of file + diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessTypeController.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessTypeController.java deleted file mode 100644 index 4a2c5b6..0000000 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessTypeController.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.hnac.hzims.middle.processflow.controller; - - -import com.alibaba.fastjson.JSON; -import com.hnac.hzims.common.logs.annotation.OperationAnnotation; -import com.hnac.hzims.common.logs.enums.BusinessType; -import com.hnac.hzims.common.logs.enums.OperatorType; -import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; -import com.hnac.hzims.middle.processflow.entity.ProcessType; -import com.hnac.hzims.middle.processflow.properties.TicketProperties; -import com.hnac.hzims.middle.processflow.properties.WorkTicketProperties; -import com.hnac.hzims.middle.processflow.service.ProcessTypeService; -import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; -import com.hnac.hzims.middle.processflow.strategy.service.ProcessService; -import lombok.RequiredArgsConstructor; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.jackson.JsonUtil; -import org.springblade.queue.produce.QueueProduceService; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import java.util.List; -import java.util.stream.Collectors; - -/** - *

- * 工作流审批类型 前端控制器 - *

- * - * @author dfy - * @since 2023-03-29 - */ -@RequiredArgsConstructor -@RestController -@RequestMapping("/processflow/process-type") -public class ProcessTypeController { - - - private final TicketProperties ticketProperties; - - - private final ProcessTypeService processTypeService; - - - private final List ticketServiceList; - - - private final RedisTemplate redisTemplate; - - private final QueueProduceService queueProduceService; - - - @GetMapping("/add") - public void add() { - List workTickets = ticketProperties.getWorkTickets(); - List processTypeList = workTickets.stream().map(item -> { - ProcessType processType = new ProcessType(); - processType.setDeploymentId(item.getFlowId()); - processType.setDeploymentName(item.getSegment()); - processType.setSegment("新工作票"); - processType.setSequence(item.getStatus()); - return processType; - }).collect(Collectors.toList()); - processTypeService.saveBatch(processTypeList); - } - - - @GetMapping("/list/{key}") - public String list(@PathVariable String key) { - //判断执行具体的实现类 - WorkflowQueue workflowQueue = new WorkflowQueue(); - workflowQueue.setProcessDefinitionKey(key); - ProcessService ticketService = ticketServiceList.stream().filter(item -> item.isWorkflowProcess(workflowQueue)).findFirst().orElse(null); - ticketService.calculate(null); - return "key"; - } - - - @GetMapping("/redis/{value}") - public int opens(@PathVariable String value) { - redisTemplate.convertAndSend("blade:queue:flow", JSON.toJSONString(value)); - return 0; - } - - - - @GetMapping("/list") - public R list() { - List list = processTypeService.list(); - System.out.println(1 / 0); - return R.data(list); - } - - - @GetMapping("/build") - public void addList() { - ProcessWorkFlowResponse workTicketMessageResponse = new ProcessWorkFlowResponse(); - workTicketMessageResponse.setTaskId("1"); - workTicketMessageResponse.setProcessDefinitionKey("newFirstWorkTicket"); - workTicketMessageResponse.setTaskName("签发人签发"); - workTicketMessageResponse.setVariables("1"); - String qqqq = JsonUtil.toJson(workTicketMessageResponse); - queueProduceService.sendMessage("blade:queue:flow", qqqq); - } - - -} - diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessType.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessType.java deleted file mode 100644 index 54c8b44..0000000 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessType.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.hnac.hzims.middle.processflow.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import java.time.LocalDateTime; -import com.baomidou.mybatisplus.annotation.TableField; -import java.io.Serializable; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - *

- * 工作流审批类型 - *

- * - * @author dfy - * @since 2023-03-29 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@TableName("hzims_process_type") -public class ProcessType implements Serializable { - - private static final long serialVersionUID=1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 序号 - */ - @TableField("sequence") - private Integer sequence; - - /** - * 当前环节流程key - */ - @TableField("deployment_id") - private String deploymentId; - - /** - * 当前流程名称 - */ - @TableField("deployment_name") - private String deploymentName; - - /** - * 一个流程图的名称 - */ - @TableField("segment") - private String segment; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 更新时间 - */ - @TableField("update_time") - private LocalDateTime updateTime; - - /** - * 逻辑删除 - */ - @TableField("is_deleted") - private Integer isDeleted; - - -} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessTypeMapper.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessTypeMapper.java deleted file mode 100644 index 174a07d..0000000 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessTypeMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hnac.hzims.middle.processflow.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzims.middle.processflow.entity.ProcessType; - -/** - *

- * 工作流审批类型 Mapper 接口 - *

- * - * @author dfy - * @since 2023-03-29 - */ -public interface ProcessTypeMapper extends BaseMapper { - -} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessTypeService.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessTypeService.java deleted file mode 100644 index 5756d74..0000000 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessTypeService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hnac.hzims.middle.processflow.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.hnac.hzims.middle.processflow.entity.ProcessType; - -/** - *

- * 工作流审批类型 服务类 - *

- * - * @author dfy - * @since 2023-03-29 - */ -public interface ProcessTypeService extends IService { - -} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessTypeServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessTypeServiceImpl.java deleted file mode 100644 index 61e87c4..0000000 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessTypeServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hnac.hzims.middle.processflow.service.impl; - -import com.hnac.hzims.middle.processflow.entity.ProcessType; -import com.hnac.hzims.middle.processflow.mapper.ProcessTypeMapper; -import com.hnac.hzims.middle.processflow.service.ProcessTypeService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 工作流审批类型 服务实现类 - *

- * - * @author dfy - * @since 2023-03-29 - */ -@Service -public class ProcessTypeServiceImpl extends ServiceImpl implements ProcessTypeService { - -} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java index 5268256..9ea4616 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java @@ -1,7 +1,5 @@ package com.hnac.hzims.middle.processflow.strategy.abstracts; -import com.hnac.hzims.middle.processflow.entity.ProcessType; -import com.hnac.hzims.middle.processflow.service.ProcessTypeService; import com.hnac.hzims.middle.processflow.strategy.service.ProcessService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -18,19 +16,4 @@ import java.util.List; public abstract class ProcessAbstractService implements ProcessService { - - @Autowired - private ProcessTypeService processTypeService; - - /** - * 查询所有的方法 - * - * @return - */ - public List getProcessList() { - log.info("实例化:" + processTypeService); - List workTickets = processTypeService.list(); - return workTickets; - } - }