feat(标准解读流程): 推送消息
This commit is contained in:
-2
@@ -38,8 +38,6 @@
|
||||
i.split_info_id,
|
||||
standard_id,
|
||||
standard_number,
|
||||
standard_number,
|
||||
s.create_time,
|
||||
implementation_date,
|
||||
standard_state,
|
||||
substitute_standard_number
|
||||
|
||||
+29
-3
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.SendMessageAPI;
|
||||
import com.jero.common.api.dto.message.SendMessageDTO;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -131,13 +133,11 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
private final ManagementService managementService;
|
||||
private final ILawsStandardMasterPlanService lawsStandardMasterPlanService;
|
||||
private final ProcessStandardInterpretMapper processStandardInterpretMapper;
|
||||
private final SendMessageAPI sendMessageAPI;
|
||||
|
||||
private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private final List<String> tempList = new ArrayList<>();
|
||||
|
||||
private String taskId;
|
||||
private String userId;
|
||||
|
||||
@Override
|
||||
public void flowStart(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
||||
// 流程信息
|
||||
@@ -279,6 +279,32 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
// 同步标准主计划
|
||||
lawsStandardMasterPlanService.syncInterpretationOfRegulations(processStandardInterpret.getId(),
|
||||
processStandardInterpret.getStandardId());
|
||||
// 发送消息
|
||||
try {
|
||||
sendMsg(processStandardInterpret);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
log.error("=============={}", "消息发送失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendMsg(ProcessStandardInterpret processStandardInterpret) {
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(processStandardInterpret.getMasterInterpretId());
|
||||
userIdList.addAll(Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(",")));
|
||||
userIdList.add(processStandardInterpret.getUploader());
|
||||
userIdList.add(processStandardInterpret.getApprovePersonId());
|
||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
||||
sendMessageDTO.setTemplateCode("standard_interpret");
|
||||
|
||||
for (String userId : userIdList) {
|
||||
sendMessageDTO.setToUserId(userId);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("standardNumber", processStandardInterpret.getStandardNumber());
|
||||
map.put("standardName", processStandardInterpret.getStandardName());
|
||||
sendMessageDTO.setMap(map);
|
||||
sendMessageAPI.sendMessage(sendMessageDTO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -30,11 +30,6 @@ public class HomeNewestStandardInterpret {
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
@Dict(dicCode = "standard_state")
|
||||
private String standardState;
|
||||
// 发布日期
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
// 实施日期
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
|
||||
Reference in New Issue
Block a user