diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java index 64efabd13..c3445c9e8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java @@ -169,6 +169,12 @@ public enum TemplateInfoEnum2 { // 认证参数收集-退回 HOMO_PARAMETER_COLLECTION_BACK("认证参数收集","ctp_AArY5ngxD5cv","Homo Parameter Collection"), // 已同步飞书开放平台 + // OTA认证管理-公共-绿色 + OTA_MANAGER_G("OTA认证管理","ctp_AAm2fgLqJccz","OTA Manager Green"), // 已同步飞书开放平台 + + // OTA认证管理-公共-红色 + OTA_MANAGER_R("OTA认证管理","ctp_AAmvnNtu20oM","OTA Manager Red"), // 已同步飞书开放平台 + ; String nameCn; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java index 32b293848..711a2ba28 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java @@ -159,4 +159,10 @@ public interface IFeishuService { */ void sendMessageHomoParameterCollection(String templeteId,Map params,String flag); + + /** + * 飞书消息模板--OTA认证管理(主题颜色为绿色) + */ + public void sendMessageOtaManager(String templeteId, Map params); + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java index 5e73a8002..ef6b1052b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java @@ -1636,4 +1636,52 @@ public class FeishuServiceImpl implements IFeishuService { } } + /** + * 飞书消息模板--OTA认证管理(主题颜色为红色或绿色) + * + * @param templeteId + * @param params + */ + @Override + public void sendMessageOtaManager(String templeteId, Map params) { + List userIdList = (List) params.get("userIdList"); + if (CollectionUtils.isNotEmpty(userIdList)) { + List userInfoList = this.sysUserService.querySysUserListByIdList(userIdList); + + String contentCn = (String) params.get("contentCn"); + String contentEn = (String) params.get("contentEn"); + String viewBtnUrlCn = (String) params.get("viewBtnUrlCn"); + String viewBtnUrlEn = (String) params.get("viewBtnUrlEn"); + String viewBtnUrlCnPhone = (String) params.get("viewBtnUrlCnPhone"); + String plannedBpLaunchBatch = (String) params.get("plannedBpLaunchBatch"); + String appliedVehicleProject = (String) params.get("appliedVehicleProject"); + String initiator = (String) params.get("initiator"); + try { + for (String userId : userIdList) { + String thirdId = this.sysUserService.getUserThirdIdByUserId(userInfoList, userId); + if (StringUtils.isNotEmpty(thirdId)) { + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", templeteId); + larkMesJson.put("userIds", thirdId); + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("contentCn", contentCn); + templateVariableMap.put("contentEn", contentEn); + templateVariableMap.put("viewBtnUrlCn", viewBtnUrlCn); + templateVariableMap.put("viewBtnUrlEn", viewBtnUrlEn); + templateVariableMap.put("viewBtnUrlCnPhone", viewBtnUrlCnPhone); + templateVariableMap.put("plannedBpLaunchBatch", plannedBpLaunchBatch); + templateVariableMap.put("appliedVehicleProject", appliedVehicleProject); + templateVariableMap.put("Initiator", " " + initiator); + + larkMesJson.put("templateVariableMap", templateVariableMap); + batchSendLarkCardMsgByTemplate2(larkMesJson); + } + } + } catch (Exception e) { + log.error("飞书消息推送失败"); + } + } + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java index 897dd60c0..645310d20 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java @@ -9,6 +9,8 @@ import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; import com.jero.common.util.oConvertUtils; import com.jero.modules.dummy.enums.OrderEnum; +import com.jero.modules.feishu.enums.TemplateInfoEnum2; +import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.ota.entity.OtaManageApplyEO; import com.jero.modules.ota.entity.OtaManageHistory; import com.jero.modules.ota.entity.OtaManagePermission; @@ -110,9 +112,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl ompList = new ArrayList<>(); for (String studioId : matchStudioSet) { OtaManagePermission omp = new OtaManagePermission(); @@ -1287,6 +1294,26 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl params = new HashMap<>(); + List userIdList = new ArrayList<>(matchStudioSet); + params.put("userIdList", userIdList); + params.put("contentCn", "您好,请及时查看处理此项任务,谢谢!-请在PC端查看"); + params.put("contentEn", "Hello! Please check and address the task in a timely manner. Thank you!-Check on the PC"); + params.put("plannedBpLaunchBatch", id); + params.put("viewBtnUrlCnPhone", backUrlPhone); + String url = backUrl; + if (omrList.size() > 0) { + url = backUrl + "/components/detil?plannedBpLaunchBatch=" + id + "&releaseDate=" + omrList.get(0).getReleaseDate(); + } + params.put("viewBtnUrlCn", url); + params.put("viewBtnUrlEn", url); + params.put("appliedVehicleProject", appMap.keySet().stream().collect(Collectors.joining(","))); + params.put("Initiator", " " + currentUser.getUsername()); + params.put("initiatorStrCn", "发起人"); + params.put("initiatorStrEn", "Initiator"); + feishuService.sendMessageOtaManager(TemplateInfoEnum2.OTA_MANAGER_G.getValue(), params); } } @@ -1298,6 +1325,14 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getAllOtaManager() { + List omList = this.sysUserRoleMapper.selectList(new QueryWrapper().lambda().eq(SysUserRole::getRoleId, RoleEnum.STUDIO.getId())); + List resList = omList.stream() + .filter(e -> StringUtils.isNotBlank(e.getId())) + .map(SysUserRole::getId).distinct().collect(Collectors.toList()); + return resList; + } + private boolean isOtaManager() { LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); List userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色 @@ -1476,6 +1511,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl submit(List list, String cut) { LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //发消息用参数 + List userIdList = getAllOtaManager(); + //操作历史 List hisList = new ArrayList<>(); List msgList = new ArrayList<>(); for (OtaManageApplyEO oma : list) { @@ -1503,10 +1541,27 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl params = new HashMap<>(); + params.put("userIdList", userIdList); + params.put("contentCn", "您好,该任务信息已提交,请及时查看处理此项任务,谢谢!-请在PC端查看"); + params.put("contentEn", "Hello! The task information has been submitted, please check and address the task in a timely manner. Thank you!-Check on the PC"); + params.put("plannedBpLaunchBatch", oma.getPlannedBpLaunchBatch()); + params.put("viewBtnUrlCnPhone", backUrlPhone); + String url = backUrl + "/components/detil?plannedBpLaunchBatch=" + oma.getPlannedBpLaunchBatch() + "&releaseDate=" + oma.getReleaseDate(); + params.put("viewBtnUrlCn", url); + params.put("viewBtnUrlEn", url); + params.put("appliedVehicleProject", oma.getVehicleType()); + params.put("Initiator", " " + user.getUsername()); + params.put("initiatorStrCn", "提交人"); + params.put("initiatorStrEn", "Submitter"); + feishuService.sendMessageOtaManager(TemplateInfoEnum2.OTA_MANAGER_G.getValue(), params); } } this.temporarySave(list, true, cut); otaManageHistoryService.saveBatch(hisList); + return msgList; } @@ -1627,6 +1682,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl params = new HashMap<>(); + params.put("userIdList", oma.getStudio()); + params.put("contentCn", "您好,该任务被发起人审查通过。-请在PC端查看"); + params.put("contentEn", "Hello! The task has been approved by the initiator.-Check on the PC"); + params.put("plannedBpLaunchBatch", oma.getPlannedBpLaunchBatch()); + params.put("viewBtnUrlCnPhone", backUrlPhone); + String url = backUrl + "/components/detil?plannedBpLaunchBatch=" + oma.getPlannedBpLaunchBatch() + "&releaseDate=" + oma.getReleaseDate(); + params.put("viewBtnUrlCn", url); + params.put("viewBtnUrlEn", url); + params.put("appliedVehicleProject", oma.getVehicleType()); + params.put("Initiator", " " + user.getUsername()); + params.put("initiatorStrCn", "发起人"); + params.put("initiatorStrEn", "Initiator"); + feishuService.sendMessageOtaManager(TemplateInfoEnum2.OTA_MANAGER_G.getValue(), params); } else { //状态不对 if (CutEnum.CN.getValue().equals(cut)) { @@ -1659,6 +1730,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl params = new HashMap<>(); + params.put("userIdList", oma.getStudio()); + params.put("contentCn", "您好,该任务被发起人审查退回,请重新处理。-请在PC端查看"); + params.put("contentEn", "Hello! The task is rejected by the inditiator, please address it again.-Check on the PC"); + params.put("plannedBpLaunchBatch", oma.getPlannedBpLaunchBatch()); + params.put("viewBtnUrlCnPhone", backUrlPhone); + String url = backUrl + "/components/detil?plannedBpLaunchBatch=" + oma.getPlannedBpLaunchBatch() + "&releaseDate=" + oma.getReleaseDate(); + params.put("viewBtnUrlCn", url); + params.put("viewBtnUrlEn", url); + params.put("appliedVehicleProject", oma.getVehicleType()); + params.put("Initiator", " " + user.getUsername()); + params.put("initiatorStrCn", "发起人"); + params.put("initiatorStrEn", "Initiator"); + feishuService.sendMessageOtaManager(TemplateInfoEnum2.OTA_MANAGER_R.getValue(), params); } else { //状态不对 if (CutEnum.CN.getValue().equals(cut)) { diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue index 125aabf9a..3fe35e7de 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue @@ -14,7 +14,7 @@
- {{'VDR'}} + {{'VDR'}} {{form.vdr}}
@@ -24,7 +24,7 @@
- {{$t('theme')}} + {{$t('theme')}} {{form.summary}}
@@ -34,7 +34,7 @@
- {{$t('authenticationimpact')}} + {{$t('authenticationimpact')}} {{form.homologationImpact}}
@@ -44,7 +44,7 @@
- {{$t('influencestatute') + '-CN'}} + {{$t('influencestatute') + '-CN'}} {{form.impactCnHomo}}
@@ -54,33 +54,33 @@
- {{$t('influencestatute') + '-EU'}} + {{$t('influencestatute') + '-EU'}} {{form.impactEuHomo}}
-
{{$t('applicationprojectversion')}}
+
{{$t('applicationprojectversion')}}
- {{item.versionName}} + {{item.versionName}}
- {{$t('certificationStartOne')}} + {{$t('certificationStartOne')}} {{item.attestationStartTime?item.attestationStartTime:'--'}}
- {{$t('certificationdeclaration')}} + {{$t('certificationdeclaration')}} {{item.certificationSubmission?item.certificationSubmission:'--'}}
@@ -89,14 +89,14 @@
- {{$t('certificationEnd')}} + {{$t('certificationEnd')}} {{item.attestationEndTime?item.attestationEndTime:'--'}}
- {{$t('CertificationProgress')}} + {{$t('CertificationProgress')}} {{item.attestationSchedule?item.attestationSchedule:'--'}}
@@ -198,11 +198,19 @@ export default { .detail-box{ width: 100%; margin-bottom: 20px; + position: relative; } .detail-text{ display: inline-block; - width: 95px; + width: 153px; font-weight: bold; + overflow: hidden; /*超出部分隐藏*/ + text-overflow: ellipsis; /*超出部分省略号表示*/ + white-space: nowrap; /*强制单行显示*/ + display: inline-block; /*转换为行内块元素*/ +} +.title-text-text{ + position: absolute; } .title-text { width: 250px; diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue index 5b6210cd2..b4d36af61 100644 --- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue +++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue @@ -295,6 +295,7 @@ let _this = this // 先调取接口判断是否有配置信息 if (item.isHistory == '1'){ + item.projectName = this.$route.query.projectName let newUrl = _this.$router.resolve({ path: '/ParameterItemCollection', query: {it: item.id, diff --git a/jero-web/src/views/projectManagement/components/otastatus.vue b/jero-web/src/views/projectManagement/components/otastatus.vue index 245bb8490..96716853a 100644 --- a/jero-web/src/views/projectManagement/components/otastatus.vue +++ b/jero-web/src/views/projectManagement/components/otastatus.vue @@ -146,9 +146,6 @@ }, methods: { - vdrcheckClick(){ - - }, getData() { let query = { ...this.queryParam, @@ -175,7 +172,9 @@ getAction('ota/otaManageApplyEO/getVdrListByProject', { projectId: id }).then((res) => { if (res.success) { this.options = res.result - this.queryParam.plannedBpLaunchBatch = this.options[0].plannedBpLaunchBatch + if(this.options.length != 0 ){ + this.queryParam.plannedBpLaunchBatch = this.options[0].plannedBpLaunchBatch + } this.getData() // this.getData(this.queryParam.ctype) } else {