认证清单-流程业务发送飞书消息开发。

This commit is contained in:
wangzhijiang
2023-03-10 17:59:27 +08:00
parent 0471871a16
commit 0ef13b8bd3
8 changed files with 390 additions and 222 deletions
@@ -304,4 +304,11 @@ public interface ISysUserService extends IService<SysUser> {
boolean isViewer(String userId);
/**
* 根据用户id,获取用户的飞书id
* @param sysUserList
* @param userId
* @return
*/
String getUserThirdIdByUserId(List<SysUser> sysUserList, String userId);
}
@@ -767,4 +767,19 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
return boo;
}
@Override
public String getUserThirdIdByUserId(List<SysUser> sysUserList, String userId) {
String result = "";
if(CollectionUtils.isNotEmpty(sysUserList)){
result = sysUserList.stream().filter(userInfo -> {
boolean flag = false;
if(StringUtils.equals(userId,userInfo.getId())){
flag = true;
}
return flag;
}).collect(Collectors.toList()).get(0).getThirdId();
}
return result;
}
}
@@ -7,101 +7,14 @@ public enum TemplateInfoEnum2 {
// 认证消息
CERTIFICATION_MESSAGE1("stuido催办,认证工程师收到消息","ctp_AAuDmU58lKqB"),
// HOME_PARAMETER_COLLECTION2("工程接口人下发参数,填写人接收任务","ctp_AAfv49aET4Rn"),
// HOME_PARAMETER_COLLECTION3("工程接口人退回,通知认证工程师","ctp_AAfvQy0bsb6Y"),
// HOME_PARAMETER_COLLECTION4("填写人退回,通知工程接口人","ctp_AAfK3TvbkTLq"),
// HOME_PARAMETER_COLLECTION5("您的参数收集任务还有7天到期,请及时查看处理","ctp_AAfvdg0Cx6yN"),
// HOME_PARAMETER_COLLECTION6("您的参数收集任务已被XXX重新分发给XXX","ctp_AAfvKkz192fn"),
// HOME_PARAMETER_COLLECTION7(" 您的参数收集任务已被XXX撤回","ctp_AAfK2oTpFn9M"),
// HOME_PARAMETER_COLLECTION8(" 您的参数收集任务还有3天到期,请及时查看处理","ctp_AAft9XcQbrlT"),
// HOME_PARAMETER_COLLECTION9(" 您的参数收集任务将于今天到期,请及时查看处理","ctp_AAfefHo8thrQ"),
//
// REGULATION_TECHNICAL_ASSESSMENT1("法规技术评估发起提醒评估人","ctp_AAf2qRfouGcc"),
// REGULATION_TECHNICAL_ASSESSMENT2("评估人提交通知发起人审批","ctp_AAfvKkz1xSd7"),
// REGULATION_TECHNICAL_ASSESSMENT3("发起人审查通过,通知评估人","ctp_AAfK2oTpRGSa"),
// REGULATION_TECHNICAL_ASSESSMENT4("发起人审查退回,评估人接收 - 任务","ctp_AAfK2oTp4Mir"),
// REGULATION_TECHNICAL_ASSESSMENT5("任务提醒,评估人接收-任务 到期前三天","ctp_AAfvKkz1bozO"),
// REGULATION_TECHNICAL_ASSESSMENT6("任务提醒,评估人接收-任务 当天","ctp_AAf2qRforjyP"),
//
// REGULATION_OPINION_COLLECTION1("法规意见收集发起提醒评估人","ctp_AAftzD2mN9jr"),
// REGULATION_OPINION_COLLECTION2("任务提醒,评估人接收-任务 到期前三天","ctp_AAfK2oTpzhDX"),
// REGULATION_OPINION_COLLECTION3("任务提醒,评估人接收-任务 当天","ctp_AAfefHo8XrBl"),
// REGULATION_OPINION_COLLECTION4("评估人提交通知发起人","ctp_AAft9XcQW1lV"),
// REGULATION_OPINION_COLLECTION5("任务完成当天通知发起人","ctp_AAftJ7q0YClP"),
//
//
//
//
// SUBSCRIPTION_NOTIFICATION1("虚拟清单订阅更新","ctp_AAfRLrOqGiF9"),
// SUBSCRIPTION_NOTIFICATION2("法规领域订阅更新","ctp_AAfvdg0Cy90I"),
// SUBSCRIPTION_NOTIFICATION3("虚拟清单订阅更新","ctp_AAfRLrOqGiF9"),
//
// SHARE_FORWARD1("转发推送","ctp_AAfdBUtdLJog"),
// SHARE_FORWARD2("问题知识库转发推送","ctp_AAfvQy0brRtq"),
// SHARE_FORWARD3("问题知识库评论信息","ctp_AAf2qRfosO2P"),
//
// REGULATION_EARLY_WARNING1("订阅法规预警","ctp_AAfvQy0br1R7"),
// REGULATION_EARLY_WARNING2("预警信息分享","ctp_AAfK3TvbktC9"),
//
// REGULATION_LIST_CONFIRMATION1("Studio发起,法规/认证接收-任务","ctp_AAfdBUtdpKCX"),
// REGULATION_LIST_CONFIRMATION2("任务提醒,法规认证接收-任务","ctp_AAftzD2mK31z"),
// REGULATION_LIST_CONFIRMATION3("状态通知,Studio接收/法规拒绝","ctp_AAftzD2mK7e6"),
// REGULATION_LIST_CONFIRMATION4("状态通知,Studio接收/认证拒绝","ctp_AAfvdg0C4OXb"),
//
// REGULATION_TASK_CONFIRMATION1("发起,工程接口人接收-任务","ctp_AAfvdg0C4qSM"),
// REGULATION_TASK_CONFIRMATION2("询问工程师,工程师接收-任务","ctp_AAftJ7q0OgGw"),
// REGULATION_TASK_CONFIRMATION3("工程师退回,接口人接收消息-任务","ctp_AAftzD2meZ6I"),
// REGULATION_TASK_CONFIRMATION4("工程师提交,接口人接收消息-任务","ctp_AAftJ7q0O8yL"),
// REGULATION_TASK_CONFIRMATION5("任务提醒,工程接口人接收-任务 3天前","ctp_AAfvdg0CdIu8"),
// REGULATION_TASK_CONFIRMATION6("任务提醒,工程接口人接收-任务 当天","ctp_AAftzD2mtsoN"),
// REGULATION_TASK_CONFIRMATION7("任务提醒,工程接口人接收-任务 逾期之后 3天,7天,14天通知","ctp_AAfvKkz1QK9Z"),
// REGULATION_TASK_CONFIRMATION8("任务提醒,工程接口人接收-任务 催办","ctp_AAf2qRfog8ey"),
// REGULATION_TASK_CONFIRMATION9("状态提醒,Studio接收","ctp_AAfK2oTpd2de"),
//
// DESIGN_COMPLIANCE_CONFIRMATION1("设计符合性任务,责任人接收-任务","ctp_AAftJ7q0YuC7"),
// DESIGN_COMPLIANCE_CONFIRMATION2("责任人下发工程师,工程师接收-任务责任人下发工程师,工程师接收-任务","ctp_AAft9XcQP4Qi"),
// DESIGN_COMPLIANCE_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfvdg0Czw0L"),
// DESIGN_COMPLIANCE_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAft9XcQTO27"),
// DESIGN_COMPLIANCE_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAftJ7q0feyC"),
// DESIGN_COMPLIANCE_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAfefHo8XmE9"),
// DESIGN_COMPLIANCE_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知","ctp_AAfvKkz1Ewe9"),
// DESIGN_COMPLIANCE_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知","ctp_AAftJ7q0ur2Z"),
// DESIGN_COMPLIANCE_CONFIRMATION9("任务提醒,责任人接收-任务 当天","ctp_AAfefHo8vZzW"),
// DESIGN_COMPLIANCE_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 3天,7天,14天通知","ctp_AAft9XcQW9xx"),
// DESIGN_COMPLIANCE_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAftJ7q0Yym9"),
// DESIGN_COMPLIANCE_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfefHo8vR6w"),
// DESIGN_COMPLIANCE_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAftJ7q0YF7H"),
//
// PRE_HOMO_CONFIRMATION1("Pre-Homo任务,责任人接收-任务","ctp_AAftJ7q0uXRs"),
// PRE_HOMO_CONFIRMATION2("责任人下发工程师,工程师接收-任务","ctp_AAfefHo8KU8o"),
// PRE_HOMO_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfvdg0C91Dv"),
// PRE_HOMO_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAftJ7q03tft"),
// PRE_HOMO_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAftJ7q03Xer"),
// PRE_HOMO_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAfvKkz1ETZU"),
// PRE_HOMO_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知","ctp_AAft9XcQTFYa"),
// PRE_HOMO_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知","ctp_AAfefHo8219e"),
// PRE_HOMO_CONFIRMATION9("任务提醒,责任人接收-任务 当天","ctp_AAftzD2mWof3"),
// PRE_HOMO_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 每天通知","ctp_AAftJ7q0ul4M"),
// PRE_HOMO_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAfvKkz1Evrr"),
// PRE_HOMO_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfvKkz1nMgY"),
// PRE_HOMO_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAftJ7q0rtdn"),
//
//
//
// VALIDATION_COMPLIANCE_CONFIRMATION1("验证符合性任务,责任人接收-任务","ctp_AAftJ7q0u3Je"),
// VALIDATION_COMPLIANCE_CONFIRMATION2("责任人下发工程师,工程师接收-任务","ctp_AAft9XcQLuty"),
// VALIDATION_COMPLIANCE_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfefHo8Kpsf"),
// VALIDATION_COMPLIANCE_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAfefHo8K9Qk"),
// VALIDATION_COMPLIANCE_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAft9XcQLkZO"),
// VALIDATION_COMPLIANCE_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAftzD2mPku1"),
// VALIDATION_COMPLIANCE_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知(接口人提交之后停止消息发送)","ctp_AAftJ7q0Hv3C"),
// VALIDATION_COMPLIANCE_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知(接口人提交之后停止消息发送)","ctp_AAftJ7q0HzZL"),
// VALIDATION_COMPLIANCE_CONFIRMATION9("任务提醒,责任人接收-任务 当天(接口人提交之后停止消息发送)","ctp_AAfefHo8edYl"),
// VALIDATION_COMPLIANCE_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 每天通知(接口人提交之后停止消息发送)","ctp_AAfefHo8ef2S"),
// VALIDATION_COMPLIANCE_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAftJ7q03z1d"),
// VALIDATION_COMPLIANCE_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfefHo8eOyG"),
// VALIDATION_COMPLIANCE_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAfefHo8K6DT"),
CERTIFICATION_MESSAGE2("Studio发起,认证工程师收到消息","ctp_AAuDmfXCkx8W"),
CERTIFICATION_MESSAGE3("认证工程师拒绝,studio收到消息","ctp_AAuDM8YPr3iJ"),
CERTIFICATION_MESSAGE4("studio撤回,认证工程师收到消息","ctp_AAuDmgJIf6Mr"),
CERTIFICATION_MESSAGE5("studio重置流程,认证工程师收到消息","ctp_AAuDM8YPrBfs"),
CERTIFICATION_MESSAGE6("认证清单-任务提醒,截止日期前第三天","ctp_AAuDmfXC3oJo"),
CERTIFICATION_MESSAGE7("认证清单-任务提醒,截止日期当天","ctp_AAuDmfXCHc1I"),
CERTIFICATION_MESSAGE8("认证清单-任务提醒,已逾期","ctp_AAuDMwOPU71H"),
CERTIFICATION_MESSAGE9("认证清单-责任人分发(转办),第二责任人收到消息","ctp_AAuDM8YP6soc"),
;
String name;
@@ -29,7 +29,7 @@ public enum CertificationInventoryFlowStatusEnum {
TASK_TO_BE_CONFIRMED("任务待确认","Task to be confirmed","Task to be confirmed"),
REFUSAL_OF_RESPONSIBLE_PERSON("责任人拒绝","Refusal of responsible person","Refusal of responsible person"),
RESULTS_TO_BE_SUBMITTED("结果待提交","Results to be submitted","Results to be submitted"),
ENGINEER_RETURN("工程师退回","Engineer return","Engineer return"),
//ENGINEER_RETURN("工程师退回","Engineer return","Engineer return"),
RESULTS_TO_BE_REVIEWED("结果待审查","Results to be reviewed","Results to be reviewed"),
REVIEW_AND_PASS("审查通过","Review and pass","Review and pass"),
REVIEW_AND_RETURN("审查退回","Review and return","Review and return"),
@@ -53,6 +53,8 @@ public enum OperatorTypeEnum {
CERTIFICATION_INVENTORY_STUDIO_EXPEDITING("认证清单-studio催办","certificationInventoryStudioExpediting"),
CERTIFICATION_INVENTORY_CERTIFICATION_ENGINEER_EXPEDITING("认证清单-认证工程师催办","certificationInventoryCertificationEngineerExpediting"),
CERTIFICATION_INVENTORY_SDT_EXPEDITING("认证清单-接口人催办","certificationInventorySdtExpediting"),
CERTIFICATION_INVENTORY_STUDIO_WITHDRAW("认证清单-studio撤回","certificationInventoryStudioWithdraw"),
CERTIFICATION_INVENTORY_STUDIO_RESET("认证清单-studio重置流程","certificationInventoryStudioReset"),
;
String name;
@@ -156,4 +156,8 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return
*/
Result<?> expediting(JSONObject json);
Map<String,Object> getCertificationInventoryLinkHrefFeishu(String projectLibraryId,String PRN_CN,String PRN_EN);
Map<String,Object> getStandNameAndItemName(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
}
@@ -125,6 +125,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
@Override
public void deleteById(String id) {
removeById(id);
QueryWrapper<ProcessInfoDetailEO> detailRemoveWrap = new QueryWrapper<>();
detailRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId,id);
this.processInfoDetailEOService.remove(detailRemoveWrap);
}
/**
@@ -135,8 +139,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
QueryWrapper<ProjectCertificationInventoryEO> queryWrap = new QueryWrapper<>();
queryWrap.lambda().eq(ProjectCertificationInventoryEO::getId,ids);
List<ProjectCertificationInventoryEO> list = this.list(queryWrap);
removeByIds(ids);
QueryWrapper<ProcessInfoDetailEO> detailRemoveWrap = new QueryWrapper<>();
detailRemoveWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,ids);
detailRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,list.get(0).getProjectLibraryId());
this.processInfoDetailEOService.remove(detailRemoveWrap);
}
/**
* 通过id查询
@@ -343,7 +355,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String projectLibraryId = json.getString("projectLibraryId");
// 获取项目信息,获取认证工程师,给认证工程师分配待办任务
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId);
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
if(ObjectUtils.isEmpty(projectLibraryBase)){
throw new JeroBootException("无法获取项目信息,请稍后重试!");
}
@@ -356,9 +370,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
List<String> certificationEngineerList = Arrays.asList(certificationEngineer.split(","));
List<String> certificationEngineerIdList = Arrays.asList(certificationEngineer.split(","));
// 给认证工程师分配任务
for (String userId : certificationEngineerList) {
for (String userId : certificationEngineerIdList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(userId);
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
@@ -381,6 +395,38 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
this.processInfoDetailEOService.remove(deleteDetailWrap);
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
this.updateBatchById(projectCertificationInventoryEOList);
// 获取认证清单 - 飞书跳转链接
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryId, PRN_CN, PRN_EN);
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
List<SysUser> certificationEngineerUserInfoList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
certificationEngineerIdList.forEach(userId -> {
try {
String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineerUserInfoList,userId);
if(StringUtils.isNotEmpty(thirdId)){
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE2.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",endTime);
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
}
} catch (Exception e) {
log.error("飞书消息推送失败");
}
});
return Result.OK("发布成功!");
}
@@ -691,7 +737,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
String projectLibraryId = json.getString("projectLibraryId");
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId);
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
if(ObjectUtils.isEmpty(projectLibraryBase)){
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
}
@@ -1084,6 +1130,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行操作!");
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> idList = Arrays.asList(ids.split(","));
List<String> flowStatusList = new ArrayList<>();
flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
@@ -1103,6 +1151,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("该项目的studio为空,请维护studio后再进行退回操作!");
}
List<SysUser> studioEngineerUserInfo = this.sysUserService.querySysUserListByIdList(Arrays.asList(projectLibraryBase.getStudioEngineer().split(",")));
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
// 获取认证清单 - 飞书跳转链接
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
// 给studio分配待办中心任务
/*List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
@@ -1110,17 +1168,60 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEOList.add(processInfoDetailEO);
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.STUDIOFQ.getKey());*/
try {
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList);
String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName");
try {
// 认证工程师退回任务到studio,将数据的状态更新为 认证退回
this.updateBatchById(projectCertificationInventoryEOList);
// 更新该项目认证流程中,认证工程师的任务状态。
// 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办
this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSJSRW.getKey(),flowStatusList);
try {
String thirdId = this.sysUserService.getUserThirdIdByUserId(studioEngineerUserInfo,projectLibraryBase.getStudioEngineer());
if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
Date endTime = projectCertificationInventoryEOList.get(0).getEndTime();
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE3.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
templateVariableMap.put("certificationEngineer",currentUser.getUsername());
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
}
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}catch (Exception ex){
ex.printStackTrace();
log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage());
@@ -1217,18 +1318,41 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("至少选择一条数据进行流程重置!");
}
String operatorType = json.getString("operatorType");
String projectLibraryId = json.getString("projectLibraryId");
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId);
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
if(ObjectUtils.isEmpty(projectLibraryBase)){
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
}
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
// 获取认证清单 - 飞书跳转链接
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryId, PRN_CN, PRN_EN);
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
List<String> idList = Arrays.asList(ids.split(","));
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList);
String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName");
try {
// 处理待办中心相关数据
// 更新该项目认证流程中,认证工程师的任务状态。
@@ -1259,6 +1383,50 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
updateWrap.eq(ProjectCertificationInventoryEO::getId,projectCertificationInventoryEO.getId());
this.update(updateWrap);
}
try {
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
if(CollectionUtils.isNotEmpty(certificationEngineerList)){
for (String certificationEngineerId : certificationEngineerIdList) {
String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineerList,certificationEngineerId);
if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
Date endTime = projectCertificationInventoryEOList.get(0).getEndTime();
JSONObject larkMesJson = new JSONObject();
if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_WITHDRAW.getValue())){
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE4.getValue());
}else if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_RESET.getValue())){
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE5.getValue());
}
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
}
}
}
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}catch (Exception ex){
ex.printStackTrace();
log.error("studio-流程重置失败:" + ex.getMessage());
@@ -1276,10 +1444,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String projectLibraryId = json.getString("projectLibraryId");
String transferUserId = json.getString("transferUserId");
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId);
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
if(ObjectUtils.isEmpty(projectLibraryBase)){
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
}
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> idList = Arrays.asList(ids.split(","));
@@ -1305,6 +1475,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
});
this.updateBatchById(projectCertificationInventoryEOList);
Collections.sort(projectCertificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
QueryWrapper<ProcessInfoDetailEO> detailQueryWrap = new QueryWrapper<>();
detailQueryWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryId);
detailQueryWrap.lambda().eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
@@ -1317,6 +1494,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
this.processInfoDetailEOService.updateBatchById(processInfoDetailEOList);
}
// 获取认证清单 - 飞书跳转链接
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList);
String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName");
SysUser sysUser = this.sysUserService.getBaseMapper().selectById(transferUserId);
if (StringUtils.isNotEmpty(sysUser.getThirdId())) {
try {
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE9.getValue());
larkMesJson.put("userIds",sysUser.getThirdId());
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn", PRN_CN);
templateVariableMap.put("projectNameEn", PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator", projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime", DateUtils.formatDate(projectCertificationInventoryEOList.get(0).getEndTime()));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}
return Result.OK("转办成功!");
}
@@ -1344,19 +1554,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){
//飞书跳转链接
String hrefFeishu_CN = backUrl
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink()
+ projectLibraryId
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
+ "&projectName=" + PRN_CN;
//飞书跳转链接
String hrefFeishu_EN = backUrl
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink()
+ projectLibraryId
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
+ "&projectName=" + PRN_EN;
// 获取认证清单 - 飞书跳转链接
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryId, PRN_CN, PRN_EN);
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
/**
* studio催办:除了 清单待发布、审查通过、认证退回 的 催办当前办理人
@@ -1377,8 +1578,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<String> certificationEngineerIdList = Arrays.asList(certificationEngineerIds.split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
StringBuilder standNameSb = new StringBuilder();
StringBuilder itemNameSb = new StringBuilder();
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(certificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
@@ -1389,53 +1588,35 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
});
Date endTime = certificationInventoryEOList.get(0).getEndTime();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) {
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){
itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(",");
}
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){
standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(",");
}
}
String standName = "";
if(StringUtils.isNotEmpty(standNameSb.toString())){
standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1);
}
String itemName = "";
if(StringUtils.isNotEmpty(itemNameSb.toString())){
itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1);
}
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(certificationInventoryEOList);
String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName");
if(CollectionUtils.isNotEmpty(certificationEngineerList)){
for (String certificationEngineerId : certificationEngineerIdList) {
String thirdId = certificationEngineerList.stream().filter(certificationEngineer -> {
boolean flag = false;
if(StringUtils.equals(certificationEngineerId,certificationEngineer.getId())){
flag = true;
String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineerList,certificationEngineerId);
if(StringUtils.isNotEmpty(thirdId)){
try {
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
} catch (Exception e) {
log.error("飞书消息推送失败");
}
return flag;
}).collect(Collectors.toList()).get(0).getThirdId();
try {
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}
}
@@ -1457,62 +1638,42 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String key = map.getKey();
List<ProjectCertificationInventoryEO> value = map.getValue();
String thirdId = dutyPersonList.stream().filter(dutyPersonInfo -> {
boolean flag = false;
if(StringUtils.equals(key,dutyPersonInfo.getId())){
flag = true;
String thirdId = this.sysUserService.getUserThirdIdByUserId(dutyPersonList,key);
if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(value, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(value);
String standName = (String) standNameAndItemName.get("standName");
String itemName = (String) standNameAndItemName.get("itemName");
Date endTime = value.get(0).getEndTime();
try {
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
} catch (Exception e) {
log.error("飞书消息推送失败");
}
return flag;
}).collect(Collectors.toList()).get(0).getThirdId();
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
Collections.sort(value, new Comparator<ProjectCertificationInventoryEO>() {
@Override
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
return p1.getEndTime().compareTo(p2.getEndTime());
}
});
Date endTime = value.get(0).getEndTime();
StringBuilder standNameSb = new StringBuilder();
StringBuilder itemNameSb = new StringBuilder();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : value) {
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){
itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(",");
}
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){
standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(",");
}
}
String standName = "";
if(StringUtils.isNotEmpty(standNameSb.toString())){
standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1);
}
String itemName = "";
if(StringUtils.isNotEmpty(itemNameSb.toString())){
itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1);
}
try {
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("projectNameCn",PRN_CN);
templateVariableMap.put("projectNameEn",PRN_EN);
templateVariableMap.put("standName",standName);
templateVariableMap.put("itemName",itemName);
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}
}
@@ -1521,4 +1682,68 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("催办成功!");
}
/**
* 获取标准编号和检验项目 发飞书消息使用
* @param projectCertificationInventoryEOList
* @return
*/
@Override
public Map<String,Object> getStandNameAndItemName(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList){
Map<String,Object> result = new HashMap<>();
StringBuilder standNameSb = new StringBuilder();
StringBuilder itemNameSb = new StringBuilder();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){
itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(",");
}
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){
standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(",");
}
}
String standName = "";
if(StringUtils.isNotEmpty(standNameSb.toString())){
standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1);
}
String itemName = "";
if(StringUtils.isNotEmpty(itemNameSb.toString())){
itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1);
}
result.put("standName",standName);
result.put("itemName",itemName);
return result;
}
/**
* 获取认证清单飞书跳转链接
* @param projectLibraryId
* @param PRN_CN
* @param PRN_EN
* @return
*/
@Override
public Map<String,Object> getCertificationInventoryLinkHrefFeishu(String projectLibraryId,String PRN_CN,String PRN_EN){
Map<String,Object> result = new HashMap<>();
String hrefFeishu_CN = backUrl
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink()
+ projectLibraryId
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
+ "&projectName=" + PRN_CN;
//飞书跳转链接
String hrefFeishu_EN = backUrl
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink()
+ projectLibraryId
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
+ "&projectName=" + PRN_EN;
result.put("hrefFeishu_CN",hrefFeishu_CN);
result.put("hrefFeishu_EN",hrefFeishu_EN);
return result;
}
}
@@ -872,7 +872,8 @@
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
postAction('/project/projectCertificationInventoryEO/resetFlow', {
ids: idList.join(','),
projectLibraryId: _this.$route.query.id
projectLibraryId: _this.$route.query.id,
operatorType: 'certificationInventoryStudioReset'
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
@@ -969,7 +970,8 @@
onOk() {
postAction('/project/projectCertificationInventoryEO/resetFlow', {
ids: ids.join(','),
projectLibraryId: _this.$route.query.id
projectLibraryId: _this.$route.query.id,
operatorType: 'certificationInventoryStudioWithdraw'
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))