haungxing
6 months ago
28 changed files with 405 additions and 90 deletions
@ -0,0 +1,72 @@ |
|||||||
|
package com.hnac.hzims.middle.processflow.strategy.serviceimpl; |
||||||
|
|
||||||
|
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; |
||||||
|
import com.hnac.hzims.middle.processflow.service.ProcessDictService; |
||||||
|
import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService; |
||||||
|
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; |
||||||
|
import com.hnac.hzims.ticket.ticketprocess.feign.OperationTicketFeignClient; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.core.log.exception.ServiceException; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import static com.hnac.hzims.middle.process.constant.TicketProcessConstant.OFFLINE_OPERATION_TICKET; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 操作票流程实现类 |
||||||
|
* |
||||||
|
* @Author dfy |
||||||
|
* @Version v1.0 |
||||||
|
* @Serial 1.0 |
||||||
|
* @Date 2023/3/28 8:47 |
||||||
|
*/ |
||||||
|
@Slf4j |
||||||
|
@Service |
||||||
|
@RequiredArgsConstructor |
||||||
|
public class OfflineOperationTicketProcessServiceImpl extends ProcessAbstractService { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final OperationTicketFeignClient operationTicketFeignClient; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final ProcessDictService processDictService; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 设置执行那种实现类 |
||||||
|
* |
||||||
|
* @param flowQueue |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Boolean isWorkflowProcess(WorkflowQueue flowQueue) { |
||||||
|
log.info("是否执行操作票流程环节操作~~~~,流程flowQueue: {}", flowQueue); |
||||||
|
String dictValue = processDictService.selectDictValueByKey(OFFLINE_OPERATION_TICKET); |
||||||
|
if (dictValue.equals(flowQueue.getProcessDefinitionKey())) { |
||||||
|
log.info("已执行操作票流程环节操作~~~~"); |
||||||
|
return true; |
||||||
|
} |
||||||
|
log.error("未执行操作票流程环节操作,请联系管理员~~~~"); |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 两票管理业务方法 |
||||||
|
* |
||||||
|
* @param response |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void calculate(ProcessWorkFlowResponse response) { |
||||||
|
log.info("操作票流程消费调用fein接口开始---param",response); |
||||||
|
Boolean pending = operationTicketFeignClient.findPending(response); |
||||||
|
if (!pending) { |
||||||
|
log.info("操作票流程调用fein接口异常---param",response); |
||||||
|
throw new ServiceException("操作票流程出现异常呢"); |
||||||
|
} |
||||||
|
log.info("操作票流程消费调用fein接口结束---param",response); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
INSERT INTO `process_dict`(`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (15, 15, 'OperationTicketOffline', 'OperationTicketOffline', '线下操作票', '线下操作票', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-05-24 11:22:14', '线下操作票流程'); |
@ -1,4 +1,17 @@ |
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.HygieneTemplateMapper"> |
<mapper namespace="com.hnac.hzims.safeproduct.mapper.HygieneTemplateMapper"> |
||||||
|
|
||||||
|
<select id="getHygieneTemplatePage" resultType="com.hnac.hzims.safeproduct.entity.HygieneTemplateEntity"> |
||||||
|
SELECT |
||||||
|
* |
||||||
|
FROM |
||||||
|
hzims_hygiene_template |
||||||
|
WHERE |
||||||
|
is_deleted = 0 |
||||||
|
<if test="param.templateName != null and param.templateName != ''"> |
||||||
|
AND template_name like concate('%', #{param.templateName}, '%') |
||||||
|
</if> |
||||||
|
ORDER BY |
||||||
|
create_time DESC |
||||||
|
</select> |
||||||
</mapper> |
</mapper> |
@ -0,0 +1,6 @@ |
|||||||
|
alter table `hzims_standard_ticket_info` add column `is_offline` tinyint(2) default 0 comment '是否线下 : 1-线下,0-线上'; |
||||||
|
alter table `hzims_standard_ticket_info` add column `is_approved` tinyint(2) default NULL comment '是否审核通过 : 1-通过,0-未通过'; |
||||||
|
alter table `hzims_standard_ticket_info` ADD COLUMN `picture` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片附件' ; |
||||||
|
ALTER TABLE `hzims_standard_ticket_info` |
||||||
|
MODIFY COLUMN `issue_order_person` bigint(20) NULL COMMENT '发令人' AFTER `code`, |
||||||
|
MODIFY COLUMN `access_order_person` bigint(20) NULL COMMENT '受令人' AFTER `issue_order_person`; |
Loading…
Reference in new issue