Merge remote-tracking branch 'origin/feature_dev_20221025_message' into dev_2nd_period_test
# Conflicts: # jero-boot/db/蔚来标准sql/dev_third_record.sql # jero-web/src/common/lang/en-us.js # jero-web/src/common/lang/zh-cn.js # jero-web/src/views/processCenter/components/feedbackInformation.vue # jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
This commit is contained in:
@@ -1203,6 +1203,3 @@ MODIFY COLUMN `content_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
|
|||||||
ALTER TABLE `laws_weilai`.`laws_monthly_report_write`
|
ALTER TABLE `laws_weilai`.`laws_monthly_report_write`
|
||||||
MODIFY COLUMN `work_progress_cn` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展中文' AFTER `content_en`,
|
MODIFY COLUMN `work_progress_cn` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展中文' AFTER `content_en`,
|
||||||
MODIFY COLUMN `work_progress_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展英文' AFTER `work_progress_cn`;
|
MODIFY COLUMN `work_progress_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展英文' AFTER `work_progress_cn`;
|
||||||
|
|
||||||
--文档拆分条款 条款号取消必填 2022-10-25 未同步生产环境
|
|
||||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `field_must_input` = '0' WHERE `id` = '0a455895498552bc709dff250b3364b1'
|
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
package com.jero.common.constant.enums;
|
||||||
|
|
||||||
|
public enum MessageType2Enum {
|
||||||
|
|
||||||
|
|
||||||
|
SUBSCRIPTION_NOTIFICATION("Subscription Notification","订阅通知"),
|
||||||
|
SHARE_FORWARD("Share Forward","转发推送"),
|
||||||
|
REGULATION_EARLY_WARNING("Regulation Early Warning","法规预警"),
|
||||||
|
REGULATION_LIST_CONFIRMATION("Regulation List Confirmation","法规清单确认"),
|
||||||
|
REGULATION_TASK_CONFIRMATION("Regulation Task Confirmation","法规任务确认"),
|
||||||
|
DESIGN_COMPLIANCE_CONFIRMATION("Design Compliance Confirmation","设计符合性确认"),
|
||||||
|
PRE_HOMO_CONFIRMATION("Pre-Homo Confirmation","Pre-Homo确认"),
|
||||||
|
VALIDATION_COMPLIANCE_CONFIRMATION("Validation Compliance Confirmation","验证符合性确认"),
|
||||||
|
REGULATION_OPINION_COLLECTION("Regulation Opinion Collection","法规意见收集"),
|
||||||
|
REGULATION_TECHNICAL_ASSESSMENT("Regulation Technical Assessment","法规技术评估"),
|
||||||
|
HOMO_PARAMETER_COLLECTION("Homo Parameter Collection","认证参数收集");
|
||||||
|
|
||||||
|
String en;
|
||||||
|
String cn;
|
||||||
|
|
||||||
|
MessageType2Enum(String en, String cn) {
|
||||||
|
this.en = en;
|
||||||
|
this.cn = cn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEn() {
|
||||||
|
return en;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEn(String en) {
|
||||||
|
this.en = en;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCn() {
|
||||||
|
return cn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCn(String cn) {
|
||||||
|
this.cn = cn;
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
-12
@@ -6,11 +6,11 @@ package com.jero.common.constant.enums;
|
|||||||
* @auth zhn
|
* @auth zhn
|
||||||
*/
|
*/
|
||||||
public enum MessageTypeEnum {
|
public enum MessageTypeEnum {
|
||||||
READ("Subscription Notification","1"),
|
READ("Subscription Notification","订阅通知","1"),
|
||||||
WARN("Early Warning","2"),
|
WARN("Regulation Early Warning","法规预警","2"),
|
||||||
PUSH("Share / Forward","3"),
|
PUSH("Share / Forward","转发推送","3"),
|
||||||
HOMO_TASK("Homo Parameter Task","4"),
|
HOMO_TASK("Homo Parameter Task","","4"),
|
||||||
TASK("Regulation Compliance Task", "5"),
|
TASK("Regulation Compliance Task","", "5"),
|
||||||
//REGULATION_LIST_CONFIRMATION_TASK("Regulation List Confirmation Task", "6"), // 清单确认任务
|
//REGULATION_LIST_CONFIRMATION_TASK("Regulation List Confirmation Task", "6"), // 清单确认任务
|
||||||
//REGULATION_LIST_CONFIRMATION_NOTIFICATION("Regulation List Confirmation Notification", "7"), // 清单确认通知
|
//REGULATION_LIST_CONFIRMATION_NOTIFICATION("Regulation List Confirmation Notification", "7"), // 清单确认通知
|
||||||
//REGULATION_TASK_CONFIRMATION_TASK("Regulation Task Confirmation", "8"), // 任务确认任务
|
//REGULATION_TASK_CONFIRMATION_TASK("Regulation Task Confirmation", "8"), // 任务确认任务
|
||||||
@@ -21,19 +21,21 @@ public enum MessageTypeEnum {
|
|||||||
//DESIGN_COMPLIANCE_NOTIFICATION("Design Compliance Notification", "12"), // 设计符合性通知
|
//DESIGN_COMPLIANCE_NOTIFICATION("Design Compliance Notification", "12"), // 设计符合性通知
|
||||||
//PRE_HOMO_NOTIFICATION("Pre-Homo Notification", "13"), // Pre-Homo通知
|
//PRE_HOMO_NOTIFICATION("Pre-Homo Notification", "13"), // Pre-Homo通知
|
||||||
//VALIDATION_COMPLIANCE_NOTIFICATION("Validation Compliance Notification", "14"), // 验证符合性通知
|
//VALIDATION_COMPLIANCE_NOTIFICATION("Validation Compliance Notification", "14"), // 验证符合性通知
|
||||||
SYSTEMATIC_NOTIFICATION("Systematic Notification", "15"), // 系统通知
|
SYSTEMATIC_NOTIFICATION("Systematic Notification","", "15"), // 系统通知
|
||||||
LIST_CONFIRMATION("List Confirmation", "17"), // 清单确认
|
LIST_CONFIRMATION("List Confirmation", "","17"), // 清单确认
|
||||||
TASK_CONFIRMATION("Task Confirmation", "18"), // 任务确认
|
TASK_CONFIRMATION("Task Confirmation", "","18"), // 任务确认
|
||||||
COMPLIANCE_CONFIRMATION("Compliance Confirmation", "19"), // 符合性确认
|
COMPLIANCE_CONFIRMATION("Compliance Confirmation","", "19"), // 符合性确认
|
||||||
COLLECTION_OF_LEGISLATIVE_COMMENTS("Collection of Legislative Comments", "20"), // 法规意见收集
|
COLLECTION_OF_LEGISLATIVE_COMMENTS("Collection of Legislative Comments","", "20"), // 法规意见收集
|
||||||
REGULATORY_AND_TECHNICAL_ASSESSMENT("Regulatory and technical assessment", "21"), // 法规技术评估
|
REGULATORY_AND_TECHNICAL_ASSESSMENT("Regulatory and technical assessment", "","21"), // 法规技术评估
|
||||||
;
|
;
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
String nameCn;
|
||||||
String value;
|
String value;
|
||||||
|
|
||||||
private MessageTypeEnum(String name, String value) {
|
private MessageTypeEnum(String name,String nameCn, String value) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.nameCn = nameCn;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,4 +54,12 @@ public enum MessageTypeEnum {
|
|||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getNameCn() {
|
||||||
|
return nameCn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameCn(String nameCn) {
|
||||||
|
this.nameCn = nameCn;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
package com.jero.common.constant.enums;
|
||||||
|
|
||||||
|
public enum MsgColorEnum {
|
||||||
|
|
||||||
|
GREEN("其他","green"),
|
||||||
|
RED("任务被拒绝","red"),
|
||||||
|
YELLOW("任务预期","yellow");
|
||||||
|
|
||||||
|
String label;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
MsgColorEnum(String label, String value) {
|
||||||
|
this.label = label;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-1
@@ -26,4 +26,6 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
|||||||
List<ParamsCollectManifestEO> listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId);
|
List<ParamsCollectManifestEO> listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId);
|
||||||
|
|
||||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||||
}
|
|
||||||
|
List<ParamsCollectManifestEO> queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString);
|
||||||
|
}
|
||||||
|
|||||||
+4
@@ -108,4 +108,8 @@
|
|||||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryByParamManifestId" resultMap="ParamsCollectManifestEOResultMap">
|
||||||
|
select * from params_collect_manifest where params_manifest_id = #{paramsManifestId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
+1
-1
@@ -147,7 +147,7 @@
|
|||||||
select tmp_tb.* from(
|
select tmp_tb.* from(
|
||||||
select
|
select
|
||||||
plb.id as project_id,
|
plb.id as project_id,
|
||||||
concat(pni.project_name,'-',pyni.year_name,' ',target_market) as project_name
|
concat(pni.project_name,'-',pyni.year_name,'-',target_market,'-',project_version) as project_name
|
||||||
from project_library_base plb
|
from project_library_base plb
|
||||||
left join project_name_info as pni on plb.project_name_id = pni.id
|
left join project_name_info as pni on plb.project_name_id = pni.id
|
||||||
left join project_year_name_info as pyni on plb.year_name_id = pyni.id
|
left join project_year_name_info as pyni on plb.year_name_id = pyni.id
|
||||||
|
|||||||
+4
@@ -164,4 +164,8 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
|||||||
|
|
||||||
// 调整责任领域
|
// 调整责任领域
|
||||||
List<String> updateBatchDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO);
|
List<String> updateBatchDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||||
|
|
||||||
|
//监控参数收集任务的截止时间,并根据时间段发送飞书
|
||||||
|
void checkDeadline();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+332
-70
@@ -11,10 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.jero.common.constant.CommonConstant;
|
import com.jero.common.constant.CommonConstant;
|
||||||
import com.jero.common.constant.WebsocketConst;
|
import com.jero.common.constant.WebsocketConst;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.*;
|
||||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
|
||||||
import com.jero.common.constant.enums.ModuleEnum;
|
|
||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
@@ -40,6 +37,7 @@ import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
|||||||
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.message.websocket.WebSocket;
|
import com.jero.modules.message.websocket.WebSocket;
|
||||||
import com.jero.modules.ocr.service.WebSocketServer;
|
import com.jero.modules.ocr.service.WebSocketServer;
|
||||||
@@ -1282,13 +1280,103 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||||
|
|
||||||
updateEO.setState(String.valueOf(Integer.parseInt(paramsCollectManifestEO.getState()) - 2)); // 设置对应状态
|
updateEO.setState(String.valueOf(Integer.parseInt(paramsCollectManifestEO.getState()) - 2)); // 设置对应状态
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
updateEO.setState(String.valueOf(Integer.parseInt(paramsCollectManifestEO.getState()) + 1)); // 设置对应状态
|
updateEO.setState(String.valueOf(Integer.parseInt(paramsCollectManifestEO.getState()) + 1)); // 设置对应状态
|
||||||
}
|
}
|
||||||
updateEOList.add(updateEO);
|
updateEOList.add(updateEO);
|
||||||
}
|
}
|
||||||
return updateBatchById(updateEOList);
|
boolean update = updateBatchById(updateEOList);
|
||||||
|
if (update) {
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
|
//飞书
|
||||||
|
for (ParamsCollectManifestEO paramsCollectManifestEO : updateEOList) {
|
||||||
|
paramsCollectManifestEO = getById(paramsCollectManifestEO.getId());
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsCollectManifestEO.getParamsManifestId());
|
||||||
|
//日期
|
||||||
|
String deadline = new SimpleDateFormat("yyyy-MM-dd").format(paramsCollectManifestEO.getDeadline());
|
||||||
|
//项目名称
|
||||||
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(paramsManifestEO.getProjectId()); // 获取项目信息
|
||||||
|
//url
|
||||||
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
|
//认证工程师
|
||||||
|
String[] engThirdIds = new String[1];
|
||||||
|
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseMapper.queryById(paramsManifestEO.getProjectId());
|
||||||
|
if (ObjectUtils.isNotEmpty(projectLibraryBases)) {
|
||||||
|
SysUser engineer = sysUserService.getById(projectLibraryBases.get(0).getCertificationEngineer());
|
||||||
|
if (ObjectUtils.isNotEmpty(engineer)) {
|
||||||
|
engThirdIds[0] = engineer.getThirdId();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||||
|
//通知认证工程师
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
|
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"退回了参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
|
||||||
|
feishuMsgVo.setCnContentLower("项目: " + projectInfo.getProjectName() +
|
||||||
|
"\n发起人: " + currentUser.getUsername() +
|
||||||
|
"\n截止时间: " + deadline);
|
||||||
|
feishuMsgVo.setEnContentUpper("Hello! "+ currentUser.getUsername() +" has returned the Parameter NIO-"+ paramsCollectManifestEO.getNioNumber() +". Please address it in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower("Project: " + projectInfo.getProjectName() +
|
||||||
|
"\nInitiator: " + currentUser.getUsername() +
|
||||||
|
"\nDue Date: " + deadline);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
} else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||||
|
|
||||||
|
//通知认证工程师
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
|
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
|
||||||
|
feishuMsgVo.setCnContentLower("项目: " + projectInfo.getProjectName() +
|
||||||
|
"\n发起人: " + currentUser.getUsername() +
|
||||||
|
"\n截止时间: " + deadline);
|
||||||
|
feishuMsgVo.setEnContentUpper("Hello! "+ currentUser.getUsername() +" requested for withdrawing Parameter NIO-"+ paramsCollectManifestEO.getNioNumber() +". Please address it in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower("Project: " + projectInfo.getProjectName() +
|
||||||
|
"\nInitiator: " + currentUser.getUsername() +
|
||||||
|
"\nDue Date: " + deadline);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
//通知工程接口人
|
||||||
|
SysUser sdtUser = sysUserService.getUserByName(paramsCollectManifestEO.getSdt());
|
||||||
|
String[] SdtThirdIds = new String[1];
|
||||||
|
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
||||||
|
SdtThirdIds[0] = sdtUser.getThirdId();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
|
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"退回了参数NIO-"+ paramsManifestEO.getTitle() +",请及时处理");
|
||||||
|
feishuMsgVo.setCnContentLower("项目: " + projectInfo.getProjectName() +
|
||||||
|
"\n发起人: " + currentUser.getUsername() +
|
||||||
|
"\n截止时间: " + deadline);
|
||||||
|
feishuMsgVo.setEnContentUpper("Hello! "+ currentUser.getUsername() +" has returned the Parameter NIO-"+ paramsManifestEO.getTitle() +". Please address it in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower("Project: " + projectInfo.getProjectName() +
|
||||||
|
"\nInitiator: " + currentUser.getUsername() +
|
||||||
|
"\nDue Date: " + deadline);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1441,13 +1529,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
thirdIds[0] = sysUser.getThirdId();
|
thirdIds[0] = sysUser.getThirdId();
|
||||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
//String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
||||||
String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it.";
|
//String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it.";
|
||||||
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
//String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
||||||
String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete";
|
//String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete";
|
||||||
|
|
||||||
// 发送系统消息
|
// 发送系统消息
|
||||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
/*SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||||
sysAnnouncement.setDelFlag("0");
|
sysAnnouncement.setDelFlag("0");
|
||||||
sysAnnouncement.setSendStatus("0");
|
sysAnnouncement.setSendStatus("0");
|
||||||
sysAnnouncement.setSendTime(new Date());
|
sysAnnouncement.setSendTime(new Date());
|
||||||
@@ -1464,10 +1552,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||||
obj.put(WebsocketConst.MSG_ID, paramsManifestId);
|
obj.put(WebsocketConst.MSG_ID, paramsManifestId);
|
||||||
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
||||||
webSocket.sendMessage(obj.toJSONString());
|
webSocket.sendMessage(obj.toJSONString());*/
|
||||||
|
|
||||||
// 发送飞书消息
|
// 发送飞书消息
|
||||||
try {
|
/*try {
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName());
|
feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName());
|
||||||
feishuMsgVo.setContent(content);
|
feishuMsgVo.setContent(content);
|
||||||
@@ -1479,6 +1567,23 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
feishuService.sendCardMsg(thirdIds, feishuMsgVo);
|
feishuService.sendCardMsg(thirdIds, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
|
}*/
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
|
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"向您分发了认证参数填写任务,请及时处理。");
|
||||||
|
feishuMsgVo.setCnContentLower("项目: " + projectInfo.getProjectName() +
|
||||||
|
"\n发起人: " + currentUser.getUsername() +
|
||||||
|
"\n截止时间: " + sdf.format(deadline));
|
||||||
|
feishuMsgVo.setEnContentUpper("Hello! "+ currentUser.getUsername() +" has assigned the task of filling in Homo Parameter to you. Please address it in a timely manner.");
|
||||||
|
feishuMsgVo.setEnContentLower("Project: " + projectInfo.getProjectName() +
|
||||||
|
"\nInitiator: " + currentUser.getUsername() +
|
||||||
|
"\nDue Date: " + sdf.format(deadline));
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(thirdIds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
return isSuccess;
|
return isSuccess;
|
||||||
@@ -1512,7 +1617,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
List<ParamsCollectManifestEO> paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr));
|
List<ParamsCollectManifestEO> paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr));
|
||||||
paramsCollectManifestEOList = paramsCollectManifestEOList.stream().sorted(Comparator.comparing(ParamsCollectManifestBaseEO::getNioNumber)).collect(Collectors.toList()); // 按NIO编号升序
|
paramsCollectManifestEOList = paramsCollectManifestEOList.stream().sorted(Comparator.comparing(ParamsCollectManifestBaseEO::getNioNumber)).collect(Collectors.toList()); // 按NIO编号升序
|
||||||
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
|
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
|
||||||
// 判断参数项状态
|
// 判断参数项状态
|
||||||
if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())
|
if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())
|
||||||
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())
|
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())
|
||||||
@@ -1543,19 +1648,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
boolean isSuccess = updateBatchById(updateEOList);
|
boolean isSuccess = updateBatchById(updateEOList);
|
||||||
|
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
// 消息内容
|
// 消息内容
|
||||||
List<ParamsCollectManifestEO> afterUpdateEOList = listByIds(updateEOIdList);
|
List<ParamsCollectManifestEO> afterUpdateEOList = listByIds(updateEOIdList);
|
||||||
List<String> sdtList = afterUpdateEOList.stream()
|
List<String> sdtList = afterUpdateEOList.stream()
|
||||||
.map(ParamsCollectManifestEO::getSdt)
|
.map(ParamsCollectManifestEO::getSdt)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollectionUtil.isEmpty(sdtList)) {
|
if (CollectionUtil.isEmpty(sdtList)) {
|
||||||
throw new JeroBootException("没有可下发的工程接口人!");
|
throw new JeroBootException("没有可下发的工程接口人!");
|
||||||
}
|
}
|
||||||
for (String sdt : sdtList) {
|
for (String sdt : sdtList) {
|
||||||
|
|
||||||
StringBuilder connectBuilder = new StringBuilder();
|
/* StringBuilder connectBuilder = new StringBuilder();
|
||||||
connectBuilder.append("You are required to fill in ");
|
connectBuilder.append("You are required to fill in ");
|
||||||
for (int i = 0; i < afterUpdateEOList.size(); i++) {
|
for (int i = 0; i < afterUpdateEOList.size(); i++) {
|
||||||
ParamsCollectManifestEO paramsCollectManifestEO = afterUpdateEOList.get(i);
|
ParamsCollectManifestEO paramsCollectManifestEO = afterUpdateEOList.get(i);
|
||||||
@@ -1563,19 +1668,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(",");
|
connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String content = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter the link to handle it.";
|
String content = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter the link to handle it.";*/
|
||||||
|
|
||||||
SysUser sysUser = sysUserService.getUserByName(sdt);
|
SysUser sysUser = sysUserService.getUserByName(sdt);
|
||||||
String[] thirdIds = new String[1];
|
String[] thirdIds = new String[1];
|
||||||
thirdIds[0] = sysUser.getThirdId();
|
thirdIds[0] = sysUser.getThirdId();
|
||||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
//String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
||||||
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
//String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
||||||
String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete";
|
//String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete";
|
||||||
|
|
||||||
// 发送系统消息
|
// 发送系统消息
|
||||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
/* SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||||
sysAnnouncement.setDelFlag("0");
|
sysAnnouncement.setDelFlag("0");
|
||||||
sysAnnouncement.setSendStatus("0");
|
sysAnnouncement.setSendStatus("0");
|
||||||
sysAnnouncement.setSendTime(new Date());
|
sysAnnouncement.setSendTime(new Date());
|
||||||
@@ -1592,24 +1697,28 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||||
obj.put(WebsocketConst.MSG_ID, paramsManifestId);
|
obj.put(WebsocketConst.MSG_ID, paramsManifestId);
|
||||||
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
||||||
webSocket.sendMessage(obj.toJSONString());
|
webSocket.sendMessage(obj.toJSONString());*/
|
||||||
|
|
||||||
// 发送飞书消息
|
// 发送飞书消息
|
||||||
try {
|
try {
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName());
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
feishuMsgVo.setContent(content);
|
feishuMsgVo.setCnContentUpper("您好,请及时分配参数填写人");
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
feishuMsgVo.setCnContentLower("项目: " + projectInfo.getProjectName() +
|
||||||
feishuMsgVo.setTaskType(MessageTypeEnum.HOMO_TASK.getName());
|
"\n发起人: " + currentUser.getUsername() +
|
||||||
feishuMsgVo.setProject(projectInfo.getProjectName()); // 车型-年款 区域
|
"\n截止时间: " + sdf.format(deadline));
|
||||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
feishuMsgVo.setEnContentUpper("Hello! Please assign the task of filling in Homo Parameter in a timely manner");
|
||||||
feishuMsgVo.setDueDate(sdf.format(deadline)); // 最早时间
|
feishuMsgVo.setEnContentLower("Project: " + projectInfo.getProjectName() +
|
||||||
feishuService.sendCardMsg(thirdIds, feishuMsgVo);
|
"\nInitiator: " + currentUser.getUsername() +
|
||||||
} catch (IOException e) {
|
"\nDue Date: " + sdf.format(deadline));
|
||||||
log.error("飞书消息推送失败");
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
}
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
}
|
feishuService.sendCard(thirdIds, feishuMsgVo);
|
||||||
}
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return getMsgOfIssueCollection(msgMapList, cut, "1");
|
return getMsgOfIssueCollection(msgMapList, cut, "1");
|
||||||
}
|
}
|
||||||
@@ -1685,7 +1794,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
for (String sdt : sdtList) {
|
for (String sdt : sdtList) {
|
||||||
|
|
||||||
StringBuilder connectBuilder = new StringBuilder();
|
/*StringBuilder connectBuilder = new StringBuilder();
|
||||||
connectBuilder.append("You are required to fill in ");
|
connectBuilder.append("You are required to fill in ");
|
||||||
for (int i = 0; i < afterUpdateEOList.size(); i++) {
|
for (int i = 0; i < afterUpdateEOList.size(); i++) {
|
||||||
ParamsCollectManifestEO paramsCollectManifestEO = afterUpdateEOList.get(i);
|
ParamsCollectManifestEO paramsCollectManifestEO = afterUpdateEOList.get(i);
|
||||||
@@ -1693,8 +1802,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(",");
|
connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String content = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter the link to handle it.";
|
String content = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter the link to handle it.";*/
|
||||||
|
|
||||||
SysUser sysUser = sysUserService.getUserByName(sdt);
|
SysUser sysUser = sysUserService.getUserByName(sdt);
|
||||||
if(sysUser == null){
|
if(sysUser == null){
|
||||||
continue;
|
continue;
|
||||||
@@ -1704,12 +1812,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
thirdIds[0] = sysUser.getThirdId();
|
thirdIds[0] = sysUser.getThirdId();
|
||||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
//String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
||||||
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
//String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
||||||
String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete";
|
//String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete";
|
||||||
|
|
||||||
// 发送系统消息
|
// 发送系统消息
|
||||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
/*SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||||
sysAnnouncement.setDelFlag("0");
|
sysAnnouncement.setDelFlag("0");
|
||||||
sysAnnouncement.setSendStatus("0");
|
sysAnnouncement.setSendStatus("0");
|
||||||
sysAnnouncement.setSendTime(new Date());
|
sysAnnouncement.setSendTime(new Date());
|
||||||
@@ -1726,19 +1834,23 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||||
obj.put(WebsocketConst.MSG_ID, paramsManifestId);
|
obj.put(WebsocketConst.MSG_ID, paramsManifestId);
|
||||||
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
||||||
webSocket.sendMessage(obj.toJSONString());
|
webSocket.sendMessage(obj.toJSONString());*/
|
||||||
|
|
||||||
// 发送飞书消息
|
// 发送飞书消息
|
||||||
try {
|
try {
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName());
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
feishuMsgVo.setContent(content);
|
feishuMsgVo.setCnContentUpper("您好,请及时分配参数填写人");
|
||||||
|
feishuMsgVo.setCnContentLower("项目: " + projectInfo.getProjectName() +
|
||||||
|
"\n发起人: " + currentUser.getUsername() +
|
||||||
|
"\n截止时间: " + sdf.format(deadline));
|
||||||
|
feishuMsgVo.setEnContentUpper("Hello! Please assign the task of filling in Homo Parameter in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower("Project: " + projectInfo.getProjectName() +
|
||||||
|
"\nInitiator: " + currentUser.getUsername() +
|
||||||
|
"\nDue Date: " + sdf.format(deadline));
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setTaskType(MessageTypeEnum.HOMO_TASK.getName());
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuMsgVo.setProject(projectInfo.getProjectName()); // 车型-年款 区域
|
feishuService.sendCard(thirdIds, feishuMsgVo);
|
||||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
|
||||||
feishuMsgVo.setDueDate(sdf.format(deadline));
|
|
||||||
feishuService.sendCardMsg(thirdIds, feishuMsgVo);
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
@@ -1748,6 +1860,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
return getMsgOfIssueCollection(msgMapList, cut, "1");
|
return getMsgOfIssueCollection(msgMapList, cut, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<String> getMsgOfIssueCollection(List<Map<String, String>> msgMapList, String cut, String operation) {
|
private List<String> getMsgOfIssueCollection(List<Map<String, String>> msgMapList, String cut, String operation) {
|
||||||
List<String> msgList = new ArrayList<>();
|
List<String> msgList = new ArrayList<>();
|
||||||
Map<String,String> collectManifestStateEnumMap = CollectManifestStateEnum.toMap(cut);
|
Map<String,String> collectManifestStateEnumMap = CollectManifestStateEnum.toMap(cut);
|
||||||
@@ -2758,4 +2871,153 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
// return map;
|
// return map;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控参数收集任务的截止时间,并根据时间段发送飞书
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void checkDeadline() {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String now = sdf.format(new Date());// 当前时间
|
||||||
|
QueryWrapper<ParamsManifestEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("state", ManifestStateEnum.COLLECTING.getValue());
|
||||||
|
List<ParamsManifestEO> manifestEOS = paramsManifestEOService.list(queryWrapper);
|
||||||
|
for (ParamsManifestEO manifestEO : manifestEOS) {
|
||||||
|
//项目名称
|
||||||
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(manifestEO.getProjectId());
|
||||||
|
if (ObjectUtils.isNotEmpty(projectInfo)) {
|
||||||
|
//url
|
||||||
|
String urlParamsStr = parseUrlParams(manifestEO);
|
||||||
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
|
//查出对应清单
|
||||||
|
List<ParamsCollectManifestEO> collectManifestEOS = paramsCollectManifestEOMapper.queryByParamManifestId(manifestEO.getId());
|
||||||
|
Map<String, List<String>> seven = new HashMap<>();
|
||||||
|
Map<String, List<String>> three = new HashMap<>();
|
||||||
|
Map<String, List<String>> today = new HashMap<>();
|
||||||
|
for (ParamsCollectManifestEO collectManifestEO : collectManifestEOS) {
|
||||||
|
String thirdId = null;
|
||||||
|
if (CollectManifestStateEnum.WAIT_SDT.getValue().equals(collectManifestEO.getState())
|
||||||
|
||CollectManifestStateEnum.DRE_BACK.getValue().equals(collectManifestEO.getState())) {
|
||||||
|
//工程接口人
|
||||||
|
if (ObjectUtils.isNotEmpty(collectManifestEO.getSdt())) {
|
||||||
|
SysUser sdt = sysUserService.getUserByName(collectManifestEO.getSdt());
|
||||||
|
if (ObjectUtils.isNotEmpty(sdt)) {
|
||||||
|
thirdId = sdt.getThirdId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (CollectManifestStateEnum.WAIT_FILL.getValue().equals(collectManifestEO.getState())
|
||||||
|
||CollectManifestStateEnum.CERT_BACK.getValue().equals(collectManifestEO.getState())) {
|
||||||
|
//填写人
|
||||||
|
if (ObjectUtils.isNotEmpty(collectManifestEO.getDre())) {
|
||||||
|
SysUser dre = sysUserService.getUserByName(collectManifestEO.getDre());
|
||||||
|
if (ObjectUtils.isNotEmpty(dre)) {
|
||||||
|
thirdId = dre.getThirdId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//截止时间
|
||||||
|
if (ObjectUtils.isNotEmpty(thirdId) && ObjectUtils.isNotEmpty(collectManifestEO.getDeadline())) {
|
||||||
|
String deadline =sdf.format(collectManifestEO.getDeadline());
|
||||||
|
//判断日期
|
||||||
|
int days = 0;
|
||||||
|
try {
|
||||||
|
days = (int) (sdf.parse(deadline).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new JeroBootException("时间获取失败");
|
||||||
|
}
|
||||||
|
if (days == 7) {
|
||||||
|
deadlineDateMap(seven, collectManifestEO, thirdId);
|
||||||
|
} else if (days == 3) {
|
||||||
|
deadlineDateMap(three, collectManifestEO, thirdId);
|
||||||
|
} else if (now.equals(deadline)) {
|
||||||
|
deadlineDateMap(today, collectManifestEO, thirdId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String title = MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn();
|
||||||
|
String cnContentLower = "项目: " + projectInfo.getProjectName() +
|
||||||
|
"\n发起人: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
String enContentLower = "Project: " + projectInfo.getProjectName() +
|
||||||
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
if (!seven.isEmpty()) {
|
||||||
|
for (String key : seven.keySet()) {
|
||||||
|
String[] thirds = new String[1];
|
||||||
|
thirds[0] = key;
|
||||||
|
List<String> stringList = seven.get(key);
|
||||||
|
String join = StringUtils.join(stringList, ",");
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(title);
|
||||||
|
feishuMsgVo.setCnContentUpper("您参与填写的参数"+ join +",还有7天到期,请及时查看处理");
|
||||||
|
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
|
feishuMsgVo.setEnContentUpper("The parameter "+ join +" you filled in will expire in 7 days. Please check and address it in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(thirds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!three.isEmpty()) {
|
||||||
|
for (String key : three.keySet()) {
|
||||||
|
String[] thirds = new String[1];
|
||||||
|
thirds[0] = key;
|
||||||
|
List<String> stringList = three.get(key);
|
||||||
|
String join = StringUtils.join(stringList, ",");
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(title);
|
||||||
|
feishuMsgVo.setCnContentUpper("您参与填写的参数"+ join +",还有3天到期,请及时查看处理");
|
||||||
|
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
|
feishuMsgVo.setEnContentUpper("The parameter "+ join +" you filled in will expire in 3 days. Please check and address it in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(thirds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!today.isEmpty()) {
|
||||||
|
for (String key : today.keySet()) {
|
||||||
|
String[] thirds = new String[1];
|
||||||
|
thirds[0] = key;
|
||||||
|
List<String> stringList = today.get(key);
|
||||||
|
String join = StringUtils.join(stringList, ",");
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(title);
|
||||||
|
feishuMsgVo.setCnContentUpper("您参与填写的参数"+ join +",将于今天到期,请及时查看处理");
|
||||||
|
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
|
feishuMsgVo.setEnContentUpper("The parameter "+ join +" you filled in will expire today. Please check and address it in a timely manner");
|
||||||
|
feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(thirds, feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deadlineDateMap(Map<String, List<String>> today, ParamsCollectManifestEO collectManifestEO, String thirdId) {
|
||||||
|
List<String> stringList = today.get(thirdId);
|
||||||
|
if (ObjectUtils.isEmpty(stringList)) {
|
||||||
|
stringList = new ArrayList<>();
|
||||||
|
stringList.add("NIO-" + collectManifestEO.getNioNumber());
|
||||||
|
today.put(thirdId, stringList);
|
||||||
|
} else {
|
||||||
|
stringList.add("NIO-" + collectManifestEO.getNioNumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
package com.jero.modules.cert.collect.task;
|
||||||
|
|
||||||
|
import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class ScheduledTask {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IParamsCollectManifestEOService paramsCollectManifestEOServicea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控参数收集任务的截止时间,并根据时间段发送飞书
|
||||||
|
*/
|
||||||
|
//@Scheduled(cron = "0 30 14 * * ?")
|
||||||
|
@Scheduled(cron = "0 0 0 */1 * ?")
|
||||||
|
public void checkTime() {
|
||||||
|
log.info("-----checkDeadline-----begin-----------");
|
||||||
|
|
||||||
|
paramsCollectManifestEOServicea.checkDeadline();
|
||||||
|
|
||||||
|
log.info("-----checkDeadline------end-----------");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+357
-22
@@ -2208,9 +2208,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
//飞书
|
//飞书
|
||||||
try {
|
try {
|
||||||
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
||||||
+ " technical field you subscribed to, the "
|
+ " technical field you subscribed to, the "+
|
||||||
+ serialNumber +" has been updated.";
|
category + " " + serialNumber +" has been updated.";
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFeiShu, MessageTypeEnum.PUSH.getName(), hrefTemp);
|
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;;
|
||||||
|
|
||||||
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||||
|
feishuMsgVo.setUrl(hrefTemp);
|
||||||
|
feishuMsgVo.setContentEn(contentInfoFeiShu);
|
||||||
|
feishuMsgVo.setContent(contentInfoFeiShuCn);
|
||||||
|
|
||||||
|
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||||
|
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFeiShu, MessageTypeEnum.PUSH.getName(), hrefTemp);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
@@ -2980,13 +2989,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if (ObjectUtils.isNotEmpty(value)) {
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
|
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt +" from \""+ value + "\" to \"" + valueTemp + "\",");
|
sb.append(dbFieldTxt +" was changed from \""+ value + "\" to \"" + valueTemp + "\",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"“" + valueTemp + "\",");
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"“" + valueTemp + "\",");
|
||||||
}
|
}
|
||||||
} else if (ObjectUtils.isEmpty(valueTemp)) {
|
} else if (ObjectUtils.isEmpty(valueTemp)) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt + " from \""+value + "\" to null " + ",");
|
sb.append(dbFieldTxt + " was changed from \""+value + "\" to null " + ",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
||||||
}
|
}
|
||||||
@@ -2994,7 +3003,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
} else {
|
} else {
|
||||||
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt + " from null to \"" + valueTemp + "\",");
|
sb.append(dbFieldTxt + " was changed from null to \"" + valueTemp + "\",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
||||||
}
|
}
|
||||||
@@ -3023,13 +3032,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if (fileNameListTemp.size() != 0 && !checkDiffrent) {
|
if (fileNameListTemp.size() != 0 && !checkDiffrent) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
//sysUser
|
//sysUser
|
||||||
sb.append(dbFieldTxt +" from \""+ StringUtils.join(fileNameList, ",") + "\" to \"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
sb.append(dbFieldTxt +" was changed from \""+ StringUtils.join(fileNameList, ",") + "\" to \"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
}
|
}
|
||||||
} else if (fileNameListTemp.size() == 0) {
|
} else if (fileNameListTemp.size() == 0) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt + " from \""+StringUtils.join(fileNameList, ",") + "\" to null " + ",");
|
sb.append(dbFieldTxt + " was changed from \""+StringUtils.join(fileNameList, ",") + "\" to null " + ",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为空" + ",");
|
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为空" + ",");
|
||||||
}
|
}
|
||||||
@@ -3038,7 +3047,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
} else {
|
} else {
|
||||||
if (fileNameListTemp.size() != 0) {
|
if (fileNameListTemp.size() != 0) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt + " from null to \"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
sb.append(dbFieldTxt + " was changed from null to \"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由空改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
sb.append(dbFieldTxt + "由空改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
}
|
}
|
||||||
@@ -3059,13 +3068,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if (ObjectUtils.isNotEmpty(value)) {
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
|
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt +" from \""+ value + "\" to \"" + valueTemp + "\",");
|
sb.append(dbFieldTxt +" was changed from \""+ value + "\" to \"" + valueTemp + "\",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"" + valueTemp + "\",");
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"" + valueTemp + "\",");
|
||||||
}
|
}
|
||||||
} else if (ObjectUtils.isEmpty(valueTemp)) {
|
} else if (ObjectUtils.isEmpty(valueTemp)) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt + " from \""+value + "\" to null " + ",");
|
sb.append(dbFieldTxt + " was changed from \""+value + "\" to null " + ",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
||||||
}
|
}
|
||||||
@@ -3073,7 +3082,203 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
} else {
|
} else {
|
||||||
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
if("1".equals(flag)){
|
if("1".equals(flag)){
|
||||||
sb.append(dbFieldTxt + " from null to \"" + valueTemp + "\",");
|
sb.append(dbFieldTxt + " was changed from null to \"" + valueTemp + "\",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return sb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private StringBuilder getUpdateInfoCn(Map<String, Object> map, List<Map<String, Object>> dataList,
|
||||||
|
List<OnlCgformField> fieldList, List<OnlCgformField> fieldDateList,
|
||||||
|
List<OnlCgformField> fieldFileList, List<OnlCgformField> fieldPullList,
|
||||||
|
String cut,String flagTemp) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
//调整dataList中map中字段顺序与表单中的一致
|
||||||
|
Map<String, Object> mapNew = new LinkedHashMap<>();
|
||||||
|
for (OnlCgformField onlCgformField : fieldList) {
|
||||||
|
for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) {
|
||||||
|
if (onlCgformField.getDbFieldName().equals(entry.getKey())) {
|
||||||
|
mapNew.put(entry.getKey(), entry.getValue());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataList.remove(0);
|
||||||
|
dataList.add(mapNew);
|
||||||
|
Map<String, Object> mapTemp = new HashMap<>();
|
||||||
|
mapCopy(map, mapTemp);
|
||||||
|
//时间类型的字段
|
||||||
|
List<String> fieldDate = fieldDateList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||||
|
//文件类型的字段
|
||||||
|
List<String> fieldFile = fieldFileList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||||
|
//下拉类型的字段
|
||||||
|
//过滤出树形字段
|
||||||
|
List<OnlCgformField> treeFieldList = fieldList.stream()
|
||||||
|
.filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
//数据字典
|
||||||
|
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||||
|
//树形数据字典
|
||||||
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
|
//下拉选处理数据字典
|
||||||
|
for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) {
|
||||||
|
//下拉选处理数据字典
|
||||||
|
dictItemCn(sysDictItems, entry, cut, fieldList,flagTemp);
|
||||||
|
treeDictItemCn(categoryList, entry, treeFieldList, cut,flagTemp);
|
||||||
|
}
|
||||||
|
for (Map.Entry<String, Object> entry : mapTemp.entrySet()) {
|
||||||
|
//下拉选处理数据字典
|
||||||
|
dictItemCn(sysDictItems, entry, cut, fieldList,flagTemp);
|
||||||
|
treeDictItemCn(categoryList, entry, treeFieldList, cut,flagTemp);
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
dataList.get(0).entrySet().forEach(entry -> {
|
||||||
|
String key = entry.getKey();
|
||||||
|
Object value = entry.getValue();
|
||||||
|
//字段中文名
|
||||||
|
List<OnlCgformField> fields = fieldList.stream().filter(e -> e.getDbFieldName().equals(key)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (fields.size() != 0) {
|
||||||
|
String dbFieldTxt = fields.get(0).getDbFieldTxt();
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
dbFieldTxt = fields.get(0).getDbFieldTxt();
|
||||||
|
}else{
|
||||||
|
dbFieldTxt = fields.get(0).getDbFieldTxt();
|
||||||
|
}
|
||||||
|
dbFieldTxt = "<text class='highlight-class'>" + dbFieldTxt + "</text>";
|
||||||
|
if (value == null) {
|
||||||
|
value = "";
|
||||||
|
}
|
||||||
|
for (Map.Entry<String, Object> entryTemp : mapTemp.entrySet()) {
|
||||||
|
String keyTemp = entryTemp.getKey();
|
||||||
|
Object valueTemp = entryTemp.getValue();
|
||||||
|
if (valueTemp == null) {
|
||||||
|
valueTemp = "";
|
||||||
|
}
|
||||||
|
if (!"create_time".equals(key) && !"update_time".equals(key)) {
|
||||||
|
if (key.equals(keyTemp)) {
|
||||||
|
if (fieldDate.contains(key)) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
value = sdf.format(value);
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
|
try {
|
||||||
|
valueTemp = sdf.format(sdf.parse((String) valueTemp));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//处理时间类型字段
|
||||||
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"“" + valueTemp + "\",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"“" + valueTemp + "\",");
|
||||||
|
}
|
||||||
|
} else if (ObjectUtils.isEmpty(valueTemp)) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (fieldFile.contains(key)) {
|
||||||
|
//处理文件类型字段
|
||||||
|
List<String> fileNameList = new ArrayList<>();
|
||||||
|
List<String> fileNameListTemp = new ArrayList<>();
|
||||||
|
//之前的文件
|
||||||
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
List<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId((String) value);
|
||||||
|
fileNameList = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
//修改的文件
|
||||||
|
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
|
List<OSSFile> fileInfosTemp = iOSSFileService.getFileInfos((String) valueTemp);
|
||||||
|
fileNameListTemp = fileInfosTemp.stream().map(OSSFile::getFileName).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
boolean checkDiffrent = checkDiffrent(fileNameList, fileNameListTemp);
|
||||||
|
|
||||||
|
if (fileNameListTemp.size() != 0 && !checkDiffrent) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
//sysUser
|
||||||
|
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
|
}
|
||||||
|
} else if (fileNameListTemp.size() == 0) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为空" + ",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由\"" + StringUtils.join(fileNameList, ",") + "\"改为空" + ",");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (fileNameListTemp.size() != 0) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由空改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由空改为\"" + StringUtils.join(fileNameListTemp, ",") + "\",");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// if ("replace_standard".equals(key) || "corresponding_standard".equals(key)) {
|
||||||
|
// if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
// value = getReplaceStandardName(value);
|
||||||
|
// }
|
||||||
|
// if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
|
// valueTemp = getReplaceStandardName(valueTemp);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//其他类型(被代替标准不处理)
|
||||||
|
if (!"replaced_standard".equals(key)) {
|
||||||
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"" + valueTemp + "\",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为\"" + valueTemp + "\",");
|
||||||
|
}
|
||||||
|
} else if (ObjectUtils.isEmpty(valueTemp)) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
||||||
|
}else{
|
||||||
|
sb.append(dbFieldTxt + "由\"" + value + "\"改为空" + ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ObjectUtils.isNotEmpty(valueTemp)) {
|
||||||
|
if("2".equals(flagTemp)){
|
||||||
|
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
||||||
}else{
|
}else{
|
||||||
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
sb.append(dbFieldTxt + "由空改为\"" + valueTemp + "\",");
|
||||||
}
|
}
|
||||||
@@ -3114,20 +3319,34 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
List<OnlCgformField> fieldFileList,
|
List<OnlCgformField> fieldFileList,
|
||||||
List<OnlCgformField> fieldPullList,
|
List<OnlCgformField> fieldPullList,
|
||||||
String cut) {
|
String cut) {
|
||||||
|
List<Map<String, Object>> dataListTemp = new ArrayList<>();
|
||||||
|
for (Map<String, Object> stringObjectMap : dataList) {
|
||||||
|
Map<String, Object> mapT = new HashMap<>();
|
||||||
|
mapCopy(stringObjectMap, mapT);
|
||||||
|
dataListTemp.add(mapT);
|
||||||
|
}
|
||||||
|
|
||||||
String technologyTerritoryNew = (String) dataList.get(0).get("technology_territory");
|
String technologyTerritoryNew = (String) dataList.get(0).get("technology_territory");
|
||||||
//1. 处理订阅的发送消息
|
//1. 处理订阅的发送消息
|
||||||
//修改的内容
|
//修改的内容
|
||||||
String flag ="1";//消息的标识(英文)
|
String flag ="1";//消息的标识(英文)
|
||||||
StringBuilder sb = getUpdateInfo(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, null,flag);
|
StringBuilder sb = getUpdateInfo(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, null,flag);
|
||||||
|
String flagTemp ="2";//消息的标识(中文--消息采用卡片型式发送, 消息内容包含中英文, 所以此处需要获取消息的中文)
|
||||||
|
StringBuilder sbCn = getUpdateInfoCn(map, dataListTemp, fieldList, fieldDateList, fieldFileList, fieldPullList, null,flagTemp);
|
||||||
//树形数据字典
|
//树形数据字典
|
||||||
List<SysCategory> categoryList = sysCategoryService.list();
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
String sbStr = "";
|
String sbStr = "";
|
||||||
if (ObjectUtils.isNotEmpty(sb)) {
|
if (ObjectUtils.isNotEmpty(sb)) {
|
||||||
sbStr = sb.substring(0, sb.length() - 1);
|
sbStr = sb.substring(0, sb.length() - 1);
|
||||||
}
|
}
|
||||||
|
String sbStrCn = "";
|
||||||
|
if (ObjectUtils.isNotEmpty(sbCn)) {
|
||||||
|
sbStrCn = sbCn.substring(0, sbCn.length() - 1);
|
||||||
|
}
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String serialNumber = (String) dataList.get(0).get("serial_number");
|
String serialNumber = (String) dataList.get(0).get("serial_number");
|
||||||
String category = (String)map.get("lei4_bie2");
|
String category = (String)map.get("lei4_bie2");
|
||||||
|
String categoryCn = (String)map.get("lei4_bie2");
|
||||||
String technologyTerritory = (String) map.get("technology_territory");
|
String technologyTerritory = (String) map.get("technology_territory");
|
||||||
if(StringUtils.isNotBlank(category)){
|
if(StringUtils.isNotBlank(category)){
|
||||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||||
@@ -3137,12 +3356,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if(stateDictItemList.size() != 0){
|
if(stateDictItemList.size() != 0){
|
||||||
category = stateDictItemList.get(0).getEnName();
|
category = stateDictItemList.get(0).getEnName();
|
||||||
|
categoryCn = stateDictItemList.get(0).getItemText();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
category = "";
|
category = "";
|
||||||
}
|
}
|
||||||
//只要修改了标准,就需要向订阅用户发送消息(内容为-->XXX对“GB 7258 进行了修改请及时查看”)
|
//只要修改了标准,就需要向订阅用户发送消息(内容为-->XXX对“GB 7258 进行了修改请及时查看”)
|
||||||
//向订阅领域管理中订阅了该技术领域的人和文档库中订阅了该条文档的人发送消息
|
//向订阅领域管理中订阅了该技术领域的人和文档库中订阅了该条文档的人发送消息
|
||||||
|
// 只有技术领域变更为订阅的技术领域这一种情况发消息, 假如订阅了技术领域A,编辑的文档的技术领域也是A,这时编辑的是其他的字段,这种情况不发消息
|
||||||
Map<String, Object> mapTemp = new HashMap<>();
|
Map<String, Object> mapTemp = new HashMap<>();
|
||||||
mapTemp.put("domainId", map.get("technology_territory"));
|
mapTemp.put("domainId", map.get("technology_territory"));
|
||||||
mapTemp.put("documentId", map.get("id"));
|
mapTemp.put("documentId", map.get("id"));
|
||||||
@@ -3223,10 +3444,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
|
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
|
||||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||||
category + " " + serialNumber+" has been updated.";
|
category + " " + serialNumber+" has been updated.";
|
||||||
|
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
||||||
try {
|
try {
|
||||||
//跳转文档详情
|
//跳转文档详情
|
||||||
String url = backUrl + "/docManage/library/detail?id=" + id;
|
String url = backUrl + "/docManage/library/detail?id=" + id;
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||||
|
feishuMsgVo.setUrl(url);
|
||||||
|
feishuMsgVo.setContentEn(contentInfoFei);
|
||||||
|
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||||
|
|
||||||
|
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||||
|
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("文档新增飞书消息推送失败");
|
log.error("文档新增飞书消息推送失败");
|
||||||
}
|
}
|
||||||
@@ -3272,13 +3501,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
//订阅文档的飞书消息
|
//订阅文档的飞书消息
|
||||||
try {
|
try {
|
||||||
// String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
//英文消息
|
||||||
// category + " " + serialNumber+" has been updated.";
|
String contentInfoFei = "In the "+category + " " + serialNumber +" you subscribed to, "+ sbStr.toString();;
|
||||||
String contentInfoFei = "In the "+category + " " + serialNumber +" you subscribed to, "+sysUser.getUsername()+" changed the " + sbStr.toString();;
|
//中文消息
|
||||||
|
String contentInfoFeiCn ="您所订阅的"+categoryCn+ serialNumber +","+ sbStrCn.toString();;
|
||||||
//跳转文档详情
|
//跳转文档详情
|
||||||
String url = backUrl + "/docManage/library/detail?id=" + id;
|
String url = backUrl + "/docManage/library/detail?id=" + id;
|
||||||
iFeishuService.batchSendMessage(userIdListUpdateFeishu.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
// iFeishuService.batchSendMessage(userIdListUpdateFeishu.toArray(new String[]{}), content, MessageTypeEnum.READ.getName(), url);
|
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||||
|
feishuMsgVo.setUrl(url);
|
||||||
|
String replaceAll = contentInfoFei.replaceAll("\"", "<");
|
||||||
|
feishuMsgVo.setContentEn(replaceAll);
|
||||||
|
|
||||||
|
String replaceAllCn = contentInfoFeiCn.replaceAll("<text class='highlight-class'>", "")
|
||||||
|
.replaceAll("</text>","").replaceAll("\"", "<");
|
||||||
|
feishuMsgVo.setContent(replaceAllCn);
|
||||||
|
//
|
||||||
|
iFeishuService.sendCardMsgDocument(userIdListUpdateFeishu.toArray(new String[]{}), feishuMsgVo);
|
||||||
|
|
||||||
|
// String contentInfoFei = "In the "+category + " " + serialNumber +" you subscribed to, "+sysUser.getUsername()+" changed the " + sbStr.toString();;
|
||||||
|
// //跳转文档详情
|
||||||
|
// String url = backUrl + "/docManage/library/detail?id=" + id;
|
||||||
|
// iFeishuService.batchSendMessage(userIdListUpdateFeishu.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("文档新增飞书消息推送失败");
|
log.error("文档新增飞书消息推送失败");
|
||||||
}
|
}
|
||||||
@@ -3932,6 +4176,64 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 用于获取飞书消息中的中文消息
|
||||||
|
*
|
||||||
|
* @param sysDictItems
|
||||||
|
* @param entry
|
||||||
|
*/
|
||||||
|
public void dictItemCn(List<SysDictItem> sysDictItems, Map.Entry<String, Object> entry, String cut, List<OnlCgformField> fieldList,String flagTemp) {
|
||||||
|
//通过dictField判断字段是否为下拉选(不为空则为下拉选)
|
||||||
|
List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> entry.getKey().equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||||
|
//数据字典中文
|
||||||
|
List<String> dictItemsCh = new ArrayList<>();
|
||||||
|
List<String> dictItemsEn = new ArrayList<>();
|
||||||
|
for (OnlCgformField onlCgformField : onlCgformFieldList) {
|
||||||
|
if (FieldTypeEnum.PULL_SINGLE.getValue().equals(onlCgformField.getFieldShowType())
|
||||||
|
|| FieldTypeEnum.PULL_MORE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||||
|
String value = (String) entry.getValue();
|
||||||
|
if (StringUtils.isNotBlank(value) && onlCgformFieldList.size() != 0 && StringUtils.isNotBlank(onlCgformFieldList.get(0).getDictField())) {
|
||||||
|
for (String itemValue : value.split(",")) {
|
||||||
|
//字段的数据字典
|
||||||
|
List<SysDictItem> dictItemList = sysDictItems.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getDictCode()) && e.getDictCode().equals(onlCgformFieldList.get(0).getDictField()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (dictItemList.size() != 0) {
|
||||||
|
List<SysDictItem> dictItems = dictItemList.stream()
|
||||||
|
.filter(e -> itemValue.equals(e.getItemValue()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (dictItems.size() != 0) {
|
||||||
|
List<String> itemText = new ArrayList<>();
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
itemText = dictItems.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||||
|
} else if(CutEnum.EN.getValue().equals(cut)) {
|
||||||
|
itemText = dictItems.stream().map(SysDictItem::getEnName).collect(Collectors.toList());
|
||||||
|
}else if("2".equals(flagTemp)){
|
||||||
|
itemText = dictItems.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
dictItemsCh.addAll(itemText);
|
||||||
|
dictItemsEn.addAll(itemText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (onlCgformFieldList.size() != 0 && StringUtils.isNotBlank(onlCgformFieldList.get(0).getDictField())) {
|
||||||
|
if(FieldTypeEnum.PULL_SINGLE.getValue().equals(onlCgformFieldList.get(0).getFieldShowType())
|
||||||
|
|| FieldTypeEnum.PULL_MORE.getValue().equals(onlCgformFieldList.get(0).getFieldShowType())){
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
entry.setValue(StringUtils.join(dictItemsCh, ","));
|
||||||
|
} else if(CutEnum.EN.getValue().equals(cut)){
|
||||||
|
entry.setValue(StringUtils.join(dictItemsEn, ","));
|
||||||
|
}else if("2".equals(flagTemp)){
|
||||||
|
entry.setValue(StringUtils.join(dictItemsEn, ","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -4906,10 +5208,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
String contentTemp = sysUser.getUsername() + " shared " + StringUtils.join(list, ",") + " with you, please be reminded to check it out.";
|
String contentTemp = sysUser.getUsername() + " shared " + StringUtils.join(list, ",") + " with you, please be reminded to check it out.";
|
||||||
// String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
String contentTempCn = sysUser.getUsername() + "向您分享了" + StringUtils.join(list, ",") + "请查看.";
|
||||||
// FeishuMsgVo feishuMsgVo = getFeishuMsgVo(MessageTypeEnum.PUSH.getName(),null, contentTemp, encode);
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
// iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
feishuMsgVo.setUrl(encode);
|
||||||
|
feishuMsgVo.setContentEn(contentTemp);
|
||||||
|
feishuMsgVo.setContent(contentTempCn);
|
||||||
|
|
||||||
|
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}),feishuMsgVo);
|
||||||
|
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书推送失败");
|
log.error("飞书推送失败");
|
||||||
@@ -4956,6 +5263,34 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 用于获取飞书消息中的中文消息
|
||||||
|
*
|
||||||
|
* @param categoryList
|
||||||
|
* @param entry
|
||||||
|
* @param treeFieldList
|
||||||
|
* @param cut
|
||||||
|
*/
|
||||||
|
public void treeDictItemCn(List<SysCategory> categoryList, Map.Entry<String, Object> entry, List<OnlCgformField> treeFieldList, String cut,String flagTemp) {
|
||||||
|
List<String> treeFields = treeFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||||
|
String key = entry.getKey();
|
||||||
|
if (treeFields.contains(entry.getKey())) {
|
||||||
|
String value = StringUtils.valueOf(entry.getValue());
|
||||||
|
if (StringUtils.isNotBlank(value)) {
|
||||||
|
List<String> idList = Arrays.asList(value.split(","));
|
||||||
|
List<SysCategory> sysCategoryList = categoryList.stream().filter(e -> idList.contains(e.getId())).collect(Collectors.toList());
|
||||||
|
List<String> nameList = sysCategoryList.stream().map(SysCategory::getName).collect(Collectors.toList());
|
||||||
|
List<String> nameEnList = sysCategoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList());
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
entry.setValue(StringUtils.join(nameList, ","));
|
||||||
|
} else if(CutEnum.EN.getValue().equals(cut)){
|
||||||
|
entry.setValue(StringUtils.join(nameEnList, ","));
|
||||||
|
}else if("2".equals(flagTemp)){
|
||||||
|
entry.setValue(StringUtils.join(nameList, ","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
|||||||
+19
-2
@@ -29,6 +29,7 @@ import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
|||||||
import com.jero.modules.dummy.service.IDummyReadEOService;
|
import com.jero.modules.dummy.service.IDummyReadEOService;
|
||||||
import com.jero.modules.dummy.vo.VirtualCreaterVo;
|
import com.jero.modules.dummy.vo.VirtualCreaterVo;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import com.jero.modules.system.entity.SysAnnouncement;
|
import com.jero.modules.system.entity.SysAnnouncement;
|
||||||
@@ -366,6 +367,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(lambdaQueryWrapper);
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(lambdaQueryWrapper);
|
||||||
String contentLog = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + "</br>";
|
String contentLog = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + "</br>";
|
||||||
String contentLogFeishu = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + " ";
|
String contentLogFeishu = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + " ";
|
||||||
|
String contentLogFeishuTemp = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + " ";
|
||||||
|
|
||||||
if(dummyContentChangeEOList.size() == 0){
|
if(dummyContentChangeEOList.size() == 0){
|
||||||
//没有添加过需要进行第一次添加
|
//没有添加过需要进行第一次添加
|
||||||
@@ -449,7 +451,15 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
if(thirdIdList.size() != 0){
|
if(thirdIdList.size() != 0){
|
||||||
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
|
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
|
||||||
try {
|
try {
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentLogFeishu, MessageTypeEnum.PUSH.getName(), href);
|
String contentInfoFeiCn = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:";
|
||||||
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||||
|
feishuMsgVo.setUrl(href);
|
||||||
|
feishuMsgVo.setContentEn(contentLogFeishuTemp);
|
||||||
|
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||||
|
|
||||||
|
iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}),feishuMsgVo,serialNumberAddList,serialNumberDeleteList);
|
||||||
|
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentLogFeishu, MessageTypeEnum.PUSH.getName(), href);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -490,8 +500,15 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
//飞书
|
//飞书
|
||||||
if(thirdIdList.size() != 0){
|
if(thirdIdList.size() != 0){
|
||||||
String contentInfoTemp = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
String contentInfoTemp = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
||||||
|
String contentInfoFeiCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回.";
|
||||||
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
|
String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href);
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||||
|
feishuMsgVo.setUrl(href);
|
||||||
|
feishuMsgVo.setContentEn(contentInfoTemp);
|
||||||
|
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||||
|
iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}), feishuMsgVo,null,null);
|
||||||
|
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
+32
@@ -1,9 +1,11 @@
|
|||||||
package com.jero.modules.feishu.service;
|
package com.jero.modules.feishu.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,6 +40,33 @@ public interface IFeishuService {
|
|||||||
*/
|
*/
|
||||||
String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
|
String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档库卡片消息
|
||||||
|
* @param userIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
String sendCardMsgDocument(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅领域(飞书消息)
|
||||||
|
* @param userIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
String sendCardMsgTerritory(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 虚拟清单(飞书消息)
|
||||||
|
* @param userIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
String sendCardMsgVirtua(String[] userIds, FeishuMsgVo feishuMsgVo, List<String> serialNumberAddList,List<String> serialNumberDeleteList) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 翻译文本
|
* 翻译文本
|
||||||
* @param params
|
* @param params
|
||||||
@@ -62,4 +91,7 @@ public interface IFeishuService {
|
|||||||
* @param split
|
* @param split
|
||||||
*/
|
*/
|
||||||
void sendKnowledgeBaseTypeChargePersonCard(String[] split);
|
void sendKnowledgeBaseTypeChargePersonCard(String[] split);
|
||||||
|
|
||||||
|
void sendCard(String[] thirdIds, FeishuMsg2Vo feishuMsgVo) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+427
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||||
@@ -24,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -280,6 +282,349 @@ public class FeishuServiceImpl implements IFeishuService {
|
|||||||
return tokenJson.get("msg").toString();
|
return tokenJson.get("msg").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档库卡片消息
|
||||||
|
* @param userIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public String sendCardMsgDocument(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException {
|
||||||
|
String token = getTenantAccessToken();
|
||||||
|
// 设置请求头
|
||||||
|
Map<String, String> headerMap = new HashMap<>();
|
||||||
|
headerMap.put("Authorization", "Bearer " + token);
|
||||||
|
headerMap.put("Content-Type", "application/json; charset=utf-8");
|
||||||
|
|
||||||
|
// 示例
|
||||||
|
StringBuilder contentSb = new StringBuilder();
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"elements\": [");
|
||||||
|
// 内容中文
|
||||||
|
if (StrUtil.isNotEmpty(feishuMsgVo.getContent())){
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + feishuMsgVo.getContent() + "\",");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
};
|
||||||
|
contentSb.append("{\"tag\": \"hr\"},");
|
||||||
|
|
||||||
|
//内容英文
|
||||||
|
if (StrUtil.isNotEmpty(feishuMsgVo.getContentEn())){
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + feishuMsgVo.getContentEn() + "\",");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"actions\": [");
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"button\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"view\",");
|
||||||
|
contentSb.append("\"tag\": \"plain_text\"");
|
||||||
|
contentSb.append("},");
|
||||||
|
contentSb.append("\"type\": \"primary\",");
|
||||||
|
contentSb.append("\"url\": \" "+ feishuMsgVo.getUrl() +" \"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("],");
|
||||||
|
contentSb.append("\"tag\": \"action\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("],");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
contentSb.append("\"header\": {");
|
||||||
|
contentSb.append("\"template\": \"green\",");
|
||||||
|
contentSb.append("\"title\": {");
|
||||||
|
contentSb.append("\"content\": \" " + feishuMsgVo.getTitle() + " \",");
|
||||||
|
contentSb.append("\"tag\": \"plain_text\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("}");
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(contentSb.toString());
|
||||||
|
|
||||||
|
String content = JSONObject.parseObject(
|
||||||
|
JSONObject.parseObject(JSONArray.parseArray(jsonObject.get("elements").toString()).get(0).toString()).get("text").toString())
|
||||||
|
.get("content").toString();
|
||||||
|
String contentEn = JSONObject.parseObject(
|
||||||
|
JSONObject.parseObject(JSONArray.parseArray(jsonObject.get("elements").toString()).get(2).toString()).get("text").toString())
|
||||||
|
.get("content").toString();
|
||||||
|
|
||||||
|
JSONObject elementTwo =
|
||||||
|
JSONObject.parseObject(JSONArray.parseArray(jsonObject.get("elements").toString()).get(1).toString());
|
||||||
|
JSONObject elementFour =
|
||||||
|
JSONObject.parseObject(JSONArray.parseArray(jsonObject.get("elements").toString()).get(3).toString());
|
||||||
|
|
||||||
|
//处理内容中的双引号(将尖括号替换成双引号)
|
||||||
|
JSONObject elementOne = getJsonObject(jsonObject, content);
|
||||||
|
JSONObject elementThree = getJsonObject(jsonObject, contentEn);
|
||||||
|
|
||||||
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
jsonArray.add(elementOne);
|
||||||
|
jsonArray.add(elementTwo);
|
||||||
|
jsonArray.add(elementThree);
|
||||||
|
jsonArray.add(elementFour);
|
||||||
|
jsonObject.put("elements",jsonArray);
|
||||||
|
|
||||||
|
// 设置请求参数
|
||||||
|
JSONObject paramsMap = new JSONObject();
|
||||||
|
paramsMap.put("user_ids", userIds);
|
||||||
|
paramsMap.put("msg_type", "interactive");
|
||||||
|
paramsMap.put("card", jsonObject);
|
||||||
|
|
||||||
|
// 发送请求给飞书
|
||||||
|
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
|
||||||
|
// 获取返回结果
|
||||||
|
JSONObject tokenJson = JSONObject.parseObject(response);
|
||||||
|
if(!tokenJson.get("code").toString().equals("0")) {
|
||||||
|
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
|
||||||
|
}
|
||||||
|
return tokenJson.get("msg").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅领域(飞书消息)
|
||||||
|
* @param userIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public String sendCardMsgTerritory(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException {
|
||||||
|
String token = getTenantAccessToken();
|
||||||
|
// 设置请求头
|
||||||
|
Map<String, String> headerMap = new HashMap<>();
|
||||||
|
headerMap.put("Authorization", "Bearer " + token);
|
||||||
|
headerMap.put("Content-Type", "application/json; charset=utf-8");
|
||||||
|
|
||||||
|
// 示例
|
||||||
|
StringBuilder contentSb = new StringBuilder();
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"elements\": [");
|
||||||
|
// 内容中文
|
||||||
|
if (StrUtil.isNotEmpty(feishuMsgVo.getContent())){
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + feishuMsgVo.getContent() + "\",");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
};
|
||||||
|
contentSb.append("{\"tag\": \"hr\"},");
|
||||||
|
|
||||||
|
//内容英文
|
||||||
|
if (StrUtil.isNotEmpty(feishuMsgVo.getContentEn())){
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + feishuMsgVo.getContentEn() + "\",");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
};
|
||||||
|
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"actions\": [");
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"button\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"view\",");
|
||||||
|
contentSb.append("\"tag\": \"plain_text\"");
|
||||||
|
contentSb.append("},");
|
||||||
|
contentSb.append("\"type\": \"primary\",");
|
||||||
|
contentSb.append("\"url\": \" "+ feishuMsgVo.getUrl() +" \"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("],");
|
||||||
|
contentSb.append("\"tag\": \"action\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("],");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
contentSb.append("\"header\": {");
|
||||||
|
contentSb.append("\"template\": \"green\",");
|
||||||
|
contentSb.append("\"title\": {");
|
||||||
|
contentSb.append("\"content\": \" " + feishuMsgVo.getTitle() + " \",");
|
||||||
|
contentSb.append("\"tag\": \"plain_text\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("}");
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(contentSb.toString());
|
||||||
|
|
||||||
|
// 设置请求参数
|
||||||
|
JSONObject paramsMap = new JSONObject();
|
||||||
|
paramsMap.put("user_ids", userIds);
|
||||||
|
paramsMap.put("msg_type", "interactive");
|
||||||
|
paramsMap.put("card", jsonObject);
|
||||||
|
|
||||||
|
// 发送请求给飞书
|
||||||
|
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
|
||||||
|
// 获取返回结果
|
||||||
|
JSONObject tokenJson = JSONObject.parseObject(response);
|
||||||
|
if(!tokenJson.get("code").toString().equals("0")) {
|
||||||
|
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
|
||||||
|
}
|
||||||
|
return tokenJson.get("msg").toString();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 虚拟清单发布(飞书消息)
|
||||||
|
* @param userIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public String sendCardMsgVirtua(String[] userIds, FeishuMsgVo feishuMsgVo,
|
||||||
|
List<String> serialNumberAddList,List<String> serialNumberDeleteList) throws IOException {
|
||||||
|
String token = getTenantAccessToken();
|
||||||
|
// 设置请求头
|
||||||
|
Map<String, String> headerMap = new HashMap<>();
|
||||||
|
headerMap.put("Authorization", "Bearer " + token);
|
||||||
|
headerMap.put("Content-Type", "application/json; charset=utf-8");
|
||||||
|
|
||||||
|
// 示例
|
||||||
|
StringBuilder contentSb = new StringBuilder();
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"elements\": [");
|
||||||
|
// 内容中文
|
||||||
|
if (StrUtil.isNotEmpty(feishuMsgVo.getContent())){
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + feishuMsgVo.getContent() + "\"\n,");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
};
|
||||||
|
if(ObjectUtils.isNotEmpty(serialNumberAddList)){
|
||||||
|
int count = 1;
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + count + ". 新增文档: " + StringUtils.join(serialNumberAddList,",") + "\"\n,");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){
|
||||||
|
int count = 2;
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + count + ". 删除文档: " + StringUtils.join(serialNumberDeleteList,",") + "\"\n,");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
}
|
||||||
|
contentSb.append("{\"tag\": \"hr\"},");
|
||||||
|
|
||||||
|
//内容英文
|
||||||
|
if (StrUtil.isNotEmpty(feishuMsgVo.getContentEn())){
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + feishuMsgVo.getContentEn() + "\"\n,");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
};
|
||||||
|
|
||||||
|
if (ObjectUtils.isNotEmpty(serialNumberAddList)) {
|
||||||
|
int count = 1;
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + count + ". New regulations: " + StringUtils.join(serialNumberAddList,",") + "\"\n,");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(serialNumberDeleteList)) {
|
||||||
|
int count = 2;
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"div\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"" + count + ". Remove regulations: " + StringUtils.join(serialNumberDeleteList,",") + "\"\n,");
|
||||||
|
contentSb.append("\"tag\": \"lark_md\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("},");
|
||||||
|
}
|
||||||
|
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"actions\": [");
|
||||||
|
contentSb.append("{");
|
||||||
|
contentSb.append("\"tag\": \"button\",");
|
||||||
|
contentSb.append("\"text\": {");
|
||||||
|
contentSb.append("\"content\": \"view\",");
|
||||||
|
contentSb.append("\"tag\": \"plain_text\"");
|
||||||
|
contentSb.append("},");
|
||||||
|
contentSb.append("\"type\": \"primary\",");
|
||||||
|
contentSb.append("\"url\": \" "+ feishuMsgVo.getUrl() +" \"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("],");
|
||||||
|
contentSb.append("\"tag\": \"action\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("],");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
contentSb.append("\"header\": {");
|
||||||
|
contentSb.append("\"template\": \"green\",");
|
||||||
|
contentSb.append("\"title\": {");
|
||||||
|
contentSb.append("\"content\": \" " + feishuMsgVo.getTitle() + " \",");
|
||||||
|
contentSb.append("\"tag\": \"plain_text\"");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("}");
|
||||||
|
contentSb.append("}");
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(contentSb.toString());
|
||||||
|
|
||||||
|
// 设置请求参数
|
||||||
|
JSONObject paramsMap = new JSONObject();
|
||||||
|
paramsMap.put("user_ids", userIds);
|
||||||
|
paramsMap.put("msg_type", "interactive");
|
||||||
|
paramsMap.put("card", jsonObject);
|
||||||
|
|
||||||
|
// 发送请求给飞书
|
||||||
|
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
|
||||||
|
// 获取返回结果
|
||||||
|
JSONObject tokenJson = JSONObject.parseObject(response);
|
||||||
|
if(!tokenJson.get("code").toString().equals("0")) {
|
||||||
|
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
|
||||||
|
}
|
||||||
|
return tokenJson.get("msg").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private JSONObject getJsonObject(JSONObject jsonObject, String content) {
|
||||||
|
String contentReplaceAll = content.replaceAll("<", "\"");
|
||||||
|
|
||||||
|
JSONObject jsonObject1 = JSONObject.parseObject(
|
||||||
|
JSONObject.parseObject(
|
||||||
|
JSONArray.parseArray(jsonObject.get("elements").toString()).get(0).toString())
|
||||||
|
.get("text").toString());
|
||||||
|
jsonObject1.put("content",contentReplaceAll);
|
||||||
|
|
||||||
|
|
||||||
|
JSONObject elementOne =
|
||||||
|
JSONObject.parseObject(JSONArray.parseArray(jsonObject.get("elements").toString()).get(0).toString());
|
||||||
|
|
||||||
|
elementOne.put("text",jsonObject1);
|
||||||
|
return elementOne;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 翻译文本
|
* 翻译文本
|
||||||
* 参数:
|
* 参数:
|
||||||
@@ -674,4 +1019,86 @@ public class FeishuServiceImpl implements IFeishuService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息
|
||||||
|
* @param thirdIds
|
||||||
|
* @param feishuMsgVo
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void sendCard(String[] thirdIds, FeishuMsg2Vo feishuMsgVo) throws IOException {
|
||||||
|
String token = getTenantAccessToken();
|
||||||
|
// 设置请求头
|
||||||
|
Map<String, String> headerMap = new HashMap<>();
|
||||||
|
headerMap.put("Authorization", "Bearer " + token);
|
||||||
|
headerMap.put("Content-Type", "application/json; charset=utf-8");
|
||||||
|
|
||||||
|
|
||||||
|
String sendJson = "{\n" +
|
||||||
|
" \"config\": {\n" +
|
||||||
|
" \"wide_screen_mode\": true\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"elements\": [\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"tag\": \"markdown\",\n" +
|
||||||
|
" \"content\": \"" + feishuMsgVo.getCnContentUpper() + "\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"tag\": \"markdown\",\n" +
|
||||||
|
" \"content\": \"" + feishuMsgVo.getCnContentLower() + "\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"tag\": \"hr\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"tag\": \"markdown\",\n" +
|
||||||
|
" \"content\": \"" + feishuMsgVo.getEnContentUpper() + "\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"tag\": \"markdown\",\n" +
|
||||||
|
" \"content\": \"" + feishuMsgVo.getEnContentLower() + "\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"actions\": [\n" +
|
||||||
|
" {\n" +
|
||||||
|
" \"tag\": \"button\",\n" +
|
||||||
|
" \"text\": {\n" +
|
||||||
|
" \"content\": \"View\",\n" +
|
||||||
|
" \"tag\": \"plain_text\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"type\": \"primary\",\n" +
|
||||||
|
" \"url\": \"" + feishuMsgVo.getUrl() + "\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" ],\n" +
|
||||||
|
" \"tag\": \"action\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" ],\n" +
|
||||||
|
" \"header\": {\n" +
|
||||||
|
" \"template\": \"" + feishuMsgVo.getColor() + "\",\n" +
|
||||||
|
" \"title\": {\n" +
|
||||||
|
" \"content\": \"" + feishuMsgVo.getTitle() + "\",\n" +
|
||||||
|
" \"tag\": \"plain_text\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(sendJson.toString());
|
||||||
|
|
||||||
|
// 设置请求参数
|
||||||
|
JSONObject paramsMap = new JSONObject();
|
||||||
|
|
||||||
|
paramsMap.put("user_ids", thirdIds);
|
||||||
|
|
||||||
|
paramsMap.put("msg_type", "interactive");
|
||||||
|
paramsMap.put("card", jsonObject);
|
||||||
|
|
||||||
|
// 发送请求给飞书
|
||||||
|
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
|
||||||
|
// 获取返回结果
|
||||||
|
JSONObject tokenJson = JSONObject.parseObject(response);
|
||||||
|
if (!tokenJson.get("code").toString().equals("0")) {
|
||||||
|
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.jero.modules.feishu.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FeishuMsg2Vo {
|
||||||
|
|
||||||
|
private String title; //标题
|
||||||
|
|
||||||
|
private String color; //颜色
|
||||||
|
|
||||||
|
private String enContentUpper; //英文内容上部
|
||||||
|
private String enContentLower; //英文内容下部
|
||||||
|
|
||||||
|
private String cnContentUpper; //中文内容上部
|
||||||
|
private String cnContentLower; //中文内容下部
|
||||||
|
|
||||||
|
private String url; //回调的网址
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,6 +12,8 @@ public class FeishuMsgVo {
|
|||||||
|
|
||||||
private String content; //内容
|
private String content; //内容
|
||||||
|
|
||||||
|
private String contentEn; //内容英文
|
||||||
|
|
||||||
private String taskType; //任务类型
|
private String taskType; //任务类型
|
||||||
|
|
||||||
private String regulationNo; //法规编号
|
private String regulationNo; //法规编号
|
||||||
@@ -26,5 +28,14 @@ public class FeishuMsgVo {
|
|||||||
|
|
||||||
private String assignee; //评估人 适用范围:责任人提交通知发起人(设计符合性,pre-homo符合性,验证符合性)
|
private String assignee; //评估人 适用范围:责任人提交通知发起人(设计符合性,pre-homo符合性,验证符合性)
|
||||||
|
|
||||||
|
private String RegulationNo; //编号
|
||||||
|
|
||||||
|
private String documentTitle; //文档标题
|
||||||
|
|
||||||
|
private String NewTypeExecutionDate; //新车型实施日期
|
||||||
|
|
||||||
|
private String NewVehicleExecutionDate; //在产车实施日期
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+59
-6
@@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.job;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||||
@@ -52,14 +53,16 @@ public class LawsTechnologyEvaluationRemindJob implements Job {
|
|||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
//获取后一天的时间
|
//获取后一天的时间
|
||||||
Calendar calendar=new GregorianCalendar();
|
//Calendar calendar=new GregorianCalendar();
|
||||||
calendar.setTime(new Date());
|
//calendar.setTime(new Date());
|
||||||
calendar.add(Calendar.DATE,1);
|
//calendar.add(Calendar.DATE,1);
|
||||||
Date nextDay = calendar.getTime();
|
//Date nextDay = calendar.getTime();
|
||||||
|
|
||||||
String nextDayStr = sdf.format(nextDay);
|
//String nextDayStr = sdf.format(nextDay);
|
||||||
|
|
||||||
|
String now = sdf.format(new Date());
|
||||||
LawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
|
LawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
|
||||||
if(StringUtils.equals(nextDayStr,sdf.format(lawsTechnologyEvaluationEO.getEndTime()))){
|
/*if(StringUtils.equals(nextDayStr,sdf.format(lawsTechnologyEvaluationEO.getEndTime()))){
|
||||||
|
|
||||||
String actiProcInstIds = flowDetailList.stream().filter(flowDetail -> {
|
String actiProcInstIds = flowDetailList.stream().filter(flowDetail -> {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
@@ -80,6 +83,56 @@ public class LawsTechnologyEvaluationRemindJob implements Job {
|
|||||||
this.lawsTechnologyEvaluationEOService.workFlowSendMsg(sendJsonObject);
|
this.lawsTechnologyEvaluationEOService.workFlowSendMsg(sendJsonObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
String endTime = sdf.format(lawsTechnologyEvaluationEO.getEndTime());
|
||||||
|
int days = 0;
|
||||||
|
try {
|
||||||
|
days = (int) (sdf.parse(endTime).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new JeroBootException("日期转换错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (days == 3) {
|
||||||
|
//到期前3天
|
||||||
|
String actiProcInstIds = flowDetailList.stream().filter(flowDetail -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(lawsTechnologyEvaluationEO.getId(), flowDetail.getLawsTechnologyEvaluationId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(actiProcInstIds)){
|
||||||
|
List<String> userIdList = this.workFlowFeignClient.getTaskAssigneeListByPrcIds(actiProcInstIds);
|
||||||
|
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||||
|
JSONObject sendJsonObject = new JSONObject();
|
||||||
|
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue());
|
||||||
|
sendJsonObject.put("lawsTechnologyEvaluationId",lawsTechnologyEvaluationEO.getId());
|
||||||
|
sendJsonObject.put("userIdList",userIdList);
|
||||||
|
this.lawsTechnologyEvaluationEOService.workFlowSendMsg(sendJsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (endTime.equals(now)){
|
||||||
|
//当天
|
||||||
|
String actiProcInstIds = flowDetailList.stream().filter(flowDetail -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(lawsTechnologyEvaluationEO.getId(), flowDetail.getLawsTechnologyEvaluationId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(actiProcInstIds)){
|
||||||
|
List<String> userIdList = this.workFlowFeignClient.getTaskAssigneeListByPrcIds(actiProcInstIds);
|
||||||
|
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||||
|
JSONObject sendJsonObject = new JSONObject();
|
||||||
|
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue());
|
||||||
|
sendJsonObject.put("lawsTechnologyEvaluationId",lawsTechnologyEvaluationEO.getId());
|
||||||
|
sendJsonObject.put("userIdList",userIdList);
|
||||||
|
this.lawsTechnologyEvaluationEOService.workFlowSendMsg(sendJsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -14,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface LawsTechnologyEvaluationFlowDetailEOMapper extends BaseMapper<LawsTechnologyEvaluationFlowDetailEO> {
|
public interface LawsTechnologyEvaluationFlowDetailEOMapper extends BaseMapper<LawsTechnologyEvaluationFlowDetailEO> {
|
||||||
|
|
||||||
|
LawsTechnologyEvaluationFlowDetailEO queryByEvaluationId(@Param("lawsTechnologyEvaluationId") String lawsTechnologyEvaluationId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -14,4 +14,11 @@
|
|||||||
<result column="prc_name" property="prcName" />
|
<result column="prc_name" property="prcName" />
|
||||||
<result column="evaluator_id" property="evaluatorId" />
|
<result column="evaluator_id" property="evaluatorId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="queryByEvaluationId" resultMap="LawsTechnologyEvaluationFlowDetailEOResultMap">
|
||||||
|
|
||||||
|
select * from laws_technology_evaluation_flow_detail where laws_technology_evaluation_id = #{lawsTechnologyEvaluationId}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
+129
-26
@@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.*;
|
||||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
|
||||||
import com.jero.common.constant.enums.ModuleEnum;
|
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
@@ -16,10 +14,13 @@ import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServi
|
|||||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||||
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
|
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
|
||||||
|
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationFlowDetailEOMapper;
|
||||||
import com.jero.modules.lawsTechnologyEvaluation.service.*;
|
import com.jero.modules.lawsTechnologyEvaluation.service.*;
|
||||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||||
import com.jero.modules.project.enums.MsgTypeEnum;
|
import com.jero.modules.project.enums.MsgTypeEnum;
|
||||||
@@ -41,6 +42,7 @@ import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
|||||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
@@ -52,7 +54,9 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -105,6 +109,11 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IProcessInfoEOService processInfoEOService;
|
private IProcessInfoEOService processInfoEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFeishuService feishuService;
|
||||||
|
@Autowired
|
||||||
|
private LawsTechnologyEvaluationFlowDetailEOMapper flowDetailEOMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -609,69 +618,163 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
throw new JeroBootException("发送消息类型不能为空,请检查!");
|
throw new JeroBootException("发送消息类型不能为空,请检查!");
|
||||||
}
|
}
|
||||||
|
|
||||||
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
//String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||||
String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
|
//String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
|
||||||
|
|
||||||
List<String> userIdList = new ArrayList<>();
|
List<String> userIdList = new ArrayList<>();
|
||||||
|
|
||||||
String msgContentEN = "";
|
//String msgContentEN = "";
|
||||||
String msgTitle = "";
|
//String msgTitle = "";
|
||||||
String initiator = "";
|
String initiator = "";
|
||||||
|
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||||
|
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
||||||
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
||||||
|
String number = flowDetailEO.getPrcNum();
|
||||||
|
String name = flowDetailEO.getPrcName();
|
||||||
|
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsTechnologyEvaluationEO.getEndTime());
|
||||||
|
|
||||||
|
String title = MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getCn() + "/" + MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getEn();
|
||||||
|
String cnContentUpper = "";
|
||||||
|
String cnContentLower = "";
|
||||||
|
String enContentUpper = "";
|
||||||
|
String enContentLower = "";
|
||||||
if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_START_MSG.getValue())){
|
if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_START_MSG.getValue())){
|
||||||
userIdList.add(jsonObject.getString("evaluationId"));
|
userIdList.add(jsonObject.getString("evaluationId"));
|
||||||
String endTime = jsonObject.getString("endTime"); //截止日期
|
//String endTime = jsonObject.getString("endTime"); //截止日期
|
||||||
//您收到GB 7258 的法规技术评估流程任务,请及时查看处理。
|
//您收到GB 7258 的法规技术评估流程任务,请及时查看处理。
|
||||||
msgContentEN = "You recieved the Regulatory and technical assessment of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
|
//msgContentEN = "You recieved the Regulatory and technical assessment of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
|
||||||
msgTitle = "You have a Regulatory and technical assessment task to complete";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
|
||||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||||
SysUser currentUser = sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
SysUser currentUser = sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||||
|
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
|
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||||
|
cnContentLower = "编号:" + number +
|
||||||
|
"\n标题: " + name +
|
||||||
|
"\n发起人: " + initiator +
|
||||||
|
"\n截止时间: " + endTime;
|
||||||
|
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||||
|
enContentLower = "Regulation No :" + number +
|
||||||
|
"\nTitle: " + name +
|
||||||
|
"\nInitiator: " + initiator +
|
||||||
|
"\nDue Date: " + endTime;
|
||||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
|
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
|
||||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||||
|
|
||||||
userIdList.add(jsonObject.getString("initiatorUserId"));
|
userIdList.add(jsonObject.getString("initiatorUserId"));
|
||||||
//XXX(人员账号)已提交GB 7258 的法规意见收集流程,请及时查看审核。
|
//XXX(人员账号)已提交GB 7258 的法规意见收集流程,请及时查看审核。
|
||||||
msgContentEN = currentUser.getUsername() + " has submitted the collection process of Regulatory and technical assessment of "+serialNumber+", Please check and address it in time.";
|
//msgContentEN = currentUser.getUsername() + " has submitted the collection process of Regulatory and technical assessment of "+serialNumber+", Please check and address it in time.";
|
||||||
msgTitle = "You have a Regulatory and technical assessment task to complete";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核";
|
||||||
|
cnContentLower = "编号:" + number +
|
||||||
|
"\n标题: " + name +
|
||||||
|
"\n发起人: " + initiator +
|
||||||
|
"\n截止时间: " + endTime;
|
||||||
|
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it";
|
||||||
|
enContentLower = "Regulation No :" + number +
|
||||||
|
"\nTitle: " + name +
|
||||||
|
"\nInitiator: " + initiator +
|
||||||
|
"\nDue Date: " + endTime;
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
|
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
|
||||||
userIdList.add(jsonObject.getString("evaluationId"));
|
userIdList.add(jsonObject.getString("evaluationId"));
|
||||||
//您提交的GB 7258 的法规技术评估流程已通过。
|
//您提交的GB 7258 的法规技术评估流程已通过。
|
||||||
msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
|
//msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
|
||||||
msgTitle = "You have a Regulatory and technical assessment task completed";
|
//msgTitle = "You have a Regulatory and technical assessment task completed";
|
||||||
|
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
cnContentUpper = "您好,您提交的评估结果已通过";
|
||||||
|
cnContentLower = "编号:" + number +
|
||||||
|
"\n标题: " + name +
|
||||||
|
"\n发起人: " + initiator +
|
||||||
|
"\n截止时间: " + endTime;
|
||||||
|
enContentUpper = "Hello! The assessment result you submitted has passed";
|
||||||
|
enContentLower = "Regulation No :" + number +
|
||||||
|
"\nTitle: " + name +
|
||||||
|
"\nInitiator: " + initiator +
|
||||||
|
"\nDue Date: " + endTime;
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
|
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
|
||||||
userIdList.add(jsonObject.getString("evaluationId"));
|
userIdList.add(jsonObject.getString("evaluationId"));
|
||||||
//您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
|
//您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
|
||||||
msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
|
//msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
|
||||||
msgTitle = "You have a Regulatory and technical assessment task to complete";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())){
|
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
|
||||||
|
cnContentLower = "编号:" + number +
|
||||||
|
"\n标题: " + name +
|
||||||
|
"\n发起人: " + initiator +
|
||||||
|
"\n截止时间: " + endTime;
|
||||||
|
enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner";
|
||||||
|
enContentLower = "Regulation No :" + number +
|
||||||
|
"\nTitle: " + name +
|
||||||
|
"\nInitiator: " + initiator +
|
||||||
|
"\nDue Date: " + endTime;
|
||||||
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||||
|
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||||
|
cnContentLower = "编号:" + number +
|
||||||
|
"\n标题: " + name +
|
||||||
|
"\n发起人: " + initiator;
|
||||||
|
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
||||||
|
enContentLower = "Regulation No :" + number +
|
||||||
|
"\nTitle: " + name +
|
||||||
|
"\nInitiator: " + initiator;
|
||||||
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
|
|
||||||
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) {
|
||||||
|
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||||
|
cnContentLower = "编号:" + number +
|
||||||
|
"\n标题: " + name +
|
||||||
|
"\n发起人: " + initiator;
|
||||||
|
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||||
|
enContentLower = "Regulation No :" + number +
|
||||||
|
"\nTitle: " + name +
|
||||||
|
"\nInitiator: " + initiator;
|
||||||
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
|
|
||||||
|
} /*else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())) {
|
||||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
//您GB 7258的法规技术评估流程将于明天结束,请及时查看处理
|
//您GB 7258的法规技术评估流程将于明天结束,请及时查看处理
|
||||||
msgContentEN = "The the Regulatory and technical assessment of "+serialNumber+" will expire tomorrow. Please check and address it in time.";
|
//msgContentEN = "The the Regulatory and technical assessment of "+serialNumber+" will expire tomorrow. Please check and address it in time.";
|
||||||
msgTitle = "You have a Regulatory and technical assessment task to complete";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
List<String> thirdIdList = new ArrayList<>();
|
||||||
|
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||||
|
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||||
|
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||||
|
try {
|
||||||
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
|
feishuMsgVo.setTitle(title);
|
||||||
|
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
|
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
|
feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
|
feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
|
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("飞书消息推送失败");
|
||||||
|
}
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
|
//String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
|
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//sendMessageMap.put("contentInfo",contentInfo);
|
||||||
|
|
||||||
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
|
//SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+15
-1
@@ -18,6 +18,7 @@ import com.jero.modules.document.enums.SearchEnum;
|
|||||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||||
import com.jero.modules.document.utils.ReadWordUtil;
|
import com.jero.modules.document.utils.ReadWordUtil;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.message.websocket.WebSocket;
|
import com.jero.modules.message.websocket.WebSocket;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
@@ -886,7 +887,20 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||||
//飞书
|
//飞书
|
||||||
try {
|
try {
|
||||||
this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
//XXX向您分享了XXXXXXXXX,请查看。
|
||||||
|
//XXX shared xxxxxxxx with you. Please be reminded to check it out.
|
||||||
|
|
||||||
|
String contentInfoFeiCn = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看";
|
||||||
|
String msgContentENTemp = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out.";
|
||||||
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||||
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
|
feishuMsgVo.setContentEn(msgContentENTemp);
|
||||||
|
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||||
|
|
||||||
|
this.iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||||
|
|
||||||
|
// this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书推送失败");
|
log.error("飞书推送失败");
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -40,6 +40,8 @@ public enum MsgTypeEnum {
|
|||||||
LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG("法规技术评估,发起人审核通过消息","lawsTechnologyEvaluationAuditAcceptedMsg"),
|
LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG("法规技术评估,发起人审核通过消息","lawsTechnologyEvaluationAuditAcceptedMsg"),
|
||||||
LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG("法规技术评估,发起人审核拒绝消息","lawsTechnologyEvaluationAuditRejectedMsg"),
|
LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG("法规技术评估,发起人审核拒绝消息","lawsTechnologyEvaluationAuditRejectedMsg"),
|
||||||
LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG("法规技术评估到期前一天消息","lawsTechnologyEvaluationExpireRemindMsg"),
|
LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG("法规技术评估到期前一天消息","lawsTechnologyEvaluationExpireRemindMsg"),
|
||||||
|
LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG("法规技术评估到期前三天消息","lawsTechnologyEvaluationExpireRemindThreeDaysBeforeMsg"),
|
||||||
|
LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG("法规技术评估到期当天消息","lawsTechnologyEvaluationExpireRemindTodayMsg"),
|
||||||
;
|
;
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
|||||||
+17
@@ -13,6 +13,7 @@ import com.jero.modules.document.enums.FieldTypeEnum;
|
|||||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.system.entity.SysAnnouncement;
|
import com.jero.modules.system.entity.SysAnnouncement;
|
||||||
import com.jero.modules.system.entity.SysCategory;
|
import com.jero.modules.system.entity.SysCategory;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
@@ -453,6 +454,22 @@ public class LawsWarnService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out.";
|
String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out.";
|
||||||
|
|
||||||
|
//XXX向您分享了法规预警信息。
|
||||||
|
//XXX shared Regulation Early Warning infomation with you.
|
||||||
|
String contentInfoFei = sysUser.getUsername() +" shared Regulation Early Warning infomation with you..";
|
||||||
|
String contentInfoFeiCn = sysUser.getUsername() +"向您分享了法规预警信息";
|
||||||
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||||
|
feishuMsgVo.setUrl(encode);
|
||||||
|
feishuMsgVo.setContentEn(contentInfoFei);
|
||||||
|
feishuMsgVo.setContent(contentInfoFeiCn);
|
||||||
|
// feishuMsgVo.setRegulationNo();
|
||||||
|
// feishuMsgVo.setDocumentTitle();
|
||||||
|
// feishuMsgVo.setNewTypeExecutionDate();
|
||||||
|
// feishuMsgVo.setNewVehicleExecutionDate();
|
||||||
|
|
||||||
|
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
|||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@@ -25,6 +26,7 @@ import java.net.UnknownHostException;
|
|||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableEurekaClient
|
@EnableEurekaClient
|
||||||
@EnableFeignClients
|
@EnableFeignClients
|
||||||
|
@EnableScheduling
|
||||||
public class LawNioApplication extends SpringBootServletInitializer {
|
public class LawNioApplication extends SpringBootServletInitializer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1350,4 +1350,13 @@ module.exports = {
|
|||||||
listToConfirm:'List to confirm',
|
listToConfirm:'List to confirm',
|
||||||
toSubmit:'To submit',
|
toSubmit:'To submit',
|
||||||
toAudit:'To audit',
|
toAudit:'To audit',
|
||||||
|
secondaryDirectory:'Secondary Directory',
|
||||||
|
OnlyPersonsCanBeSelected:'The maximum upper limit is exceeded; Only 100 persons can be selected',
|
||||||
|
projectVersion:'Project Version',
|
||||||
|
softwareVersion:'Authentication Software version',
|
||||||
|
versionStatistics:'Version statistics',
|
||||||
|
addSubproject:'Add Subproject',
|
||||||
|
Topping:'Topping',
|
||||||
|
cancelTopping:'Cancel Topping',
|
||||||
|
relatedProjectVersion:'Related project version',
|
||||||
}
|
}
|
||||||
@@ -1451,4 +1451,13 @@ module.exports = {
|
|||||||
listToConfirm:'待确认',
|
listToConfirm:'待确认',
|
||||||
toSubmit:'待提交',
|
toSubmit:'待提交',
|
||||||
toAudit:'待审核',
|
toAudit:'待审核',
|
||||||
|
secondaryDirectory:'二级目录',
|
||||||
|
OnlyPersonsCanBeSelected:'超出最大上限;最多只能选择100个人员',
|
||||||
|
projectVersion:'项目版本',
|
||||||
|
softwareVersion:'认证软件版本',
|
||||||
|
versionStatistics:'版本统计',
|
||||||
|
addSubproject:'添加子项目',
|
||||||
|
Topping:'置顶',
|
||||||
|
cancelTopping:'取消置顶',
|
||||||
|
relatedProjectVersion:'相关项目版本',
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
|
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
|
||||||
<div style="margin-left: 5%;width: 80%;">
|
<div style="margin-left: 5%;width: 80%;">
|
||||||
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
|
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
|
||||||
<a :title="record.titile" @click="showAnnouncement(record)">{{ record.titile }}</a>
|
<a :title="record.msgContent" @click="showAnnouncement(record)">{{ record.msgContent }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
@@ -110,6 +110,11 @@
|
|||||||
// clearInterval(this.timer)
|
// clearInterval(this.timer)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
getText(str) {
|
||||||
|
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||||
|
//.replace(/\s/g, '') //这里是去除空格
|
||||||
|
return words
|
||||||
|
},
|
||||||
loadData() {
|
loadData() {
|
||||||
getAction(this.url.listCementByUser).then((res) => {
|
getAction(this.url.listCementByUser).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -134,9 +139,12 @@
|
|||||||
showAnnouncement(record) {
|
showAnnouncement(record) {
|
||||||
getAction(this.url.readAllMsg, { ids: record.id }).then((res) => {
|
getAction(this.url.readAllMsg, { ids: record.id }).then((res) => {
|
||||||
})
|
})
|
||||||
|
localStorage.setItem('msgContent', record.msgContent)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/system/MessageDetails',
|
path: '/isps/userAnnouncement',
|
||||||
query: record
|
query: {
|
||||||
|
Date: Date.now()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toMyAnnouncement() {
|
toMyAnnouncement() {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
|
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
|
||||||
<img src="../../../assets/wdxx.png" alt="">
|
<img src="../../../assets/wdxx.png" alt="">
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<div class="top" :title="item.titile">
|
<div class="top" :title="item.msgContent">
|
||||||
{{item.titile}}
|
{{item.msgContent}}
|
||||||
</div>
|
</div>
|
||||||
<div class="botton">
|
<div class="botton">
|
||||||
{{item.sendTime}}
|
{{item.sendTime}}
|
||||||
@@ -69,9 +69,12 @@
|
|||||||
magClick(row) {
|
magClick(row) {
|
||||||
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
||||||
})
|
})
|
||||||
|
localStorage.setItem('msgContent', row.msgContent)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/system/MessageDetails',
|
path: '/isps/userAnnouncement',
|
||||||
query: row
|
query: {
|
||||||
|
Date: Date.now()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
moreClick() {
|
moreClick() {
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
<a-col :md="6" :sm="8" style="line-height: 48px">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('MessageTitle')">
|
<div class="title-text" :title="$t('MessageContent')">
|
||||||
<span>{{this.$t('MessageTitle')}}</span>
|
<span>{{this.$t('MessageContent')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:placeholder="$t('pleaseEnter')+$t('MessageTitle')"
|
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
|
||||||
v-model="queryParam.titile">
|
v-model="queryParam.msgContent">
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -63,18 +63,28 @@
|
|||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
|
:expandIconAsCell='false'
|
||||||
|
:expandIconColumnIndex="5"
|
||||||
|
:expandIcon="expandIcon"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
@expand="expandChange"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="msgTitile" slot-scope="text,scope">
|
<span slot="msgTitile" slot-scope="text,scope">
|
||||||
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text" @click="msgContentClick(scope)">
|
<!-- @click="msgContentClick(scope)"-->
|
||||||
|
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text">
|
||||||
{{text}}
|
{{text}}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="msgCategory" slot-scope="text,scope">
|
<span slot="msgCategory" slot-scope="text,scope">
|
||||||
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)">
|
<!-- :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)"-->
|
||||||
|
<span :title="msgCategoryQuery[text]">
|
||||||
{{msgCategoryQuery[text]}}
|
{{msgCategoryQuery[text]}}
|
||||||
</a>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
|
||||||
|
<span v-html="record.msgContentInfo">
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
</a-table>
|
</a-table>
|
||||||
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
||||||
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
|
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
|
||||||
@@ -104,8 +114,8 @@
|
|||||||
msgCategoryQuery: {
|
msgCategoryQuery: {
|
||||||
'1': this.$t('SubscriptionNotification'),
|
'1': this.$t('SubscriptionNotification'),
|
||||||
'2': this.$t('warningInformation'),
|
'2': this.$t('warningInformation'),
|
||||||
'3': this.$t('ForwardPush'),
|
'3': this.$t('ForwardPush')
|
||||||
'4': this.$t('CollectinguthenticationParameters'),
|
// '4': this.$t('CollectinguthenticationParameters'),
|
||||||
// '6':this.$t('RegulationListConfirmationTask'),
|
// '6':this.$t('RegulationListConfirmationTask'),
|
||||||
// '7':this.$t('RegulationListConfirmationNotification'),
|
// '7':this.$t('RegulationListConfirmationNotification'),
|
||||||
// '8':this.$t('RegulationTaskConfirmation'),
|
// '8':this.$t('RegulationTaskConfirmation'),
|
||||||
@@ -115,39 +125,48 @@
|
|||||||
// '12':this.$t('DesignComplianceNotification'),
|
// '12':this.$t('DesignComplianceNotification'),
|
||||||
// '13':this.$t('PreHomoNotification'),
|
// '13':this.$t('PreHomoNotification'),
|
||||||
// '14':this.$t('ValidationComplianceNotification'),
|
// '14':this.$t('ValidationComplianceNotification'),
|
||||||
'15':this.$t('RegulationTaskConfirmationNotification'),
|
// '15':this.$t('RegulationTaskConfirmationNotification'),
|
||||||
'17':this.$t('listConfirmation'),
|
// '17':this.$t('listConfirmation'),
|
||||||
'18':this.$t('taskAffirm'),
|
// '18':this.$t('taskAffirm'),
|
||||||
'19':this.$t('complianceConfirmation'),
|
// '19':this.$t('complianceConfirmation'),
|
||||||
'20':this.$t('collectionLegislativeComments'),
|
// '20':this.$t('collectionLegislativeComments'),
|
||||||
'21':this.$t('regulatoryAndTechnicalAssessment'),
|
// '21':this.$t('regulatoryAndTechnicalAssessment'),
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('MessageTitle'),
|
title: this.$t('MessageContent'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
dataIndex: 'titile',
|
dataIndex: 'msgContent',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
scopedSlots: { customRender: 'msgTitile' }
|
scopedSlots: { customRender: 'msgTitile' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
|
ellipsis: true,
|
||||||
dataIndex: 'initiator',
|
dataIndex: 'initiator',
|
||||||
width: 200,
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('MessageType'),
|
title: this.$t('MessageType'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
|
ellipsis: true,
|
||||||
dataIndex: 'msgCategory',
|
dataIndex: 'msgCategory',
|
||||||
width: 200,
|
width: 200,
|
||||||
scopedSlots: { customRender: 'msgCategory' }
|
scopedSlots: { customRender: 'msgCategory' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('NotificationTime'),
|
title: this.$t('NotificationTime'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
|
ellipsis: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
dataIndex: 'sendTime'
|
dataIndex: 'sendTime'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'',
|
||||||
|
align: 'left',
|
||||||
|
ellipsis: true,
|
||||||
|
width: 50,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
@@ -161,7 +180,42 @@
|
|||||||
formData: ''
|
formData: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
$route: function(res) {
|
||||||
|
console.log(res)
|
||||||
|
this.loadData()
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
expandIcon(props) {
|
||||||
|
if (props.expanded) {
|
||||||
|
return <a-icon type='down' onClick={e => {
|
||||||
|
props.onExpand(props.record, e);
|
||||||
|
}}/>;
|
||||||
|
} else {
|
||||||
|
return <a-icon type='right' onClick={e => {
|
||||||
|
props.onExpand(props.record, e);
|
||||||
|
}}/>;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getQueryParams() {
|
||||||
|
//获取查询条件
|
||||||
|
let sqp = {}
|
||||||
|
if (this.superQueryParams) {
|
||||||
|
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
|
||||||
|
sqp['superQueryMatchType'] = this.superQueryMatchType
|
||||||
|
}
|
||||||
|
if (localStorage.getItem('msgContent')) {
|
||||||
|
this.queryParam.msgContent = localStorage.getItem('msgContent')
|
||||||
|
this.queryParam = { ...this.queryParam }
|
||||||
|
localStorage.removeItem('msgContent')
|
||||||
|
}
|
||||||
|
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
|
||||||
|
param.field = this.getQueryField()
|
||||||
|
param.pageNo = this.ipagination.current
|
||||||
|
param.pageSize = this.ipagination.pageSize
|
||||||
|
return filterObj(param)
|
||||||
|
},
|
||||||
showAnnouncement(record) {
|
showAnnouncement(record) {
|
||||||
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
|
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -177,6 +231,13 @@
|
|||||||
this.$refs.ShowAnnouncement.detail(record)
|
this.$refs.ShowAnnouncement.detail(record)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
expandChange(isTrue, val) {
|
||||||
|
if (isTrue) {
|
||||||
|
if (val.readFlag == '0') {
|
||||||
|
this.msgContentClick(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
readAll() {
|
readAll() {
|
||||||
var that = this
|
var that = this
|
||||||
if (this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys.length > 0) {
|
||||||
@@ -204,11 +265,12 @@
|
|||||||
},
|
},
|
||||||
msgContentClick(row) {
|
msgContentClick(row) {
|
||||||
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
||||||
|
// this.loadData()
|
||||||
})
|
})
|
||||||
this.$router.push({
|
// this.$router.push({
|
||||||
path: '/system/MessageDetails',
|
// path: '/system/MessageDetails',
|
||||||
query: row
|
// query: row
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
handleDel() {
|
handleDel() {
|
||||||
var that = this
|
var that = this
|
||||||
@@ -297,6 +359,9 @@
|
|||||||
height: 38px;
|
height: 38px;
|
||||||
/*margin-top: 2px;*/
|
/*margin-top: 2px;*/
|
||||||
}
|
}
|
||||||
|
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon{
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.box-input .ant-select-selection {
|
.box-input .ant-select-selection {
|
||||||
|
|||||||
Reference in New Issue
Block a user