10-27-添加审核完善
This commit is contained in:
		| @ -32,6 +32,11 @@ public class XzdProject extends BaseEntity { | ||||
|     @TableId(value = "id") | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 审核状态 | ||||
|      */ | ||||
|     private String shzt; | ||||
|  | ||||
|     /** | ||||
|      * 区域码 | ||||
|      */ | ||||
|  | ||||
| @ -29,6 +29,11 @@ public class XzdProjectManagerApproval extends BaseEntity { | ||||
|     @TableId(value = "id") | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 审核状态 | ||||
|      */ | ||||
|     private String shzt; | ||||
|  | ||||
|     /** | ||||
|      * 区域码 | ||||
|      */ | ||||
|  | ||||
| @ -28,6 +28,11 @@ public class XzdProjectBo extends BaseEntity { | ||||
|      */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 审核状态 | ||||
|      */ | ||||
|     private String shzt; | ||||
|  | ||||
|     /** | ||||
|      * 区域码 | ||||
|      */ | ||||
|  | ||||
| @ -29,6 +29,11 @@ public class XzdProjectManagerApprovalBo extends BaseEntity { | ||||
|     @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 审核状态 | ||||
|      */ | ||||
|     private String shzt; | ||||
|  | ||||
|     /** | ||||
|      * 区域码 | ||||
|      */ | ||||
|  | ||||
| @ -32,6 +32,11 @@ public class XzdProjectManagerApprovalVo implements Serializable { | ||||
|     @ExcelProperty(value = "主键ID") | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 审核状态 | ||||
|      */ | ||||
|     private String shzt; | ||||
|  | ||||
|     /** | ||||
|      * 区域码 | ||||
|      */ | ||||
|  | ||||
| @ -37,6 +37,11 @@ public class XzdProjectVo implements Serializable { | ||||
|     @ExcelProperty(value = "主键ID") | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 审核状态 | ||||
|      */ | ||||
|     private String shzt; | ||||
|  | ||||
|     /** | ||||
|      * 区域码 | ||||
|      */ | ||||
|  | ||||
| @ -448,7 +448,7 @@ public class XzdContractAccountServiceImpl extends ServiceImpl<XzdContractAccoun | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdContractAccount')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同竣工结算审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -460,7 +460,7 @@ public class XzdContractAccountServiceImpl extends ServiceImpl<XzdContractAccoun | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdContractAccount')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同竣工结算计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -269,7 +269,7 @@ public class XzdContractAgreementServiceImpl extends ServiceImpl<XzdContractAgre | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdContractAgreement')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("合作协议审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -281,7 +281,7 @@ public class XzdContractAgreementServiceImpl extends ServiceImpl<XzdContractAgre | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdContractAgreement')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("合作协议计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -503,7 +503,7 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdContractChange')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同变更审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -515,7 +515,7 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdContractChange')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同变更计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -602,7 +602,7 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdContractDetails')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -614,7 +614,7 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdContractDetails')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -572,7 +572,7 @@ public class XzdContractProgressSettlementServiceImpl extends ServiceImpl<XzdCon | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('ProgressSettlement')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同进度结算审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -584,7 +584,7 @@ public class XzdContractProgressSettlementServiceImpl extends ServiceImpl<XzdCon | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('ProgressSettlement')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同进度结算计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -226,7 +226,7 @@ public class XzdContractTerminationServiceImpl extends ServiceImpl<XzdContractTe | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdContractTermination')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同终止审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -238,7 +238,7 @@ public class XzdContractTerminationServiceImpl extends ServiceImpl<XzdContractTe | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdContractTermination')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同终止计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -6,6 +6,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||
| import org.dromara.common.core.utils.MapstructUtils; | ||||
| import org.dromara.common.core.utils.StringUtils; | ||||
| import org.dromara.common.mybatis.core.page.PageQuery; | ||||
| @ -18,6 +22,7 @@ import org.dromara.xzd.domain.vo.XzdProjectManagerApprovalVo; | ||||
| import org.dromara.xzd.mapper.XzdProjectManagerApprovalMapper; | ||||
| import org.dromara.xzd.service.IXzdProjectManagerApprovalService; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.context.event.EventListener; | ||||
| import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
|  | ||||
| @ -34,6 +39,7 @@ import java.util.Map; | ||||
|  */ | ||||
| @RequiredArgsConstructor | ||||
| @Service | ||||
| @Slf4j | ||||
| public class XzdProjectManagerApprovalServiceImpl extends ServiceImpl<XzdProjectManagerApprovalMapper, XzdProjectManagerApproval> implements IXzdProjectManagerApprovalService { | ||||
|  | ||||
|     private final XzdProjectManagerApprovalMapper baseMapper; | ||||
| @ -182,4 +188,52 @@ public class XzdProjectManagerApprovalServiceImpl extends ServiceImpl<XzdProject | ||||
|         } | ||||
|         return baseMapper.deleteByIds(ids) > 0; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) | ||||
|      * 正常使用只需#processEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processEvent.flowCode.endsWith('ManagerApproval')") | ||||
|     @Transactional | ||||
|     public void processPlansHandler(ProcessEvent processEvent) { | ||||
|         log.info("项目经理推荐及审批审核任务执行了{}", processEvent.toString()); | ||||
|         String id = processEvent.getBusinessId(); | ||||
|         XzdProjectManagerApproval byId = this.getById(Long.valueOf(id)); | ||||
|         byId.setShzt(processEvent.getStatus()); | ||||
|         boolean b = this.updateById(byId); | ||||
|         if (!b) { | ||||
|             log.error("供应商审核任务更新状态失败"); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 执行任务创建监听 | ||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||
|      * 在方法中判断流程节点key | ||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||
|      * //执行业务逻辑 | ||||
|      * } | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('ManagerApproval')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("项目经理推荐及审批审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 监听删除流程事件 | ||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('ManagerApproval')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("项目经理推荐及审批计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -7,6 +7,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||
| import org.dromara.common.core.service.XzdProjectService; | ||||
| import org.dromara.common.core.utils.MapstructUtils; | ||||
| import org.dromara.common.core.utils.SpringUtils; | ||||
| @ -27,6 +30,7 @@ import org.dromara.xzd.service.IXzdCorrespondentList; | ||||
| import org.dromara.xzd.service.IXzdProjectService; | ||||
| import org.springframework.beans.BeanUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.context.event.EventListener; | ||||
| import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
|  | ||||
| @ -677,4 +681,52 @@ public class XzdProjectServiceImpl extends ServiceImpl<XzdProjectMapper, XzdProj | ||||
|         } | ||||
|         return String.join(StringUtils.SEPARATOR, list); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) | ||||
|      * 正常使用只需#processEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('XzdProject')") | ||||
|     @Transactional | ||||
|     public void processPlansHandler(ProcessEvent processEvent) { | ||||
|         log.info("项目信息审核任务执行了{}", processEvent.toString()); | ||||
|         String id = processEvent.getBusinessId(); | ||||
|         XzdProject byId = this.getById(Long.valueOf(id)); | ||||
|         byId.setShzt(processEvent.getStatus()); | ||||
|         boolean b = this.updateById(byId); | ||||
|         if (!b) { | ||||
|             log.error("项目信息审核任务更新状态失败"); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 执行任务创建监听 | ||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||
|      * 在方法中判断流程节点key | ||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||
|      * //执行业务逻辑 | ||||
|      * } | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdProject')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("项目信息审批审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 监听删除流程事件 | ||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdProject')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("项目信息审批计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -983,7 +983,7 @@ public class XzdSupplierInfoServiceImpl extends ServiceImpl<XzdSupplierInfoMappe | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdSupplierInfo')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("供应商审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -995,7 +995,7 @@ public class XzdSupplierInfoServiceImpl extends ServiceImpl<XzdSupplierInfoMappe | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdSupplierInfo')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("供应商计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -397,7 +397,7 @@ public class XzdWorkcontractCompletionAdjustServiceImpl extends ServiceImpl<XzdW | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('CompletionAdjust')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同竣工结算调整审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
| @ -409,7 +409,7 @@ public class XzdWorkcontractCompletionAdjustServiceImpl extends ServiceImpl<XzdW | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdCsContractInformation')") | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('CompletionAdjust')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同竣工结算调整计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| @ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||
| import org.dromara.common.core.utils.MapstructUtils; | ||||
| import org.dromara.common.core.utils.StringUtils; | ||||
| import org.dromara.common.mybatis.core.page.PageQuery; | ||||
| @ -363,4 +365,31 @@ public class XzdContractPaymentServiceImpl extends ServiceImpl<XzdContractPaymen | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 执行任务创建监听 | ||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||
|      * 在方法中判断流程节点key | ||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||
|      * //执行业务逻辑 | ||||
|      * } | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdContractPayment')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("承包合同收款审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 监听删除流程事件 | ||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdContractPayment')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("承包合同收款计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||
| import org.dromara.common.core.utils.MapstructUtils; | ||||
| import org.dromara.common.core.utils.StringUtils; | ||||
| import org.dromara.common.mybatis.core.page.PageQuery; | ||||
| @ -393,14 +395,41 @@ public class XzdSkyfkFbhtfkServiceImpl extends ServiceImpl<XzdSkyfkFbhtfkMapper, | ||||
|     @EventListener(condition = "#processEvent.flowCode.endsWith('XzdSkyfkFbhtfk')") | ||||
|     @Transactional | ||||
|     public void processPlansHandler(ProcessEvent processEvent) { | ||||
|         log.info("承包合同收款审核任务执行了{}", processEvent.toString()); | ||||
|         log.info("分包合同付款审核任务执行了{}", processEvent.toString()); | ||||
|         String id = processEvent.getBusinessId(); | ||||
|         XzdSkyfkFbhtfk byId = this.getById(Long.valueOf(id)); | ||||
|         byId.setShzt(processEvent.getStatus()); | ||||
|         boolean b = this.updateById(byId); | ||||
|         if (!b) { | ||||
|             log.error("承包合同收款审核任务更新状态失败"); | ||||
|             log.error("分包合同付款审核任务更新状态失败"); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 执行任务创建监听 | ||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||
|      * 在方法中判断流程节点key | ||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||
|      * //执行业务逻辑 | ||||
|      * } | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdSkyfkFbhtfk')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("分包合同付款审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 监听删除流程事件 | ||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdSkyfkFbhtfk')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("分包合同付款计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||
| import org.dromara.common.core.utils.MapstructUtils; | ||||
| import org.dromara.common.core.utils.StringUtils; | ||||
| import org.dromara.common.mybatis.core.page.PageQuery; | ||||
| @ -335,4 +337,31 @@ public class XzdSpykpKpsqServiceImpl extends ServiceImpl<XzdSpykpKpsqMapper, Xzd | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 执行任务创建监听 | ||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||
|      * 在方法中判断流程节点key | ||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||
|      * //执行业务逻辑 | ||||
|      * } | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdSpykpKpsq')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("开票申请审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 监听删除流程事件 | ||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdSpykpKpsq')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("开票申请计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessEvent; | ||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||
| import org.dromara.common.core.domain.model.LoginUser; | ||||
| import org.dromara.common.core.utils.MapstructUtils; | ||||
| import org.dromara.common.core.utils.StringUtils; | ||||
| @ -331,4 +333,31 @@ public class XzdSpykpSjsqdServiceImpl extends ServiceImpl<XzdSpykpSjsqdMapper, X | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 执行任务创建监听 | ||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||
|      * 在方法中判断流程节点key | ||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||
|      * //执行业务逻辑 | ||||
|      * } | ||||
|      * | ||||
|      * @param processTaskEvent 参数 | ||||
|      */ | ||||
|     @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('XzdSpykpSjsqd')") | ||||
|     public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { | ||||
|         log.info("收据申请单审核任务创建了{}", processTaskEvent.toString()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 监听删除流程事件 | ||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||
|      * 示例为了方便则使用startsWith匹配了全部示例key | ||||
|      * | ||||
|      * @param processDeleteEvent 参数 | ||||
|      */ | ||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('XzdSpykpSjsqd')") | ||||
|     public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { | ||||
|         log.info("收据申请单计划删除流程事件{}", processDeleteEvent.toString()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user