合并分支 'fix_bug_first_stage' 到 'master'

Fix bug first stage

查看合并请求 laws-nio/laws-weilai!22
This commit is contained in:
李雪涛
2022-07-01 15:00:00 +08:00
74 changed files with 1609 additions and 558 deletions
@@ -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`;
@@ -6,10 +6,11 @@ package com.jero.common.constant.enums;
* @auth zhn * @auth zhn
*/ */
public enum MessageTypeEnum { public enum MessageTypeEnum {
READ("订阅通知","1"), READ("Subscription Notification","1"),
WARN("预警信息","2"), WARN("Early Warning","2"),
PUSH("转发推送","3"), PUSH("Share / Forward","3"),
COLLECT("认证消息","4"); HOMO_TASK("Homo Parameter Task","4"),
TASK("Regulation Compliance Task", "5");
String name; String name;
String value; String value;
@@ -486,53 +486,58 @@ public class QueryGenerator {
} }
name = oConvertUtils.camelToUnderline(name); name = oConvertUtils.camelToUnderline(name);
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value); log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
switch (rule) { if(" is null ".equals(value)){
case GT: queryWrapper.isNull(name);
queryWrapper.gt(name, value); }else{
break; switch (rule) {
case GE: case GT:
queryWrapper.ge(name, value); queryWrapper.gt(name, value);
break; break;
case LT: case GE:
queryWrapper.lt(name, value); queryWrapper.ge(name, value);
break; break;
case LE: case LT:
queryWrapper.le(name, value); queryWrapper.lt(name, value);
break; break;
case EQ: case LE:
case EQ_WITH_ADD: queryWrapper.le(name, value);
queryWrapper.eq(name, value); break;
break; case EQ:
case NE: case EQ_WITH_ADD:
queryWrapper.ne(name, value); queryWrapper.eq(name, value);
break; break;
case IN: case NE:
if(value instanceof String) { queryWrapper.ne(name, value);
queryWrapper.in(name, (Object[])value.toString().split(",")); break;
}else if(value instanceof String[]) { case IN:
queryWrapper.in(name, (Object[]) value); 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;
} }
} }
/** /**
* *
@@ -1061,7 +1061,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
sysAnnouncement.setDelFlag("0"); sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0"); sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date()); sysAnnouncement.setSendTime(new Date());
sysAnnouncement.setMsgCategory(MessageTypeEnum.COLLECT.getValue());//消息类型 sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户 sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
sysAnnouncement.setMsgContent(content); sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo); sysAnnouncement.setMsgContentInfo(contentInfo);
@@ -1070,7 +1070,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 发送飞书消息 // 发送飞书消息
try { try {
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu); feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.HOMO_TASK.getName(), hrefFeishu);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
@@ -1126,7 +1126,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
sysAnnouncement.setDelFlag("0"); sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0"); sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date()); sysAnnouncement.setSendTime(new Date());
sysAnnouncement.setMsgCategory(MessageTypeEnum.COLLECT.getValue());//消息类型 sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户 sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
sysAnnouncement.setMsgContent(content); sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo); sysAnnouncement.setMsgContentInfo(contentInfo);
@@ -1135,7 +1135,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 发送飞书消息 // 发送飞书消息
try { try {
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu); feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.HOMO_TASK.getName(), hrefFeishu);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.system.api.ISysBaseAPI; 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.RestUtil;
import com.jero.common.util.TokenUtils; import com.jero.common.util.TokenUtils;
import com.jero.common.util.oConvertUtils; import com.jero.common.util.oConvertUtils;
@@ -19,6 +19,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
@@ -47,6 +48,8 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@@ -341,7 +344,7 @@ public class CommonController {
* @param response * @param response
*/ */
@GetMapping(value = "/downLoadFile") @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)){ if(StringUtils.isBlank(id)){
throw new JeroBootException("参数信息不全"); throw new JeroBootException("参数信息不全");
} }
@@ -355,6 +358,7 @@ public class CommonController {
} }
InputStream inputStream = null; InputStream inputStream = null;
OutputStream outputStream = null; OutputStream outputStream = null;
File newFile =null;
try { try {
String fileName = ""; String fileName = "";
//本地下载 //本地下载
@@ -367,9 +371,18 @@ public class CommonController {
fileName = ossFile.getFileName(); fileName = ossFile.getFileName();
response.setContentType("application/force-download");// 设置强制下载不打开 response.setContentType("application/force-download");// 设置强制下载不打开
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1")); 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(); outputStream = response.getOutputStream();
inputStream = CosBootUtil.download(filePath);
byte[] buf = new byte[1024]; byte[] buf = new byte[1024];
int len; int len;
while ((len = inputStream.read(buf)) > 0) { while ((len = inputStream.read(buf)) > 0) {
@@ -394,7 +407,17 @@ public class CommonController {
} catch (IOException e) { } catch (IOException e) {
log.error(e.getMessage(), 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 * @param response
*/ */
@GetMapping(value = "/pdf/viewFile") @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<>(); LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OSSFile::getId,id); queryWrapper.eq(OSSFile::getId,id);
@@ -490,7 +513,10 @@ public class CommonController {
InputStream download = CosBootUtil.download(filePath); InputStream download = CosBootUtil.download(filePath);
File file = new File(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); File newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
// 文件名称 // 文件名称
fileName = file.getName(); fileName = file.getName();
@@ -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") @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); 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); 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") @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")
@@ -73,9 +73,9 @@ public class PDFUtils {
PdfTilingBrush brush = new PdfTilingBrush(dimension2D); PdfTilingBrush brush = new PdfTilingBrush(dimension2D);
brush.getGraphics().setTransparency(0.4F); brush.getGraphics().setTransparency(0.4F);
brush.getGraphics().save(); 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().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)); PdfBrushes.getViolet(), 0 , 0 , new PdfStringFormat(PdfTextAlignment.Center));
brush.getGraphics().restore(); brush.getGraphics().restore();
brush.getGraphics().setTransparency(1); brush.getGraphics().setTransparency(1);
@@ -4974,9 +4974,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
File saveDirectory, File saveDirectory,
String cut) { 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; int i = 2;
List<String> msgList = new ArrayList<>(); List<String> msgList = new ArrayList<>();
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
@@ -5074,11 +5085,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (StringUtils.isNotBlank(value)) { if (StringUtils.isNotBlank(value)) {
for (String valueTemp : value.split(",")) { for (String valueTemp : value.split(",")) {
if (treeNameList.contains(valueTemp)) { if (treeNameList.contains(valueTemp)) {
List<SysCategory> collect = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList()); List<SysCategory> collect = new ArrayList<>();
valueId += collect.get(0).getId(); 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)) { } else if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldShowType)) {
@@ -5150,7 +5168,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//文字转数据字典编码 //文字转数据字典编码
if (itemNameList.contains(value)) { if (itemNameList.contains(value)) {
String finalValue = 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) { if (collect.size() != 0) {
value = collect.get(0).getItemValue(); value = collect.get(0).getItemValue();
} }
@@ -5193,7 +5216,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (StringUtils.isNotBlank(value)) { if (StringUtils.isNotBlank(value)) {
for (String valueTemp : value.split(",")) { for (String valueTemp : value.split(",")) {
if (itemNameList.contains(valueTemp)) { 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() + ","; valueId += collect.get(0).getItemValue() + ",";
} }
} }
@@ -201,6 +201,10 @@ public class DummyInventoryInfoEO implements Serializable {
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String designDuty; private java.lang.String designDuty;
//交付物说明
@Excel(name = "设计符合性确认-交付物说明", width = 20)
private String designRemark;
/**prehomo确认-交付物类型*/ /**prehomo确认-交付物类型*/
@Excel(name = "Prehomo-交付物类型", width = 15,dicCode ="deliverable_template") @Excel(name = "Prehomo-交付物类型", width = 15,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-交付物类型") @ApiModelProperty(value = "prehomo确认-交付物类型")
@@ -209,6 +213,7 @@ public class DummyInventoryInfoEO implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private java.lang.String prehomoDeliverableTypeName; private java.lang.String prehomoDeliverableTypeName;
/**prehomo确认-交付物模板*/ /**prehomo确认-交付物模板*/
@ApiModelProperty(value = "prehomo确认-交付物模板") @ApiModelProperty(value = "prehomo确认-交付物模板")
@@ -230,6 +235,10 @@ public class DummyInventoryInfoEO implements Serializable {
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String prehomoDuty; private java.lang.String prehomoDuty;
//prehomo确认-交付物说明
@Excel(name = "prehomo确认-交付物说明", width = 20)
private String prehomoRemark;
/**验证符合性确认-交付物类型*/ /**验证符合性确认-交付物类型*/
@Excel(name = "验证-交付物类型", width = 15,dicCode ="deliverable_template") @Excel(name = "验证-交付物类型", width = 15,dicCode ="deliverable_template")
@ApiModelProperty(value = "验证符合性确认-交付物类型") @ApiModelProperty(value = "验证符合性确认-交付物类型")
@@ -259,6 +268,10 @@ public class DummyInventoryInfoEO implements Serializable {
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String verifyDuty; private java.lang.String verifyDuty;
//验证备注
@Excel(name = "验证符合性确认-交付物说明", width = 20)
private String verifyRemark;
@TableField(exist = false) @TableField(exist = false)
private String cut; private String cut;
@@ -273,4 +286,9 @@ public class DummyInventoryInfoEO implements Serializable {
} }
@@ -82,11 +82,11 @@ public class DummyInventoryInfoEOEn implements Serializable {
/**适用地区*/ /**适用地区*/
@ApiModelProperty(value = "适用地区") @ApiModelProperty(value = "适用地区")
@Dict(dicCode ="region") @Dict(dicCode ="region")
@Excel(name = "Area", width = 15, dicCode = "region") @Excel(name = "Area", width = 15)
private String region; 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 = "适用范围") @ApiModelProperty(value = "适用范围")
@Dict(dicCode ="apply_scope") @Dict(dicCode ="apply_scope")
private String shi4Yong4Fan4Wei2; private String shi4Yong4Fan4Wei2;
@@ -111,7 +111,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String implementType; 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 = "新车型实施日期") @ApiModelProperty(value = "新车型实施日期")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@@ -120,7 +120,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String; 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 = "在产车实施日期") @ApiModelProperty(value = "在产车实施日期")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@@ -134,25 +134,25 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String wvtaId; private String wvtaId;
/**认证类型*/ /**认证类型*/
@Excel(name = "Certification Type", width = 15,dicCode ="attestation_type") @Excel(name = "Certification Type", width = 30,dicCode ="attestation_type")
@ApiModelProperty(value = "认证类型") @ApiModelProperty(value = "认证类型")
@Dict(dicCode ="attestation_type") @Dict(dicCode ="attestation_type")
private String attestationType; private String attestationType;
/**认证级别*/ /**认证级别*/
@Excel(name = "Certification Level", width = 15,dicCode ="attestation_rank") @Excel(name = "Certification Level", width = 30,dicCode ="attestation_rank")
@ApiModelProperty(value = "认证级别") @ApiModelProperty(value = "认证级别")
@Dict(dicCode ="attestation_rank") @Dict(dicCode ="attestation_rank")
private String attestationRank; private String attestationRank;
/**适用增补件*/ /**适用增补件*/
@ApiModelProperty(value = "适用增补件") @ApiModelProperty(value = "适用增补件")
@Excel(name = "Applicable Supplement", width = 15) @Excel(name = "Applicable Supplement", width = 30)
private String applicableSupplement; private String applicableSupplement;
/**技术领域*/ /**技术领域*/
@Excel(name = "Technical Field", width = 15) @Excel(name = "Technical Field", width = 30)
@ApiModelProperty(value = "技术领域") @ApiModelProperty(value = "技术领域")
private String technologyTerritory; private String technologyTerritory;
@@ -160,7 +160,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String technologyTerritoryName; private String technologyTerritoryName;
/**责任领域*/ /**责任领域*/
@Excel(name = "Responsible Field", width = 15,dicCode ="duty_territory") @Excel(name = "Responsible Field", width = 30,dicCode ="duty_territory")
@ApiModelProperty(value = "责任领域") @ApiModelProperty(value = "责任领域")
@Dict(dicCode ="duty_territory") @Dict(dicCode ="duty_territory")
private String dutyTerritory; private String dutyTerritory;
@@ -171,7 +171,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String remark; private String remark;
/**设计符合性确认-交付物类型*/ /**设计符合性确认-交付物类型*/
@Excel(name = "Design-Deliverables", width = 15,dicCode ="deliverable_template") @Excel(name = "Design Deliverables", width = 30,dicCode ="deliverable_template")
@ApiModelProperty(value = "设计符合性确认-交付物类型") @ApiModelProperty(value = "设计符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template") @Dict(dicCode ="deliverable_template")
private String designDeliverableType; private String designDeliverableType;
@@ -182,23 +182,28 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String designDeliverableTemplate; private String designDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "Design-Deliverable Template", width = 15) @Excel(name = "Design Deliverable Template", width = 30)
private String designDeliverableTemplateName; private String designDeliverableTemplateName;
/**设计符合性确认-发起人*/ /**设计符合性确认-发起人*/
@Excel(name = "Design-Initiator", width = 15) @Excel(name = "Design Initiator", width = 30)
@ApiModelProperty(value = "设计符合性确认-发起人") @ApiModelProperty(value = "设计符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2") @Dict(dicCode ="fa1_qi3_ren2")
private String designInitiator; private String designInitiator;
/**设计符合性确认-责任人*/ /**设计符合性确认-责任人*/
@Excel(name = "Design-Assignee", width = 15) @Excel(name = "Design Assignee", width = 30)
@ApiModelProperty(value = "设计符合性确认-责任人") @ApiModelProperty(value = "设计符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private String designDuty; private String designDuty;
//交付物说明
@Excel(name = "Design Compliance Check Deliverable Description", width = 50)
private String designRemark;
/**prehomo确认-交付物类型*/ /**prehomo确认-交付物类型*/
@Excel(name = "Prehomo-Deliverables", width = 15,dicCode ="deliverable_template") @Excel(name = "Prehomo Deliverables", width = 30,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-交付物类型") @ApiModelProperty(value = "prehomo确认-交付物类型")
@Dict(dicCode ="deliverable_template") @Dict(dicCode ="deliverable_template")
private String prehomoDeliverableType; private String prehomoDeliverableType;
@@ -209,23 +214,27 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String prehomoDeliverableTemplate; private String prehomoDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "Prehomo-Deliverable Template", width = 15) @Excel(name = "Prehomo Deliverable Template", width = 30)
private String prehomoDeliverableTemplateName; private String prehomoDeliverableTemplateName;
/**prehomo确认-发起人*/ /**prehomo确认-发起人*/
@Excel(name = "Prehomo-Initiator", width = 15) @Excel(name = "Prehomo Initiator", width = 30)
@ApiModelProperty(value = "prehomo确认-发起人") @ApiModelProperty(value = "prehomo确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2") @Dict(dicCode ="fa1_qi3_ren2")
private String prehomoInitiator; private String prehomoInitiator;
/**prehomo确认-责任人*/ /**prehomo确认-责任人*/
@Excel(name = "Prehomo-Assignee", width = 15) @Excel(name = "Prehomo Assignee", width = 30)
@ApiModelProperty(value = "prehomo确认-责任人") @ApiModelProperty(value = "prehomo确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private String prehomoDuty; 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 = "验证符合性确认-交付物类型") @ApiModelProperty(value = "验证符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template") @Dict(dicCode ="deliverable_template")
private String verifyDeliverableType; private String verifyDeliverableType;
@@ -235,21 +244,25 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String verifyDeliverableTemplate; private String verifyDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "Verify-Deliverable Template", width = 15) @Excel(name = "Verify Deliverable Template", width = 30)
private String verifyDeliverableTemplateName; private String verifyDeliverableTemplateName;
/**验证符合性确认-发起人*/ /**验证符合性确认-发起人*/
@Excel(name = "Verify-Initiator", width = 15) @Excel(name = "Verify Initiator", width = 30)
@ApiModelProperty(value = "验证符合性确认-发起人") @ApiModelProperty(value = "验证符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2") @Dict(dicCode ="fa1_qi3_ren2")
private String verifyInitiator; private String verifyInitiator;
/**验证符合性确认-责任人*/ /**验证符合性确认-责任人*/
@Excel(name = "Verify-Assignee", width = 15) @Excel(name = "Verify Assignee", width = 30)
@ApiModelProperty(value = "验证符合性确认-责任人") @ApiModelProperty(value = "验证符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private String verifyDuty; private String verifyDuty;
///验证-交付物说明
@Excel(name = "Validation Compliance Check Deliverable Description", width = 60)
private String verifyRemark;
@TableField(exist = false) @TableField(exist = false)
private String cut; private String cut;
@@ -264,4 +277,9 @@ public class DummyInventoryInfoEOEn implements Serializable {
} }
@@ -30,7 +30,6 @@
<result column="design_duty" property="designDuty" /> <result column="design_duty" property="designDuty" />
<result column="prehomo_deliverable_type" property="prehomoDeliverableType" /> <result column="prehomo_deliverable_type" property="prehomoDeliverableType" />
<result column="prehomo_deliverable_template" property="prehomoDeliverableTemplate" /> <result column="prehomo_deliverable_template" property="prehomoDeliverableTemplate" />
<result column="prehomo_initiator" property="prehomoInitiator" />
<result column="prehomo_duty" property="prehomoDuty" /> <result column="prehomo_duty" property="prehomoDuty" />
<result column="verify_deliverable_type" property="verifyDeliverableType" /> <result column="verify_deliverable_type" property="verifyDeliverableType" />
<result column="verify_deliverable_template" property="verifyDeliverableTemplate" /> <result column="verify_deliverable_template" property="verifyDeliverableTemplate" />
@@ -38,5 +37,8 @@
<result column="verify_duty" property="verifyDuty" /> <result column="verify_duty" property="verifyDuty" />
<result column="region" property="region" /> <result column="region" property="region" />
<result column="applicable_supplement" property="applicableSupplement" /> <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> </resultMap>
</mapper> </mapper>
@@ -653,16 +653,18 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
"*认证级别," +"适用增补件,"+ "*认证级别," +"适用增补件,"+
"*责任领域,备注," + "*责任领域,备注," +
"设计符合性确认,Pre-homo确认,验证符合性确认"; "设计符合性确认,Pre-homo确认,验证符合性确认";
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人"; titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物说明," +
"交付物类型,交付物模板,发起人,责任人,交付物说明," +
"交付物类型,交付物模板,发起人,责任人,交付物说明";
}else{ }else{
titleOne = "*Number,Sub-Title,Usage," + titleOne = "*Number,Sub-Title,Usage," +
"WVTA ID,Certification Type," + "WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+ "*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," + "*Responsible Field,Comments," +
"design compliance check,pre-homo check,validation compliance chech"; "Design compliance check,Pre-homo check,Validation compliance chech";
titleTwo = "type of deliverables,deliverable template,initiator,person liable," + titleTwo = "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
"type of deliverables,deliverable template,initiator,person liable," + "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
"type of deliverables,deliverable template,initiator,person liable"; "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description";
} }
@@ -694,7 +696,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
int count = 1; int count = 1;
int startLine = 0; int startLine = 0;
int endLine = 0; int endLine = 0;
int line = 3; int line = 4;
for (int i = 0; i < index; i++) { for (int i = 0; i < index; i++) {
//合并单元格 //合并单元格
CellRangeAddress region1 = CellRangeAddress region1 =
@@ -716,7 +718,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
count ++; count ++;
} }
CellRangeAddress region = 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); sheet.addMergedRegion(region);
String explain= ""; String explain= "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){ if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
@@ -751,7 +753,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
row.createCell(lineTemp).setCellValue(headerArr[m]); row.createCell(lineTemp).setCellValue(headerArr[m]);
Cell cell = row.getCell(lineTemp); Cell cell = row.getCell(lineTemp);
cell.setCellStyle(cellStyle); cell.setCellStyle(cellStyle);
lineTemp = lineTemp + 4; lineTemp = lineTemp + 5;
} }
} }
@@ -916,15 +918,17 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
String title = ""; String title = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){ if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
title = "*编号,子标题,实施类别,WVTA ID,认证类型,*认证级别,适用增补件,*责任领域,备注," + title = "*编号,子标题,实施类别,WVTA ID,认证类型,*认证级别,适用增补件,*责任领域,备注," +
"设计交付物类型,设计交付物模板,设计发起人,设计责任人,pre交付物类型,pre交付物模板,pre发起人,pre责任人,验证交付物类型,验证交付物模板,验证发起人,验证责任人"; "设计交付物类型,设计交付物模板,设计发起人,设计责任人,设计交付物说明," +
"Pre交付物类型,Pre交付物模板,Pre发起人,Pre责任人,Pre交付物说明," +
"验证交付物类型,验证交付物模板,验证发起人,验证责任人,验证交付物说明";
}else{ }else{
title = "*Number,Sub-Title,Usage," + title = "*Number,Sub-Title,Usage," +
"WVTA ID,Certification Type," + "WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+ "*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," + "*Responsible Field,Comments," +
"design type of deliverables,design deliverable template,design initiator,design 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 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 Type of deliverables,Verify Deliverable template,Verify Initiator,Verify Person liable,Verify Deliverables description";
} }
int pos = file.getOriginalFilename().lastIndexOf("."); int pos = file.getOriginalFilename().lastIndexOf(".");
@@ -1046,27 +1050,27 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
}else if(i == 1){ }else if(i == 1){
if(j > 8){ if(j > 8){
String flag = ""; String flag = "";
if(8 < j && j < 13){ if(8 < j && j < 14){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){ if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="设计"; flag ="设计";
}else{ }else{
flag ="design "; flag ="Design ";
} }
key = flag + headerCell.getStringCellValue(); key = flag + headerCell.getStringCellValue();
} }
if(12 < j && j < 17){ if(13 < j && j < 19){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){ if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="pre"; flag ="Pre";
}else{ }else{
flag ="pre "; flag ="Pre ";
} }
key = flag + headerCell.getStringCellValue(); key = flag + headerCell.getStringCellValue();
} }
if(16 < j && j < 21){ if(18 < j && j < 24){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){ if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="验证"; flag ="验证";
}else{ }else{
flag ="verify "; flag ="Verify ";
} }
key = flag + headerCell.getStringCellValue(); key = flag + headerCell.getStringCellValue();
@@ -1720,18 +1724,21 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
case "设计交付物模板": return "designDeliverableTemplate"; case "设计交付物模板": return "designDeliverableTemplate";
case "设计发起人": return "designInitiator"; case "设计发起人": return "designInitiator";
case "设计责任人": return "designDuty"; case "设计责任人": return "designDuty";
case "pre交付物类型": return "prehomoDeliverableType"; case "设计交付物说明": return "designRemark";
case "pre交付物模板": return "prehomoDeliverableTemplate"; case "Pre交付物类型": return "prehomoDeliverableType";
case "pre发起人": return "prehomoInitiator"; case "Pre交付物模板": return "prehomoDeliverableTemplate";
case "pre责任人": return "prehomoDuty"; case "Pre发起人": return "prehomoInitiator";
case "Pre责任人": return "prehomoDuty";
case "Pre交付物说明": return "prehomoRemark";
case "验证交付物类型": return "verifyDeliverableType"; case "验证交付物类型": return "verifyDeliverableType";
case "验证交付物模板": return "verifyDeliverableTemplate"; case "验证交付物模板": return "verifyDeliverableTemplate";
case "验证发起人": return "verifyInitiator"; case "验证发起人": return "verifyInitiator";
case "验证责任人": return "verifyDuty"; case "验证责任人": return "verifyDuty";
case "验证交付物说明": return "verifyRemark";
case "*Number": return "serialNumber"; case "*Number": return "serialNumber";
case "title": return "title"; case "Title": return "title";
case "Sub-Title": return "subtitle"; case "Sub-Title": return "subtitle";
// case "适用范围": return "shi4Yong4Fan4Wei2"; // case "适用范围": return "shi4Yong4Fan4Wei2";
// case "状态": return "state"; // case "状态": return "state";
@@ -1747,18 +1754,21 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
case "*Responsible Field": return "dutyTerritory"; case "*Responsible Field": return "dutyTerritory";
// case "适用地区": return "region"; // case "适用地区": return "region";
case "Comments": return "remark"; case "Comments": return "remark";
case "design type of deliverables": return "designDeliverableType"; case "Design Type of deliverables": return "designDeliverableType";
case "design deliverable template": return "designDeliverableTemplate"; case "Design Deliverable template": return "designDeliverableTemplate";
case "design initiator": return "designInitiator"; case "Design Initiator": return "designInitiator";
case "design person liable": return "designDuty"; case "Design Person liable": return "designDuty";
case "pre type of deliverables": return "prehomoDeliverableType"; case "Design Deliverables description": return "designRemark";
case "pre deliverable template": return "prehomoDeliverableTemplate"; case "Pre Type of deliverables": return "prehomoDeliverableType";
case "pre initiator": return "prehomoInitiator"; case "Pre Deliverable template": return "prehomoDeliverableTemplate";
case "pre person liable": return "prehomoDuty"; case "Pre Initiator": return "prehomoInitiator";
case "verify type of deliverables": return "verifyDeliverableType"; case "Pre Person liable": return "prehomoDuty";
case "verify deliverable template": return "verifyDeliverableTemplate"; case "Pre Deliverables description": return "prehomoRemark";
case "verify initiator": return "verifyInitiator"; case "Verify Type of deliverables": return "verifyDeliverableType";
case "verify person liable": return "verifyDuty"; 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; default: return null;
} }
} }
@@ -1,5 +1,7 @@
package com.jero.modules.feishu.service; package com.jero.modules.feishu.service;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import java.io.IOException; import java.io.IOException;
/** /**
@@ -26,4 +28,11 @@ public interface IFeishuService {
* @throws IOException * @throws IOException
*/ */
String batchSendMessage(String[] userIds, String message, String title, String backUrl) 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;
} }
@@ -1,8 +1,11 @@
package com.jero.modules.feishu.service.impl; 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.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.system.util.HttpRequestUtil; import com.jero.modules.system.util.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@@ -111,4 +114,128 @@ public class FeishuServiceImpl implements IFeishuService {
} }
return tokenJson.get("msg").toString(); 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; //回调的网址
}
@@ -101,10 +101,13 @@ public class ProjectLawsInventoryEO implements Serializable {
/**适用地区*/ /**适用地区*/
@ApiModelProperty(value = "适用地区") @ApiModelProperty(value = "适用地区")
@Dict(dicCode ="region") //@Dict(dicCode ="region")
@Excel(name = "适用地区", width = 15, dicCode = "region") @Excel(name = "适用地区", width = 15, dicCode = "region")
private java.lang.String region; private java.lang.String region;
@TableField(exist = false)
private String region_dictText;
/**对应标准*/ /**对应标准*/
@Excel(name = "对应标准", width = 20) @Excel(name = "对应标准", width = 20)
@ApiModelProperty(value = "对应标准") @ApiModelProperty(value = "对应标准")
@@ -113,8 +116,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**实施类别*/ /**实施类别*/
@Excel(name = "实施类别", width = 20,dicCode ="implement_type") @Excel(name = "实施类别", width = 20,dicCode ="implement_type")
@ApiModelProperty(value = "实施类别") @ApiModelProperty(value = "实施类别")
@Dict(dicCode ="implement_type") //@Dict(dicCode ="implement_type")
private String implementType; private String implementType;
@TableField(exist = false)
private String implementType_dictText;
/**新车型实施日期*/ /**新车型实施日期*/
@Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd") @Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd")
@@ -139,14 +144,18 @@ public class ProjectLawsInventoryEO implements Serializable {
/**认证类型*/ /**认证类型*/
@Excel(name = "认证类型", width = 20,dicCode ="attestation_type") @Excel(name = "认证类型", width = 20,dicCode ="attestation_type")
@ApiModelProperty(value = "认证类型") @ApiModelProperty(value = "认证类型")
@Dict(dicCode ="attestation_type") //@Dict(dicCode ="attestation_type")
private String attestationType; private String attestationType;
@TableField(exist = false)
private String attestationType_dictText;
/**认证级别*/ /**认证级别*/
@Excel(name = "认证级别", width = 20,dicCode ="attestation_rank") @Excel(name = "认证级别", width = 20,dicCode ="attestation_rank")
@ApiModelProperty(value = "认证级别") @ApiModelProperty(value = "认证级别")
@Dict(dicCode ="attestation_rank") //@Dict(dicCode ="attestation_rank")
private String attestationRank; private String attestationRank;
@TableField(exist = false)
private String attestationRank_dictText;
//适用增补件 //适用增补件
@Excel(name = "适用增补件", width = 20) @Excel(name = "适用增补件", width = 20)
@@ -160,8 +169,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**责任领域*/ /**责任领域*/
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory") @Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
@ApiModelProperty(value = "责任领域") @ApiModelProperty(value = "责任领域")
@Dict(dicCode ="duty_territory") //@Dict(dicCode ="duty_territory")
private String dutyTerritory; private String dutyTerritory;
@TableField(exist = false)
private String dutyTerritory_dictText;
/**法规工程师id*/ /**法规工程师id*/
@ApiModelProperty(value = "法规工程师id") @ApiModelProperty(value = "法规工程师id")
@@ -198,10 +209,12 @@ public class ProjectLawsInventoryEO implements Serializable {
/**设计符合性确认-交付物类型*/ /**设计符合性确认-交付物类型*/
@Excel(name = "设计符合性确认-交付物类型", width = 20,dicCode ="deliverable_template") @Excel(name = "设计符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
@ApiModelProperty(value = "设计符合性确认-交付物类型") @ApiModelProperty(value = "设计符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template") //@Dict(dicCode ="deliverable_template")
private String designDeliverableType; private String designDeliverableType;
@TableField(exist = false) @TableField(exist = false)
private String designDeliverableTypeName; private String designDeliverableTypeName;
@TableField(exist = false)
private String designDeliverableType_dictText;
/**设计符合性确认-交付物模板*/ /**设计符合性确认-交付物模板*/
@ApiModelProperty(value = "设计符合性确认-交付物模板") @ApiModelProperty(value = "设计符合性确认-交付物模板")
@@ -214,8 +227,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**设计符合性确认-发起人角色*/ /**设计符合性确认-发起人角色*/
@ApiModelProperty(value = "设计符合性确认-发起人角色") @ApiModelProperty(value = "设计符合性确认-发起人角色")
@Dict(dicCode ="fa1_qi3_ren2") //@Dict(dicCode ="fa1_qi3_ren2")
private String designInitiator; private String designInitiator;
@TableField(exist = false)
private String designInitiator_dictText;
/**设计符合性确认-发起人id*/ /**设计符合性确认-发起人id*/
//@TableField(updateStrategy = FieldStrategy.IGNORED) //@TableField(updateStrategy = FieldStrategy.IGNORED)
@@ -229,8 +244,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**设计符合性确认-责任人角色*/ /**设计符合性确认-责任人角色*/
@ApiModelProperty(value = "设计符合性确认-责任人角色") @ApiModelProperty(value = "设计符合性确认-责任人角色")
@Dict(dicCode ="ze2_ren4_ren2") //@Dict(dicCode ="ze2_ren4_ren2")
private String designDuty; private String designDuty;
@TableField(exist = false)
private String designDuty_dictText;
/**设计符合性确认-责任人id*/ /**设计符合性确认-责任人id*/
@ApiModelProperty(value = "设计符合性确认-责任人id") @ApiModelProperty(value = "设计符合性确认-责任人id")
@@ -259,8 +276,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**prehomo确认-交付物类型*/ /**prehomo确认-交付物类型*/
@Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template") @Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-1") @ApiModelProperty(value = "prehomo确认-1")
@Dict(dicCode ="deliverable_template") ////@Dict(dicCode ="deliverable_template")
private String prehomoDeliverableType; private String prehomoDeliverableType;
@TableField(exist = false)
private String prehomoDeliverableType_dictText;
@TableField(exist = false) @TableField(exist = false)
private String prehomoDeliverableTypeName; private String prehomoDeliverableTypeName;
@@ -275,8 +294,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**prehomo确认-发起人角色*/ /**prehomo确认-发起人角色*/
@ApiModelProperty(value = "prehomo确认-发起人角色") @ApiModelProperty(value = "prehomo确认-发起人角色")
@Dict(dicCode ="fa1_qi3_ren2") //@Dict(dicCode ="fa1_qi3_ren2")
private String prehomoInitiator; private String prehomoInitiator;
@TableField(exist = false)
private String prehomoInitiator_dictText;
/**prehomo确认-发起人id*/ /**prehomo确认-发起人id*/
@ApiModelProperty(value = "prehomo确认-发起人id") @ApiModelProperty(value = "prehomo确认-发起人id")
@@ -290,8 +311,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**prehomo确认-责任人角色*/ /**prehomo确认-责任人角色*/
@ApiModelProperty(value = "prehomo确认-责任人角色") @ApiModelProperty(value = "prehomo确认-责任人角色")
@Dict(dicCode ="ze2_ren4_ren2") //@Dict(dicCode ="ze2_ren4_ren2")
private String prehomoDuty; private String prehomoDuty;
@TableField(exist = false)
private String prehomoDuty_dictText;
/**prehomo确认-责任人id*/ /**prehomo确认-责任人id*/
@ApiModelProperty(value = "prehomo确认-责任人id") @ApiModelProperty(value = "prehomo确认-责任人id")
@@ -320,8 +343,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**验证符合性确认-交付物类型*/ /**验证符合性确认-交付物类型*/
@Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template") @Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
@ApiModelProperty(value = "验证符合性确认-交付物类型") @ApiModelProperty(value = "验证符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template") //@Dict(dicCode ="deliverable_template")
private String verifyDeliverableType; private String verifyDeliverableType;
@TableField(exist = false)
private String verifyDeliverableType_dictText;
@TableField(exist = false) @TableField(exist = false)
private String verifyDeliverableTypeName; private String verifyDeliverableTypeName;
@@ -336,8 +361,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**验证符合性确认-发起人角色*/ /**验证符合性确认-发起人角色*/
@ApiModelProperty(value = "验证符合性确认-发起人角色") @ApiModelProperty(value = "验证符合性确认-发起人角色")
@Dict(dicCode ="fa1_qi3_ren2") //@Dict(dicCode ="fa1_qi3_ren2")
private String verifyInitiator; private String verifyInitiator;
@TableField(exist = false)
private String verifyInitiator_dictText;
/**验证符合性确认-发起人id*/ /**验证符合性确认-发起人id*/
@ApiModelProperty(value = "验证符合性确认-发起人id") @ApiModelProperty(value = "验证符合性确认-发起人id")
@@ -351,8 +378,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**验证符合性确认-责任人角色*/ /**验证符合性确认-责任人角色*/
@ApiModelProperty(value = "验证符合性确认-责任人角色") @ApiModelProperty(value = "验证符合性确认-责任人角色")
@Dict(dicCode ="ze2_ren4_ren2") //@Dict(dicCode ="ze2_ren4_ren2")
private String verifyDuty; private String verifyDuty;
@TableField(exist = false)
private String verifyDuty_dictText;
/**验证符合性确认-责任人id*/ /**验证符合性确认-责任人id*/
@ApiModelProperty(value = "验证符合性确认-责任人id") @ApiModelProperty(value = "验证符合性确认-责任人id")
@@ -71,7 +71,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
private String serialNumber; private String serialNumber;
/**标题*/ /**标题*/
@Excel(name = "title", width = 20) @Excel(name = "Title", width = 20)
@ApiModelProperty(value = "标题") @ApiModelProperty(value = "标题")
private String title; private String title;
@@ -101,7 +101,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
/**适用地区*/ /**适用地区*/
@ApiModelProperty(value = "适用地区") @ApiModelProperty(value = "适用地区")
@Dict(dicCode ="Area") @Dict(dicCode ="Area")
@Excel(name = "Area", width = 15, dicCode = "region") @Excel(name = "Area", width = 15)
private String region; private String region;
/**对应标准*/ /**对应标准*/
@@ -1,13 +1,13 @@
package com.jero.modules.project.enums; package com.jero.modules.project.enums;
public enum ProjectTaskPlanningNameEnum { public enum ProjectTaskPlanningNameEnum {
LIST_CONFIRMATION("法规清单确认"," Confirmation of regulations list"), LIST_CONFIRMATION("清单确认"," Checklist confirmation"),
LEGAL_TASK_CONFIRMATION("法规任务确认","Regulatory task confirmation"), LEGAL_TASK_CONFIRMATION("任务确认","Task confirmation"),
DESIGN_DEADLINE("设计符合性确认","Design Compliance Check"), DESIGN_DEADLINE("设计符合性","Design compliance"),
PREHOMO_DEADLINE("Pre-Homo确认","Pre-Homo Check"), PREHOMO_DEADLINE("Pre-Homo","Pre-Homo"),
ATTESTATION_START_TIME("认证开始","Certification start"), ATTESTATION_START_TIME("认证开始","Certification begins"),
ATTESTATION_END_TIME("认证结束"," Certification end"), ATTESTATION_END_TIME("认证结束"," End of certification"),
VERIFY_DEADLINE("验证符合性确认","Verification compliance confirmation deadline"), VERIFY_DEADLINE("验证符合性","Verify compliance"),
; ;
String name; String name;
@@ -1,6 +1,8 @@
package com.jero.modules.project.job; package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO; import com.jero.modules.project.entity.ProjectNameInfoEO;
@@ -71,7 +73,7 @@ public class InventoryAffirmJob implements Job {
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper); List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){ if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date(); Date currentDate = new Date();
@@ -134,22 +136,31 @@ public class InventoryAffirmJob implements Job {
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*/ /*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*/
// XXX . // XXX .
String msgContentEN = "The remaining processing time for the regulation list confirmation of" String msgContentEN = "The remaining processing time for the regulation list confirmation of "
+ projectNameInfoEO.getProjectName() + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()+ " "
+ projectLibraryBase.getTargetMarket()
+ " are 3 days. Please check and handle it in time."; + " 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("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId() + projectLibraryBase.getId()
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName(); + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接 //系统内部跳转链接
String href = "<a href='" String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName() + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>"; + "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href; String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>(); Map<String,Object> sendMessageMap = new HashMap<>();
@@ -157,36 +168,43 @@ public class InventoryAffirmJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap); projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList()); currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/ /*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
String msgContentEN = "The the regulation list confirmation for " String msgContentEN = "The regulation list confirmation for "
+ projectNameInfoEO.getProjectName() + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " will expire today. Please check and address it in a timely manner."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId() + projectLibraryBase.getId()
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName(); + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接 //系统内部跳转链接
String href = "<a href='" String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName() + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>"; + "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href; String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>(); Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu); sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap); projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
} }
@@ -1,9 +1,12 @@
package com.jero.modules.project.job; package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.entity.*;
import com.jero.modules.project.enums.DesignComplianceStatusEnum; import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.enums.SendMsgFlagEnum; import com.jero.modules.project.enums.SendMsgFlagEnum;
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
@@ -74,7 +77,7 @@ public class PrehomoJob implements Job {
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList); queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper); List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){ if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date(); Date currentDate = new Date();
@@ -137,9 +140,17 @@ public class PrehomoJob implements Job {
//您XXX(项目名称)中GB 7258的Pre-Homo确认剩余处理时间还有3天,请及时查看处理 //您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. //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 " 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."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
@@ -159,7 +170,7 @@ public class PrehomoJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -168,9 +179,15 @@ public class PrehomoJob implements Job {
//您XXX(项目名称)中GB 7258的Pre-Homo确认任务今天即将结束,请及时查看处理 //您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 //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 " 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."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
@@ -190,7 +207,7 @@ public class PrehomoJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
} }
@@ -1,6 +1,8 @@
package com.jero.modules.project.job; package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.entity.*;
import com.jero.modules.project.enums.DesignComplianceStatusEnum; import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.JumpLinkEnum;
@@ -73,7 +75,7 @@ public class VerifyComplianceJob implements Job {
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList); queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper); List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){ if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date(); Date currentDate = new Date();
@@ -135,9 +137,17 @@ public class VerifyComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理 //您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. //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 " 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."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
@@ -157,7 +167,7 @@ public class VerifyComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -166,9 +176,15 @@ public class VerifyComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理 //您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 //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 " 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."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
@@ -188,7 +204,7 @@ public class VerifyComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
} }
@@ -1,6 +1,8 @@
package com.jero.modules.project.job; package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.entity.*;
import com.jero.modules.project.enums.DesignComplianceStatusEnum; import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.JumpLinkEnum;
@@ -73,7 +75,7 @@ public class designComplianceJob implements Job {
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList); queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper); List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){ if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date(); Date currentDate = new Date();
@@ -137,8 +139,16 @@ public class designComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理 //您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理
String msgContentEN = "The remaining processing time for the design compliance confirmation for " String msgContentEN = "The remaining processing time for the design compliance confirmation for "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ projectYearNameInfoEO.getYearName()+ " "
+ projectLibraryBase.getTargetMarket()
+ " are 3 days. Please check and address it in a timely manner."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
@@ -158,17 +168,23 @@ public class designComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList()); currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
//您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理 //您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理
String msgContentEN = "The the design compliance confirmation for " String msgContentEN = "The design compliance confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " will expire today. Please check and address it in time."; + " 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 String hrefFeishu = backUrl
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
@@ -188,7 +204,7 @@ public class designComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap); projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
} }
@@ -44,7 +44,7 @@
</if> </if>
AND sd.dict_code = #{dictCode} AND sd.dict_code = #{dictCode}
</where> </where>
ORDER BY sdi.sort_order ORDER BY sdi.item_text ASC
</select> </select>
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel"> <select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel">
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException; import com.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser; 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.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.system.entity.SysRole; import com.jero.modules.system.entity.SysRole;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@@ -76,7 +78,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
*/ */
Result<?> updateStatusBatch(JSONObject json); 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);
/** /**
* 匹配相关人员 * 匹配相关人员
@@ -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.DeepCopyListUtil;
import com.jero.modules.dummy.util.ListDiff; import com.jero.modules.dummy.util.ListDiff;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.message.websocket.WebSocket; import com.jero.modules.message.websocket.WebSocket;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
@@ -646,6 +647,166 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper); List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut()); 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; return result;
} }
@@ -1102,20 +1263,31 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper); 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."; + ". 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 String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName(); + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接 //系统内部跳转链接
String href = "<a href='" String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName() + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>"; + "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href; String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>(); Map<String,Object> sendMessageMap = new HashMap<>();
@@ -1123,7 +1295,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap); sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
result = "发起清单确认"; result = "发起清单确认";
@@ -1237,7 +1409,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
* @param projectLibraryId * @param projectLibraryId
*/ */
@Override @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; String idTemp = projectLibraryId;
List<SysUser> sysUsers = sysUserService.listByIds(userIdList); List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
@@ -1245,7 +1417,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(CollectionUtils.isNotEmpty(sysUsers)){ if(CollectionUtils.isNotEmpty(sysUsers)){
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList()); thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
} }
//飞书跳转链接 // //飞书跳转链接
String hrefFeishu = (String) sendMessageMap.get("hrefFeishu"); String hrefFeishu = (String) sendMessageMap.get("hrefFeishu");
//消息内容 //消息内容
String contentInfo = (String) sendMessageMap.get("contentInfo"); String contentInfo = (String) sendMessageMap.get("contentInfo");
@@ -1255,9 +1427,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sysAnnouncementService.saveAnnouncement(sysAnnouncement); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(idTemp, idTemp); sendWebsocket(idTemp, idTemp);
//飞书消息 // //飞书消息
try { 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) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
@@ -1607,32 +1786,56 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId()); projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper); 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)); SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
String msgContentEN = ""; String msgContentEN = "";
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) { if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " assigned the regulation task confirmation of " + projectNameInfoEO.getProjectName() 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."; + ".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())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
userIdList.add(dreUserId); userIdList.add(dreUserId);
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName() 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."; + ".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())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has returned the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() 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."; + ".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())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() 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."; + ".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)){ 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(); String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接 //系统内部跳转链接
@@ -1643,7 +1846,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
sendMessage(msgContentEN,userIdList,id,sendMessageMap); sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
@@ -2929,8 +3132,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
fileTemp.mkdirs(); fileTemp.mkdirs();
//文件 //文件
exportFile(dataList,fileInfos); exportFile(dataList,fileInfos);
String excelName = "";
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
excelName = "法规清单.xlsx";
}else{
excelName = "Regulation List.xlsx";
}
//excel //excel
OutputStream excelOS = new FileOutputStream(path + File.separator + "法规清单.xlsx"); OutputStream excelOS = new FileOutputStream(path + File.separator + excelName);
ExportParams exportParams = new ExportParams(); ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); exportParams.setType(ExcelType.XSSF);
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){ if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
@@ -3069,6 +3278,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isNotBlank(pullVerifyDeliverableType)){ if(StringUtils.isNotBlank(pullVerifyDeliverableType)){
projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType); projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType);
} }
//清单确认状态
String inventoryAffirmStatus = projectLawsInventoryEOEn.getInventoryAffirmStatus();
if(StringUtils.isNotBlank(inventoryAffirmStatus)){
projectLawsInventoryEOEn.setInventoryAffirmStatusName(inventoryAffirmStatus);
}
//任务确认状态
String taskAffirmStatus = projectLawsInventoryEOEn.getTaskAffirmStatus();
if(StringUtils.isNotBlank(taskAffirmStatus)){
projectLawsInventoryEOEn.setTaskAffirmStatusName(taskAffirmStatus);
}
} }
} }
@@ -5805,18 +6025,25 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//消息内容 //消息内容
String msgContentEN = "Please address the regulation list confirmation process for "+ projectNameInfoEO.getProjectName() +" ASAP. "; 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 String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + projectLibraryId
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName(); + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接 //系统内部跳转链接
String href = "<a href='" String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName() + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>"; + "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href; String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>(); Map<String,Object> sendMessageMap = new HashMap<>();
@@ -5824,7 +6051,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
sendMessage(msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap); sendMessage(msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
@@ -5855,9 +6082,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId()); projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper); 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. "; 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(); String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接 //系统内部跳转链接
@@ -5869,7 +6105,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
sendMessage(msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap); sendMessage(msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
}); });
@@ -211,6 +211,16 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
*/ */
@Override @Override
public void checkData(String id, String cut) { 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<>(); QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrapper = new QueryWrapper<>();
lawsInventoryQueryWrapper.eq("project_library_id",id); lawsInventoryQueryWrapper.eq("project_library_id",id);
List<ProjectLawsInventoryEO> lawsInventoryRecords = projectLawsInventoryEOMapper.selectList(lawsInventoryQueryWrapper); List<ProjectLawsInventoryEO> lawsInventoryRecords = projectLawsInventoryEOMapper.selectList(lawsInventoryQueryWrapper);
@@ -1063,8 +1063,6 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
} }
} }
if (CollectionUtils.isNotEmpty(certificationEngineerNameList) && StringUtils.isNotBlank(certificationEngineerNameList.get(0))) { if (CollectionUtils.isNotEmpty(certificationEngineerNameList) && StringUtils.isNotBlank(certificationEngineerNameList.get(0))) {
certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList()); certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList());
certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList); certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
@@ -1139,28 +1137,29 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
List<ProjectLibraryBase> baseDataList = projectLibraryBaseService.list(baseQueryWrapper.eq("id", projectId)); List<ProjectLibraryBase> baseDataList = projectLibraryBaseService.list(baseQueryWrapper.eq("id", projectId));
if (CollectionUtils.isNotEmpty(baseDataList)) { if (CollectionUtils.isNotEmpty(baseDataList)) {
String baseCertificationEngineer = baseDataList.get(0).getCertificationEngineer(); String baseCertificationEngineer = baseDataList.get(0).getCertificationEngineer();
List<String> baseCertificationEngineerIdList = Arrays.asList(baseCertificationEngineer.split(",")); // 判断是否有工程师
String certificationEngineerName; if (StringUtils.isNotEmpty(baseCertificationEngineer)){
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>(); List<String> baseCertificationEngineerIdList = Arrays.asList(baseCertificationEngineer.split(","));
userqueryWrapper.in("id ", baseCertificationEngineerIdList); String certificationEngineerName;
List<SysUser> userList = sysUserMapper.selectList(userqueryWrapper); QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
if (CollectionUtils.isNotEmpty(userList)) { userqueryWrapper.in("id ", baseCertificationEngineerIdList);
for (String baseUserId : baseCertificationEngineerIdList) { List<SysUser> userList = sysUserMapper.selectList(userqueryWrapper);
if (CollectionUtils.isNotEmpty(userList)) {
for (String baseUserId : baseCertificationEngineerIdList) {
if (StringUtils.isNotEmpty(baseUserId)) { if (StringUtils.isNotEmpty(baseUserId)) {
certificationEngineerName = userList.stream().filter(e -> baseUserId.equals(e.getId())) certificationEngineerName = userList.stream().filter(e -> baseUserId.equals(e.getId()))
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(",")); .map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
ProjectRelatedPersonnel relatedPersonnel =new ProjectRelatedPersonnel(); ProjectRelatedPersonnel relatedPersonnel =new ProjectRelatedPersonnel();
relatedPersonnel.setCertificationEngineer(baseUserId); relatedPersonnel.setCertificationEngineer(baseUserId);
relatedPersonnel.setCertificationEngineerName(certificationEngineerName); relatedPersonnel.setCertificationEngineerName(certificationEngineerName);
certificationEngineerList.add(relatedPersonnel); certificationEngineerList.add(relatedPersonnel);
}
} }
} }
} }
} }
certificationEngineerList = certificationEngineerList.stream().distinct().collect(Collectors.toList()); certificationEngineerList = certificationEngineerList.stream().distinct().collect(Collectors.toList());
return certificationEngineerList; return certificationEngineerList;
@@ -111,8 +111,9 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
} }
} }
} }
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) { for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
targetMarket(projectLibraryBase, dictItemList, libraryBase);
Map<String,Object> mapList = new HashMap<>(); Map<String,Object> mapList = new HashMap<>();
List<List<TimeNodeVO>> collect = new ArrayList<>(); List<List<TimeNodeVO>> collect = new ArrayList<>();
if(ObjectUtils.isNotEmpty(startTime) && ObjectUtils.isNotEmpty(endTime)){ if(ObjectUtils.isNotEmpty(startTime) && ObjectUtils.isNotEmpty(endTime)){
@@ -124,7 +125,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
if(collect.size() != 0){ if(collect.size() != 0){
index ++; index ++;
mapList.put("index",index); mapList.put("index",index);
mapList.put("projectName",libraryBase.getProjectName()); mapList.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket());
mapList.put("data",collect); mapList.put("data",collect);
result.add(mapList); result.add(mapList);
} }
@@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser; 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.entity.*;
import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum; import com.jero.modules.project.enums.MsgTypeEnum;
@@ -260,22 +262,44 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper); ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
String id = UUID.randomUUID().toString().replace("-", ""); 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())){ 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. //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 " msgContentEN = currentUser.getUsername() + " has assigned the design 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."; + " 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())){ }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. //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 " 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."; + " 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())){ }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. //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 " 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."; + " 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)){ if(CollectionUtils.isNotEmpty(userIdList) && org.apache.commons.lang3.StringUtils.isNotEmpty(msgContentEN)){
//飞书跳转链接 //飞书跳转链接
@@ -297,7 +321,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap); SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
} }
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*; import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*; import com.jero.modules.project.enums.*;
import com.jero.modules.project.mapper.*; import com.jero.modules.project.mapper.*;
@@ -315,21 +317,42 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
String dreUserIds = jsonObject.getString("dreUserIds"); //dre用户id String dreUserIds = jsonObject.getString("dreUserIds"); //dre用户id
userIdList.addAll(Arrays.asList(dreUserIds.split(","))); userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
if(StringUtils.equals(msgType,MsgTypeEnum.DESIGN_REMIND_MSG.getValue())){ 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. //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 " 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."; + " 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())){ }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. //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 " msgContentEN = "Please check and address the Pre-Homo confirmation process of "
+ serialNumber + " in "+ projectNameInfoEO.getProjectName() + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " in time."; + " 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())){ }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. //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() + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " in time."; + " 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)){ if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
@@ -340,12 +363,14 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
+ projectLibraryBase.getId() + projectLibraryBase.getId()
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName(); + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接 //系统内部跳转链接
String href = "<a href='" String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-" + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName() + projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>"; + "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href; String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>(); Map<String,Object> sendMessageMap = new HashMap<>();
@@ -353,7 +378,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap); SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
return new Result<>().success("提醒办理成功!"); return new Result<>().success("提醒办理成功!");
} }
@@ -622,10 +647,17 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
userIdList.addAll(Arrays.asList(dreUserIds.split(","))); userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) { 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() msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "
+ " to you. Please check and handle it in time."; + 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)){ if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
//飞书跳转链接 //飞书跳转链接
@@ -647,7 +679,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
//发送消息 //发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap); SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
@@ -5,6 +5,7 @@ import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.WebsocketConst; import com.jero.common.constant.WebsocketConst;
import com.jero.common.constant.enums.MessageTypeEnum; import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.message.websocket.WebSocket; import com.jero.modules.message.websocket.WebSocket;
import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysAnnouncement;
import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.entity.SysUser;
@@ -53,7 +54,7 @@ public class SendMessageUtils {
SendMessageUtils.webSocket = webSocket; 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; String idTemp = projectLibraryId;
List<SysUser> sysUsers = sysUserService.listByIds(userIdList); List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
@@ -74,7 +75,14 @@ public class SendMessageUtils {
//飞书消息 //飞书消息
try { 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) { } catch (IOException e) {
logger.error("飞书消息推送失败"); logger.error("飞书消息推送失败");
} }
+12 -5
View File
@@ -404,9 +404,9 @@ module.exports = {
NodeQuickLookup: 'Node quick lookup', NodeQuickLookup: 'Node quick lookup',
AreAllLabelsRead: 'Are all labels read', AreAllLabelsRead: 'Are all labels read',
AllLabelsRead: 'Labels Read', AllLabelsRead: 'Labels Read',
SubscriptionNotification: 'Subscription notification', SubscriptionNotification: 'Subscription Notification',
warningInformation: 'Warning Information', warningInformation: 'Early Warning',
ForwardPush: 'Forward push', ForwardPush: 'Share / Forward',
PleaseSelectData: 'Please select data first', PleaseSelectData: 'Please select data first',
MessageContent: 'Message Content', MessageContent: 'Message Content',
MessageType: 'Message Type', MessageType: 'Message Type',
@@ -671,6 +671,10 @@ module.exports = {
listConfirmation: 'List Confirmation', listConfirmation: 'List Confirmation',
ListConfirmationDeadline: 'List confirmation deadline', ListConfirmationDeadline: 'List confirmation deadline',
dataConfirmation: 'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty', dataConfirmation: 'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
pleaseSelectinitiatedOrRejected: 'Please select the data whose list confirmation status is not initiated or rejected',
TheEngineerAndCertification: 'The regulatory engineer and Certification Engineer of cannot be blank',
PleaseTaskConfirmationRejected: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected',
theProjectContactEmpty: 'The project contact person of cannot be empty',
pleaseSelectPersonFirst: 'Please select a person first', pleaseSelectPersonFirst: 'Please select a person first',
onlyOnePersonCanBeSelected: 'Only one person can be selected', onlyOnePersonCanBeSelected: 'Only one person can be selected',
overrule: 'Overrule', overrule: 'Overrule',
@@ -852,7 +856,8 @@ module.exports = {
yellowSchedule: 'Yellow: non conformance / to be tracked, with acceptable scheme and schedule', yellowSchedule: 'Yellow: non conformance / to be tracked, with acceptable scheme and schedule',
greenRequirements: 'Green: confirm that it meets or meets the current requirements', greenRequirements: 'Green: confirm that it meets or meets the current requirements',
blueUndeterminedState: 'Blue: undetermined state', blueUndeterminedState: 'Blue: undetermined state',
authenticationMessage: 'Authentication Message', authenticationMessage: 'Homo Parameter Task',
taskRegulationComplianceTask: 'Regulation Compliance Task',
accept: 'Accept', accept: 'Accept',
notLaunch: 'Not start', notLaunch: 'Not start',
refuse: 'Reject', refuse: 'Reject',
@@ -939,5 +944,7 @@ module.exports = {
question: 'Question', question: 'Question',
ConfirmQuestion: 'Confirm Question', ConfirmQuestion: 'Confirm Question',
disableInput: 'Disable input', disableInput: 'Disable input',
OnlyOrTaskconfirmationOut: 'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out' taskConfirmationDeadline: 'Task Confirmation Deadline',
OnlyOrTaskconfirmationOut: 'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out',
taskConfirmationResponsiblePerson:'Task confirmation of responsible person',
} }
+8 -1
View File
@@ -680,7 +680,11 @@ module.exports = {
listConfirmation: '清单确认', listConfirmation: '清单确认',
ListConfirmationDeadline: '清单确认截止时间', ListConfirmationDeadline: '清单确认截止时间',
dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空', dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空',
pleaseSelectinitiatedOrRejected:'请选择清单确认状态为未发起或拒绝的数据',
TheEngineerAndCertification:'的法规工程师、认证工程师不能为空',
taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空', taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空',
theProjectContactEmpty:'的工程接口人不能为空',
PleaseTaskConfirmationRejected:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据',
pleaseSelectPersonFirst: '请先选择人员', pleaseSelectPersonFirst: '请先选择人员',
onlyOnePersonCanBeSelected: '只能选择一个人员', onlyOnePersonCanBeSelected: '只能选择一个人员',
overrule: '驳回', overrule: '驳回',
@@ -860,7 +864,8 @@ module.exports = {
yellowSchedule: '黄:不符合/待追踪,有可接受的方案和时间表', yellowSchedule: '黄:不符合/待追踪,有可接受的方案和时间表',
greenRequirements: '绿:确认符合或满足当前要求', greenRequirements: '绿:确认符合或满足当前要求',
blueUndeterminedState: '蓝:未判断状态', blueUndeterminedState: '蓝:未判断状态',
authenticationMessage: '认证消息', authenticationMessage: '参数收集',
taskRegulationComplianceTask: '法规符合性任务',
accept: '接受', accept: '接受',
refuse: '拒绝', refuse: '拒绝',
taskTermination: '任务终止', taskTermination: '任务终止',
@@ -945,4 +950,6 @@ module.exports = {
ConfirmQuestion: '确认催办?', ConfirmQuestion: '确认催办?',
OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办', OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办',
disableInput:'禁止输入', disableInput:'禁止输入',
taskConfirmationDeadline:'任务确认截止时间',
taskConfirmationResponsiblePerson:'责任人任务确认',
} }
+45 -38
View File
@@ -3,13 +3,20 @@
<a-radio v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio> <a-radio v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio>
</a-radio-group> </a-radio-group>
<a-radio-group v-else-if="tagType=='radioButton'" buttonStyle="solid" @change="handleInput" :value="getValueSting" :disabled="disabled"> <a-radio-group v-else-if="tagType=='radioButton'" buttonStyle="solid" @change="handleInput" :value="getValueSting"
:disabled="disabled">
<a-radio-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button> <a-radio-button v-for="(item, key) in dictOptions" :key="key" :value="item.value">{{ item.text }}</a-radio-button>
</a-radio-group> </a-radio-group>
<a-select v-else-if="tagType=='select'" allowClear :getPopupContainer = "getPopupContainer" :placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput"> <a-select v-else-if="tagType=='select'" allowClear :getPopupContainer="getPopupContainer"
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>--> show-search
<a-select-option v-for="(item, key) in dictOptionsValue" :key="key" :value="item.value"> optionFilterProp="label"
:placeholder="placeholder" :disabled="disabled" :value="getValueSting" @change="handleInput">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in dictOptionsValue"
:key="key"
:label="item.text || item.label"
:value="item.value">
<span class="itemOption-index" :title=" item.text || item.label "> <span class="itemOption-index" :title=" item.text || item.label ">
{{ item.text || item.label }} {{ item.text || item.label }}
</span> </span>
@@ -18,19 +25,19 @@
</template> </template>
<script> <script>
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api' import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
export default { export default {
name: "JDictSelectTag", name: 'JDictSelectTag',
props: { props: {
dictCode: String, dictCode: String,
placeholder: String, placeholder: String,
triggerChange: Boolean, triggerChange: Boolean,
disabled: Boolean, disabled: Boolean,
db_field_name:String, db_field_name: String,
value: [String, Number], value: [String, Number],
type: String, type: String,
getPopupContainer:{ getPopupContainer: {
type: Function, type: Function,
default: (node) => node.parentNode default: (node) => node.parentNode
} }
@@ -38,36 +45,36 @@
data() { data() {
return { return {
dictOptions: [], dictOptions: [],
tagType:"" tagType: ''
} }
}, },
watch:{ watch: {
dictCode:{ dictCode: {
immediate:true, immediate: true,
handler() { handler() {
this.initDictData() this.initDictData()
}, }
} }
}, },
created() { created() {
// console.log(this.dictCode); // console.log(this.dictCode);
if(!this.type || this.type==="list"){ if (!this.type || this.type === 'list') {
this.tagType = "select" this.tagType = 'select'
}else{ } else {
this.tagType = this.type this.tagType = this.type
} }
//获取字典数据 //获取字典数据
// this.initDictData(); // this.initDictData();
}, },
computed: { computed: {
getValueSting(){ getValueSting() {
// update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------ // update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
// 当有null或“” placeholder不显示 // 当有null或“” placeholder不显示
return this.value != null ? this.value.toString() : undefined; return this.value != null ? this.value.toString() : undefined
// update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------ // update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
}, },
dictOptionsValue: function () { dictOptionsValue: function() {
return this.dictOptions.filter(function (dictOption) { return this.dictOptions.filter(function(dictOption) {
return dictOption.value return dictOption.value
}) })
} }
@@ -75,8 +82,8 @@
methods: { methods: {
initDictData() { initDictData() {
//优先从缓存中读取字典配置 //优先从缓存中读取字典配置
if(getDictItemsFromCache(this.dictCode)){ if (getDictItemsFromCache(this.dictCode)) {
this.dictOptions = getDictItemsFromCache(this.dictCode); this.dictOptions = getDictItemsFromCache(this.dictCode)
return return
} }
@@ -84,34 +91,34 @@
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
// console.log(res.result); // console.log(res.result);
this.dictOptions = res.result; this.dictOptions = res.result
} }
}) })
}, },
handleInput(e) { handleInput(e) {
let val; let val
if(this.tagType=="radio"){ if (this.tagType == 'radio') {
val = e.target.value val = e.target.value
}else{ } else {
val = e val = e
} }
let content = '' let content = ''
this.dictOptions.forEach(res=>{ this.dictOptions.forEach(res => {
if (res.value == e){ if (res.value == e) {
content = res.text || res.label content = res.text || res.label
} }
}) })
if(this.triggerChange){ if (this.triggerChange) {
this.$emit('change', val); this.$emit('change', val)
}else{ } else {
this.$emit('input', val); this.$emit('input', val)
this.$emit('changeQuery', content,this.db_field_name); this.$emit('changeQuery', content, this.db_field_name)
} }
}, },
setCurrentDictOptions(dictOptions){ setCurrentDictOptions(dictOptions) {
this.dictOptions = dictOptions this.dictOptions = dictOptions
}, },
getCurrentDictOptions(){ getCurrentDictOptions() {
return this.dictOptions return this.dictOptions
} }
} }
@@ -124,6 +131,6 @@
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow:ellipsis; -o-text-overflow: ellipsis;
} }
</style> </style>
@@ -387,7 +387,7 @@
return str return str
}, },
handleOk() { handleOk() {
if (!this.isNullArray(this.queryParamsModel)) { // if (!this.isNullArray(this.queryParamsModel)) {
let event = { let event = {
matchType: this.matchType, matchType: this.matchType,
params: this.removeEmptyObject(this.queryParamsModel) params: this.removeEmptyObject(this.queryParamsModel)
@@ -397,9 +397,9 @@
this.visible = false this.visible = false
} }
this.emitCallback(event) this.emitCallback(event)
} else { // } else {
this.$message.warn(this.$t('CannotQueryEmpty')) // this.$message.warn(this.$t('CannotQueryEmpty'))
} // }
}, },
emitCallback(event = {}) { emitCallback(event = {}) {
let { params = [], matchType = this.matchType } = event let { params = [], matchType = this.matchType } = event
@@ -408,6 +408,9 @@
if (Array.isArray(param.val)) { if (Array.isArray(param.val)) {
param.val = param.val.join(',') param.val = param.val.join(',')
} }
if (param.type == "Personnel" && !param.val){
param.val = ' is null '
}
} }
console.debug('---高级查询参数--->', { params, matchType }) console.debug('---高级查询参数--->', { params, matchType })
this.$emit(this.callback, params, matchType) this.$emit(this.callback, params, matchType)
@@ -614,7 +617,6 @@
item.val = values[item.popup['destFields']] item.val = values[item.popup['destFields']]
}, },
PersonnelSelectionChange(value, id,index){ PersonnelSelectionChange(value, id,index){
console.log(index)
this.queryParamsModel[index].val = id this.queryParamsModel[index].val = id
this.queryParamsModel[index].valueId = id this.queryParamsModel[index].valueId = id
console.log(this.queryParamsModel) console.log(this.queryParamsModel)
@@ -120,6 +120,11 @@
this.getData() this.getData()
this.getTableList() this.getTableList()
}) })
eventBUs.$on('searchGetData', target => {
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
this.getData() this.getData()
this.getTableList() this.getTableList()
}, },
+3 -3
View File
@@ -223,13 +223,13 @@
return that.Logout({}).then(() => { return that.Logout({}).then(() => {
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面 // update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
// TODO 在部署线上时注掉以下代码 // TODO 在部署线上时注掉以下代码
// that.$router.push({ path: '/user/login' }) that.$router.push({ path: '/user/login' })
// window.location.href = 'https://signin-test.nio.com/logout?client_id=100679&redirect_uri=' + // window.location.href = 'https://signin-test.nio.com/logout?client_id=100679&redirect_uri=' +
// encodeURIComponent('http://localhost:3000/dashboard/analysis') + '&response_type=code' //本地 // encodeURIComponent('http://localhost:3000/dashboard/analysis') + '&response_type=code' //本地
// TODO 在部署线上时解开以下代码 // TODO 在部署线上时解开以下代码
window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' + // window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' +
encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上 // encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上
localStorage.removeItem('language') localStorage.removeItem('language')
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面 // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
+3 -1
View File
@@ -30,6 +30,7 @@
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage' import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'file', name: 'file',
@@ -65,6 +66,7 @@
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl); // console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
}, },
methods: { methods: {
...mapGetters(['userInfo']),
perentHandleFunc(data) { perentHandleFunc(data) {
this.myfileList = data this.myfileList = data
if (data && data.length > 0) { if (data && data.length > 0) {
@@ -182,7 +184,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') { if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx') { } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -30,6 +30,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage' import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'file', name: 'file',
@@ -66,6 +67,7 @@ export default {
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl); // console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
}, },
methods: { methods: {
...mapGetters(['userInfo']),
perentHandleFunc(data) { perentHandleFunc(data) {
this.myfileList = data this.myfileList = data
if (data && data.length > 0) { if (data && data.length > 0) {
@@ -187,7 +189,7 @@ export default {
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') { if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx') { } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -38,6 +38,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage' import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'file', name: 'file',
@@ -87,6 +88,7 @@ export default {
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl); // console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
}, },
methods: { methods: {
...mapGetters(['userInfo']),
download() { download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId }) downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
}, },
@@ -209,7 +211,7 @@ export default {
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') { if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx') { } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -36,6 +36,7 @@
<script> <script>
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default { export default {
name: 'viewFileModel', name: 'viewFileModel',
@@ -64,13 +65,14 @@
} }
}, },
methods: { methods: {
...mapGetters(['userInfo']),
pdfPreview(fileQuery) { pdfPreview(fileQuery) {
let fileName = fileQuery.fileName let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.') let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -82,7 +84,7 @@
} }
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id ,userName:this.userInfo().username})
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
this.loading = true this.loading = true
+8 -8
View File
@@ -14,10 +14,10 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
// TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码 // TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码
// TODO 在部署线上时注掉以下代码 // TODO 在部署线上时注掉以下代码
// const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration']
// TODO 在部署线上时解开一下代码 // TODO 在部署线上时解开一下代码
const whiteList = [] // const whiteList = []
// no redirect whitelist // no redirect whitelist
@@ -96,7 +96,7 @@ router.beforeEach((to, from, next) => {
// query: { redirect: to.fullPath } // query: { redirect: to.fullPath }
store.dispatch('Logout').then(() => { store.dispatch('Logout').then(() => {
// TODO 在部署线上时注掉此代码 // TODO 在部署线上时注掉此代码
// next({ path: '/user/login', query: { redirect: to.fullPath } }) next({ path: '/user/login', query: { redirect: to.fullPath } })
let fullPath = '' let fullPath = ''
if (to.fullPath == '/') { if (to.fullPath == '/') {
@@ -109,8 +109,8 @@ router.beforeEach((to, from, next) => {
// + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地 // + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地
// TODO 在部署线上时解开此代码 // TODO 在部署线上时解开此代码
window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' // window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
+ encodeURIComponent('https://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上 // + encodeURIComponent('https://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上
}) })
}) })
} else { } else {
@@ -123,7 +123,7 @@ router.beforeEach((to, from, next) => {
next() next()
} else { } else {
// TODO 在部署线上时注掉此代码 // TODO 在部署线上时注掉此代码
// next({ path: '/user/login', query: { redirect: to.fullPath } }) next({ path: '/user/login', query: { redirect: to.fullPath } })
let fullPath = '' let fullPath = ''
if (to.fullPath == '/') { if (to.fullPath == '/') {
@@ -135,8 +135,8 @@ router.beforeEach((to, from, next) => {
// window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' // window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
// + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地 // + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地
// TODO 在部署线上时解开此代码 // TODO 在部署线上时解开此代码
window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' // window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
+ encodeURIComponent('https://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上 // + encodeURIComponent('https://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
} }
@@ -1,7 +1,7 @@
<template> <template>
<div class="myList-box"> <div class="myList-box">
<div class="header-text"> <div class="header-text">
<div class="header-text-left">{{this.$t('myList')}}</div> <div class="header-text-left">{{this.$t('toDoProcess')}}</div>
<div class="header-text-right" @click="moreClick"> <div class="header-text-right" @click="moreClick">
More More
<img src="../../../assets/gengduo.png" alt=""> <img src="../../../assets/gengduo.png" alt="">
@@ -264,6 +264,7 @@
import { getAction, postAction, downFile, downloadFile } from '@/api/manage' import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
import { mapGetters } from 'vuex'
export default { export default {
name: 'docIndex', name: 'docIndex',
@@ -351,6 +352,7 @@
}) })
}, },
methods: { methods: {
...mapGetters(['userInfo']),
getTitle(callback) { getTitle(callback) {
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getTitle, { id: _id }).then((res) => { getAction(this.url.getTitle, { id: _id }).then((res) => {
@@ -399,7 +401,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -411,7 +413,7 @@
} }
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id ,userName:this.userInfo().username})
}, },
UpdateLog() { UpdateLog() {
this.visible = true this.visible = true
@@ -151,13 +151,17 @@
}, },
//带文件导出 //带文件导出
handleFileExport() { handleFileExport() {
let query = { if (this.idList.length > 0) {
...this.$refs.searchRef.queryParam, let query = {
id: this.idList.join(','), ...this.$refs.searchRef.queryParam,
flag: 'file' id: this.idList.join(','),
flag: 'file'
}
let handlingTime = moment(new Date()).format('YYYY-MM-DD')
downloadFile('document/bussDocumentLibraryEO/exportZip', this.$t('DocumentLibrary')+handlingTime+'.zip', query, this.Deselect)
}else{
this.$message.warning(this.$t('selectLeastOne'))
} }
let handlingTime = moment(new Date()).format('YYYY-MM-DD')
downloadFile('document/bussDocumentLibraryEO/exportZip', this.$t('DocumentLibrary')+handlingTime+'.zip', query, this.Deselect)
}, },
//新增 //新增
handleAdd() { handleAdd() {
@@ -253,7 +257,7 @@
getAction(url, { id: val.id }).then((res) => { getAction(url, { id: val.id }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') eventBUs.$emit('searchGetData')
} else { } else {
_this.$message.warning(_this.$t('operationFailed')) _this.$message.warning(_this.$t('operationFailed'))
} }
@@ -276,7 +280,7 @@
getAction(url, { id: val.id }).then((res) => { getAction(url, { id: val.id }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') eventBUs.$emit('searchGetData')
} else { } else {
_this.$message.warning(_this.$t('operationFailed')) _this.$message.warning(_this.$t('operationFailed'))
} }
@@ -96,6 +96,7 @@
import Vue from 'vue' import Vue from 'vue'
import eventBUs from '../../../common/event' import eventBUs from '../../../common/event'
import axios from 'axios' import axios from 'axios'
import { mapGetters } from 'vuex'
export default { export default {
name: 'ocr', name: 'ocr',
@@ -177,6 +178,7 @@
}, },
methods:{ methods:{
...mapGetters(['userInfo']),
initWebSocket: function () { initWebSocket: function () {
let token = Vue.ls.get(ACCESS_TOKEN) let token = Vue.ls.get(ACCESS_TOKEN)
// console.log("------------WebSocket连接成功"); // console.log("------------WebSocket连接成功");
@@ -443,7 +445,7 @@
}, },
//文件详情跳转 //文件详情跳转
detailClick(val){ detailClick(val){
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + val.attId)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + val.attId+'&userName='+this.userInfo().username))
}, },
exportVisible(val){ exportVisible(val){
// this.fileVisible=val // this.fileVisible=val
@@ -5,44 +5,46 @@
<div class="subscribtion-search-header"> <div class="subscribtion-search-header">
<!-- <search :url="url" :flag="'1'"></search>--> <!-- <search :url="url" :flag="'1'"></search>-->
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-row :gutter="24"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-col :md="6" :sm="8"> <a-row :gutter="24">
<div class="box-title-text"> <a-col :md="6" :sm="8">
<div class="title-text" :title="$t('standard')"> <div class="box-title-text">
<span>{{$t('standard')}}</span> <div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParams.serialNumber"></a-input>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')" </a-col>
v-model="queryParams.serialNumber"></a-input> <a-col :md="6" :sm="8">
</div> <div class="box-title-text">
</a-col> <div class="title-text" :title="$t('title')">
<a-col :md="6" :sm="8"> <span>{{$t('title')}}</span>
<div class="box-title-text"> </div>
<div class="title-text" :title="$t('title')"> <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
<span>{{$t('title')}}</span> v-model="queryParams.title"></a-input>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')" </a-col>
v-model="queryParams.title"></a-input> <a-col :md="6" :sm="8">
</div> <div class="box-title-text">
</a-col> <div class="title-text" :title="$t('status')">
<a-col :md="6" :sm="8"> <span>{{$t('status')}}</span>
<div class="box-title-text"> </div>
<div class="title-text" :title="$t('status')"> <j-dict-select-tag class="box-input" v-model="queryParams.state"
<span>{{$t('status')}}</span> :placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'state'"/>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParams.state" </a-col>
:placeholder="$t('PleaseSelect')+$t('status')" <span style="float: right;overflow: hidden;margin-right: 11px"
:type="'select'" class="table-page-search-submitButtons">
:triggerChange="false" :dictCode="'state'"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px"
class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col> </a-col>
</span> </span>
</a-row> </a-row>
</a-form>
</div> </div>
</div> </div>
</div> </div>
@@ -2,11 +2,10 @@
<div class="dic-list"> <div class="dic-list">
<div class="dic-list-content"> <div class="dic-list-content">
<div class="dic-list-header"> <div class="dic-list-header">
<a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form :model="queryParams" :label-col="labelCol" @keyup.enter.native="search" :wrapper-col="wrapperCol">
<a-form-item :label="$t('name')+':'"> <a-form-item :label="$t('name')+':'">
<a-input v-if="dictVal=='tree'" v-model="queryParams.name" :placeholder="$t('enterName')"/> <a-input v-if="dictVal=='tree'" v-model="queryParams.name" :placeholder="$t('enterName')"/>
<j-input v-if="dictVal=='list'" v-model="queryParams.itemText" :placeholder="$t('enterName')"/> <a-input v-if="dictVal=='list'" v-model="queryParams.itemText" :placeholder="$t('enterName')"/>
</a-form-item> </a-form-item>
</a-form> </a-form>
<div class="form-btn"> <div class="form-btn">
@@ -215,9 +215,13 @@
:title="$t('viewFile')" :title="$t('viewFile')"
:width="500" :width="500"
:visible="visible" :visible="visible"
@ok="visible=false"
@cancel="visible=false" @cancel="visible=false"
> >
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<p v-for="(item,index) in fileList" :key="index" <p v-for="(item,index) in fileList" :key="index"
class="fileText" :title="item.fileName" @click="fileClick(item)">{{ item.fileName }}</p> class="fileText" :title="item.fileName" @click="fileClick(item)">{{ item.fileName }}</p>
</a-modal> </a-modal>
@@ -230,6 +234,7 @@
import libraryPush from '@/components/libraryPush/index' import libraryPush from '@/components/libraryPush/index'
import moment from 'moment' import moment from 'moment'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'DocumentLibrary', name: 'DocumentLibrary',
@@ -376,6 +381,7 @@
}, },
methods: { methods: {
...mapGetters(['userInfo']),
handleChange() { handleChange() {
}, },
@@ -677,7 +683,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -90,6 +90,7 @@
<script> <script>
import { getAction, postAction, downloadFile } from '@/api/manage' import { getAction, postAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'whole', name: 'whole',
@@ -130,6 +131,7 @@
// } // }
}, },
methods: { methods: {
...mapGetters(['userInfo']),
checkedClick(item) { checkedClick(item) {
if (item.checked) { if (item.checked) {
this.checkboxText = this.checkboxText.filter(res => { this.checkboxText = this.checkboxText.filter(res => {
@@ -151,7 +153,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id.slice(0, 32))) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id.slice(0, 32)+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -13,6 +13,7 @@
</a-select> </a-select>
<a-input <a-input
:maxLength="100" :maxLength="100"
@keyup.enter.native="onSearch(selectValueTwo)"
v-model="selectValueTwo" v-model="selectValueTwo"
style="width: calc(100% - 128px)" style="width: calc(100% - 128px)"
:placeholder="$t('pleaseEnter')+$t('searchContent')" :placeholder="$t('pleaseEnter')+$t('searchContent')"
@@ -21,6 +22,7 @@
<a-input <a-input
v-model="selectValueTwo" v-model="selectValueTwo"
:maxLength="100" :maxLength="100"
@keyup.enter.native="wholeOnSearch(selectValueTwo)"
v-else-if="active === $t('whole')" v-else-if="active === $t('whole')"
class="inputSearch" class="inputSearch"
:placeholder="$t('pleaseEnter')+$t('searchContent')" :placeholder="$t('pleaseEnter')+$t('searchContent')"
@@ -32,6 +34,7 @@
</a-button> </a-button>
<a-button class="textSearch" <a-button class="textSearch"
v-if="active === $t('whole')" v-if="active === $t('whole')"
@keyup.enter.native="wholeOnSearch(selectValueTwo)"
@click="wholeOnSearch(selectValueTwo)" @click="wholeOnSearch(selectValueTwo)"
>{{$t('query')}} >{{$t('query')}}
</a-button> </a-button>
@@ -31,11 +31,15 @@
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span> <span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model="formInline.attestationType" <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
@input="handleInput('attestationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :type="'select'"
:type="'select'" :triggerChange="false" :dictCode="'attestation_type'"/>
:triggerChange="false" dictCode="attestation_type"/> <!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationType"-->
<!-- @input="handleInput('attestationType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_type"/>-->
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -47,11 +51,15 @@
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span> <span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank" <j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
@input="handleInput('attestationRank')" :placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')" :type="'select'"
:type="'select'" :triggerChange="false" :dictCode="'attestation_rank'"/>
:triggerChange="false" dictCode="attestation_rank"/> <!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationRank"-->
<!-- @input="handleInput('attestationRank')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationLevel')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_rank"/>-->
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -195,7 +195,7 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span> :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="certificationType"> <a-form-model-item class="itemModel-multi" prop="certificationType">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType" <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'" :type="'select'"
@@ -212,13 +212,11 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span> :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="attestationRank"> <a-form-model-item class="itemModel-multi" prop="attestationRank">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank" <j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="disabled" :placeholder="$t('PleaseSelect')+$t('certificationLevel')"
@input="handleInput('attestationRank')" :type="'select'"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')" :triggerChange="false" :dictCode="'attestation_rank'"/>
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -84,7 +84,7 @@
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<div class="table-operator"> <div class="table-operator" style="margin-bottom: 16px">
<!-- 导入--> <!-- 导入-->
<!-- <div class="operator-text"--> <!-- <div class="operator-text"-->
<!-- style="float: left;font-size: 16px;font-weight: 400;color: #040B29;">--> <!-- style="float: left;font-size: 16px;font-weight: 400;color: #040B29;">-->
@@ -140,10 +140,10 @@
<div style="width: 100%"> <div style="width: 100%">
<a-table <a-table
ref="table" ref="table"
class="ant-table" class="ant-table tableList"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 200px)'}" :scroll="{x: '100%',y:'calc(100vh - 170px)'}"
rowKey="id" rowKey="id"
:data-source="dataSource" :data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -247,6 +247,7 @@
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index' import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import { getAction, postAction, downloadFile } from '@/api/manage' import { getAction, postAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'virtualListDetails', name: 'virtualListDetails',
@@ -320,8 +321,7 @@
align: 'center', align: 'center',
dataIndex: 'subtitle', dataIndex: 'subtitle',
width: 180, width: 180,
fixed: 'left', ellipsis: true
scopedSlots: { customRender: 'titleName' }
}, },
{ {
title: this.$t('zoneOfApplication'), title: this.$t('zoneOfApplication'),
@@ -630,6 +630,7 @@
} }
}, },
methods: { methods: {
...mapGetters(['userInfo']),
handleSuperQuery(params, matchType) { handleSuperQuery(params, matchType) {
let sqp = {} let sqp = {}
if (!params || (params && params.length == 0)) { if (!params || (params && params.length == 0)) {
@@ -789,7 +790,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -806,7 +807,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -818,7 +819,7 @@
} }
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id ,userName:this.userInfo().username})
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
this.loading = true this.loading = true
@@ -1007,4 +1008,7 @@
border-top: none; border-top: none;
} }
.tableList .ant-table-thead > tr > th {
padding: 7px 16px !important;
}
</style> </style>
@@ -139,11 +139,12 @@
<a-col :span="24" v-if="title == $t('addFeedback') || title == $t('edit')"> <a-col :span="24" v-if="title == $t('addFeedback') || title == $t('edit')">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<span class="title-text-text" <span class="title-text-text"
:title="$t('Deliverables')">{{$t('Deliverables')}}</span> :title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="fileId"> <!-- prop="fileId"-->
<a-form-model-item class="itemModel">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('fileId')"> @click="clickButtonToUpload('fileId')">
{{ (formInline.fileId === 'null' || formInline.fileId === '' || {{ (formInline.fileId === 'null' || formInline.fileId === '' ||
@@ -16,7 +16,7 @@
<a-form-model-item style="margin-left: 36px" class="itemModel" prop="flag"> <a-form-model-item style="margin-left: 36px" class="itemModel" prop="flag">
<a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.flag"> <a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.flag">
<a-radio value="0"> <a-radio value="0">
{{$t('agree')}} {{$t('accept')}}
</a-radio> </a-radio>
<a-radio value="1"> <a-radio value="1">
{{$t('disagree')}} {{$t('disagree')}}
@@ -44,6 +44,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="$route.query.isDisplay">*</span>
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span> <span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="approvalOpinion"> <a-form-model-item class="itemModel" prop="approvalOpinion">
@@ -148,6 +149,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="$route.query.isDisplay">*</span>
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span> <span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="approvalOpinion"> <a-form-model-item class="itemModel" prop="approvalOpinion">
@@ -197,6 +199,11 @@
} }
], ],
approvalOpinion: [ approvalOpinion: [
{
required: true,
message: this.$t('feedbackMessage') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 300, max: 300,
message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -227,6 +234,7 @@
}, },
mounted() { mounted() {
this.formInline.approvalOpinion = '' this.formInline.approvalOpinion = ''
this.formInline = { ...this.formInline }
this.$route.query.isDisplay = JSON.parse(this.$route.query.isDisplay) this.$route.query.isDisplay = JSON.parse(this.$route.query.isDisplay)
if (this.queryBy && this.$route.query.TaskKey == 'fqrsh') { if (this.queryBy && this.$route.query.TaskKey == 'fqrsh') {
this.formInline.reviewResult = this.queryBy.reviewResult || undefined this.formInline.reviewResult = this.queryBy.reviewResult || undefined
@@ -56,6 +56,7 @@
<script> <script>
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default { export default {
name: 'standardContentList', name: 'standardContentList',
@@ -168,13 +169,14 @@
}) })
}, },
methods: { methods: {
...mapGetters(['userInfo']),
pdfPreview(fileQuery) { pdfPreview(fileQuery) {
let fileName = fileQuery.fileName let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.') let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -191,7 +193,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -203,7 +205,7 @@
} }
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id ,userName:this.userInfo().username})
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
this.loading = true this.loading = true
@@ -126,7 +126,7 @@
if (this.$route.query.taskDefinitionKey == 'dreqr') { if (this.$route.query.taskDefinitionKey == 'dreqr') {
this.titleName = this.$t('engineerReply') this.titleName = this.$t('engineerReply')
} else { } else {
this.titleName = this.$t('confirmationEngineeringInterfacePerson') this.titleName = this.$t('taskConfirmationResponsiblePerson')
} }
this.queryTaskDetailByTask(function() { this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo() _this.queryProjectLawsInventoryInfo()
@@ -195,17 +195,17 @@
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if (this.$route.query.taskDefinitionKey == 'zrrjsrw' || this.$route.query.taskDefinitionKey == 'zrrqr') { if (this.$route.query.taskDefinitionKey == 'zrrjsrw' || this.$route.query.taskDefinitionKey == 'zrrqr') {
if (value.flag == 0) { if (value.flag == 0) {
if (this.queryProject.verifyDeliverableType) { if (this.queryProject.verifyRemark) {
this.startProcessDesign(this.queryBy, 4) this.startProcessDesign(this.queryBy, 4)
} }
if (this.queryProject.prehomoDeliverableType) { if (this.queryProject.prehomoRemark) {
this.startProcessDesign(this.queryBy, 3) this.startProcessDesign(this.queryBy, 3)
} }
if (this.queryProject.designDeliverableType) { if (this.queryProject.designRemark) {
this.startProcessDesign(this.queryBy, 2) this.startProcessDesign(this.queryBy, 2)
} }
if (!this.queryProject.verifyDeliverableType && !this.queryProject.prehomoDeliverableType && if (!this.queryProject.verifyRemark && !this.queryProject.prehomoRemark &&
!this.queryProject.designDeliverableType) { !this.queryProject.designRemark) {
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
window.close() window.close()
@@ -320,15 +320,18 @@
putAction(this.url.dreSubmit, query).then((res) => { putAction(this.url.dreSubmit, query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
// this.$router.push({
// path: '/ProjectDetails',
// query: this.$route.query
// })
setTimeout(() => {
this.loading = false
window.close()
}, 1000)
this.$router.push({
path: '/ProjectDetails',
query: {
type:'103',
...this.$route.query
}
})
// setTimeout(() => {
// this.loading = false
// window.close()
// }, 1000)
} else { } else {
this.loading = false this.loading = false
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -347,10 +350,6 @@
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.edit() this.edit()
// this.$router.push({
// path: '/ProjectDetails',
// query: this.$route.query
// })
} else { } else {
this.loading = false this.loading = false
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -366,7 +365,13 @@
if (res.success) { if (res.success) {
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
window.close() this.$router.push({
path: '/ProjectDetails',
query: {
type:'103',
...this.$route.query
}
})
}, 1000) }, 1000)
} }
}) })
@@ -2,9 +2,10 @@
<div class="doc-detail"> <div class="doc-detail">
<div class="Virtual-detail-header" style="position: fixed;top: 0"> <div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title"> <div class="Virtual-detail-title">
<!-- <span style="line-height: 74px;display: inline-block;float: left">--> <span style="line-height: 74px;display: inline-block;float: left">
<!-- <a-icon type="left-circle" theme="filled" style="margin-right: 6px;font-size: 30px;color: #21c9cc;"/>--> <a-icon @click="backClick" type="left-circle" theme="filled"
<!-- </span>--> style="margin-right: 8px;font-size: 30px;color: #21c9cc;"/>
</span>
<span> <span>
{{this.title}} {{this.title}}
</span> </span>
@@ -26,7 +27,7 @@
</div> </div>
<div style="padding: 67px 0 0 0;background: #ffffff;height:100%"> <div style="padding: 67px 0 0 0;background: #ffffff;height:100%">
<div class="detail-content" style="height: 100%"> <div class="detail-content" style="height: 100%">
<div class="Virtual-detail-left"> <div v-if="isDisplay" class="Virtual-detail-left">
<div class="Virtual-detail-left-text" :title="$t('projectDetails')" <div class="Virtual-detail-left-text" :title="$t('projectDetails')"
v-has="'projectLawsInventory:projectDetails'" v-has="'projectLawsInventory:projectDetails'"
v-if="isTrue" v-if="isTrue"
@@ -36,28 +37,58 @@
</div> </div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')" <div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')"
@click="textClick(1,$t('listOfRegulations'))"> @click="textClick(1,$t('listOfRegulations'))">
<a-icon type="container"/> <a-icon type="control"/>
{{$t('listOfRegulations')}} {{$t('listOfRegulations')}}
</div> </div>
<div class="Virtual-detail-left-text" :title="$t('taskList')" <div class="Virtual-detail-left-text" :title="$t('taskList')"
v-has="'projectLawsInventory:taskList'" v-has="'projectLawsInventory:taskList'"
@click="textClick(2,$t('taskList'))"> @click="textClick(2,$t('taskList'))">
<a-icon type="container"/> <a-icon type="safety"/>
{{$t('taskList')}} {{$t('taskList')}}
</div> </div>
<div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')" <div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"
@click="textClick(3,$t('nonConformance'))"> @click="textClick(3,$t('nonConformance'))">
<a-icon type="container"/> <a-icon type="safety-certificate"/>
{{$t('nonConformance')}} {{$t('nonConformance')}}
</div> </div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:TaskParameterCollection'" <div class="Virtual-detail-left-text" v-has="'projectLawsInventory:TaskParameterCollection'"
:title="$t('TaskParameterCollection')" :title="$t('TaskParameterCollection')"
@click="textClick(4,$t('TaskParameterCollection'))"> @click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="container"/> <a-icon type="profile"/>
{{$t('TaskParameterCollection')}} {{$t('TaskParameterCollection')}}
</div> </div>
<a-icon @click="textIconClick" type="menu-fold" class="text-icon"/>
</div> </div>
<div class="Virtual-detail-right"> <div v-if="!isDisplay" class="Virtual-detail-left-One">
<div class="Virtual-detail-left-text"
:title="$t('projectDetails')"
v-has="'projectLawsInventory:projectDetails'"
v-if="isTrue"
@click="textClick(0,$t('projectDetails'))">
<a-icon type="container"/>
</div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')"
@click="textClick(1,$t('listOfRegulations'))">
<a-icon type="control"/>
</div>
<div class="Virtual-detail-left-text" :title="$t('taskList')"
v-has="'projectLawsInventory:taskList'"
@click="textClick(2,$t('taskList'))">
<a-icon type="safety"/>
</div>
<div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"
@click="textClick(3,$t('nonConformance'))">
<a-icon type="safety-certificate"/>
</div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:TaskParameterCollection'"
:title="$t('TaskParameterCollection')"
@click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="profile"/>
</div>
<a-icon @click="textIconClick" type="menu-unfold" class="text-icon-one"/>
</div>
<div class="Virtual-detail-right"
:style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}">
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/> <ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/> <listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility" <TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
@@ -100,11 +131,13 @@
}, },
data() { data() {
return { return {
title: this.$t('projectDetails'), title: '',
isDisplayNum: '', isDisplayNum: '',
textTitle: '', textTitle: '',
isTrue: true, isTrue: true,
loading: false, loading: false,
isDisplay: true,
url: { url: {
logList: '/project/projectLawsInventoryLogEO/page', logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '', historicalVersionUrl: '',
@@ -115,7 +148,8 @@
} }
}, },
created() { created() {
document.title = this.$t('projectDetails') + '-' + this.$route.query.projectName document.title = this.$route.query.projectName ? this.$t('projectDetails') + '-' + this.$route.query.projectName : this.$t('projectDetails')
this.title = this.$route.query.projectName && this.$route.query.targetMarket ? this.$route.query.projectName + '-' + this.$route.query.targetMarket : this.$t('projectDetails')
}, },
mounted() { mounted() {
this.getTaskId() this.getTaskId()
@@ -149,6 +183,9 @@
} }
}, },
methods: { methods: {
textIconClick() {
this.isDisplay = !this.isDisplay
},
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
textColor(name) { textColor(name) {
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color') let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
@@ -261,6 +298,11 @@
text[i].classList.add('Virtual-detail-left-text-color') text[i].classList.add('Virtual-detail-left-text-color')
} }
} }
},
backClick() {
this.$router.push({
path: '/projectLibrary'
})
} }
} }
} }
@@ -305,11 +347,13 @@
.Virtual-detail-left { .Virtual-detail-left {
width: 240px; width: 240px;
flex: 0 0 240px;
padding: 16px 24px; padding: 16px 24px;
box-sizing: border-box; box-sizing: border-box;
font-size: 16px; font-size: 16px;
line-height: 3; line-height: 3;
float: left; float: left;
transition: all 0.2s;
.Virtual-detail-left-text { .Virtual-detail-left-text {
padding: 2px 12px; padding: 2px 12px;
@@ -320,12 +364,30 @@
} }
} }
.Virtual-detail-left-One {
width: 66px;
flex: 0 0 66px;
display: inline-block;
padding: 16px 16px;
box-sizing: border-box;
font-size: 18px;
right: 0;
transition: all 0.2s;
.Virtual-detail-left-text {
padding: 2px 8px;
cursor: pointer;
margin-bottom: 18px;
color: rgb(0, 0, 0);
}
}
.Virtual-detail-right { .Virtual-detail-right {
border-left: 2px #eff1f3 solid; border-left: 2px #eff1f3 solid;
width: calc(100% - 240px);
height: 100%; height: 100%;
float: left; float: right;
overflow: auto; overflow: auto;
transition: all 0.2s;
} }
} }
@@ -337,4 +399,22 @@
.Virtual-detail-text-right { .Virtual-detail-text-right {
} }
.text-icon {
color: rgb(0, 0, 0);
font-size: 22px;
position: absolute;
left: 200px;
bottom: 20px;
transition: all 0.2s;
}
.text-icon-one {
color: rgb(0, 0, 0);
font-size: 22px;
position: absolute;
left: 22px;
bottom: 20px;
transition: all 0.2s;
}
</style> </style>
@@ -5,7 +5,8 @@
{{$t('basicInformationOfParameters')}} {{$t('basicInformationOfParameters')}}
</div> </div>
<div class="header-tight"> <div class="header-tight">
<a-button v-has="'projectLibraryBase:edit'" class="box-button" style="line-height: 32px" @click="edit"> <a-button v-if="this.$route.query.studioEngineer == this.userInfo().id" class="box-button"
style="line-height: 32px" @click="edit">
{{$t('edit')}} {{$t('edit')}}
</a-button> </a-button>
</div> </div>
@@ -92,7 +93,8 @@
{{$t('regulatoryCertificationTaskPlan')}} {{$t('regulatoryCertificationTaskPlan')}}
</div> </div>
<div class="header-tight"> <div class="header-tight">
<a-button class="box-button" v-has="'projectTaskPlanning:queryByProjectId'" style="line-height: 32px" <a-button class="box-button" v-if="this.$route.query.studioEngineer == this.userInfo().id"
style="line-height: 32px"
@click="settingClick">{{$t('setting')}} @click="settingClick">{{$t('setting')}}
</a-button> </a-button>
</div> </div>
@@ -139,6 +141,7 @@
import currentStatusOfTheProjectEcharts from './currentStatusOfTheProjectEcharts' import currentStatusOfTheProjectEcharts from './currentStatusOfTheProjectEcharts'
import deliverableStatusEchart from './deliverableStatusEchart' import deliverableStatusEchart from './deliverableStatusEchart'
import certificationProgressEchart from './certificationProgressEchart' import certificationProgressEchart from './certificationProgressEchart'
import { mapGetters } from 'vuex'
export default { export default {
name: 'ProjectDetails', name: 'ProjectDetails',
@@ -171,6 +174,7 @@
this.getSetting() this.getSetting()
}, },
methods: { methods: {
...mapGetters(['userInfo']),
getForm() { getForm() {
getAction(this.url.queryById, { id: this.$route.query.id }).then((res) => { getAction(this.url.queryById, { id: this.$route.query.id }).then((res) => {
if (res.success) { if (res.success) {
@@ -46,6 +46,7 @@
<a-table <a-table
ref="table" ref="table"
bordered bordered
class="taskTable"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: true}"
@@ -197,7 +198,7 @@
scopedSlots: { customRender: 'CertificationProgress' } scopedSlots: { customRender: 'CertificationProgress' }
}, },
{ {
title: this.$t('CurrentProjectStatusEvaluation'), title: this.$t('CurrentStatus'),
align: 'center', align: 'center',
width: 150, width: 150,
dataIndex: 'CurrentProjectStatusEvaluation', dataIndex: 'CurrentProjectStatusEvaluation',
@@ -406,7 +407,7 @@
}, },
CurrentProjectClick(val) { CurrentProjectClick(val) {
let item = JSON.parse(JSON.stringify(val)) let item = JSON.parse(JSON.stringify(val))
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentProjectStatusEvaluation')) this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
}, },
TaskListModelList() { TaskListModelList() {
this.getList() this.getList()
@@ -603,4 +604,9 @@
.box-input .ant-select-selection__rendered { .box-input .ant-select-selection__rendered {
line-height: 38px; line-height: 38px;
} }
.taskTable .ant-empty-normal {
padding: 32px 0 !important;
margin: 0 !important;
}
</style> </style>
@@ -10,7 +10,7 @@
> >
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24"> <a-row :gutter="24">
<div class="headerText" v-if="title == $t('CurrentProjectStatusEvaluation')"> <div class="headerText" v-if="title == $t('CurrentStatus')">
{{this.$t('redSchedule')}}<br/> {{this.$t('redSchedule')}}<br/>
{{this.$t('yellowSchedule')}}<br/> {{this.$t('yellowSchedule')}}<br/>
{{this.$t('greenRequirements')}}<br/> {{this.$t('greenRequirements')}}<br/>
@@ -47,7 +47,7 @@
</div> </div>
</a-col> </a-col>
<a-col :span="24" v-if="title == $t('CurrentProjectStatusEvaluation') && this.formInline.roleCode != '0'"> <a-col :span="24" v-if="title == $t('CurrentStatus') && this.formInline.roleCode != '0'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
@@ -84,7 +84,7 @@
</div> </div>
</a-col> </a-col>
<a-col :span="24" v-if="title == $t('CurrentProjectStatusEvaluation') && this.formInline.roleCode != '0'"> <a-col :span="24" v-if="title == $t('CurrentStatus') && this.formInline.roleCode != '0'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
@@ -99,7 +99,7 @@
</div> </div>
</a-col> </a-col>
<div v-for="item in studioList" <div v-for="item in studioList"
v-if="title == $t('CurrentProjectStatusEvaluation') && formInline.roleCode == '0'"> v-if="title == $t('CurrentStatus') && formInline.roleCode == '0'">
<div class="headerText" <div class="headerText"
v-if="item.roleCode == 1" v-if="item.roleCode == 1"
style="margin-top: 10px"> style="margin-top: 10px">
@@ -196,7 +196,7 @@
getData(val, title) { getData(val, title) {
this.visible = true this.visible = true
this.title = title this.title = title
if (title == this.$t('CurrentProjectStatusEvaluation')) { if (title == this.$t('CurrentStatus')) {
val.remark = val.projectStatusAssessRemark || '' val.remark = val.projectStatusAssessRemark || ''
val.conditionAssessment = val.projectStatusAssess || '' val.conditionAssessment = val.projectStatusAssess || ''
if (val.roleCode == '2' || val.roleCode == '4' || val.roleCode == '1') { if (val.roleCode == '2' || val.roleCode == '4' || val.roleCode == '1') {
@@ -31,11 +31,15 @@
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span> <span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model="formInline.attestationType" <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
@input="handleInput('attestationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :type="'select'"
:type="'select'" :triggerChange="false" :dictCode="'attestation_type'"/>
:triggerChange="false" dictCode="attestation_type"/> <!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationType"-->
<!-- @input="handleInput('attestationType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_type"/>-->
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -61,11 +65,15 @@
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span> <span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank" <j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
@input="handleInput('attestationRank')" :placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')" :type="'select'"
:type="'select'" :triggerChange="false" :dictCode="'attestation_rank'"/>
:triggerChange="false" dictCode="attestation_rank"/> <!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationRank"-->
<!-- @input="handleInput('attestationRank')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationLevel')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_rank"/>-->
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -142,7 +142,7 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span> :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="attestationType"> <a-form-model-item class="itemModel-multi" prop="attestationType">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType" <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true" :disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
@@ -158,13 +158,12 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span> :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="attestationRank"> <a-form-model-item class="itemModel-multi" prop="attestationRank">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank" <j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true" :disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
@input="handleInput('attestationRank')" :placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')" :type="'select'"
:type="'select'" :triggerChange="false" :dictCode="'attestation_rank'"/>
:triggerChange="false" :dictCode="'attestation_rank'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -1,8 +1,8 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<div class="header-text"> <!-- <div class="header-text">-->
{{ $t('DocumentStandard') }} <!-- {{ $t('DocumentStandard') }}-->
</div> <!-- </div>-->
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
@@ -46,8 +46,10 @@
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<div class="table-operator" style="overflow:hidden;"> <div class="table-operator"
<div style="float: left;margin-bottom: 10px;margin-left: 20px" v-if="isDisplay"> v-if="(isRoleSwitching && !isDisplay) || (!isDisplay && roleSwitchingList.length > 1) || isDisplay"
style="overflow:hidden;margin-bottom: 20px">
<div style="float: left;margin-bottom: 0px;margin-left: 20px" v-if="isDisplay">
<div class="operator-text" @click="initiateListConfirmationcClick('清单')"> <div class="operator-text" @click="initiateListConfirmationcClick('清单')">
<a-icon type="solution"/> <a-icon type="solution"/>
{{ $t('initiateListConfirmation') }} {{ $t('initiateListConfirmation') }}
@@ -124,7 +126,7 @@
{{ $t('roleSwitching') }} {{ $t('roleSwitching') }}
</div> </div>
</div> </div>
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px"> <div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 0px">
<div class="operator-text" @click="submitClick(0)" v-if="isRoleSwitching"> <div class="operator-text" @click="submitClick(0)" v-if="isRoleSwitching">
<a-icon type="check-circle"/> <a-icon type="check-circle"/>
{{ $t('submit') }} {{ $t('submit') }}
@@ -148,9 +150,10 @@
<div style="width: 100%"> <div style="width: 100%">
<a-table <a-table
ref="table" ref="table"
class="tableList"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 420px)'}" :scroll="{x: '100%',y:'calc(100vh - 170px)'}"
rowKey="id" rowKey="id"
:data-source="dataSource" :data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -220,7 +223,7 @@
<transferList :url="url" @transferListForm="addModelList" ref="transferListRef"/> <transferList :url="url" @transferListForm="addModelList" ref="transferListRef"/>
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/> <fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
<a-modal <a-modal
:title="$t('ListConfirmationDeadline')" :title="listTitle"
:width="500" :width="500"
:visible="visible" :visible="visible"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
@@ -228,39 +231,41 @@
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
> >
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-spin :spinning="confirmLoading">
<a-row :gutter="24"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-col :span="24"> <a-row :gutter="24">
<div class="box-title-text-index"> <a-col :span="24">
<div class="title-text-index"> <div class="box-title-text-index">
<span class="Required">*</span> <div class="title-text-index">
<span class="title-text-text" <span class="Required">*</span>
:title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span> <span class="title-text-text"
:title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span>
</div>
<a-form-model-item v-if="this.timeName == '清单'" class="itemModel" prop="inventoryAffirmDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
<a-form-model-item v-else-if="this.timeName == '任务'" class="itemModel" prop="taskAffirmDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'taskAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.taskAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item v-if="this.timeName == '清单'" class="itemModel" prop="inventoryAffirmDueDate"> </a-col>
<a-date-picker class="box-input" </a-row>
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')" </a-form-model>
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})" </a-spin>
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
<a-form-model-item v-else-if="this.timeName == '任务'" class="itemModel" prop="taskAffirmDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'taskAffirmDueDate'})"
format="YYYY-MM-DD"
:disabledDate="disabledDate"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.taskAffirmDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal> </a-modal>
<a-modal <a-modal
:title="fileTitle" :title="fileTitle"
@@ -391,6 +396,7 @@
data() { data() {
return { return {
roleSwitchingList: [], roleSwitchingList: [],
listTitle: '',
columnsAll: [ columnsAll: [
{ {
title: this.$t('standard'), title: this.$t('standard'),
@@ -412,9 +418,8 @@
title: this.$t('subtitle'), title: this.$t('subtitle'),
align: 'center', align: 'center',
dataIndex: 'subtitle', dataIndex: 'subtitle',
width: 180, ellipsis: true,
fixed: 'left', width: 180
scopedSlots: { customRender: 'titleName' }
}, },
{ {
title: this.$t('listConfirmationStatus'), title: this.$t('listConfirmationStatus'),
@@ -1215,10 +1220,10 @@
this.getList() this.getList()
}, },
searchReset() { searchReset() {
this.queryParam = {}
this.$refs.globalAdvancedQueryRef.resetLine() this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback() this.$refs.globalAdvancedQueryRef.emitCallback()
this.queryParam = {} // this.getList()
this.getList()
}, },
addModelList() { addModelList() {
this.getList() this.getList()
@@ -1253,8 +1258,8 @@
roleCode: roleCode roleCode: roleCode
} }
this.loading = true this.loading = true
this.getRoleByUserId()
getAction(this.url.list, query).then((res) => { getAction(this.url.list, query).then((res) => {
this.getRoleByUserId()
if (res.success) { if (res.success) {
this.dataSource = res.result this.dataSource = res.result
this.loading = false this.loading = false
@@ -1269,6 +1274,7 @@
this.getList() this.getList()
}, },
initiateListConfirmationcClick(name) { initiateListConfirmationcClick(name) {
this.listTitle = this.$t('ListConfirmationDeadline')
this.timeName = name this.timeName = name
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
@@ -1276,11 +1282,16 @@
for (let i = 0; i < this.dataSource.length; i++) { for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) { for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].id == selectedRowKeys[j]) {
if ((this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') && if (this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) { if (this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
isTrue = true isTrue = true
} else {
this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
isTrue = false
return
}
} else { } else {
this.$message.warning(this.$t('dataConfirmation')) this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
isTrue = false isTrue = false
return return
} }
@@ -1298,6 +1309,7 @@
initiateTaskConfirmationClick(name) { initiateTaskConfirmationClick(name) {
this.timeName = name this.timeName = name
this.listTitle = this.$t('taskConfirmationDeadline')
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true let isTrue = true
@@ -1305,40 +1317,49 @@
for (let j = 0; j < selectedRowKeys.length; j++) { for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].id == selectedRowKeys[j]) {
if ((this.dataSource[i].taskAffirmStatus == 'Not started' || this.dataSource[i].taskAffirmStatus == 'Rejected') && if ((this.dataSource[i].taskAffirmStatus == 'Not started' || this.dataSource[i].taskAffirmStatus == 'Rejected') &&
this.dataSource[i].engineeringInterfacePerson && this.dataSource[i].inventoryAffirmStatus == 'Accepted') { this.dataSource[i].inventoryAffirmStatus == 'Accepted') {
if ((this.dataSource[i].verifyDueDate && this.dataSource[i].verifyDutyId if (this.dataSource[i].engineeringInterfacePerson) {
&& this.dataSource[i].verifyInitiatorId && this.dataSource[i].verifyDeliverableType) || if (this.dataSource[i].verifyRemark) {
(!this.dataSource[i].verifyDueDate && !this.dataSource[i].verifyDutyId if (this.dataSource[i].verifyDueDate && this.dataSource[i].verifyDutyId
&& !this.dataSource[i].verifyInitiatorId && !this.dataSource[i].verifyDeliverableType)) { && this.dataSource[i].verifyInitiatorId) {
isTrue = true isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
return
}
}
if (this.dataSource[i].prehomoRemark) {
if (this.dataSource[i].prehomoDueDate && this.dataSource[i].prehomoDutyId
&& this.dataSource[i].prehomoInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
return
}
}
if (this.dataSource[i].designRemark) {
if (this.dataSource[i].designDueDate && this.dataSource[i].designDutyId
&& this.dataSource[i].designInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
return
}
}
} else { } else {
isTrue = false isTrue = false
this.$message.warning(this.$t('pleaseConformityVerification')) this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
return
}
if ((this.dataSource[i].prehomoDueDate && this.dataSource[i].prehomoDutyId
&& this.dataSource[i].prehomoInitiatorId && this.dataSource[i].prehomoDeliverableType) ||
(!this.dataSource[i].prehomoDueDate && !this.dataSource[i].prehomoDutyId
&& !this.dataSource[i].prehomoInitiatorId && !this.dataSource[i].prehomoDeliverableType)) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('pleaseConfirmedByPrehomo'))
return
}
if ((this.dataSource[i].designDueDate && this.dataSource[i].designDutyId
&& this.dataSource[i].designInitiatorId && this.dataSource[i].designDeliverableType) ||
(!this.dataSource[i].designDueDate && !this.dataSource[i].designDutyId
&& !this.dataSource[i].designInitiatorId && !this.dataSource[i].designDeliverableType)) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('pleaseDesignConformityConfirmation'))
return return
} }
} else { } else {
isTrue = false isTrue = false
this.$message.warning(this.$t('taskDataConfirmation')) this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
return return
} }
} }
@@ -1578,7 +1599,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -1596,7 +1617,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id + '&userName=' + this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -1604,12 +1625,12 @@
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else { } else {
downloadFile('/sys/common/downLoadFile', name, { id: id }) downloadFile('/sys/common/downLoadFile', name, { id: id, userName: this.userInfo().username })
} }
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
}, },
clickButtonToUpload(item, num) { clickButtonToUpload(item, num) {
@@ -1885,4 +1906,8 @@
.itemModelComment .ant-form-item-control-wrapper { .itemModelComment .ant-form-item-control-wrapper {
width: 100% !important; width: 100% !important;
} }
.tableList .ant-table-thead > tr > th {
padding: 7px 16px !important;
}
</style> </style>
@@ -84,10 +84,11 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span> <span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'lawEngineerName'"> <!-- :prop="'lawEngineerName'"-->
<a-form-model-item class="itemModel">
<PersonnelSelection <PersonnelSelection
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}" :query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
:personneQuery="formInline" :personneQuery="formInline"
@@ -101,10 +102,11 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span> <span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePersonName'"> <!-- :prop="'engineeringInterfacePersonName'"-->
<a-form-model-item class="itemModel">
<PersonnelSelection <PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}" :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:personneQuery="formInline" :personneQuery="formInline"
@@ -118,10 +120,11 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span> <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'certificationEngineer'"> <!-- :prop="'certificationEngineer'"-->
<a-form-model-item class="itemModel">
<a-select allowClear <a-select allowClear
v-model="formInline.certificationEngineer" v-model="formInline.certificationEngineer"
:placeholder="$t('certifiedEngineer')+$t('areaOfResponsibility')"> :placeholder="$t('certifiedEngineer')+$t('areaOfResponsibility')">
@@ -325,6 +328,9 @@
editOk() { editOk() {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
if (!this.formInline.certificationEngineer){
this.formInline.certificationEngineer = ''
}
this.confirmLoading = true this.confirmLoading = true
putAction(this.url.edit, this.formInline).then((res) => { putAction(this.url.edit, this.formInline).then((res) => {
if (res.success) { if (res.success) {
@@ -35,6 +35,7 @@
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downFile, downloadFile, putAction } from '@/api/manage'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'resultReportedUpload', name: 'resultReportedUpload',
@@ -74,6 +75,7 @@
} }
}, },
methods: { methods: {
...mapGetters(['userInfo']),
clickButtonToUploadFile(item) { clickButtonToUploadFile(item) {
this.uploadQuery = item this.uploadQuery = item
this.myfileList = [] this.myfileList = []
@@ -208,7 +210,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') { if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx') { } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -216,7 +218,7 @@
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id,userName:this.userInfo().username })
} }
} }
} }
@@ -463,7 +463,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -480,7 +480,7 @@
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') { if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id)) window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx') { } else if (fileSuffix == '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
@@ -492,7 +492,7 @@
} }
}, },
download(item) { download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id ,userName:this.userInfo().username})
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
this.loading = true this.loading = true
@@ -107,10 +107,10 @@
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('newlyAdded')}} {{$t('newlyAdded')}}
</div> </div>
<div @click="handleDel" class="operator-text" v-has="'projectLibraryBase:deleteBatch'"> <!-- <div @click="handleDel" class="operator-text" v-has="'projectLibraryBase:deleteBatch'">-->
<a-icon type="delete"/> <!-- <a-icon type="delete"/>-->
{{$t('BatchDelete')}} <!-- {{$t('BatchDelete')}}-->
</div> <!-- </div>-->
</div> </div>
<div> <div>
<a-table <a-table
@@ -129,7 +129,10 @@
</span> </span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>--> <!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation" v-has="'projectLibraryBase:deleteBatch'" @click="deleteLib(record)">{{$t('deleteLib')}}</a> <a class="text-operation"
v-has="'projectLibraryBase:delete'"
v-if="record.createBy == userInfoQuery.username"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>--> <!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
</span> </span>
</a-table> </a-table>
@@ -153,6 +156,7 @@
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import addModel from '../components/addModel' import addModel from '../components/addModel'
import PersonnelSelection from '@/components/PersonnelSelection/index' import PersonnelSelection from '@/components/PersonnelSelection/index'
import { mapGetters } from 'vuex'
export default { export default {
name: 'index', name: 'index',
@@ -240,13 +244,16 @@
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
userInfoQuery: {},
queryParam: {} queryParam: {}
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.userInfoQuery = this.userInfo()
}, },
methods: { methods: {
...mapGetters(['userInfo']),
handleToggleSearch() { handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus this.toggleSearchStatus = !this.toggleSearchStatus
}, },
@@ -45,11 +45,12 @@
<div class="process-content-right-xian"></div> <div class="process-content-right-xian"></div>
<div class="process-content-content" :style="val.left" <div class="process-content-content" :style="val.left"
v-for="(val,indexOne) in item.data[0]" :key="indexOne"> v-for="(val,indexOne) in item.data[0]" :key="indexOne">
<div class="process-content-right-top" :title="val.name">{{val.name}}</div>
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template slot="title"> <template slot="title">
<span>{{val.time.slice(0,11)}}</span> <span>{{val.time.slice(0,11)}}</span>
</template> </template>
<div class="process-content-right-top">{{val.name}}</div>
<img v-if="val.status == 1" src="../../../../assets/done.svg" class="process-content-left" alt=""> <img v-if="val.status == 1" src="../../../../assets/done.svg" class="process-content-left" alt="">
<img v-else-if="val.status == 2" src="../../../../assets/open.svg" <img v-else-if="val.status == 2" src="../../../../assets/open.svg"
class="process-content-left" class="process-content-left"
@@ -109,10 +110,73 @@
this.handlingTime = moment(new Date()).format('YYYY-MM-DD') this.handlingTime = moment(new Date()).format('YYYY-MM-DD')
}, },
methods: { methods: {
getNewDate(flag, many) {
const thirtyDays = [4, 6, 9, 11] // 30天的月份
const thirtyOneDays = [1, 3, 5, 7, 8, 10, 12] // 31天的月份
const currDate = new Date() // 今天日期
const year = currDate.getFullYear()
let month = currDate.getMonth() + 1
let targetDateMilli = 0
let GMTDate = '' // 中国标准时间
let targetYear = '' // 年
let targetMonth = '' // 月
let targetDate = '' // 日
let dealTargetDays = '' // 目标日期
const isLeapYear = !!((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) // 是否是闰年
let countDays = 0 // 累计天数
for (let i = 0; i < many; i++) {
if (flag === 'before') {
month = month - 1 <= 0 ? 12 : month - 1
} else {
month = month + 1 > 12 ? 1 : month + 1
}
thirtyDays.includes(month) ? (countDays += 30) : thirtyOneDays.includes(month) ? (countDays += 31) : isLeapYear ? (countDays += 29) : (countDays += 28)
}
targetDateMilli = currDate.setDate(
currDate.getDate() - (flag === 'before' ? countDays : countDays * -1)
)
GMTDate = new Date(targetDateMilli)
targetYear = GMTDate.getFullYear()
targetMonth = GMTDate.getMonth() + 1
targetDate = GMTDate.getDate()
targetMonth = targetMonth.toString().padStart(2, '0')
targetDate = targetDate.toString().padStart(2, '0')
dealTargetDays = `${targetYear}-${targetMonth}`
return dealTargetDays
},
getTimeline() { getTimeline() {
let query = { let query = {
startTime: this.startTime, startTime: this.startTime || this.getNewDate('before', 6),
endTime: this.endTime endTime: this.endTime || this.getNewDate('after', 5)
} }
this.loadingMain = true this.loadingMain = true
getAction(this.url.timeline, query).then((res) => { getAction(this.url.timeline, query).then((res) => {
@@ -143,8 +207,8 @@
}, },
getTimelineList(time) { getTimelineList(time) {
let query = { let query = {
startTime: this.startTime, startTime: this.startTime || this.getNewDate('before', 6),
endTime: this.endTime endTime: this.endTime || this.getNewDate('after', 5)
} }
getAction(this.url.timelineList, query).then((res) => { getAction(this.url.timelineList, query).then((res) => {
if (res.success) { if (res.success) {
@@ -355,7 +419,7 @@
} }
.box-top-content-left { .box-top-content-left {
width: 160px; width: 140px;
float: left; float: left;
padding-top: 100px; padding-top: 100px;
margin-right: 20px; margin-right: 20px;
@@ -364,8 +428,8 @@
.box-top-content-left-text { .box-top-content-left-text {
color: #191E29; color: #191E29;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 12px;
height: 104px; height: 84px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -374,7 +438,7 @@
} }
.box-top-content-right { .box-top-content-right {
width: calc(100% - 180px); width: calc(100% - 160px);
float: left; float: left;
} }
@@ -392,7 +456,7 @@
height: 36px; height: 36px;
color: #54565A; color: #54565A;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 13px;
line-height: 36px; line-height: 36px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: center; text-align: center;
@@ -409,7 +473,7 @@
.process-content { .process-content {
position: relative; position: relative;
height: 104px; height: 84px;
.process-content-content { .process-content-content {
background: #fff; background: #fff;
@@ -430,15 +494,22 @@
} }
.process-content-right-top { .process-content-right-top {
font-size: 14px; font-size: 12px;
color: #040B29; color: #040B29;
max-width: 155px; width: 50px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
top: -8px; top: -14px;
left: 50%; left: 50%;
line-height: 1.2;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
@@ -71,11 +71,11 @@
<div class="process-content-right-xian"></div> <div class="process-content-right-xian"></div>
<div class="process-content-content" :style="val.left" <div class="process-content-content" :style="val.left"
v-for="(val,indexOne) in item.data[0]" :key="indexOne"> v-for="(val,indexOne) in item.data[0]" :key="indexOne">
<div class="process-content-right-top" :title="val.name">{{val.name}}</div>
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template slot="title"> <template slot="title">
<span>{{val.time.slice(0,11)}}</span> <span>{{val.time.slice(0,11)}}</span>
</template> </template>
<div class="process-content-right-top">{{val.name}}</div>
<img v-if="val.status == 1" src="../../../assets/done.svg" class="process-content-left" <img v-if="val.status == 1" src="../../../assets/done.svg" class="process-content-left"
alt=""> alt="">
<img v-else-if="val.status == 2" src="../../../assets/open.svg" <img v-else-if="val.status == 2" src="../../../assets/open.svg"
@@ -242,10 +242,73 @@
this.handlingTime = moment(new Date()).format('YYYY-MM-DD') this.handlingTime = moment(new Date()).format('YYYY-MM-DD')
}, },
methods: { methods: {
getNewDate(flag, many) {
const thirtyDays = [4, 6, 9, 11] // 30天的月份
const thirtyOneDays = [1, 3, 5, 7, 8, 10, 12] // 31天的月份
const currDate = new Date() // 今天日期
const year = currDate.getFullYear()
let month = currDate.getMonth() + 1
let targetDateMilli = 0
let GMTDate = '' // 中国标准时间
let targetYear = '' // 年
let targetMonth = '' // 月
let targetDate = '' // 日
let dealTargetDays = '' // 目标日期
const isLeapYear = !!((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) // 是否是闰年
let countDays = 0 // 累计天数
for (let i = 0; i < many; i++) {
if (flag === 'before') {
month = month - 1 <= 0 ? 12 : month - 1
} else {
month = month + 1 > 12 ? 1 : month + 1
}
thirtyDays.includes(month) ? (countDays += 30) : thirtyOneDays.includes(month) ? (countDays += 31) : isLeapYear ? (countDays += 29) : (countDays += 28)
}
targetDateMilli = currDate.setDate(
currDate.getDate() - (flag === 'before' ? countDays : countDays * -1)
)
GMTDate = new Date(targetDateMilli)
targetYear = GMTDate.getFullYear()
targetMonth = GMTDate.getMonth() + 1
targetDate = GMTDate.getDate()
targetMonth = targetMonth.toString().padStart(2, '0')
targetDate = targetDate.toString().padStart(2, '0')
dealTargetDays = `${targetYear}-${targetMonth}`
return dealTargetDays
},
getTimeline() { getTimeline() {
let query = { let query = {
startTime: this.startTime, startTime: this.startTime || this.getNewDate('before',6),
endTime: this.endTime, endTime: this.endTime || this.getNewDate('after',5),
...this.queryParam ...this.queryParam
} }
this.loadingMain = true this.loadingMain = true
@@ -277,8 +340,8 @@
}, },
getTimelineList(time) { getTimelineList(time) {
let query = { let query = {
startTime: this.startTime, startTime: this.startTime || this.getNewDate('before',6),
endTime: this.endTime, endTime: this.endTime || this.getNewDate('after',5),
...this.queryParam ...this.queryParam
} }
getAction(this.url.timelineList, query).then((res) => { getAction(this.url.timelineList, query).then((res) => {
@@ -506,7 +569,7 @@
} }
.box-top-content-left { .box-top-content-left {
width: 160px; width: 140px;
float: left; float: left;
padding-top: 100px; padding-top: 100px;
margin-right: 20px; margin-right: 20px;
@@ -515,8 +578,8 @@
.box-top-content-left-text { .box-top-content-left-text {
color: #191E29; color: #191E29;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 12px;
height: 104px; height: 84px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -525,7 +588,7 @@
} }
.box-top-content-right { .box-top-content-right {
width: calc(100% - 180px); width: calc(100% - 160px);
float: left; float: left;
} }
@@ -544,7 +607,7 @@
padding-left: 10px; padding-left: 10px;
color: #54565A; color: #54565A;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 13px;
line-height: 36px; line-height: 36px;
letter-spacing: 0px; letter-spacing: 0px;
text-align: center; text-align: center;
@@ -561,7 +624,7 @@
.process-content { .process-content {
position: relative; position: relative;
height: 104px; height: 84px;
.process-content-content { .process-content-content {
background: #fff; background: #fff;
@@ -582,15 +645,22 @@
} }
.process-content-right-top { .process-content-right-top {
font-size: 14px; font-size: 12px;
color: #040B29; color: #040B29;
max-width: 155px; width: 50px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
top: -8px; top: -14px;
left: 50%; left: 50%;
line-height: 1.2;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
@@ -104,7 +104,8 @@
'1': this.$t('SubscriptionNotification'), '1': this.$t('SubscriptionNotification'),
'2': this.$t('warningInformation'), '2': this.$t('warningInformation'),
'3': this.$t('ForwardPush'), '3': this.$t('ForwardPush'),
'4': this.$t('authenticationMessage') '4': this.$t('authenticationMessage'),
'5': this.$t('taskRegulationComplianceTask')
}, },
columns: [ columns: [
{ {