Merge remote-tracking branch 'origin/master'
# Conflicts: # jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java # jero-web/src/common/lang/en-us.js # jero-web/src/common/lang/zh-cn.js # jero-web/src/components/uploadFileChangeDown/file.vue
This commit is contained in:
@@ -1 +1,10 @@
|
||||
-- 一阶段的bug修复导致的字段增删、必须数据增删添加到此处
|
||||
-- 一阶段的bug修复导致的字段增删、必须数据增删添加到此处
|
||||
|
||||
ALTER TABLE `sys_role_permission`
|
||||
MODIFY COLUMN `operate_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作ip' AFTER `operate_date`;
|
||||
-- 6月23日部署上线
|
||||
|
||||
ALTER TABLE `dummy_inventory_info`
|
||||
ADD COLUMN `verify_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证备注' AFTER `applicable_supplement`,
|
||||
ADD COLUMN `prehomo_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'pre备注' AFTER `verify_remark`,
|
||||
ADD COLUMN `design_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计备注' AFTER `prehomo_remark`;
|
||||
|
||||
+5
-4
@@ -6,10 +6,11 @@ package com.jero.common.constant.enums;
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum MessageTypeEnum {
|
||||
READ("订阅通知","1"),
|
||||
WARN("预警信息","2"),
|
||||
PUSH("转发推送","3"),
|
||||
COLLECT("认证消息","4");
|
||||
READ("Subscription Notification","1"),
|
||||
WARN("Early Warning","2"),
|
||||
PUSH("Share / Forward","3"),
|
||||
HOMO_TASK("Homo Parameter Task","4"),
|
||||
TASK("Regulation Compliance Task", "5");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
+50
-45
@@ -486,53 +486,58 @@ public class QueryGenerator {
|
||||
}
|
||||
name = oConvertUtils.camelToUnderline(name);
|
||||
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
|
||||
switch (rule) {
|
||||
case GT:
|
||||
queryWrapper.gt(name, value);
|
||||
break;
|
||||
case GE:
|
||||
queryWrapper.ge(name, value);
|
||||
break;
|
||||
case LT:
|
||||
queryWrapper.lt(name, value);
|
||||
break;
|
||||
case LE:
|
||||
queryWrapper.le(name, value);
|
||||
break;
|
||||
case EQ:
|
||||
case EQ_WITH_ADD:
|
||||
queryWrapper.eq(name, value);
|
||||
break;
|
||||
case NE:
|
||||
queryWrapper.ne(name, value);
|
||||
break;
|
||||
case IN:
|
||||
if(value instanceof String) {
|
||||
queryWrapper.in(name, (Object[])value.toString().split(","));
|
||||
}else if(value instanceof String[]) {
|
||||
queryWrapper.in(name, (Object[]) value);
|
||||
if(" is null ".equals(value)){
|
||||
queryWrapper.isNull(name);
|
||||
}else{
|
||||
switch (rule) {
|
||||
case GT:
|
||||
queryWrapper.gt(name, value);
|
||||
break;
|
||||
case GE:
|
||||
queryWrapper.ge(name, value);
|
||||
break;
|
||||
case LT:
|
||||
queryWrapper.lt(name, value);
|
||||
break;
|
||||
case LE:
|
||||
queryWrapper.le(name, value);
|
||||
break;
|
||||
case EQ:
|
||||
case EQ_WITH_ADD:
|
||||
queryWrapper.eq(name, value);
|
||||
break;
|
||||
case NE:
|
||||
queryWrapper.ne(name, value);
|
||||
break;
|
||||
case IN:
|
||||
if(value instanceof String) {
|
||||
queryWrapper.in(name, (Object[])value.toString().split(","));
|
||||
}else if(value instanceof String[]) {
|
||||
queryWrapper.in(name, (Object[]) value);
|
||||
}
|
||||
//update-begin-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
|
||||
else if(value.getClass().isArray()) {
|
||||
queryWrapper.in(name, (Object[])value);
|
||||
}else {
|
||||
queryWrapper.in(name, value);
|
||||
}
|
||||
//update-end-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
|
||||
break;
|
||||
case LIKE:
|
||||
queryWrapper.like(name, value);
|
||||
break;
|
||||
case LEFT_LIKE:
|
||||
queryWrapper.likeLeft(name, value);
|
||||
break;
|
||||
case RIGHT_LIKE:
|
||||
queryWrapper.likeRight(name, value);
|
||||
break;
|
||||
default:
|
||||
log.info("--查询规则未匹配到---");
|
||||
break;
|
||||
}
|
||||
//update-begin-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
|
||||
else if(value.getClass().isArray()) {
|
||||
queryWrapper.in(name, (Object[])value);
|
||||
}else {
|
||||
queryWrapper.in(name, value);
|
||||
}
|
||||
//update-end-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
|
||||
break;
|
||||
case LIKE:
|
||||
queryWrapper.like(name, value);
|
||||
break;
|
||||
case LEFT_LIKE:
|
||||
queryWrapper.likeLeft(name, value);
|
||||
break;
|
||||
case RIGHT_LIKE:
|
||||
queryWrapper.likeRight(name, value);
|
||||
break;
|
||||
default:
|
||||
log.info("--查询规则未匹配到---");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
+4
-4
@@ -1198,7 +1198,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.COLLECT.getValue());//消息类型
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
@@ -1207,7 +1207,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
// 发送飞书消息
|
||||
try {
|
||||
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu);
|
||||
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.HOMO_TASK.getName(), hrefFeishu);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -1266,7 +1266,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.COLLECT.getValue());//消息类型
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
@@ -1275,7 +1275,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
// 发送飞书消息
|
||||
try {
|
||||
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu);
|
||||
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.HOMO_TASK.getName(), hrefFeishu);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
+32
-6
@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.RestUtil;
|
||||
import com.jero.common.util.TokenUtils;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
@@ -19,6 +19,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -47,6 +48,8 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -341,7 +344,7 @@ public class CommonController {
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/downLoadFile")
|
||||
public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
throw new JeroBootException("参数信息不全");
|
||||
}
|
||||
@@ -355,6 +358,7 @@ public class CommonController {
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
File newFile =null;
|
||||
try {
|
||||
String fileName = "";
|
||||
//本地下载
|
||||
@@ -367,9 +371,18 @@ public class CommonController {
|
||||
fileName = ossFile.getFileName();
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
|
||||
InputStream download = CosBootUtil.download(filePath);
|
||||
File file = new File(filePath);
|
||||
if(file.getName().endsWith(".pdf") || file.getName().endsWith(".PDF")){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String currentTime = sdf.format(new Date());
|
||||
String waterContent = userName+" "+currentTime;
|
||||
newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
|
||||
inputStream = new FileInputStream(newFile.getPath());
|
||||
}else{
|
||||
inputStream = CosBootUtil.download(filePath);
|
||||
}
|
||||
outputStream = response.getOutputStream();
|
||||
inputStream = CosBootUtil.download(filePath);
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
@@ -394,7 +407,17 @@ public class CommonController {
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
if (newFile != null) {
|
||||
try {
|
||||
newFile.delete();
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,7 +491,7 @@ public class CommonController {
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/pdf/viewFile")
|
||||
public void viewFile(String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
public void viewFile(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getId,id);
|
||||
@@ -490,7 +513,10 @@ public class CommonController {
|
||||
InputStream download = CosBootUtil.download(filePath);
|
||||
File file = new File(filePath);
|
||||
//水印内容
|
||||
String waterContent = "water mark";//临时定义(水印信息通过传过来)
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String currentTime = sdf.format(new Date());
|
||||
String waterContent = userName+" "+currentTime;
|
||||
// String waterContent = "water mark";//临时定义(水印信息通过传过来)
|
||||
File newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
|
||||
// 文件名称
|
||||
fileName = file.getName();
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
|
||||
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE sys_dict_item.DEL_FLAG = 0 and DICT_CODE = #{dictCode} order by sort_order asc, item_value asc")
|
||||
public List<SysDictItem> selectItemsByDictCode(String dictCode);
|
||||
|
||||
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.sort_order asc")
|
||||
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.item_text asc")
|
||||
public List<SysDictItem> selectItemsOrderBySortOrder(String dictCode);
|
||||
|
||||
@Select("SELECT sys_dict.dict_code,sys_dict_item.* from sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id where status = 1")
|
||||
|
||||
+2
-2
@@ -195,8 +195,8 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
ppEmployeeList.addAll(currentPPEmployeeList);
|
||||
}
|
||||
}
|
||||
// 处理同步过来的数据id不同,username相同的情况
|
||||
ppEmployeeList.sort(Comparator.comparing(PPEmployee::getCreation_time).reversed());
|
||||
// 处理同步过来的数据id不同,username相同的情况 creation_time不能为空
|
||||
// ppEmployeeList.sort(Comparator.comparing(PPEmployee::getCreation_time).reversed());
|
||||
|
||||
//此处获取全部pp用户信息
|
||||
List<SysUser> sysUserList = sysUserService.getPPEmployeeList();
|
||||
|
||||
+2
-2
@@ -73,9 +73,9 @@ public class PDFUtils {
|
||||
PdfTilingBrush brush = new PdfTilingBrush(dimension2D);
|
||||
brush.getGraphics().setTransparency(0.4F);
|
||||
brush.getGraphics().save();
|
||||
brush.getGraphics().translateTransform((float) brush.getSize().getWidth() / 5, (float) brush.getSize().getHeight() / 5);
|
||||
brush.getGraphics().translateTransform((float) brush.getSize().getWidth() / 1.5, (float) brush.getSize().getHeight() / 3);
|
||||
brush.getGraphics().rotateTransform(-45);
|
||||
brush.getGraphics().drawString(watermark, new PdfFont(PdfFontFamily.Helvetica, 15),
|
||||
brush.getGraphics().drawString(watermark, new PdfFont(PdfFontFamily.Helvetica, 10),
|
||||
PdfBrushes.getViolet(), 0 , 0 , new PdfStringFormat(PdfTextAlignment.Center));
|
||||
brush.getGraphics().restore();
|
||||
brush.getGraphics().setTransparency(1);
|
||||
|
||||
+36
-7
@@ -4997,9 +4997,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
File saveDirectory,
|
||||
String cut) {
|
||||
//树形数据字典
|
||||
List<String> treeNameList = categoryList.stream().map(SysCategory::getName).collect(Collectors.toList());
|
||||
List<String> treeNameList = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
treeNameList = categoryList.stream().map(SysCategory::getName).collect(Collectors.toList());
|
||||
}else{
|
||||
treeNameList = categoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList());
|
||||
}
|
||||
//普通数据字典
|
||||
List<String> itemNameList = dictItemList.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||
List<String> itemNameList = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
itemNameList = dictItemList.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||
}else{
|
||||
itemNameList = dictItemList.stream().map(SysDictItem::getEnName).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
int i = 2;
|
||||
List<String> msgList = new ArrayList<>();
|
||||
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
@@ -5097,11 +5108,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (treeNameList.contains(valueTemp)) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
|
||||
valueId += collect.get(0).getId();
|
||||
List<SysCategory> collect = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
collect = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
|
||||
}else{
|
||||
collect = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList());
|
||||
}
|
||||
valueId += collect.get(0).getId()+",";
|
||||
}
|
||||
}
|
||||
value = valueId;
|
||||
if(StringUtils.isNotBlank(valueId)){
|
||||
value = valueId.substring(0, valueId.length() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldShowType)) {
|
||||
@@ -5173,7 +5191,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//文字转数据字典编码
|
||||
if (itemNameList.contains(value)) {
|
||||
String finalValue = value;
|
||||
List<SysDictItem> collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(finalValue)).collect(Collectors.toList());
|
||||
List<SysDictItem> collect = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(finalValue)).collect(Collectors.toList());
|
||||
}else{
|
||||
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getEnName()) && e.getEnName().equals(finalValue)).collect(Collectors.toList());
|
||||
}
|
||||
if (collect.size() != 0) {
|
||||
value = collect.get(0).getItemValue();
|
||||
}
|
||||
@@ -5216,7 +5239,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (itemNameList.contains(valueTemp)) {
|
||||
List<SysDictItem> collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(valueTemp)).collect(Collectors.toList());
|
||||
List<SysDictItem> collect = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(valueTemp)).collect(Collectors.toList());
|
||||
}else{
|
||||
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getEnName()) && e.getEnName().equals(valueTemp)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
valueId += collect.get(0).getItemValue() + ",";
|
||||
}
|
||||
}
|
||||
|
||||
+18
@@ -201,6 +201,10 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private java.lang.String designDuty;
|
||||
|
||||
//交付物说明
|
||||
@Excel(name = "设计符合性确认-交付物说明", width = 20)
|
||||
private String designRemark;
|
||||
|
||||
/**prehomo确认-交付物类型*/
|
||||
@Excel(name = "Prehomo-交付物类型", width = 15,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "prehomo确认-交付物类型")
|
||||
@@ -209,6 +213,7 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private java.lang.String prehomoDeliverableTypeName;
|
||||
|
||||
|
||||
/**prehomo确认-交付物模板*/
|
||||
|
||||
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
||||
@@ -230,6 +235,10 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private java.lang.String prehomoDuty;
|
||||
|
||||
//prehomo确认-交付物说明
|
||||
@Excel(name = "prehomo确认-交付物说明", width = 20)
|
||||
private String prehomoRemark;
|
||||
|
||||
/**验证符合性确认-交付物类型*/
|
||||
@Excel(name = "验证-交付物类型", width = 15,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@@ -259,6 +268,10 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private java.lang.String verifyDuty;
|
||||
|
||||
//验证备注
|
||||
@Excel(name = "验证符合性确认-交付物说明", width = 20)
|
||||
private String verifyRemark;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@@ -273,4 +286,9 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+39
-21
@@ -82,11 +82,11 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "适用地区")
|
||||
@Dict(dicCode ="region")
|
||||
@Excel(name = "Area", width = 15, dicCode = "region")
|
||||
@Excel(name = "Area", width = 15)
|
||||
private String region;
|
||||
|
||||
/**适用范围*/
|
||||
@Excel(name = "Scope of application", width = 15, dicCode = "apply_scope")
|
||||
@Excel(name = "Scope of application", width = 30, dicCode = "apply_scope")
|
||||
@ApiModelProperty(value = "适用范围")
|
||||
@Dict(dicCode ="apply_scope")
|
||||
private String shi4Yong4Fan4Wei2;
|
||||
@@ -111,7 +111,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String implementType;
|
||||
|
||||
/**新车型实施日期*/
|
||||
@Excel(name = "New Type Execute Date", width = 15,format = "yyyy-MM-dd")
|
||||
@Excel(name = "New Type Execute Date", width = 30,format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@@ -120,7 +120,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@Excel(name = "New Vehicle Execute Date", width = 15,format = "yyyy-MM-dd")
|
||||
@Excel(name = "New Vehicle Execute Date", width = 30,format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@@ -134,25 +134,25 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String wvtaId;
|
||||
|
||||
/**认证类型*/
|
||||
@Excel(name = "Certification Type", width = 15,dicCode ="attestation_type")
|
||||
@Excel(name = "Certification Type", width = 30,dicCode ="attestation_type")
|
||||
@ApiModelProperty(value = "认证类型")
|
||||
@Dict(dicCode ="attestation_type")
|
||||
private String attestationType;
|
||||
|
||||
/**认证级别*/
|
||||
@Excel(name = "Certification Level", width = 15,dicCode ="attestation_rank")
|
||||
@Excel(name = "Certification Level", width = 30,dicCode ="attestation_rank")
|
||||
@ApiModelProperty(value = "认证级别")
|
||||
@Dict(dicCode ="attestation_rank")
|
||||
private String attestationRank;
|
||||
|
||||
/**适用增补件*/
|
||||
@ApiModelProperty(value = "适用增补件")
|
||||
@Excel(name = "Applicable Supplement", width = 15)
|
||||
@Excel(name = "Applicable Supplement", width = 30)
|
||||
private String applicableSupplement;
|
||||
|
||||
|
||||
/**技术领域*/
|
||||
@Excel(name = "Technical Field", width = 15)
|
||||
@Excel(name = "Technical Field", width = 30)
|
||||
@ApiModelProperty(value = "技术领域")
|
||||
private String technologyTerritory;
|
||||
|
||||
@@ -160,7 +160,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String technologyTerritoryName;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "Responsible Field", width = 15,dicCode ="duty_territory")
|
||||
@Excel(name = "Responsible Field", width = 30,dicCode ="duty_territory")
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
@Dict(dicCode ="duty_territory")
|
||||
private String dutyTerritory;
|
||||
@@ -171,7 +171,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String remark;
|
||||
|
||||
/**设计符合性确认-交付物类型*/
|
||||
@Excel(name = "Design-Deliverables", width = 15,dicCode ="deliverable_template")
|
||||
@Excel(name = "Design Deliverables", width = 30,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String designDeliverableType;
|
||||
@@ -182,23 +182,28 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String designDeliverableTemplate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Design-Deliverable Template", width = 15)
|
||||
@Excel(name = "Design Deliverable Template", width = 30)
|
||||
private String designDeliverableTemplateName;
|
||||
|
||||
|
||||
/**设计符合性确认-发起人*/
|
||||
@Excel(name = "Design-Initiator", width = 15)
|
||||
@Excel(name = "Design Initiator", width = 30)
|
||||
@ApiModelProperty(value = "设计符合性确认-发起人")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String designInitiator;
|
||||
|
||||
/**设计符合性确认-责任人*/
|
||||
@Excel(name = "Design-Assignee", width = 15)
|
||||
@Excel(name = "Design Assignee", width = 30)
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String designDuty;
|
||||
|
||||
//交付物说明
|
||||
@Excel(name = "Design Compliance Check Deliverable Description", width = 50)
|
||||
private String designRemark;
|
||||
|
||||
/**prehomo确认-交付物类型*/
|
||||
@Excel(name = "Prehomo-Deliverables", width = 15,dicCode ="deliverable_template")
|
||||
@Excel(name = "Prehomo Deliverables", width = 30,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "prehomo确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String prehomoDeliverableType;
|
||||
@@ -209,23 +214,27 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String prehomoDeliverableTemplate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Prehomo-Deliverable Template", width = 15)
|
||||
@Excel(name = "Prehomo Deliverable Template", width = 30)
|
||||
private String prehomoDeliverableTemplateName;
|
||||
|
||||
/**prehomo确认-发起人*/
|
||||
@Excel(name = "Prehomo-Initiator", width = 15)
|
||||
@Excel(name = "Prehomo Initiator", width = 30)
|
||||
@ApiModelProperty(value = "prehomo确认-发起人")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String prehomoInitiator;
|
||||
|
||||
/**prehomo确认-责任人*/
|
||||
@Excel(name = "Prehomo-Assignee", width = 15)
|
||||
@Excel(name = "Prehomo Assignee", width = 30)
|
||||
@ApiModelProperty(value = "prehomo确认-责任人")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String prehomoDuty;
|
||||
|
||||
//prehomo确认-交付物说明
|
||||
@Excel(name = "Prehomo Check Deliverable Description", width = 50)
|
||||
private String prehomoRemark;
|
||||
|
||||
/**验证符合性确认-交付物类型*/
|
||||
@Excel(name = "Verify-Deliverables", width = 15,dicCode ="deliverable_template")
|
||||
@Excel(name = "Verify Deliverables", width = 30,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String verifyDeliverableType;
|
||||
@@ -235,21 +244,25 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
private String verifyDeliverableTemplate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Verify-Deliverable Template", width = 15)
|
||||
@Excel(name = "Verify Deliverable Template", width = 30)
|
||||
private String verifyDeliverableTemplateName;
|
||||
|
||||
/**验证符合性确认-发起人*/
|
||||
@Excel(name = "Verify-Initiator", width = 15)
|
||||
@Excel(name = "Verify Initiator", width = 30)
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String verifyInitiator;
|
||||
|
||||
/**验证符合性确认-责任人*/
|
||||
@Excel(name = "Verify-Assignee", width = 15)
|
||||
@Excel(name = "Verify Assignee", width = 30)
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String verifyDuty;
|
||||
|
||||
///验证-交付物说明
|
||||
@Excel(name = "Validation Compliance Check Deliverable Description", width = 60)
|
||||
private String verifyRemark;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@@ -264,4 +277,9 @@ public class DummyInventoryInfoEOEn implements Serializable {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
-1
@@ -30,7 +30,6 @@
|
||||
<result column="design_duty" property="designDuty" />
|
||||
<result column="prehomo_deliverable_type" property="prehomoDeliverableType" />
|
||||
<result column="prehomo_deliverable_template" property="prehomoDeliverableTemplate" />
|
||||
<result column="prehomo_initiator" property="prehomoInitiator" />
|
||||
<result column="prehomo_duty" property="prehomoDuty" />
|
||||
<result column="verify_deliverable_type" property="verifyDeliverableType" />
|
||||
<result column="verify_deliverable_template" property="verifyDeliverableTemplate" />
|
||||
@@ -38,5 +37,8 @@
|
||||
<result column="verify_duty" property="verifyDuty" />
|
||||
<result column="region" property="region" />
|
||||
<result column="applicable_supplement" property="applicableSupplement" />
|
||||
<result column="verify_remark" property="verifyRemark" />
|
||||
<result column="prehomo_remark" property="prehomoRemark" />
|
||||
<result column="design_remark" property="designRemark" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
+52
-40
@@ -653,16 +653,18 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
"*认证级别," +"适用增补件,"+
|
||||
"*责任领域,备注," +
|
||||
"设计符合性确认,Pre-homo确认,验证符合性确认";
|
||||
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人";
|
||||
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物说明," +
|
||||
"交付物类型,交付物模板,发起人,责任人,交付物说明," +
|
||||
"交付物类型,交付物模板,发起人,责任人,交付物说明";
|
||||
}else{
|
||||
titleOne = "*Number,Sub-Title,Usage," +
|
||||
"WVTA ID,Certification Type," +
|
||||
"*Certification Level," +"Applicable Supplement,"+
|
||||
"*Responsible Field,Comments," +
|
||||
"design compliance check,pre-homo check,validation compliance chech";
|
||||
titleTwo = "type of deliverables,deliverable template,initiator,person liable," +
|
||||
"type of deliverables,deliverable template,initiator,person liable," +
|
||||
"type of deliverables,deliverable template,initiator,person liable";
|
||||
"Design compliance check,Pre-homo check,Validation compliance chech";
|
||||
titleTwo = "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
|
||||
"Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
|
||||
"Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description";
|
||||
}
|
||||
|
||||
|
||||
@@ -694,7 +696,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
int count = 1;
|
||||
int startLine = 0;
|
||||
int endLine = 0;
|
||||
int line = 3;
|
||||
int line = 4;
|
||||
for (int i = 0; i < index; i++) {
|
||||
//合并单元格
|
||||
CellRangeAddress region1 =
|
||||
@@ -716,7 +718,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
count ++;
|
||||
}
|
||||
CellRangeAddress region =
|
||||
new CellRangeAddress(2, 2, 0, 20); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
new CellRangeAddress(2, 2, 0, 23); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
sheet.addMergedRegion(region);
|
||||
String explain= "";
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
@@ -751,7 +753,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
row.createCell(lineTemp).setCellValue(headerArr[m]);
|
||||
Cell cell = row.getCell(lineTemp);
|
||||
cell.setCellStyle(cellStyle);
|
||||
lineTemp = lineTemp + 4;
|
||||
lineTemp = lineTemp + 5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,15 +918,17 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String title = "";
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
title = "*编号,子标题,实施类别,WVTA ID,认证类型,*认证级别,适用增补件,*责任领域,备注," +
|
||||
"设计交付物类型,设计交付物模板,设计发起人,设计责任人,pre交付物类型,pre交付物模板,pre发起人,pre责任人,验证交付物类型,验证交付物模板,验证发起人,验证责任人";
|
||||
"设计交付物类型,设计交付物模板,设计发起人,设计责任人,设计交付物说明," +
|
||||
"Pre交付物类型,Pre交付物模板,Pre发起人,Pre责任人,Pre交付物说明," +
|
||||
"验证交付物类型,验证交付物模板,验证发起人,验证责任人,验证交付物说明";
|
||||
}else{
|
||||
title = "*Number,Sub-Title,Usage," +
|
||||
"WVTA ID,Certification Type," +
|
||||
"*Certification Level," +"Applicable Supplement,"+
|
||||
"*Responsible Field,Comments," +
|
||||
"design type of deliverables,design deliverable template,design initiator,design person liable," +
|
||||
"pre type of deliverables,pre deliverable template,pre initiator,pre person liable," +
|
||||
"verify type of deliverables,verify deliverable template,verify initiator,verify person liable";
|
||||
"Design Type of deliverables,Design Deliverable template,Design Initiator,Design Person liable,Design Deliverables description," +
|
||||
"Pre Type of deliverables,Pre Deliverable template,Pre Initiator,Pre Person liable,Pre Deliverables description," +
|
||||
"Verify Type of deliverables,Verify Deliverable template,Verify Initiator,Verify Person liable,Verify Deliverables description";
|
||||
}
|
||||
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
@@ -1046,27 +1050,27 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}else if(i == 1){
|
||||
if(j > 8){
|
||||
String flag = "";
|
||||
if(8 < j && j < 13){
|
||||
if(8 < j && j < 14){
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
flag ="设计";
|
||||
}else{
|
||||
flag ="design ";
|
||||
flag ="Design ";
|
||||
}
|
||||
key = flag + headerCell.getStringCellValue();
|
||||
}
|
||||
if(12 < j && j < 17){
|
||||
if(13 < j && j < 19){
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
flag ="pre";
|
||||
flag ="Pre";
|
||||
}else{
|
||||
flag ="pre ";
|
||||
flag ="Pre ";
|
||||
}
|
||||
key = flag + headerCell.getStringCellValue();
|
||||
}
|
||||
if(16 < j && j < 21){
|
||||
if(18 < j && j < 24){
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
flag ="验证";
|
||||
}else{
|
||||
flag ="verify ";
|
||||
flag ="Verify ";
|
||||
}
|
||||
key = flag + headerCell.getStringCellValue();
|
||||
|
||||
@@ -1469,10 +1473,12 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
//存在文档库没有的数据
|
||||
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
List<String> serialNumbers = serialNumberS.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList());
|
||||
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
|
||||
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
|
||||
}else{
|
||||
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
|
||||
if(serialNumbers.size() != 0){
|
||||
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
|
||||
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
|
||||
}else{
|
||||
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(dummyInventoryInfoEOList.size() > 0){
|
||||
@@ -1718,18 +1724,21 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
case "设计交付物模板": return "designDeliverableTemplate";
|
||||
case "设计发起人": return "designInitiator";
|
||||
case "设计责任人": return "designDuty";
|
||||
case "pre交付物类型": return "prehomoDeliverableType";
|
||||
case "pre交付物模板": return "prehomoDeliverableTemplate";
|
||||
case "pre发起人": return "prehomoInitiator";
|
||||
case "pre责任人": return "prehomoDuty";
|
||||
case "设计交付物说明": return "designRemark";
|
||||
case "Pre交付物类型": return "prehomoDeliverableType";
|
||||
case "Pre交付物模板": return "prehomoDeliverableTemplate";
|
||||
case "Pre发起人": return "prehomoInitiator";
|
||||
case "Pre责任人": return "prehomoDuty";
|
||||
case "Pre交付物说明": return "prehomoRemark";
|
||||
case "验证交付物类型": return "verifyDeliverableType";
|
||||
case "验证交付物模板": return "verifyDeliverableTemplate";
|
||||
case "验证发起人": return "verifyInitiator";
|
||||
case "验证责任人": return "verifyDuty";
|
||||
case "验证交付物说明": return "verifyRemark";
|
||||
|
||||
|
||||
case "*Number": return "serialNumber";
|
||||
case "title": return "title";
|
||||
case "Title": return "title";
|
||||
case "Sub-Title": return "subtitle";
|
||||
// case "适用范围": return "shi4Yong4Fan4Wei2";
|
||||
// case "状态": return "state";
|
||||
@@ -1745,18 +1754,21 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
case "*Responsible Field": return "dutyTerritory";
|
||||
// case "适用地区": return "region";
|
||||
case "Comments": return "remark";
|
||||
case "design type of deliverables": return "designDeliverableType";
|
||||
case "design deliverable template": return "designDeliverableTemplate";
|
||||
case "design initiator": return "designInitiator";
|
||||
case "design person liable": return "designDuty";
|
||||
case "pre type of deliverables": return "prehomoDeliverableType";
|
||||
case "pre deliverable template": return "prehomoDeliverableTemplate";
|
||||
case "pre initiator": return "prehomoInitiator";
|
||||
case "pre person liable": return "prehomoDuty";
|
||||
case "verify type of deliverables": return "verifyDeliverableType";
|
||||
case "verify deliverable template": return "verifyDeliverableTemplate";
|
||||
case "verify initiator": return "verifyInitiator";
|
||||
case "verify person liable": return "verifyDuty";
|
||||
case "Design Type of deliverables": return "designDeliverableType";
|
||||
case "Design Deliverable template": return "designDeliverableTemplate";
|
||||
case "Design Initiator": return "designInitiator";
|
||||
case "Design Person liable": return "designDuty";
|
||||
case "Design Deliverables description": return "designRemark";
|
||||
case "Pre Type of deliverables": return "prehomoDeliverableType";
|
||||
case "Pre Deliverable template": return "prehomoDeliverableTemplate";
|
||||
case "Pre Initiator": return "prehomoInitiator";
|
||||
case "Pre Person liable": return "prehomoDuty";
|
||||
case "Pre Deliverables description": return "prehomoRemark";
|
||||
case "Verify Type of deliverables": return "verifyDeliverableType";
|
||||
case "Verify Deliverable template": return "verifyDeliverableTemplate";
|
||||
case "Verify Initiator": return "verifyInitiator";
|
||||
case "Verify Person liable": return "verifyDuty";
|
||||
case "Verify Deliverables description": return "verifyRemark";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package com.jero.modules.feishu.service;
|
||||
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@@ -26,4 +28,11 @@ public interface IFeishuService {
|
||||
* @throws IOException
|
||||
*/
|
||||
String batchSendMessage(String[] userIds, String message, String title, String backUrl) throws IOException;
|
||||
|
||||
/**
|
||||
* 发送卡片消息
|
||||
* @param feishuMsgVo
|
||||
* @return
|
||||
*/
|
||||
String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
|
||||
}
|
||||
|
||||
+127
@@ -1,8 +1,11 @@
|
||||
package com.jero.modules.feishu.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.druid.support.json.JSONUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.system.util.HttpRequestUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -111,4 +114,128 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
}
|
||||
return tokenJson.get("msg").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送卡片消息
|
||||
* @param feishuMsgVo
|
||||
* @return
|
||||
*/
|
||||
public String sendCardMsg(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("},");
|
||||
};
|
||||
// 补充tasktype、project、Initiator等的外层
|
||||
contentSb.append("{");
|
||||
contentSb.append("\"fields\": [");
|
||||
contentSb.append("{");
|
||||
contentSb.append("\"is_short\": false,");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"**Task Type:** " + feishuMsgVo.getTaskType() + "\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("}");
|
||||
|
||||
if (StrUtil.isNotEmpty(feishuMsgVo.getRegulationNo())){
|
||||
contentSb.append(",");
|
||||
contentSb.append("{");
|
||||
contentSb.append("\"is_short\": false,");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"**Regulation No:** " + feishuMsgVo.getRegulationNo() + "\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("}");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(feishuMsgVo.getProject())){
|
||||
contentSb.append(",");
|
||||
contentSb.append("{");
|
||||
contentSb.append("\"is_short\": false,");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"**Project:** " + feishuMsgVo.getProject() + "\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("}");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(feishuMsgVo.getInitiator())){
|
||||
contentSb.append(",");
|
||||
contentSb.append("{");
|
||||
contentSb.append("\"is_short\": false,");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"**Initiator:** " + feishuMsgVo.getInitiator() + "\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("}");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(feishuMsgVo.getDueDate())){
|
||||
contentSb.append(",");
|
||||
contentSb.append("{");
|
||||
contentSb.append("\"is_short\": false,");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"**Due Date:** " + feishuMsgVo.getDueDate() + "\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("}");
|
||||
}
|
||||
contentSb.append("],");
|
||||
contentSb.append("\"tag\": \"div\"");
|
||||
contentSb.append("},");
|
||||
contentSb.append("{\"tag\": \"hr\"},");
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.jero.modules.feishu.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 飞书消息的VO
|
||||
*/
|
||||
@Data
|
||||
public class FeishuMsgVo {
|
||||
|
||||
private String title; //标题
|
||||
|
||||
private String content; //内容
|
||||
|
||||
private String taskType; //任务类型
|
||||
|
||||
private String regulationNo; //法规编号
|
||||
|
||||
private String project; //项目名称
|
||||
|
||||
private String initiator; //发起人
|
||||
|
||||
private String dueDate; //截止时间
|
||||
|
||||
private String url; //回调的网址
|
||||
|
||||
}
|
||||
|
||||
+43
-14
@@ -101,10 +101,13 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "适用地区")
|
||||
@Dict(dicCode ="region")
|
||||
//@Dict(dicCode ="region")
|
||||
@Excel(name = "适用地区", width = 15, dicCode = "region")
|
||||
private java.lang.String region;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String region_dictText;
|
||||
|
||||
/**对应标准*/
|
||||
@Excel(name = "对应标准", width = 20)
|
||||
@ApiModelProperty(value = "对应标准")
|
||||
@@ -113,8 +116,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
/**实施类别*/
|
||||
@Excel(name = "实施类别", width = 20,dicCode ="implement_type")
|
||||
@ApiModelProperty(value = "实施类别")
|
||||
@Dict(dicCode ="implement_type")
|
||||
//@Dict(dicCode ="implement_type")
|
||||
private String implementType;
|
||||
@TableField(exist = false)
|
||||
private String implementType_dictText;
|
||||
|
||||
/**新车型实施日期*/
|
||||
@Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd")
|
||||
@@ -139,14 +144,18 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
/**认证类型*/
|
||||
@Excel(name = "认证类型", width = 20,dicCode ="attestation_type")
|
||||
@ApiModelProperty(value = "认证类型")
|
||||
@Dict(dicCode ="attestation_type")
|
||||
//@Dict(dicCode ="attestation_type")
|
||||
private String attestationType;
|
||||
@TableField(exist = false)
|
||||
private String attestationType_dictText;
|
||||
|
||||
/**认证级别*/
|
||||
@Excel(name = "认证级别", width = 20,dicCode ="attestation_rank")
|
||||
@ApiModelProperty(value = "认证级别")
|
||||
@Dict(dicCode ="attestation_rank")
|
||||
//@Dict(dicCode ="attestation_rank")
|
||||
private String attestationRank;
|
||||
@TableField(exist = false)
|
||||
private String attestationRank_dictText;
|
||||
|
||||
//适用增补件
|
||||
@Excel(name = "适用增补件", width = 20)
|
||||
@@ -160,8 +169,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
/**责任领域*/
|
||||
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
@Dict(dicCode ="duty_territory")
|
||||
//@Dict(dicCode ="duty_territory")
|
||||
private String dutyTerritory;
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritory_dictText;
|
||||
|
||||
/**法规工程师id*/
|
||||
@ApiModelProperty(value = "法规工程师id")
|
||||
@@ -198,10 +209,12 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
/**设计符合性确认-交付物类型*/
|
||||
@Excel(name = "设计符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
//@Dict(dicCode ="deliverable_template")
|
||||
private String designDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private String designDeliverableTypeName;
|
||||
@TableField(exist = false)
|
||||
private String designDeliverableType_dictText;
|
||||
|
||||
/**设计符合性确认-交付物模板*/
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||
@@ -214,8 +227,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**设计符合性确认-发起人角色*/
|
||||
@ApiModelProperty(value = "设计符合性确认-发起人角色")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
//@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String designInitiator;
|
||||
@TableField(exist = false)
|
||||
private String designInitiator_dictText;
|
||||
|
||||
/**设计符合性确认-发起人id*/
|
||||
//@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@@ -229,8 +244,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**设计符合性确认-责任人角色*/
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人角色")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
//@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String designDuty;
|
||||
@TableField(exist = false)
|
||||
private String designDuty_dictText;
|
||||
|
||||
/**设计符合性确认-责任人id*/
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人id")
|
||||
@@ -259,8 +276,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
/**prehomo确认-交付物类型*/
|
||||
@Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "prehomo确认-1")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
////@Dict(dicCode ="deliverable_template")
|
||||
private String prehomoDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDeliverableType_dictText;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDeliverableTypeName;
|
||||
|
||||
@@ -275,8 +294,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**prehomo确认-发起人角色*/
|
||||
@ApiModelProperty(value = "prehomo确认-发起人角色")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
//@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String prehomoInitiator;
|
||||
@TableField(exist = false)
|
||||
private String prehomoInitiator_dictText;
|
||||
|
||||
/**prehomo确认-发起人id*/
|
||||
@ApiModelProperty(value = "prehomo确认-发起人id")
|
||||
@@ -290,8 +311,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**prehomo确认-责任人角色*/
|
||||
@ApiModelProperty(value = "prehomo确认-责任人角色")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
//@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String prehomoDuty;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDuty_dictText;
|
||||
|
||||
/**prehomo确认-责任人id*/
|
||||
@ApiModelProperty(value = "prehomo确认-责任人id")
|
||||
@@ -320,8 +343,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
/**验证符合性确认-交付物类型*/
|
||||
@Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
//@Dict(dicCode ="deliverable_template")
|
||||
private String verifyDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private String verifyDeliverableType_dictText;
|
||||
@TableField(exist = false)
|
||||
private String verifyDeliverableTypeName;
|
||||
|
||||
@@ -336,8 +361,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**验证符合性确认-发起人角色*/
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人角色")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
//@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String verifyInitiator;
|
||||
@TableField(exist = false)
|
||||
private String verifyInitiator_dictText;
|
||||
|
||||
/**验证符合性确认-发起人id*/
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人id")
|
||||
@@ -351,8 +378,10 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**验证符合性确认-责任人角色*/
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人角色")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
//@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String verifyDuty;
|
||||
@TableField(exist = false)
|
||||
private String verifyDuty_dictText;
|
||||
|
||||
/**验证符合性确认-责任人id*/
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人id")
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String serialNumber;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "title", width = 20)
|
||||
@Excel(name = "Title", width = 20)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@@ -101,7 +101,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "适用地区")
|
||||
@Dict(dicCode ="Area")
|
||||
@Excel(name = "Area", width = 15, dicCode = "region")
|
||||
@Excel(name = "Area", width = 15)
|
||||
private String region;
|
||||
|
||||
/**对应标准*/
|
||||
|
||||
+7
-7
@@ -1,13 +1,13 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
public enum ProjectTaskPlanningNameEnum {
|
||||
LIST_CONFIRMATION("法规清单确认"," Confirmation of regulations list"),
|
||||
LEGAL_TASK_CONFIRMATION("法规任务确认","Regulatory task confirmation"),
|
||||
DESIGN_DEADLINE("设计符合性确认","Design Compliance Check"),
|
||||
PREHOMO_DEADLINE("Pre-Homo确认","Pre-Homo Check"),
|
||||
ATTESTATION_START_TIME("认证开始","Certification start"),
|
||||
ATTESTATION_END_TIME("认证结束"," Certification end"),
|
||||
VERIFY_DEADLINE("验证符合性确认","Verification compliance confirmation deadline"),
|
||||
LIST_CONFIRMATION("清单确认"," Checklist confirmation"),
|
||||
LEGAL_TASK_CONFIRMATION("任务确认","Task confirmation"),
|
||||
DESIGN_DEADLINE("设计符合性","Design compliance"),
|
||||
PREHOMO_DEADLINE("Pre-Homo","Pre-Homo"),
|
||||
ATTESTATION_START_TIME("认证开始","Certification begins"),
|
||||
ATTESTATION_END_TIME("认证结束"," End of certification"),
|
||||
VERIFY_DEADLINE("验证符合性","Verify compliance"),
|
||||
|
||||
;
|
||||
String name;
|
||||
|
||||
+55
-32
@@ -1,6 +1,8 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
@@ -71,7 +73,7 @@ public class InventoryAffirmJob implements Job {
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
@@ -134,54 +136,75 @@ public class InventoryAffirmJob implements Job {
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*/
|
||||
// XXX .
|
||||
String msgContentEN = "The remaining processing time for the regulation list confirmation of"
|
||||
+ projectNameInfoEO.getProjectName()
|
||||
String msgContentEN = "The remaining processing time for the regulation list confirmation of "
|
||||
+ projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and handle it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
|
||||
String msgContentEN = "The the regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName()
|
||||
+ " will expire today. Please check and address it in a timely manner.";
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
|
||||
String msgContentEN = "The regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in a timely manner.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
-5
@@ -1,9 +1,12 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.MsgTypeEnum;
|
||||
import com.jero.modules.project.enums.SendMsgFlagEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
@@ -74,7 +77,7 @@ public class PrehomoJob implements Job {
|
||||
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
@@ -137,9 +140,17 @@ public class PrehomoJob implements Job {
|
||||
//您XXX(项目名称)中GB 7258的Pre-Homo确认剩余处理时间还有3天,请及时查看处理
|
||||
//The remaining processing time for the Pre-Homo confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
|
||||
String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and handle it in time.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
@@ -157,7 +168,7 @@ public class PrehomoJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -166,9 +177,15 @@ public class PrehomoJob implements Job {
|
||||
//您XXX(项目名称)中GB 7258的Pre-Homo确认任务今天即将结束,请及时查看处理
|
||||
//The the Pre-Homo confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
|
||||
String msgContentEN = "The the Pre-Homo confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in time.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
@@ -186,7 +203,7 @@ public class PrehomoJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
-5
@@ -1,6 +1,8 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
@@ -73,7 +75,7 @@ public class VerifyComplianceJob implements Job {
|
||||
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
@@ -135,9 +137,17 @@ public class VerifyComplianceJob implements Job {
|
||||
//您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理
|
||||
//The remaining processing time for the Verify compliance confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
|
||||
String msgContentEN = "The remaining processing time for the validation compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and handle it in time.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
@@ -155,7 +165,7 @@ public class VerifyComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -164,9 +174,15 @@ public class VerifyComplianceJob implements Job {
|
||||
//您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理
|
||||
//The the Verify compliance confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
|
||||
String msgContentEN = "The the validation compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in time.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
@@ -184,7 +200,7 @@ public class VerifyComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-4
@@ -1,6 +1,8 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
@@ -73,7 +75,7 @@ public class designComplianceJob implements Job {
|
||||
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
@@ -137,8 +139,16 @@ public class designComplianceJob implements Job {
|
||||
//您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理
|
||||
String msgContentEN = "The remaining processing time for the design compliance confirmation for "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and address it in a timely manner.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
@@ -151,17 +161,23 @@ public class designComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理
|
||||
String msgContentEN = "The the design compliance confirmation for "
|
||||
String msgContentEN = "The design compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " will expire today. Please check and address it in time.";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
@@ -179,7 +195,7 @@ public class designComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
</if>
|
||||
AND sd.dict_code = #{dictCode}
|
||||
</where>
|
||||
ORDER BY sdi.sort_order
|
||||
ORDER BY sdi.item_text ASC
|
||||
</select>
|
||||
|
||||
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel">
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -76,7 +78,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
*/
|
||||
Result<?> updateStatusBatch(JSONObject json);
|
||||
|
||||
void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> params);
|
||||
void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType);
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
|
||||
+239
-15
@@ -35,6 +35,7 @@ import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||
import com.jero.modules.dummy.util.DeepCopyListUtil;
|
||||
import com.jero.modules.dummy.util.ListDiff;
|
||||
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.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
@@ -646,6 +647,166 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
|
||||
dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
|
||||
long startTime = System.currentTimeMillis();
|
||||
dataDictDispose(result,projectLawsInventoryEO.getCut());
|
||||
log.debug("处理数据字典消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据字典数据处理方法
|
||||
* @param result 返回值
|
||||
* @param cut 中英文切换
|
||||
*/
|
||||
public void dataDictDispose(List<ProjectLawsInventoryEO> result,String cut){
|
||||
if(CollectionUtils.isNotEmpty(result)){
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : result) {
|
||||
//处理适用地区
|
||||
String region = projectLawsInventoryEO.getRegion();
|
||||
if(StringUtils.isNotEmpty(region)){
|
||||
String region_dictText = disposeShowDictItemValue(sysDictItems, region,cut,ProjectInventoryFieldEnum.REGION.getValue());
|
||||
projectLawsInventoryEO.setRegion_dictText(region_dictText);
|
||||
}
|
||||
|
||||
//处理实施类别
|
||||
String implementType = projectLawsInventoryEO.getImplementType();
|
||||
if(StringUtils.isNotEmpty(implementType)){
|
||||
String implementType_dictText = disposeShowDictItemValue(sysDictItems, implementType,cut,ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getValue());
|
||||
projectLawsInventoryEO.setImplementType_dictText(implementType_dictText);
|
||||
}
|
||||
|
||||
//处理认证类型
|
||||
String attestationType = projectLawsInventoryEO.getAttestationType();
|
||||
if(StringUtils.isNotEmpty(attestationType)){
|
||||
String attestationType_dictText = disposeShowDictItemValue(sysDictItems, attestationType,cut,ProjectInventoryFieldEnum.ATTESTATION_TYPE.getValue());
|
||||
projectLawsInventoryEO.setAttestationType_dictText(attestationType_dictText);
|
||||
}
|
||||
|
||||
//处理认证级别
|
||||
String attestationRank = projectLawsInventoryEO.getAttestationRank();
|
||||
if(StringUtils.isNotEmpty(attestationRank)){
|
||||
String attestationRank_dictText = disposeShowDictItemValue(sysDictItems, attestationRank,cut,ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue());
|
||||
projectLawsInventoryEO.setAttestationRank_dictText(attestationRank_dictText);
|
||||
}
|
||||
|
||||
//处理责任领域
|
||||
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
||||
if(StringUtils.isNotEmpty(dutyTerritory)){
|
||||
String dutyTerritory_dictText = disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||
projectLawsInventoryEO.setDutyTerritory_dictText(dutyTerritory_dictText);
|
||||
}
|
||||
|
||||
//处理设计符合性确认-交付物类型
|
||||
String designDeliverableType = projectLawsInventoryEO.getDesignDeliverableType();
|
||||
if(StringUtils.isNotEmpty(designDeliverableType)){
|
||||
String designDeliverableType_dictText = disposeShowDictItemValue(sysDictItems, designDeliverableType,cut,ProjectInventoryFieldEnum.DESIGN_DELIVERABLE_TYPE.getValue());
|
||||
projectLawsInventoryEO.setDesignDeliverableType_dictText(designDeliverableType_dictText);
|
||||
}
|
||||
|
||||
//处理设计符合性确认-发起人角色
|
||||
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
|
||||
if(StringUtils.isNotEmpty(designInitiator)){
|
||||
String designInitiator_dictText = disposeShowDictItemValue(sysDictItems, designInitiator,cut,ProjectInventoryFieldEnum.DESIGN_INITIATOR.getValue());
|
||||
projectLawsInventoryEO.setDesignInitiator_dictText(designInitiator_dictText);
|
||||
}
|
||||
|
||||
//处理设计符合性确认-责任人角色
|
||||
String designDuty = projectLawsInventoryEO.getDesignDuty();
|
||||
if(StringUtils.isNotEmpty(designDuty)){
|
||||
String designDuty_dictText = disposeShowDictItemValue(sysDictItems, designDuty,cut,ProjectInventoryFieldEnum.DESIGN_DUTY.getValue());
|
||||
projectLawsInventoryEO.setDesignDuty_dictText(designDuty_dictText);
|
||||
}
|
||||
|
||||
//处理prehomo确认-交付物类型
|
||||
String prehomoDeliverableType = projectLawsInventoryEO.getPrehomoDeliverableType();
|
||||
if(StringUtils.isNotEmpty(prehomoDeliverableType)){
|
||||
String prehomoDeliverableType_dictText = disposeShowDictItemValue(sysDictItems, prehomoDeliverableType,cut,ProjectInventoryFieldEnum.PREHOMO_DELIVERABLE_TYPE.getValue());
|
||||
projectLawsInventoryEO.setPrehomoDeliverableType_dictText(prehomoDeliverableType_dictText);
|
||||
}
|
||||
|
||||
//处理prehomo确认-发起人角色
|
||||
String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator();
|
||||
if(StringUtils.isNotEmpty(prehomoInitiator)){
|
||||
String prehomoInitiator_dictText = disposeShowDictItemValue(sysDictItems, prehomoInitiator,cut,ProjectInventoryFieldEnum.PREHOMO_INITIATOR.getValue());
|
||||
projectLawsInventoryEO.setPrehomoInitiator_dictText(prehomoInitiator_dictText);
|
||||
}
|
||||
|
||||
//处理prehomo确认-责任人角色
|
||||
String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty();
|
||||
if(StringUtils.isNotEmpty(prehomoDuty)){
|
||||
String prehomoDuty_dictText = disposeShowDictItemValue(sysDictItems, prehomoDuty,cut,ProjectInventoryFieldEnum.PREHOMO_DUTY.getValue());
|
||||
projectLawsInventoryEO.setPrehomoDuty_dictText(prehomoDuty_dictText);
|
||||
}
|
||||
|
||||
//处理验证符合性确认-交付物类型
|
||||
String verifyDeliverableType = projectLawsInventoryEO.getVerifyDeliverableType();
|
||||
if(StringUtils.isNotEmpty(verifyDeliverableType)){
|
||||
String verifyDeliverableType_dictText = disposeShowDictItemValue(sysDictItems, verifyDeliverableType,cut,ProjectInventoryFieldEnum.VERIFY_DELIVERABLE_TYPE.getValue());
|
||||
projectLawsInventoryEO.setVerifyDeliverableType_dictText(verifyDeliverableType_dictText);
|
||||
}
|
||||
|
||||
//处理验证符合性确认-发起人角色
|
||||
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
|
||||
if(StringUtils.isNotEmpty(verifyInitiator)){
|
||||
String verifyInitiator_dictText = disposeShowDictItemValue(sysDictItems, verifyInitiator,cut,ProjectInventoryFieldEnum.VERIFY_INITIATOR.getValue());
|
||||
projectLawsInventoryEO.setVerifyInitiator_dictText(verifyInitiator_dictText);
|
||||
}
|
||||
|
||||
//处理验证符合性确认-责任人角色
|
||||
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
|
||||
if(StringUtils.isNotEmpty(verifyDuty)){
|
||||
String verifyDuty_dictText = disposeShowDictItemValue(sysDictItems, verifyDuty,cut,ProjectInventoryFieldEnum.VERIFY_DUTY.getValue());
|
||||
projectLawsInventoryEO.setVerifyDuty_dictText(verifyDuty_dictText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理展示数据字典值
|
||||
* @param sysDictItems 所有的数据字典项
|
||||
* @param fieldValues 字段值
|
||||
* @param cut 中英文切换标识
|
||||
* @param dicCode 数据字典code码
|
||||
* @return
|
||||
*/
|
||||
public String disposeShowDictItemValue(List<SysDictItem> sysDictItems,String fieldValues,String cut,String dicCode){
|
||||
String result = "";
|
||||
List<SysDictItem> sysDictItemList = sysDictItems.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(e.getDictCode(),dicCode)){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).distinct().collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(sysDictItemList)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
result = sysDictItemList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
|
||||
for (String fieldValueStr : fieldValueStrList) {
|
||||
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
result = sysDictItemList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
|
||||
for (String fieldValueStr : fieldValueStrList) {
|
||||
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getEnName).collect(Collectors.joining(","));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1102,18 +1263,31 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for " + projectNameInfoEO.getProjectName()
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ". The due date is:" +inventoryAffirmDueDate+ " .Please check and address it in a timely manner.";
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
feishuMsgVo.setDueDate(inventoryAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -1121,7 +1295,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap);
|
||||
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
|
||||
result = "发起清单确认";
|
||||
@@ -1235,7 +1409,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
* @param projectLibraryId
|
||||
*/
|
||||
@Override
|
||||
public void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap){
|
||||
public void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType){
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -1243,7 +1417,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//飞书跳转链接
|
||||
// //飞书跳转链接
|
||||
String hrefFeishu = (String) sendMessageMap.get("hrefFeishu");
|
||||
//消息内容
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
@@ -1253,9 +1427,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
//飞书消息
|
||||
// //飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||
if (feishuMsgVo != null){
|
||||
// 补充飞书跳转链接
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setTitle(messageType.getName());
|
||||
iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
} else {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, messageType.getName(), hrefFeishu);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -1605,32 +1786,56 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
|
||||
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||
|
||||
String msgContentEN = "";
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " assigned the regulation task confirmation of " + projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is:" +taskAffirmDueDate+ " Please check and address it in a timely manner.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task to you. Please check and and handle it in time.");
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
|
||||
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
|
||||
userIdList.add(dreUserId);
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ ".to you. the due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has returned the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has returned the task. Please check and and handle it in time.");
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has submitted the task. Please check and and handle it in time.");
|
||||
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
|
||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(sysUser.getUsername());
|
||||
feishuMsgVo.setDueDate(taskAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink()
|
||||
@@ -1643,7 +1848,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgContentEN,userIdList,id,sendMessageMap);
|
||||
sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5788,15 +5993,25 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//消息内容
|
||||
String msgContentEN = "Please address the regulation list confirmation process for "+ projectNameInfoEO.getProjectName() +" ASAP. ";
|
||||
|
||||
//飞书跳转链接
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! Please address the regulation list confirmation process ASAP. ");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
+ projectLibraryId
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -5804,7 +6019,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap);
|
||||
sendMessage(msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5835,9 +6050,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
|
||||
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = "Please address the regulation task confirmation process for "+ projectNameInfoEO.getProjectName() +" ASAP. ";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
//系统内部跳转链接
|
||||
@@ -5849,7 +6073,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap);
|
||||
sendMessage(msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+10
@@ -211,6 +211,16 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
*/
|
||||
@Override
|
||||
public void checkData(String id, String cut) {
|
||||
//判断该条项目是否是自己创建,如果不是则不能删除
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<ProjectLibraryBase> projectLibraryBases = this.queryById(id);
|
||||
if(!loginUser.getUsername().equals(projectLibraryBases.get(0).getCreateBy())){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("该条项目非本人创建,不能删除");
|
||||
}else{
|
||||
throw new JeroBootException("This item is not created by myself and cannot be deleted");
|
||||
}
|
||||
}
|
||||
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrapper = new QueryWrapper<>();
|
||||
lawsInventoryQueryWrapper.eq("project_library_id",id);
|
||||
List<ProjectLawsInventoryEO> lawsInventoryRecords = projectLawsInventoryEOMapper.selectList(lawsInventoryQueryWrapper);
|
||||
|
||||
+17
-18
@@ -1063,8 +1063,6 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (CollectionUtils.isNotEmpty(certificationEngineerNameList) && StringUtils.isNotBlank(certificationEngineerNameList.get(0))) {
|
||||
certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList());
|
||||
certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
|
||||
@@ -1139,28 +1137,29 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
List<ProjectLibraryBase> baseDataList = projectLibraryBaseService.list(baseQueryWrapper.eq("id", projectId));
|
||||
if (CollectionUtils.isNotEmpty(baseDataList)) {
|
||||
String baseCertificationEngineer = baseDataList.get(0).getCertificationEngineer();
|
||||
List<String> baseCertificationEngineerIdList = Arrays.asList(baseCertificationEngineer.split(","));
|
||||
String certificationEngineerName;
|
||||
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
userqueryWrapper.in("id ", baseCertificationEngineerIdList);
|
||||
List<SysUser> userList = sysUserMapper.selectList(userqueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(userList)) {
|
||||
for (String baseUserId : baseCertificationEngineerIdList) {
|
||||
// 判断是否有工程师
|
||||
if (StringUtils.isNotEmpty(baseCertificationEngineer)){
|
||||
List<String> baseCertificationEngineerIdList = Arrays.asList(baseCertificationEngineer.split(","));
|
||||
String certificationEngineerName;
|
||||
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
userqueryWrapper.in("id ", baseCertificationEngineerIdList);
|
||||
List<SysUser> userList = sysUserMapper.selectList(userqueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(userList)) {
|
||||
for (String baseUserId : baseCertificationEngineerIdList) {
|
||||
|
||||
if (StringUtils.isNotEmpty(baseUserId)) {
|
||||
certificationEngineerName = userList.stream().filter(e -> baseUserId.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
ProjectRelatedPersonnel relatedPersonnel =new ProjectRelatedPersonnel();
|
||||
relatedPersonnel.setCertificationEngineer(baseUserId);
|
||||
relatedPersonnel.setCertificationEngineerName(certificationEngineerName);
|
||||
certificationEngineerList.add(relatedPersonnel);
|
||||
if (StringUtils.isNotEmpty(baseUserId)) {
|
||||
certificationEngineerName = userList.stream().filter(e -> baseUserId.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
ProjectRelatedPersonnel relatedPersonnel =new ProjectRelatedPersonnel();
|
||||
relatedPersonnel.setCertificationEngineer(baseUserId);
|
||||
relatedPersonnel.setCertificationEngineerName(certificationEngineerName);
|
||||
certificationEngineerList.add(relatedPersonnel);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
certificationEngineerList = certificationEngineerList.stream().distinct().collect(Collectors.toList());
|
||||
return certificationEngineerList;
|
||||
|
||||
|
||||
+3
-2
@@ -111,8 +111,9 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
|
||||
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
|
||||
targetMarket(projectLibraryBase, dictItemList, libraryBase);
|
||||
Map<String,Object> mapList = new HashMap<>();
|
||||
List<List<TimeNodeVO>> collect = new ArrayList<>();
|
||||
if(ObjectUtils.isNotEmpty(startTime) && ObjectUtils.isNotEmpty(endTime)){
|
||||
@@ -124,7 +125,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
if(collect.size() != 0){
|
||||
index ++;
|
||||
mapList.put("index",index);
|
||||
mapList.put("projectName",libraryBase.getProjectName());
|
||||
mapList.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket());
|
||||
mapList.put("data",collect);
|
||||
result.add(mapList);
|
||||
}
|
||||
|
||||
+29
-5
@@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.MsgTypeEnum;
|
||||
@@ -260,22 +262,44 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
String id = UUID.randomUUID().toString().replace("-", "");
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//给工程师下发消息
|
||||
if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())){
|
||||
//XXX has distributed the design compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
|
||||
msgContentEN = currentUser.getUsername() + " has distributed the design compliance confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
|
||||
msgContentEN = currentUser.getUsername() + " has assigned the design compliance confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.PREHOMO_ISSUE_DRE_MSG.getValue())){
|
||||
//XXX has distributed the Pre-Homo confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
|
||||
msgContentEN = currentUser.getUsername() + " has assigned the Pre-Homo confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.VERIFY_ISSUE_DRE_MSG.getValue())){
|
||||
//XXX has distributed the Verify compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
|
||||
msgContentEN = currentUser.getUsername() + " has assigned the validation compliance confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && org.apache.commons.lang3.StringUtils.isNotEmpty(msgContentEN)){
|
||||
//飞书跳转链接
|
||||
@@ -295,7 +319,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap);
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+50
-11
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.*;
|
||||
import com.jero.modules.project.mapper.*;
|
||||
@@ -315,21 +317,42 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
|
||||
String dreUserIds = jsonObject.getString("dreUserIds"); //dre用户id
|
||||
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
if(StringUtils.equals(msgType,MsgTypeEnum.DESIGN_REMIND_MSG.getValue())){
|
||||
//Please check and deal with the design compliance confirmation process of GB 7258 in XXX (project name) in time.
|
||||
msgContentEN = "Please check and deal with the design compliance confirmation process of "
|
||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_REMIND_MSG.getValue())){
|
||||
//Please check and deal with the Pre-Homo confirmation process of GB 7258 in XXX (project name) in time.
|
||||
msgContentEN = "Please check and address the Pre-Homo confirmation process of "
|
||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ " in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.VERIFY_REMIND_MSG.getValue())){
|
||||
//Please check and deal with the Verify compliance confirmation process of GB 7258 in XXX (project name) in time.
|
||||
msgContentEN = "Please check and address the Verify compliance confirmation process of "
|
||||
msgContentEN = "Please check and address the validation compliance confirmation process of "
|
||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ " in time.";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
@@ -337,12 +360,17 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -350,7 +378,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap);
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
return new Result<>().success("提醒办理成功!");
|
||||
}
|
||||
@@ -615,10 +643,17 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) {
|
||||
msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
}
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -626,11 +661,15 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -638,7 +677,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap);
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-2
@@ -5,6 +5,7 @@ import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
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.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
@@ -53,7 +54,7 @@ public class SendMessageUtils {
|
||||
SendMessageUtils.webSocket = webSocket;
|
||||
}
|
||||
|
||||
public static void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap) {
|
||||
public static void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType) {
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -74,7 +75,14 @@ public class SendMessageUtils {
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||
if (feishuMsgVo != null){
|
||||
// 补充飞书跳转链接
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setTitle(messageType.getName());
|
||||
iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
} else {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, messageType.getName(), hrefFeishu);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user