站内信推送

zhanneixin
shangliming 2026-04-10 17:34:00 +08:00
parent 74bcd9c715
commit 8f92ea4b65
9 changed files with 197 additions and 19 deletions

View File

@ -3,8 +3,12 @@ package com.zcloud.primeport.command;
import com.alibaba.cola.dto.SingleResponse;
import com.jjb.saas.framework.auth.model.SSOUser;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
import com.zcloud.primeport.domain.enums.AuditEnum;
@ -20,6 +24,9 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
/**
* web-app
@ -34,7 +41,8 @@ public class ClosedAreaCarApplyAddExe {
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private ZcloudUserFacade zcloudUserFacade;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public Long execute(ClosedAreaCarApplyAddCmd cmd) {
ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE();
@ -72,6 +80,19 @@ public class ClosedAreaCarApplyAddExe {
todoListAddEvent.setPcFlag(1);
todoListAddEvent.setAppFlag(1);
todoListEventPusherUtil.sendMessageAddEvent(todoListAddEvent);
//封闭区域车辆新增审批
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(cmd.getAuditPersonUserId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
} catch (Exception e) {
throw new RuntimeException(e);
}

View File

@ -1,19 +1,26 @@
package com.zcloud.primeport.command;
import com.alibaba.cola.exception.BizException;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
import com.zcloud.gbscommon.utils.DateUtil;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.gateway.ClosedAreaCarApplyGateway;
import com.zcloud.primeport.domain.model.ClosedAreaCarApplyE;
import com.zcloud.primeport.dto.ClosedAreaCarApplyAuditCmd;
import com.zcloud.primeport.dto.ClosedAreaCarApplyUpdateCmd;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
@ -27,7 +34,8 @@ import java.util.Date;
public class ClosedAreaCarApplyUpdateExe {
private final ClosedAreaCarApplyGateway closedAreaCarApplyGateway;
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public void execute(ClosedAreaCarApplyUpdateCmd closedAreaCarApplyUpdateCmd) {
ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE();
@ -46,7 +54,19 @@ public class ClosedAreaCarApplyUpdateExe {
closedAreaCarApplyE.setRefusalReason(auditCmd.getRefusalReason());
closedAreaCarApplyE.setAuditTime(DateUtil.date2Str(new Date()));
closedAreaCarApplyGateway.update(closedAreaCarApplyE);
//封闭区域车辆审批
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(auditCmd.getId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
TodoListCompleteEvent todoListCompleteEvent = new TodoListCompleteEvent();
todoListCompleteEvent.setForeignSubsidiaryKey(auditCmd.getId());
todoListEventPusherUtil.sendMessageCompleteEvent(todoListCompleteEvent);

View File

@ -3,8 +3,12 @@ package com.zcloud.primeport.command;
import com.alibaba.cola.dto.SingleResponse;
import com.jjb.saas.framework.auth.model.SSOUser;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
import com.zcloud.primeport.domain.gateway.ClosedAreaPersonApplyGateway;
@ -18,6 +22,9 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
/**
* web-app
@ -33,7 +40,8 @@ public class ClosedAreaPersonApplyAddExe {
@DubboReference
private ZcloudUserFacade zcloudUserFacade;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public Long execute(ClosedAreaPersonApplyAddCmd cmd) {
ClosedAreaPersonApplyE closedAreaPersonApplyE = new ClosedAreaPersonApplyE();
@ -66,6 +74,19 @@ public class ClosedAreaPersonApplyAddExe {
todoListAddEvent.setReceiveUser(cmd.getAuditPersonUserId());
todoListAddEvent.setPcFlag(1);
todoListAddEvent.setAppFlag(1);
//封闭区域人员新增审批
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(cmd.getAuditPersonUserId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
todoListEventPusherUtil.sendMessageAddEvent(todoListAddEvent);
} catch (Exception e) {
throw new RuntimeException(e);

View File

@ -1,9 +1,13 @@
package com.zcloud.primeport.command;
import com.alibaba.cola.exception.BizException;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
import com.zcloud.gbscommon.utils.DateUtil;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.gateway.ClosedAreaFgsPersonAreaGateway;
import com.zcloud.primeport.domain.gateway.ClosedAreaFgsPersonAuthGateway;
import com.zcloud.primeport.domain.gateway.ClosedAreaPersonApplyGateway;
@ -14,13 +18,12 @@ import com.zcloud.primeport.dto.ClosedAreaPersonApplyAuditCmd;
import com.zcloud.primeport.dto.ClosedAreaPersonApplyAuthCmd;
import com.zcloud.primeport.dto.ClosedAreaPersonApplyUpdateCmd;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
@ -36,7 +39,8 @@ public class ClosedAreaPersonApplyUpdateExe {
private final ClosedAreaFgsPersonAuthGateway areaFgsPersonAuthGateway;
private final ClosedAreaFgsPersonAreaGateway areaFgsPersonAreaGateway;
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public void execute(ClosedAreaPersonApplyUpdateCmd closedAreaPersonApplyUpdateCmd) {
ClosedAreaPersonApplyE closedAreaPersonApplyE = new ClosedAreaPersonApplyE();
@ -58,6 +62,19 @@ public class ClosedAreaPersonApplyUpdateExe {
TodoListCompleteEvent todoListCompleteEvent = new TodoListCompleteEvent();
todoListCompleteEvent.setForeignSubsidiaryKey(auditCmd.getId());
todoListEventPusherUtil.sendMessageCompleteEvent(todoListCompleteEvent);
//封闭区人员审核通过
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(auditCmd.getId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
}
@Transactional(rollbackFor = Exception.class)

View File

@ -4,9 +4,13 @@ import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.alibaba.cola.exception.BizException;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
import com.zcloud.gbscommon.utils.DateUtil;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
import com.zcloud.primeport.domain.gateway.XgfApplyPersonGateway;
import com.zcloud.primeport.domain.model.PersonApplyE;
@ -19,14 +23,13 @@ import com.zcloud.primeport.dto.clientobject.PersonApplyCO;
import com.zcloud.primeport.dto.clientobject.XgfPersonApplyCO;
import jodd.util.Base64;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
@ -41,7 +44,8 @@ public class PersonApplyAddExe {
private final PersonApplyGateway personApplyGateway;
private final XgfApplyPersonGateway xgfApplyPersonGateway;
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public boolean execute(PersonApplyAddCmd cmd) {
PersonApplyE examTypeE = new PersonApplyE();
@ -84,6 +88,19 @@ public class PersonApplyAddExe {
todoListAddEvent.setPcFlag(1);
todoListAddEvent.setAppFlag(1);
todoListEventPusherUtil.sendMessageAddEvent(todoListAddEvent);
//口门人员申请
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(cmd.getAuditUserId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
List<XgfPersonApplyAddCmd.PersonApplyAddCmdExt> personApplyList = cmd.getPersonApplyList();
// 相关方人员信息的保存
ArrayList<PersonApplyE> personApplyES = new ArrayList<>();

View File

@ -4,9 +4,13 @@ import com.alibaba.cola.exception.BizException;
import com.alibaba.fastjson.JSON;
import com.jjb.saas.framework.auth.model.SSOUser;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
import com.zcloud.gbscommon.utils.DateUtil;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.enums.AuditEnum;
import com.zcloud.primeport.domain.enums.VehicleBelongTypeEnum;
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
@ -18,11 +22,14 @@ import com.zcloud.primeport.domain.model.VehicleMessageE;
import com.zcloud.primeport.dto.VehicleApplyAddCmd;
import jodd.util.Base64;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
@ -38,7 +45,8 @@ public class VehicleApplyAddExe {
private final VehicleAuditGateway vehicleAuditGateway;
private final VehicleMessageGateway vehicleMessageGateway;
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public VehicleApplyE execute(VehicleApplyAddCmd cmd) {
VehicleApplyE examTypeE = new VehicleApplyE();
@ -91,7 +99,20 @@ public class VehicleApplyAddExe {
todoListAddEvent.setPcFlag(1);
todoListAddEvent.setAppFlag(1);
todoListEventPusherUtil.sendMessageAddEvent(todoListAddEvent);
//
// 发送待审核消息
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(cmd.getAuditUserId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
// todoListEventPusherUtil.sendMessageAddEvent(build.getSendEventObj());
return add;

View File

@ -1,14 +1,22 @@
package com.zcloud.primeport.command;
import com.alibaba.cola.exception.BizException;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
import com.zcloud.primeport.domain.model.VehicleAuditE;
import com.zcloud.primeport.dto.VehicleAuditAddCmd;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
/**
* web-app
@ -20,7 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
@AllArgsConstructor
public class VehicleAuditAddExe {
private final VehicleAuditGateway vehicleAuditGateway;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public boolean execute(VehicleAuditAddCmd cmd) {
VehicleAuditE examTypeE = new VehicleAuditE();
@ -28,6 +37,19 @@ public class VehicleAuditAddExe {
boolean res = false;
try {
res = vehicleAuditGateway.add(examTypeE);
//口门车辆新增审批
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(cmd.getAuditUserId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
} catch (Exception e) {
throw new RuntimeException(e);
}

View File

@ -1,20 +1,27 @@
package com.zcloud.primeport.command;
import com.alibaba.cola.exception.BizException;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
import com.zcloud.gbscommon.utils.DateUtil;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
import com.zcloud.primeport.domain.model.VehicleApplyE;
import com.zcloud.primeport.domain.model.VehicleAuditE;
import com.zcloud.primeport.dto.VehicleAuditUpdateCmd;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
@ -29,7 +36,8 @@ public class VehicleAuditUpdateExe {
private final VehicleAuditGateway vehicleAuditGateway;
private final VehicleApplyGateway vehicleApplyGateway;
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private MessageFacade messageFacade;
@Transactional(rollbackFor = Exception.class)
public void execute(VehicleAuditUpdateCmd vehicleAuditUpdateCmd) {
VehicleAuditE vehicleAuditE = new VehicleAuditE();
@ -60,6 +68,19 @@ public class VehicleAuditUpdateExe {
TodoListCompleteEvent todoListCompleteEvent = new TodoListCompleteEvent();
todoListCompleteEvent.setForeignSubsidiaryKey(vehicleAuditE.getId());
todoListEventPusherUtil.sendMessageCompleteEvent(todoListCompleteEvent);
//口门车辆审批
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(vehicleAuditE.getId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
}
}

View File

@ -2,9 +2,13 @@ package com.zcloud.primeport.gatewayimpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.jjb.saas.message.client.message.facede.MessageFacade;
import com.jjb.saas.message.client.message.request.MessageSendCmd;
import com.jjb.saas.message.client.message.request.MessageTargetCmd;
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
import com.zcloud.gbscommon.utils.UuidUtil;
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
import com.zcloud.primeport.domain.model.PersonApplyE;
import com.zcloud.primeport.domain.model.XgfApplyPersonE;
@ -15,12 +19,11 @@ import com.zcloud.primeport.persistence.repository.PersonApplyRepository;
import com.zcloud.primeport.persistence.repository.PersonMessageRepository;
import com.zcloud.primeport.persistence.repository.XgfApplyPersonRepository;
import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.*;
/**
* web-infrastructure
@ -35,7 +38,8 @@ public class PersonApplyGatewayImpl implements PersonApplyGateway {
private final XgfApplyPersonRepository xgfApplyPersonRepository;
private final PersonMessageRepository personMessageRepository;
private final TodoListEventPusherUtil todoListEventPusherUtil;
@DubboReference
private MessageFacade messageFacade;
@Override
public Boolean add(PersonApplyE personApplyE) {
PersonApplyDO d = new PersonApplyDO();
@ -103,9 +107,23 @@ public class PersonApplyGatewayImpl implements PersonApplyGateway {
messageDO.setVisitStartTime(byId.getVisitStartTime());
messageDO.setVisitEndTime(byId.getVisitEndTime());
personMessageDOS.add(messageDO);
//口门人员审核通过
MessageSendCmd messageSendCmd = new MessageSendCmd();
messageSendCmd.setBusinessId(UuidUtil.get32UUID());
MessageTargetCmd messageTargetCmd = new MessageTargetCmd();
messageTargetCmd.setUserId(d.getId());
messageSendCmd.setTargetCmd(messageTargetCmd);
messageSendCmd.setNeedTokenEnum(false);
Map<String, Object> sendParams = new HashMap<String, Object>();
messageSendCmd.setSourceCode("MS000119");
sendParams.put("HazardDeferralApplicationNumber", 1);
sendParams.put("ReformHazardNumber", 1);
messageSendCmd.setParams(sendParams);
messageFacade.send(messageSendCmd);
});
personMessageRepository.saveBatch(personMessageDOS);
}
TodoListCompleteEvent todoListCompleteEvent = new TodoListCompleteEvent();
todoListCompleteEvent.setForeignSubsidiaryKey(build.getId());
todoListEventPusherUtil.sendMessageCompleteEvent(todoListCompleteEvent);