Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java
#	jero-web/src/common/lang/en-us.js
#	jero-web/src/common/lang/zh-cn.js
#	jero-web/src/components/uploadFileChangeDown/file.vue
This commit is contained in:
zer0Black
2022-07-01 15:12:31 +08:00
74 changed files with 1796 additions and 722 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
*/
public enum MessageTypeEnum {
READ("订阅通知","1"),
WARN("预警信息","2"),
PUSH("转发推送","3"),
COLLECT("认证消息","4");
READ("Subscription Notification","1"),
WARN("Early Warning","2"),
PUSH("Share / Forward","3"),
HOMO_TASK("Homo Parameter Task","4"),
TASK("Regulation Compliance Task", "5");
String name;
String value;
@@ -486,53 +486,58 @@ public class QueryGenerator {
}
name = oConvertUtils.camelToUnderline(name);
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
switch (rule) {
case GT:
queryWrapper.gt(name, value);
break;
case GE:
queryWrapper.ge(name, value);
break;
case LT:
queryWrapper.lt(name, value);
break;
case LE:
queryWrapper.le(name, value);
break;
case EQ:
case EQ_WITH_ADD:
queryWrapper.eq(name, value);
break;
case NE:
queryWrapper.ne(name, value);
break;
case IN:
if(value instanceof String) {
queryWrapper.in(name, (Object[])value.toString().split(","));
}else if(value instanceof String[]) {
queryWrapper.in(name, (Object[]) value);
if(" is null ".equals(value)){
queryWrapper.isNull(name);
}else{
switch (rule) {
case GT:
queryWrapper.gt(name, value);
break;
case GE:
queryWrapper.ge(name, value);
break;
case LT:
queryWrapper.lt(name, value);
break;
case LE:
queryWrapper.le(name, value);
break;
case EQ:
case EQ_WITH_ADD:
queryWrapper.eq(name, value);
break;
case NE:
queryWrapper.ne(name, value);
break;
case IN:
if(value instanceof String) {
queryWrapper.in(name, (Object[])value.toString().split(","));
}else if(value instanceof String[]) {
queryWrapper.in(name, (Object[]) value);
}
//update-begin-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
else if(value.getClass().isArray()) {
queryWrapper.in(name, (Object[])value);
}else {
queryWrapper.in(name, value);
}
//update-end-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
break;
case LIKE:
queryWrapper.like(name, value);
break;
case LEFT_LIKE:
queryWrapper.likeLeft(name, value);
break;
case RIGHT_LIKE:
queryWrapper.likeRight(name, value);
break;
default:
log.info("--查询规则未匹配到---");
break;
}
//update-begin-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
else if(value.getClass().isArray()) {
queryWrapper.in(name, (Object[])value);
}else {
queryWrapper.in(name, value);
}
//update-end-author:taoyan date:20200909 for:【bug】in 类型多值查询 不适配postgresql #1671
break;
case LIKE:
queryWrapper.like(name, value);
break;
case LEFT_LIKE:
queryWrapper.likeLeft(name, value);
break;
case RIGHT_LIKE:
queryWrapper.likeRight(name, value);
break;
default:
log.info("--查询规则未匹配到---");
break;
}
}
/**
*
@@ -1198,7 +1198,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date());
sysAnnouncement.setMsgCategory(MessageTypeEnum.COLLECT.getValue());//消息类型
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo);
@@ -1207,7 +1207,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 发送飞书消息
try {
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu);
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.HOMO_TASK.getName(), hrefFeishu);
} catch (IOException e) {
log.error("飞书消息推送失败");
}
@@ -1266,7 +1266,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date());
sysAnnouncement.setMsgCategory(MessageTypeEnum.COLLECT.getValue());//消息类型
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo);
@@ -1275,7 +1275,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 发送飞书消息
try {
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu);
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.HOMO_TASK.getName(), hrefFeishu);
} catch (IOException e) {
log.error("飞书消息推送失败");
}
@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.api.ISysBaseAPI;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.RestUtil;
import com.jero.common.util.TokenUtils;
import com.jero.common.util.oConvertUtils;
@@ -19,6 +19,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
@@ -47,6 +48,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLDecoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
@@ -341,7 +344,7 @@ public class CommonController {
* @param response
*/
@GetMapping(value = "/downLoadFile")
public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response) {
public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
if(StringUtils.isBlank(id)){
throw new JeroBootException("参数信息不全");
}
@@ -355,6 +358,7 @@ public class CommonController {
}
InputStream inputStream = null;
OutputStream outputStream = null;
File newFile =null;
try {
String fileName = "";
//本地下载
@@ -367,9 +371,18 @@ public class CommonController {
fileName = ossFile.getFileName();
response.setContentType("application/force-download");// 设置强制下载不打开
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
InputStream download = CosBootUtil.download(filePath);
File file = new File(filePath);
if(file.getName().endsWith(".pdf") || file.getName().endsWith(".PDF")){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String currentTime = sdf.format(new Date());
String waterContent = userName+" "+currentTime;
newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
inputStream = new FileInputStream(newFile.getPath());
}else{
inputStream = CosBootUtil.download(filePath);
}
outputStream = response.getOutputStream();
inputStream = CosBootUtil.download(filePath);
byte[] buf = new byte[1024];
int len;
while ((len = inputStream.read(buf)) > 0) {
@@ -394,7 +407,17 @@ public class CommonController {
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
if (newFile != null) {
try {
newFile.delete();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
}
}
@@ -468,7 +491,7 @@ public class CommonController {
* @param response
*/
@GetMapping(value = "/pdf/viewFile")
public void viewFile(String id,HttpServletRequest request, HttpServletResponse response) {
public void viewFile(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
// 查询数据表数据是否存在
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OSSFile::getId,id);
@@ -490,7 +513,10 @@ public class CommonController {
InputStream download = CosBootUtil.download(filePath);
File file = new File(filePath);
//水印内容
String waterContent = "water mark";//临时定义(水印信息通过传过来)
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String currentTime = sdf.format(new Date());
String waterContent = userName+" "+currentTime;
// String waterContent = "water mark";//临时定义(水印信息通过传过来)
File newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
// 文件名称
fileName = file.getName();
@@ -23,7 +23,7 @@ public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE sys_dict_item.DEL_FLAG = 0 and DICT_CODE = #{dictCode} order by sort_order asc, item_value asc")
public List<SysDictItem> selectItemsByDictCode(String dictCode);
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.sort_order asc")
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.item_text asc")
public List<SysDictItem> selectItemsOrderBySortOrder(String dictCode);
@Select("SELECT sys_dict.dict_code,sys_dict_item.* from sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id where status = 1")
@@ -195,8 +195,8 @@ public class SyncDataServiceImpl implements ISyncDataService{
ppEmployeeList.addAll(currentPPEmployeeList);
}
}
// 处理同步过来的数据id不同,username相同的情况
ppEmployeeList.sort(Comparator.comparing(PPEmployee::getCreation_time).reversed());
// 处理同步过来的数据id不同,username相同的情况 creation_time不能为空
// ppEmployeeList.sort(Comparator.comparing(PPEmployee::getCreation_time).reversed());
//此处获取全部pp用户信息
List<SysUser> sysUserList = sysUserService.getPPEmployeeList();
@@ -73,9 +73,9 @@ public class PDFUtils {
PdfTilingBrush brush = new PdfTilingBrush(dimension2D);
brush.getGraphics().setTransparency(0.4F);
brush.getGraphics().save();
brush.getGraphics().translateTransform((float) brush.getSize().getWidth() / 5, (float) brush.getSize().getHeight() / 5);
brush.getGraphics().translateTransform((float) brush.getSize().getWidth() / 1.5, (float) brush.getSize().getHeight() / 3);
brush.getGraphics().rotateTransform(-45);
brush.getGraphics().drawString(watermark, new PdfFont(PdfFontFamily.Helvetica, 15),
brush.getGraphics().drawString(watermark, new PdfFont(PdfFontFamily.Helvetica, 10),
PdfBrushes.getViolet(), 0 , 0 , new PdfStringFormat(PdfTextAlignment.Center));
brush.getGraphics().restore();
brush.getGraphics().setTransparency(1);
@@ -4997,9 +4997,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
File saveDirectory,
String cut) {
//树形数据字典
List<String> treeNameList = categoryList.stream().map(SysCategory::getName).collect(Collectors.toList());
List<String> treeNameList = new ArrayList<>();
if(CutEnum.CN.getValue().equals(cut)){
treeNameList = categoryList.stream().map(SysCategory::getName).collect(Collectors.toList());
}else{
treeNameList = categoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList());
}
//普通数据字典
List<String> itemNameList = dictItemList.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
List<String> itemNameList = new ArrayList<>();
if(CutEnum.CN.getValue().equals(cut)){
itemNameList = dictItemList.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
}else{
itemNameList = dictItemList.stream().map(SysDictItem::getEnName).collect(Collectors.toList());
}
int i = 2;
List<String> msgList = new ArrayList<>();
List<Map<String, Object>> mapList = new ArrayList<>();
@@ -5097,11 +5108,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (StringUtils.isNotBlank(value)) {
for (String valueTemp : value.split(",")) {
if (treeNameList.contains(valueTemp)) {
List<SysCategory> collect = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
valueId += collect.get(0).getId();
List<SysCategory> collect = new ArrayList<>();
if(CutEnum.CN.getValue().equals(cut)){
collect = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
}else{
collect = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList());
}
valueId += collect.get(0).getId()+",";
}
}
value = valueId;
if(StringUtils.isNotBlank(valueId)){
value = valueId.substring(0, valueId.length() - 1);
}
}
} else if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldShowType)) {
@@ -5173,7 +5191,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//文字转数据字典编码
if (itemNameList.contains(value)) {
String finalValue = value;
List<SysDictItem> collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(finalValue)).collect(Collectors.toList());
List<SysDictItem> collect = new ArrayList<>();
if(CutEnum.CN.getValue().equals(cut)){
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(finalValue)).collect(Collectors.toList());
}else{
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getEnName()) && e.getEnName().equals(finalValue)).collect(Collectors.toList());
}
if (collect.size() != 0) {
value = collect.get(0).getItemValue();
}
@@ -5216,7 +5239,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (StringUtils.isNotBlank(value)) {
for (String valueTemp : value.split(",")) {
if (itemNameList.contains(valueTemp)) {
List<SysDictItem> collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(valueTemp)).collect(Collectors.toList());
List<SysDictItem> collect = new ArrayList<>();
if(CutEnum.CN.getValue().equals(cut)){
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getItemText()) && e.getItemText().equals(valueTemp)).collect(Collectors.toList());
}else{
collect = dictItemList.stream().filter(e -> StringUtils.isNotBlank(e.getEnName()) && e.getEnName().equals(valueTemp)).collect(Collectors.toList());
}
valueId += collect.get(0).getItemValue() + ",";
}
}
@@ -201,6 +201,10 @@ public class DummyInventoryInfoEO implements Serializable {
@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String designDuty;
//交付物说明
@Excel(name = "设计符合性确认-交付物说明", width = 20)
private String designRemark;
/**prehomo确认-交付物类型*/
@Excel(name = "Prehomo-交付物类型", width = 15,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-交付物类型")
@@ -209,6 +213,7 @@ public class DummyInventoryInfoEO implements Serializable {
@TableField(exist = false)
private java.lang.String prehomoDeliverableTypeName;
/**prehomo确认-交付物模板*/
@ApiModelProperty(value = "prehomo确认-交付物模板")
@@ -230,6 +235,10 @@ public class DummyInventoryInfoEO implements Serializable {
@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String prehomoDuty;
//prehomo确认-交付物说明
@Excel(name = "prehomo确认-交付物说明", width = 20)
private String prehomoRemark;
/**验证符合性确认-交付物类型*/
@Excel(name = "验证-交付物类型", width = 15,dicCode ="deliverable_template")
@ApiModelProperty(value = "验证符合性确认-交付物类型")
@@ -259,6 +268,10 @@ public class DummyInventoryInfoEO implements Serializable {
@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String verifyDuty;
//验证备注
@Excel(name = "验证符合性确认-交付物说明", width = 20)
private String verifyRemark;
@TableField(exist = false)
private String cut;
@@ -273,4 +286,9 @@ public class DummyInventoryInfoEO implements Serializable {
}
@@ -82,11 +82,11 @@ public class DummyInventoryInfoEOEn implements Serializable {
/**适用地区*/
@ApiModelProperty(value = "适用地区")
@Dict(dicCode ="region")
@Excel(name = "Area", width = 15, dicCode = "region")
@Excel(name = "Area", width = 15)
private String region;
/**适用范围*/
@Excel(name = "Scope of application", width = 15, dicCode = "apply_scope")
@Excel(name = "Scope of application", width = 30, dicCode = "apply_scope")
@ApiModelProperty(value = "适用范围")
@Dict(dicCode ="apply_scope")
private String shi4Yong4Fan4Wei2;
@@ -111,7 +111,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String implementType;
/**新车型实施日期*/
@Excel(name = "New Type Execute Date", width = 15,format = "yyyy-MM-dd")
@Excel(name = "New Type Execute Date", width = 30,format = "yyyy-MM-dd")
@ApiModelProperty(value = "新车型实施日期")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@@ -120,7 +120,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String;
/**在产车实施日期*/
@Excel(name = "New Vehicle Execute Date", width = 15,format = "yyyy-MM-dd")
@Excel(name = "New Vehicle Execute Date", width = 30,format = "yyyy-MM-dd")
@ApiModelProperty(value = "在产车实施日期")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@@ -134,25 +134,25 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String wvtaId;
/**认证类型*/
@Excel(name = "Certification Type", width = 15,dicCode ="attestation_type")
@Excel(name = "Certification Type", width = 30,dicCode ="attestation_type")
@ApiModelProperty(value = "认证类型")
@Dict(dicCode ="attestation_type")
private String attestationType;
/**认证级别*/
@Excel(name = "Certification Level", width = 15,dicCode ="attestation_rank")
@Excel(name = "Certification Level", width = 30,dicCode ="attestation_rank")
@ApiModelProperty(value = "认证级别")
@Dict(dicCode ="attestation_rank")
private String attestationRank;
/**适用增补件*/
@ApiModelProperty(value = "适用增补件")
@Excel(name = "Applicable Supplement", width = 15)
@Excel(name = "Applicable Supplement", width = 30)
private String applicableSupplement;
/**技术领域*/
@Excel(name = "Technical Field", width = 15)
@Excel(name = "Technical Field", width = 30)
@ApiModelProperty(value = "技术领域")
private String technologyTerritory;
@@ -160,7 +160,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String technologyTerritoryName;
/**责任领域*/
@Excel(name = "Responsible Field", width = 15,dicCode ="duty_territory")
@Excel(name = "Responsible Field", width = 30,dicCode ="duty_territory")
@ApiModelProperty(value = "责任领域")
@Dict(dicCode ="duty_territory")
private String dutyTerritory;
@@ -171,7 +171,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String remark;
/**设计符合性确认-交付物类型*/
@Excel(name = "Design-Deliverables", width = 15,dicCode ="deliverable_template")
@Excel(name = "Design Deliverables", width = 30,dicCode ="deliverable_template")
@ApiModelProperty(value = "设计符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template")
private String designDeliverableType;
@@ -182,23 +182,28 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String designDeliverableTemplate;
@TableField(exist = false)
@Excel(name = "Design-Deliverable Template", width = 15)
@Excel(name = "Design Deliverable Template", width = 30)
private String designDeliverableTemplateName;
/**设计符合性确认-发起人*/
@Excel(name = "Design-Initiator", width = 15)
@Excel(name = "Design Initiator", width = 30)
@ApiModelProperty(value = "设计符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
private String designInitiator;
/**设计符合性确认-责任人*/
@Excel(name = "Design-Assignee", width = 15)
@Excel(name = "Design Assignee", width = 30)
@ApiModelProperty(value = "设计符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2")
private String designDuty;
//交付物说明
@Excel(name = "Design Compliance Check Deliverable Description", width = 50)
private String designRemark;
/**prehomo确认-交付物类型*/
@Excel(name = "Prehomo-Deliverables", width = 15,dicCode ="deliverable_template")
@Excel(name = "Prehomo Deliverables", width = 30,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-交付物类型")
@Dict(dicCode ="deliverable_template")
private String prehomoDeliverableType;
@@ -209,23 +214,27 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String prehomoDeliverableTemplate;
@TableField(exist = false)
@Excel(name = "Prehomo-Deliverable Template", width = 15)
@Excel(name = "Prehomo Deliverable Template", width = 30)
private String prehomoDeliverableTemplateName;
/**prehomo确认-发起人*/
@Excel(name = "Prehomo-Initiator", width = 15)
@Excel(name = "Prehomo Initiator", width = 30)
@ApiModelProperty(value = "prehomo确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
private String prehomoInitiator;
/**prehomo确认-责任人*/
@Excel(name = "Prehomo-Assignee", width = 15)
@Excel(name = "Prehomo Assignee", width = 30)
@ApiModelProperty(value = "prehomo确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2")
private String prehomoDuty;
//prehomo确认-交付物说明
@Excel(name = "Prehomo Check Deliverable Description", width = 50)
private String prehomoRemark;
/**验证符合性确认-交付物类型*/
@Excel(name = "Verify-Deliverables", width = 15,dicCode ="deliverable_template")
@Excel(name = "Verify Deliverables", width = 30,dicCode ="deliverable_template")
@ApiModelProperty(value = "验证符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template")
private String verifyDeliverableType;
@@ -235,21 +244,25 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String verifyDeliverableTemplate;
@TableField(exist = false)
@Excel(name = "Verify-Deliverable Template", width = 15)
@Excel(name = "Verify Deliverable Template", width = 30)
private String verifyDeliverableTemplateName;
/**验证符合性确认-发起人*/
@Excel(name = "Verify-Initiator", width = 15)
@Excel(name = "Verify Initiator", width = 30)
@ApiModelProperty(value = "验证符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
private String verifyInitiator;
/**验证符合性确认-责任人*/
@Excel(name = "Verify-Assignee", width = 15)
@Excel(name = "Verify Assignee", width = 30)
@ApiModelProperty(value = "验证符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2")
private String verifyDuty;
///验证-交付物说明
@Excel(name = "Validation Compliance Check Deliverable Description", width = 60)
private String verifyRemark;
@TableField(exist = false)
private String cut;
@@ -264,4 +277,9 @@ public class DummyInventoryInfoEOEn implements Serializable {
}
@@ -30,7 +30,6 @@
<result column="design_duty" property="designDuty" />
<result column="prehomo_deliverable_type" property="prehomoDeliverableType" />
<result column="prehomo_deliverable_template" property="prehomoDeliverableTemplate" />
<result column="prehomo_initiator" property="prehomoInitiator" />
<result column="prehomo_duty" property="prehomoDuty" />
<result column="verify_deliverable_type" property="verifyDeliverableType" />
<result column="verify_deliverable_template" property="verifyDeliverableTemplate" />
@@ -38,5 +37,8 @@
<result column="verify_duty" property="verifyDuty" />
<result column="region" property="region" />
<result column="applicable_supplement" property="applicableSupplement" />
<result column="verify_remark" property="verifyRemark" />
<result column="prehomo_remark" property="prehomoRemark" />
<result column="design_remark" property="designRemark" />
</resultMap>
</mapper>
@@ -653,16 +653,18 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
"*认证级别," +"适用增补件,"+
"*责任领域,备注," +
"设计符合性确认,Pre-homo确认,验证符合性确认";
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人";
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物说明," +
"交付物类型,交付物模板,发起人,责任人,交付物说明," +
"交付物类型,交付物模板,发起人,责任人,交付物说明";
}else{
titleOne = "*Number,Sub-Title,Usage," +
"WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," +
"design compliance check,pre-homo check,validation compliance chech";
titleTwo = "type of deliverables,deliverable template,initiator,person liable," +
"type of deliverables,deliverable template,initiator,person liable," +
"type of deliverables,deliverable template,initiator,person liable";
"Design compliance check,Pre-homo check,Validation compliance chech";
titleTwo = "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
"Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
"Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description";
}
@@ -694,7 +696,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
int count = 1;
int startLine = 0;
int endLine = 0;
int line = 3;
int line = 4;
for (int i = 0; i < index; i++) {
//合并单元格
CellRangeAddress region1 =
@@ -716,7 +718,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
count ++;
}
CellRangeAddress region =
new CellRangeAddress(2, 2, 0, 20); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
new CellRangeAddress(2, 2, 0, 23); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
sheet.addMergedRegion(region);
String explain= "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
@@ -751,7 +753,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
row.createCell(lineTemp).setCellValue(headerArr[m]);
Cell cell = row.getCell(lineTemp);
cell.setCellStyle(cellStyle);
lineTemp = lineTemp + 4;
lineTemp = lineTemp + 5;
}
}
@@ -916,15 +918,17 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
String title = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
title = "*编号,子标题,实施类别,WVTA ID,认证类型,*认证级别,适用增补件,*责任领域,备注," +
"设计交付物类型,设计交付物模板,设计发起人,设计责任人,pre交付物类型,pre交付物模板,pre发起人,pre责任人,验证交付物类型,验证交付物模板,验证发起人,验证责任人";
"设计交付物类型,设计交付物模板,设计发起人,设计责任人,设计交付物说明," +
"Pre交付物类型,Pre交付物模板,Pre发起人,Pre责任人,Pre交付物说明," +
"验证交付物类型,验证交付物模板,验证发起人,验证责任人,验证交付物说明";
}else{
title = "*Number,Sub-Title,Usage," +
"WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," +
"design type of deliverables,design deliverable template,design initiator,design person liable," +
"pre type of deliverables,pre deliverable template,pre initiator,pre person liable," +
"verify type of deliverables,verify deliverable template,verify initiator,verify person liable";
"Design Type of deliverables,Design Deliverable template,Design Initiator,Design Person liable,Design Deliverables description," +
"Pre Type of deliverables,Pre Deliverable template,Pre Initiator,Pre Person liable,Pre Deliverables description," +
"Verify Type of deliverables,Verify Deliverable template,Verify Initiator,Verify Person liable,Verify Deliverables description";
}
int pos = file.getOriginalFilename().lastIndexOf(".");
@@ -1046,27 +1050,27 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
}else if(i == 1){
if(j > 8){
String flag = "";
if(8 < j && j < 13){
if(8 < j && j < 14){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="设计";
}else{
flag ="design ";
flag ="Design ";
}
key = flag + headerCell.getStringCellValue();
}
if(12 < j && j < 17){
if(13 < j && j < 19){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="pre";
flag ="Pre";
}else{
flag ="pre ";
flag ="Pre ";
}
key = flag + headerCell.getStringCellValue();
}
if(16 < j && j < 21){
if(18 < j && j < 24){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="验证";
}else{
flag ="verify ";
flag ="Verify ";
}
key = flag + headerCell.getStringCellValue();
@@ -1469,10 +1473,12 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
//存在文档库没有的数据
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
List<String> serialNumbers = serialNumberS.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
}else{
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
if(serialNumbers.size() != 0){
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
}else{
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
}
}
}
if(dummyInventoryInfoEOList.size() > 0){
@@ -1718,18 +1724,21 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
case "设计交付物模板": return "designDeliverableTemplate";
case "设计发起人": return "designInitiator";
case "设计责任人": return "designDuty";
case "pre交付物类型": return "prehomoDeliverableType";
case "pre交付物模板": return "prehomoDeliverableTemplate";
case "pre发起人": return "prehomoInitiator";
case "pre责任": return "prehomoDuty";
case "设计交付物说明": return "designRemark";
case "Pre交付物类型": return "prehomoDeliverableType";
case "Pre交付物模板": return "prehomoDeliverableTemplate";
case "Pre发起": return "prehomoInitiator";
case "Pre责任人": return "prehomoDuty";
case "Pre交付物说明": return "prehomoRemark";
case "验证交付物类型": return "verifyDeliverableType";
case "验证交付物模板": return "verifyDeliverableTemplate";
case "验证发起人": return "verifyInitiator";
case "验证责任人": return "verifyDuty";
case "验证交付物说明": return "verifyRemark";
case "*Number": return "serialNumber";
case "title": return "title";
case "Title": return "title";
case "Sub-Title": return "subtitle";
// case "适用范围": return "shi4Yong4Fan4Wei2";
// case "状态": return "state";
@@ -1745,18 +1754,21 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
case "*Responsible Field": return "dutyTerritory";
// case "适用地区": return "region";
case "Comments": return "remark";
case "design type of deliverables": return "designDeliverableType";
case "design deliverable template": return "designDeliverableTemplate";
case "design initiator": return "designInitiator";
case "design person liable": return "designDuty";
case "pre type of deliverables": return "prehomoDeliverableType";
case "pre deliverable template": return "prehomoDeliverableTemplate";
case "pre initiator": return "prehomoInitiator";
case "pre person liable": return "prehomoDuty";
case "verify type of deliverables": return "verifyDeliverableType";
case "verify deliverable template": return "verifyDeliverableTemplate";
case "verify initiator": return "verifyInitiator";
case "verify person liable": return "verifyDuty";
case "Design Type of deliverables": return "designDeliverableType";
case "Design Deliverable template": return "designDeliverableTemplate";
case "Design Initiator": return "designInitiator";
case "Design Person liable": return "designDuty";
case "Design Deliverables description": return "designRemark";
case "Pre Type of deliverables": return "prehomoDeliverableType";
case "Pre Deliverable template": return "prehomoDeliverableTemplate";
case "Pre Initiator": return "prehomoInitiator";
case "Pre Person liable": return "prehomoDuty";
case "Pre Deliverables description": return "prehomoRemark";
case "Verify Type of deliverables": return "verifyDeliverableType";
case "Verify Deliverable template": return "verifyDeliverableTemplate";
case "Verify Initiator": return "verifyInitiator";
case "Verify Person liable": return "verifyDuty";
case "Verify Deliverables description": return "verifyRemark";
default: return null;
}
}
@@ -1,5 +1,7 @@
package com.jero.modules.feishu.service;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import java.io.IOException;
/**
@@ -26,4 +28,11 @@ public interface IFeishuService {
* @throws IOException
*/
String batchSendMessage(String[] userIds, String message, String title, String backUrl) throws IOException;
/**
* 发送卡片消息
* @param feishuMsgVo
* @return
*/
String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
}
@@ -1,8 +1,11 @@
package com.jero.modules.feishu.service.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.druid.support.json.JSONUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.system.util.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@@ -111,4 +114,128 @@ public class FeishuServiceImpl implements IFeishuService {
}
return tokenJson.get("msg").toString();
}
/**
* 发送卡片消息
* @param feishuMsgVo
* @return
*/
public String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException {
String token = getTenantAccessToken();
// 设置请求头
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Authorization", "Bearer " + token);
headerMap.put("Content-Type", "application/json; charset=utf-8");
// 示例
StringBuilder contentSb = new StringBuilder();
contentSb.append("{");
contentSb.append("\"elements\": [");
// 补充内容
if (StrUtil.isNotEmpty(feishuMsgVo.getContent())){
contentSb.append("{");
contentSb.append("\"tag\": \"div\",");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"" + feishuMsgVo.getContent() + "\",");
contentSb.append("\"tag\": \"lark_md\"");
contentSb.append("}");
contentSb.append("},");
};
// 补充tasktype、project、Initiator等的外层
contentSb.append("{");
contentSb.append("\"fields\": [");
contentSb.append("{");
contentSb.append("\"is_short\": false,");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"**Task Type** " + feishuMsgVo.getTaskType() + "\",");
contentSb.append("\"tag\": \"lark_md\"");
contentSb.append("}");
contentSb.append("}");
if (StrUtil.isNotEmpty(feishuMsgVo.getRegulationNo())){
contentSb.append(",");
contentSb.append("{");
contentSb.append("\"is_short\": false,");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"**Regulation No** " + feishuMsgVo.getRegulationNo() + "\",");
contentSb.append("\"tag\": \"lark_md\"");
contentSb.append("}");
contentSb.append("}");
}
if (StrUtil.isNotEmpty(feishuMsgVo.getProject())){
contentSb.append(",");
contentSb.append("{");
contentSb.append("\"is_short\": false,");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"**Project** " + feishuMsgVo.getProject() + "\",");
contentSb.append("\"tag\": \"lark_md\"");
contentSb.append("}");
contentSb.append("}");
}
if (StrUtil.isNotEmpty(feishuMsgVo.getInitiator())){
contentSb.append(",");
contentSb.append("{");
contentSb.append("\"is_short\": false,");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"**Initiator** " + feishuMsgVo.getInitiator() + "\",");
contentSb.append("\"tag\": \"lark_md\"");
contentSb.append("}");
contentSb.append("}");
}
if (StrUtil.isNotEmpty(feishuMsgVo.getDueDate())){
contentSb.append(",");
contentSb.append("{");
contentSb.append("\"is_short\": false,");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"**Due Date** " + feishuMsgVo.getDueDate() + "\",");
contentSb.append("\"tag\": \"lark_md\"");
contentSb.append("}");
contentSb.append("}");
}
contentSb.append("],");
contentSb.append("\"tag\": \"div\"");
contentSb.append("},");
contentSb.append("{\"tag\": \"hr\"},");
contentSb.append("{");
contentSb.append("\"actions\": [");
contentSb.append("{");
contentSb.append("\"tag\": \"button\",");
contentSb.append("\"text\": {");
contentSb.append("\"content\": \"view\",");
contentSb.append("\"tag\": \"plain_text\"");
contentSb.append("},");
contentSb.append("\"type\": \"primary\",");
contentSb.append("\"url\": \" "+ feishuMsgVo.getUrl() +" \"");
contentSb.append("}");
contentSb.append("],");
contentSb.append("\"tag\": \"action\"");
contentSb.append("}");
contentSb.append("],");
contentSb.append("\"header\": {");
contentSb.append("\"template\": \"green\",");
contentSb.append("\"title\": {");
contentSb.append("\"content\": \" " + feishuMsgVo.getTitle() + " \",");
contentSb.append("\"tag\": \"plain_text\"");
contentSb.append("}");
contentSb.append("}");
contentSb.append("}");
JSONObject jsonObject = JSONObject.parseObject(contentSb.toString());
// 设置请求参数
JSONObject paramsMap = new JSONObject();
paramsMap.put("user_ids", userIds);
paramsMap.put("msg_type", "interactive");
paramsMap.put("card", jsonObject);
// 发送请求给飞书
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
// 获取返回结果
JSONObject tokenJson = JSONObject.parseObject(response);
if(!tokenJson.get("code").toString().equals("0")) {
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
}
return tokenJson.get("msg").toString();
}
}
@@ -0,0 +1,28 @@
package com.jero.modules.feishu.vo;
import lombok.Data;
/**
* 飞书消息的VO
*/
@Data
public class FeishuMsgVo {
private String title; //标题
private String content; //内容
private String taskType; //任务类型
private String regulationNo; //法规编号
private String project; //项目名称
private String initiator; //发起人
private String dueDate; //截止时间
private String url; //回调的网址
}
@@ -101,10 +101,13 @@ public class ProjectLawsInventoryEO implements Serializable {
/**适用地区*/
@ApiModelProperty(value = "适用地区")
@Dict(dicCode ="region")
//@Dict(dicCode ="region")
@Excel(name = "适用地区", width = 15, dicCode = "region")
private java.lang.String region;
@TableField(exist = false)
private String region_dictText;
/**对应标准*/
@Excel(name = "对应标准", width = 20)
@ApiModelProperty(value = "对应标准")
@@ -113,8 +116,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**实施类别*/
@Excel(name = "实施类别", width = 20,dicCode ="implement_type")
@ApiModelProperty(value = "实施类别")
@Dict(dicCode ="implement_type")
//@Dict(dicCode ="implement_type")
private String implementType;
@TableField(exist = false)
private String implementType_dictText;
/**新车型实施日期*/
@Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd")
@@ -139,14 +144,18 @@ public class ProjectLawsInventoryEO implements Serializable {
/**认证类型*/
@Excel(name = "认证类型", width = 20,dicCode ="attestation_type")
@ApiModelProperty(value = "认证类型")
@Dict(dicCode ="attestation_type")
//@Dict(dicCode ="attestation_type")
private String attestationType;
@TableField(exist = false)
private String attestationType_dictText;
/**认证级别*/
@Excel(name = "认证级别", width = 20,dicCode ="attestation_rank")
@ApiModelProperty(value = "认证级别")
@Dict(dicCode ="attestation_rank")
//@Dict(dicCode ="attestation_rank")
private String attestationRank;
@TableField(exist = false)
private String attestationRank_dictText;
//适用增补件
@Excel(name = "适用增补件", width = 20)
@@ -160,8 +169,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**责任领域*/
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
@ApiModelProperty(value = "责任领域")
@Dict(dicCode ="duty_territory")
//@Dict(dicCode ="duty_territory")
private String dutyTerritory;
@TableField(exist = false)
private String dutyTerritory_dictText;
/**法规工程师id*/
@ApiModelProperty(value = "法规工程师id")
@@ -198,10 +209,12 @@ public class ProjectLawsInventoryEO implements Serializable {
/**设计符合性确认-交付物类型*/
@Excel(name = "设计符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
@ApiModelProperty(value = "设计符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template")
//@Dict(dicCode ="deliverable_template")
private String designDeliverableType;
@TableField(exist = false)
private String designDeliverableTypeName;
@TableField(exist = false)
private String designDeliverableType_dictText;
/**设计符合性确认-交付物模板*/
@ApiModelProperty(value = "设计符合性确认-交付物模板")
@@ -214,8 +227,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**设计符合性确认-发起人角色*/
@ApiModelProperty(value = "设计符合性确认-发起人角色")
@Dict(dicCode ="fa1_qi3_ren2")
//@Dict(dicCode ="fa1_qi3_ren2")
private String designInitiator;
@TableField(exist = false)
private String designInitiator_dictText;
/**设计符合性确认-发起人id*/
//@TableField(updateStrategy = FieldStrategy.IGNORED)
@@ -229,8 +244,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**设计符合性确认-责任人角色*/
@ApiModelProperty(value = "设计符合性确认-责任人角色")
@Dict(dicCode ="ze2_ren4_ren2")
//@Dict(dicCode ="ze2_ren4_ren2")
private String designDuty;
@TableField(exist = false)
private String designDuty_dictText;
/**设计符合性确认-责任人id*/
@ApiModelProperty(value = "设计符合性确认-责任人id")
@@ -259,8 +276,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**prehomo确认-交付物类型*/
@Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-1")
@Dict(dicCode ="deliverable_template")
////@Dict(dicCode ="deliverable_template")
private String prehomoDeliverableType;
@TableField(exist = false)
private String prehomoDeliverableType_dictText;
@TableField(exist = false)
private String prehomoDeliverableTypeName;
@@ -275,8 +294,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**prehomo确认-发起人角色*/
@ApiModelProperty(value = "prehomo确认-发起人角色")
@Dict(dicCode ="fa1_qi3_ren2")
//@Dict(dicCode ="fa1_qi3_ren2")
private String prehomoInitiator;
@TableField(exist = false)
private String prehomoInitiator_dictText;
/**prehomo确认-发起人id*/
@ApiModelProperty(value = "prehomo确认-发起人id")
@@ -290,8 +311,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**prehomo确认-责任人角色*/
@ApiModelProperty(value = "prehomo确认-责任人角色")
@Dict(dicCode ="ze2_ren4_ren2")
//@Dict(dicCode ="ze2_ren4_ren2")
private String prehomoDuty;
@TableField(exist = false)
private String prehomoDuty_dictText;
/**prehomo确认-责任人id*/
@ApiModelProperty(value = "prehomo确认-责任人id")
@@ -320,8 +343,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**验证符合性确认-交付物类型*/
@Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
@ApiModelProperty(value = "验证符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template")
//@Dict(dicCode ="deliverable_template")
private String verifyDeliverableType;
@TableField(exist = false)
private String verifyDeliverableType_dictText;
@TableField(exist = false)
private String verifyDeliverableTypeName;
@@ -336,8 +361,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**验证符合性确认-发起人角色*/
@ApiModelProperty(value = "验证符合性确认-发起人角色")
@Dict(dicCode ="fa1_qi3_ren2")
//@Dict(dicCode ="fa1_qi3_ren2")
private String verifyInitiator;
@TableField(exist = false)
private String verifyInitiator_dictText;
/**验证符合性确认-发起人id*/
@ApiModelProperty(value = "验证符合性确认-发起人id")
@@ -351,8 +378,10 @@ public class ProjectLawsInventoryEO implements Serializable {
/**验证符合性确认-责任人角色*/
@ApiModelProperty(value = "验证符合性确认-责任人角色")
@Dict(dicCode ="ze2_ren4_ren2")
//@Dict(dicCode ="ze2_ren4_ren2")
private String verifyDuty;
@TableField(exist = false)
private String verifyDuty_dictText;
/**验证符合性确认-责任人id*/
@ApiModelProperty(value = "验证符合性确认-责任人id")
@@ -71,7 +71,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
private String serialNumber;
/**标题*/
@Excel(name = "title", width = 20)
@Excel(name = "Title", width = 20)
@ApiModelProperty(value = "标题")
private String title;
@@ -101,7 +101,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
/**适用地区*/
@ApiModelProperty(value = "适用地区")
@Dict(dicCode ="Area")
@Excel(name = "Area", width = 15, dicCode = "region")
@Excel(name = "Area", width = 15)
private String region;
/**对应标准*/
@@ -1,13 +1,13 @@
package com.jero.modules.project.enums;
public enum ProjectTaskPlanningNameEnum {
LIST_CONFIRMATION("法规清单确认"," Confirmation of regulations list"),
LEGAL_TASK_CONFIRMATION("法规任务确认","Regulatory task confirmation"),
DESIGN_DEADLINE("设计符合性确认","Design Compliance Check"),
PREHOMO_DEADLINE("Pre-Homo确认","Pre-Homo Check"),
ATTESTATION_START_TIME("认证开始","Certification start"),
ATTESTATION_END_TIME("认证结束"," Certification end"),
VERIFY_DEADLINE("验证符合性确认","Verification compliance confirmation deadline"),
LIST_CONFIRMATION("清单确认"," Checklist confirmation"),
LEGAL_TASK_CONFIRMATION("任务确认","Task confirmation"),
DESIGN_DEADLINE("设计符合性","Design compliance"),
PREHOMO_DEADLINE("Pre-Homo","Pre-Homo"),
ATTESTATION_START_TIME("认证开始","Certification begins"),
ATTESTATION_END_TIME("认证结束"," End of certification"),
VERIFY_DEADLINE("验证符合性","Verify compliance"),
;
String name;
@@ -1,6 +1,8 @@
package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO;
@@ -71,7 +73,7 @@ public class InventoryAffirmJob implements Job {
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
@@ -134,54 +136,75 @@ public class InventoryAffirmJob implements Job {
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*/
// XXX .
String msgContentEN = "The remaining processing time for the regulation list confirmation of"
+ projectNameInfoEO.getProjectName()
String msgContentEN = "The remaining processing time for the regulation list confirmation of "
+ projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()+ " "
+ projectLibraryBase.getTargetMarket()
+ " are 3 days. Please check and handle it in time.";
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap);
}
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
String msgContentEN = "The the regulation list confirmation for "
+ projectNameInfoEO.getProjectName()
+ " will expire today. Please check and address it in a timely manner.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId()
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName();
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
String msgContentEN = "The regulation list confirmation for "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " will expire today. Please check and address it in a timely manner.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId()
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
}
@@ -1,9 +1,12 @@
package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.enums.SendMsgFlagEnum;
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
@@ -74,7 +77,7 @@ public class PrehomoJob implements Job {
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
@@ -137,9 +140,17 @@ public class PrehomoJob implements Job {
//您XXX(项目名称)中GB 7258的Pre-Homo确认剩余处理时间还有3天,请及时查看处理
//The remaining processing time for the Pre-Homo confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()+ " "
+ projectLibraryBase.getTargetMarket()
+ " are 3 days. Please check and handle it in time.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
@@ -157,7 +168,7 @@ public class PrehomoJob implements Job {
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -166,9 +177,15 @@ public class PrehomoJob implements Job {
//您XXX(项目名称)中GB 7258的Pre-Homo确认任务今天即将结束,请及时查看处理
//The the Pre-Homo confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
String msgContentEN = "The the Pre-Homo confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " will expire today. Please check and address it in time.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
@@ -186,7 +203,7 @@ public class PrehomoJob implements Job {
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
}
@@ -1,6 +1,8 @@
package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
@@ -73,7 +75,7 @@ public class VerifyComplianceJob implements Job {
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
@@ -135,9 +137,17 @@ public class VerifyComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理
//The remaining processing time for the Verify compliance confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
String msgContentEN = "The remaining processing time for the validation compliance confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()+ " "
+ projectLibraryBase.getTargetMarket()
+ " are 3 days. Please check and handle it in time.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
@@ -155,7 +165,7 @@ public class VerifyComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -164,9 +174,15 @@ public class VerifyComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理
//The the Verify compliance confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
String msgContentEN = "The the validation compliance confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " will expire today. Please check and address it in time.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
@@ -184,7 +200,7 @@ public class VerifyComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
}
@@ -1,6 +1,8 @@
package com.jero.modules.project.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
@@ -73,7 +75,7 @@ public class designComplianceJob implements Job {
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectLibraryBaseList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
@@ -137,8 +139,16 @@ public class designComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理
String msgContentEN = "The remaining processing time for the design compliance confirmation for "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ projectYearNameInfoEO.getYearName()+ " "
+ projectLibraryBase.getTargetMarket()
+ " are 3 days. Please check and address it in a timely manner.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
//系统内部跳转链接
@@ -151,17 +161,23 @@ public class designComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
//您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理
String msgContentEN = "The the design compliance confirmation for "
String msgContentEN = "The design compliance confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " will expire today. Please check and address it in time.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
@@ -179,7 +195,7 @@ public class designComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
}
@@ -44,7 +44,7 @@
</if>
AND sd.dict_code = #{dictCode}
</where>
ORDER BY sdi.sort_order
ORDER BY sdi.item_text ASC
</select>
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel">
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.system.entity.SysRole;
import org.springframework.web.multipart.MultipartFile;
@@ -76,7 +78,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
*/
Result<?> updateStatusBatch(JSONObject json);
void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> params);
void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType);
/**
* 匹配相关人员
@@ -35,6 +35,7 @@ import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
import com.jero.modules.dummy.util.DeepCopyListUtil;
import com.jero.modules.dummy.util.ListDiff;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.message.websocket.WebSocket;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
@@ -646,6 +647,166 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
long startTime = System.currentTimeMillis();
dataDictDispose(result,projectLawsInventoryEO.getCut());
log.debug("处理数据字典消耗时间:" + (System.currentTimeMillis() - startTime));
return result;
}
/**
* 数据字典数据处理方法
* @param result 返回值
* @param cut 中英文切换
*/
public void dataDictDispose(List<ProjectLawsInventoryEO> result,String cut){
if(CollectionUtils.isNotEmpty(result)){
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
for (ProjectLawsInventoryEO projectLawsInventoryEO : result) {
//处理适用地区
String region = projectLawsInventoryEO.getRegion();
if(StringUtils.isNotEmpty(region)){
String region_dictText = disposeShowDictItemValue(sysDictItems, region,cut,ProjectInventoryFieldEnum.REGION.getValue());
projectLawsInventoryEO.setRegion_dictText(region_dictText);
}
//处理实施类别
String implementType = projectLawsInventoryEO.getImplementType();
if(StringUtils.isNotEmpty(implementType)){
String implementType_dictText = disposeShowDictItemValue(sysDictItems, implementType,cut,ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getValue());
projectLawsInventoryEO.setImplementType_dictText(implementType_dictText);
}
//处理认证类型
String attestationType = projectLawsInventoryEO.getAttestationType();
if(StringUtils.isNotEmpty(attestationType)){
String attestationType_dictText = disposeShowDictItemValue(sysDictItems, attestationType,cut,ProjectInventoryFieldEnum.ATTESTATION_TYPE.getValue());
projectLawsInventoryEO.setAttestationType_dictText(attestationType_dictText);
}
//处理认证级别
String attestationRank = projectLawsInventoryEO.getAttestationRank();
if(StringUtils.isNotEmpty(attestationRank)){
String attestationRank_dictText = disposeShowDictItemValue(sysDictItems, attestationRank,cut,ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue());
projectLawsInventoryEO.setAttestationRank_dictText(attestationRank_dictText);
}
//处理责任领域
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
if(StringUtils.isNotEmpty(dutyTerritory)){
String dutyTerritory_dictText = disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
projectLawsInventoryEO.setDutyTerritory_dictText(dutyTerritory_dictText);
}
//处理设计符合性确认-交付物类型
String designDeliverableType = projectLawsInventoryEO.getDesignDeliverableType();
if(StringUtils.isNotEmpty(designDeliverableType)){
String designDeliverableType_dictText = disposeShowDictItemValue(sysDictItems, designDeliverableType,cut,ProjectInventoryFieldEnum.DESIGN_DELIVERABLE_TYPE.getValue());
projectLawsInventoryEO.setDesignDeliverableType_dictText(designDeliverableType_dictText);
}
//处理设计符合性确认-发起人角色
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
if(StringUtils.isNotEmpty(designInitiator)){
String designInitiator_dictText = disposeShowDictItemValue(sysDictItems, designInitiator,cut,ProjectInventoryFieldEnum.DESIGN_INITIATOR.getValue());
projectLawsInventoryEO.setDesignInitiator_dictText(designInitiator_dictText);
}
//处理设计符合性确认-责任人角色
String designDuty = projectLawsInventoryEO.getDesignDuty();
if(StringUtils.isNotEmpty(designDuty)){
String designDuty_dictText = disposeShowDictItemValue(sysDictItems, designDuty,cut,ProjectInventoryFieldEnum.DESIGN_DUTY.getValue());
projectLawsInventoryEO.setDesignDuty_dictText(designDuty_dictText);
}
//处理prehomo确认-交付物类型
String prehomoDeliverableType = projectLawsInventoryEO.getPrehomoDeliverableType();
if(StringUtils.isNotEmpty(prehomoDeliverableType)){
String prehomoDeliverableType_dictText = disposeShowDictItemValue(sysDictItems, prehomoDeliverableType,cut,ProjectInventoryFieldEnum.PREHOMO_DELIVERABLE_TYPE.getValue());
projectLawsInventoryEO.setPrehomoDeliverableType_dictText(prehomoDeliverableType_dictText);
}
//处理prehomo确认-发起人角色
String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator();
if(StringUtils.isNotEmpty(prehomoInitiator)){
String prehomoInitiator_dictText = disposeShowDictItemValue(sysDictItems, prehomoInitiator,cut,ProjectInventoryFieldEnum.PREHOMO_INITIATOR.getValue());
projectLawsInventoryEO.setPrehomoInitiator_dictText(prehomoInitiator_dictText);
}
//处理prehomo确认-责任人角色
String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty();
if(StringUtils.isNotEmpty(prehomoDuty)){
String prehomoDuty_dictText = disposeShowDictItemValue(sysDictItems, prehomoDuty,cut,ProjectInventoryFieldEnum.PREHOMO_DUTY.getValue());
projectLawsInventoryEO.setPrehomoDuty_dictText(prehomoDuty_dictText);
}
//处理验证符合性确认-交付物类型
String verifyDeliverableType = projectLawsInventoryEO.getVerifyDeliverableType();
if(StringUtils.isNotEmpty(verifyDeliverableType)){
String verifyDeliverableType_dictText = disposeShowDictItemValue(sysDictItems, verifyDeliverableType,cut,ProjectInventoryFieldEnum.VERIFY_DELIVERABLE_TYPE.getValue());
projectLawsInventoryEO.setVerifyDeliverableType_dictText(verifyDeliverableType_dictText);
}
//处理验证符合性确认-发起人角色
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
if(StringUtils.isNotEmpty(verifyInitiator)){
String verifyInitiator_dictText = disposeShowDictItemValue(sysDictItems, verifyInitiator,cut,ProjectInventoryFieldEnum.VERIFY_INITIATOR.getValue());
projectLawsInventoryEO.setVerifyInitiator_dictText(verifyInitiator_dictText);
}
//处理验证符合性确认-责任人角色
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
if(StringUtils.isNotEmpty(verifyDuty)){
String verifyDuty_dictText = disposeShowDictItemValue(sysDictItems, verifyDuty,cut,ProjectInventoryFieldEnum.VERIFY_DUTY.getValue());
projectLawsInventoryEO.setVerifyDuty_dictText(verifyDuty_dictText);
}
}
}
}
/**
* 处理展示数据字典值
* @param sysDictItems 所有的数据字典项
* @param fieldValues 字段值
* @param cut 中英文切换标识
* @param dicCode 数据字典code码
* @return
*/
public String disposeShowDictItemValue(List<SysDictItem> sysDictItems,String fieldValues,String cut,String dicCode){
String result = "";
List<SysDictItem> sysDictItemList = sysDictItems.stream().filter(e -> {
boolean flag = false;
if(StringUtils.equals(e.getDictCode(),dicCode)){
flag = true;
}
return flag;
}).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(sysDictItemList)){
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
result = sysDictItemList.stream().filter(e -> {
boolean flag = false;
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
for (String fieldValueStr : fieldValueStrList) {
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
flag = true;
break;
}
}
return flag;
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
result = sysDictItemList.stream().filter(e -> {
boolean flag = false;
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
for (String fieldValueStr : fieldValueStrList) {
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
flag = true;
break;
}
}
return flag;
}).map(SysDictItem::getEnName).collect(Collectors.joining(","));
}
}
return result;
}
@@ -1102,18 +1263,31 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
//消息内容
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for " + projectNameInfoEO.getProjectName()
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ ". The due date is" +inventoryAffirmDueDate+ " .Please check and address it in a timely manner.";
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
feishuMsgVo.setDueDate(inventoryAffirmDueDate);
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName();
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
@@ -1121,7 +1295,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap);
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
result = "发起清单确认";
@@ -1235,7 +1409,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
* @param projectLibraryId
*/
@Override
public void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap){
public void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType){
String idTemp = projectLibraryId;
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
@@ -1243,7 +1417,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(CollectionUtils.isNotEmpty(sysUsers)){
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
}
//飞书跳转链接
// //飞书跳转链接
String hrefFeishu = (String) sendMessageMap.get("hrefFeishu");
//消息内容
String contentInfo = (String) sendMessageMap.get("contentInfo");
@@ -1253,9 +1427,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(idTemp, idTemp);
//飞书消息
// //飞书消息
try {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu);
if (feishuMsgVo != null){
// 补充飞书跳转链接
feishuMsgVo.setUrl(hrefFeishu);
feishuMsgVo.setTitle(messageType.getName());
iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
} else {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, messageType.getName(), hrefFeishu);
}
} catch (IOException e) {
log.error("飞书消息推送失败");
}
@@ -1605,32 +1786,56 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
String msgContentEN = "";
List<String> userIdList = new ArrayList<>();
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " assigned the regulation task confirmation of " + projectNameInfoEO.getProjectName()
+ ".The due date is" +taskAffirmDueDate+ " Please check and address it in a timely manner.";
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task to you. Please check and and handle it in time.");
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
userIdList.add(dreUserId);
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ ".to you. the due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has returned the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
+ ".The due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has returned the task. Please check and and handle it in time.");
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
+ ".The due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has submitted the task. Please check and and handle it in time.");
}
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
feishuMsgVo.setTaskType("Regulation Task Confirmation");
feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(sysUser.getUsername());
feishuMsgVo.setDueDate(taskAffirmDueDate);
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink()
@@ -1643,7 +1848,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
sendMessage(msgContentEN,userIdList,id,sendMessageMap);
sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
@@ -5788,15 +5993,25 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//消息内容
String msgContentEN = "Please address the regulation list confirmation process for "+ projectNameInfoEO.getProjectName() +" ASAP. ";
//飞书跳转链接
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! Please address the regulation list confirmation process ASAP. ");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName();
+ projectLibraryId
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
@@ -5804,7 +6019,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
sendMessage(msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap);
sendMessage(msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
@@ -5835,9 +6050,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
//消息内容
String msgContentEN = "Please address the regulation task confirmation process for "+ projectNameInfoEO.getProjectName() +" ASAP. ";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接
@@ -5849,7 +6073,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
sendMessage(msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap);
sendMessage(msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
});
@@ -211,6 +211,16 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
*/
@Override
public void checkData(String id, String cut) {
//判断该条项目是否是自己创建,如果不是则不能删除
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<ProjectLibraryBase> projectLibraryBases = this.queryById(id);
if(!loginUser.getUsername().equals(projectLibraryBases.get(0).getCreateBy())){
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("该条项目非本人创建,不能删除");
}else{
throw new JeroBootException("This item is not created by myself and cannot be deleted");
}
}
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrapper = new QueryWrapper<>();
lawsInventoryQueryWrapper.eq("project_library_id",id);
List<ProjectLawsInventoryEO> lawsInventoryRecords = projectLawsInventoryEOMapper.selectList(lawsInventoryQueryWrapper);
@@ -1063,8 +1063,6 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
}
}
if (CollectionUtils.isNotEmpty(certificationEngineerNameList) && StringUtils.isNotBlank(certificationEngineerNameList.get(0))) {
certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList());
certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
@@ -1139,28 +1137,29 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
List<ProjectLibraryBase> baseDataList = projectLibraryBaseService.list(baseQueryWrapper.eq("id", projectId));
if (CollectionUtils.isNotEmpty(baseDataList)) {
String baseCertificationEngineer = baseDataList.get(0).getCertificationEngineer();
List<String> baseCertificationEngineerIdList = Arrays.asList(baseCertificationEngineer.split(","));
String certificationEngineerName;
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
userqueryWrapper.in("id ", baseCertificationEngineerIdList);
List<SysUser> userList = sysUserMapper.selectList(userqueryWrapper);
if (CollectionUtils.isNotEmpty(userList)) {
for (String baseUserId : baseCertificationEngineerIdList) {
// 判断是否有工程师
if (StringUtils.isNotEmpty(baseCertificationEngineer)){
List<String> baseCertificationEngineerIdList = Arrays.asList(baseCertificationEngineer.split(","));
String certificationEngineerName;
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
userqueryWrapper.in("id ", baseCertificationEngineerIdList);
List<SysUser> userList = sysUserMapper.selectList(userqueryWrapper);
if (CollectionUtils.isNotEmpty(userList)) {
for (String baseUserId : baseCertificationEngineerIdList) {
if (StringUtils.isNotEmpty(baseUserId)) {
certificationEngineerName = userList.stream().filter(e -> baseUserId.equals(e.getId()))
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
ProjectRelatedPersonnel relatedPersonnel =new ProjectRelatedPersonnel();
relatedPersonnel.setCertificationEngineer(baseUserId);
relatedPersonnel.setCertificationEngineerName(certificationEngineerName);
certificationEngineerList.add(relatedPersonnel);
if (StringUtils.isNotEmpty(baseUserId)) {
certificationEngineerName = userList.stream().filter(e -> baseUserId.equals(e.getId()))
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
ProjectRelatedPersonnel relatedPersonnel =new ProjectRelatedPersonnel();
relatedPersonnel.setCertificationEngineer(baseUserId);
relatedPersonnel.setCertificationEngineerName(certificationEngineerName);
certificationEngineerList.add(relatedPersonnel);
}
}
}
}
}
certificationEngineerList = certificationEngineerList.stream().distinct().collect(Collectors.toList());
return certificationEngineerList;
@@ -111,8 +111,9 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
}
}
}
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
targetMarket(projectLibraryBase, dictItemList, libraryBase);
Map<String,Object> mapList = new HashMap<>();
List<List<TimeNodeVO>> collect = new ArrayList<>();
if(ObjectUtils.isNotEmpty(startTime) && ObjectUtils.isNotEmpty(endTime)){
@@ -124,7 +125,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
if(collect.size() != 0){
index ++;
mapList.put("index",index);
mapList.put("projectName",libraryBase.getProjectName());
mapList.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket());
mapList.put("data",collect);
result.add(mapList);
}
@@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
@@ -260,22 +262,44 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
String id = UUID.randomUUID().toString().replace("-", "");
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
//给工程师下发消息
if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())){
//XXX has distributed the design compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
msgContentEN = currentUser.getUsername() + " has distributed the design compliance confirmation process of "
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
msgContentEN = currentUser.getUsername() + " has assigned the design compliance confirmation process of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " to you. Please check and handle it in time.";
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.PREHOMO_ISSUE_DRE_MSG.getValue())){
//XXX has distributed the Pre-Homo confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
msgContentEN = currentUser.getUsername() + " has assigned the Pre-Homo confirmation process of "
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " to you. Please check and handle it in time.";
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.VERIFY_ISSUE_DRE_MSG.getValue())){
//XXX has distributed the Verify compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
msgContentEN = currentUser.getUsername() + " has assigned the validation compliance confirmation process of "
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " to you. Please check and handle it in time.";
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
}
if(CollectionUtils.isNotEmpty(userIdList) && org.apache.commons.lang3.StringUtils.isNotEmpty(msgContentEN)){
//飞书跳转链接
@@ -295,7 +319,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap);
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
}
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*;
import com.jero.modules.project.mapper.*;
@@ -315,21 +317,42 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
String dreUserIds = jsonObject.getString("dreUserIds"); //dre用户id
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
if(StringUtils.equals(msgType,MsgTypeEnum.DESIGN_REMIND_MSG.getValue())){
//Please check and deal with the design compliance confirmation process of GB 7258 in XXX (project name) in time.
msgContentEN = "Please check and deal with the design compliance confirmation process of "
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ serialNumber + " in "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " in time.";
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
}else if(StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_REMIND_MSG.getValue())){
//Please check and deal with the Pre-Homo confirmation process of GB 7258 in XXX (project name) in time.
msgContentEN = "Please check and address the Pre-Homo confirmation process of "
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " in time.";
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
}else if(StringUtils.equals(msgType,MsgTypeEnum.VERIFY_REMIND_MSG.getValue())){
//Please check and deal with the Verify compliance confirmation process of GB 7258 in XXX (project name) in time.
msgContentEN = "Please check and address the Verify compliance confirmation process of "
msgContentEN = "Please check and address the validation compliance confirmation process of "
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " in time.";
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
}
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
@@ -337,12 +360,17 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName();
+ projectLibraryBase.getId()
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
@@ -350,7 +378,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap);
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
return new Result<>().success("提醒办理成功!");
}
@@ -615,10 +643,17 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) {
msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " to you. Please check and handle it in time.";
msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
+ " to you. Please check and handle it in time.";
}
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
//飞书跳转链接
@@ -626,11 +661,15 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId()
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName();
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
@@ -638,7 +677,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap);
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
@@ -5,6 +5,7 @@ import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.WebsocketConst;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.message.websocket.WebSocket;
import com.jero.modules.system.entity.SysAnnouncement;
import com.jero.modules.system.entity.SysUser;
@@ -53,7 +54,7 @@ public class SendMessageUtils {
SendMessageUtils.webSocket = webSocket;
}
public static void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap) {
public static void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType) {
String idTemp = projectLibraryId;
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
@@ -74,7 +75,14 @@ public class SendMessageUtils {
//飞书消息
try {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu);
if (feishuMsgVo != null){
// 补充飞书跳转链接
feishuMsgVo.setUrl(hrefFeishu);
feishuMsgVo.setTitle(messageType.getName());
iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
} else {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, messageType.getName(), hrefFeishu);
}
} catch (IOException e) {
logger.error("飞书消息推送失败");
}
+5 -2
View File
@@ -872,7 +872,8 @@ module.exports = {
yellowSchedule: 'Yellow: non conformance / to be tracked, with acceptable scheme and schedule',
greenRequirements: 'Green: confirm that it meets or meets the current requirements',
blueUndeterminedState: 'Blue: undetermined state',
authenticationMessage: 'Authentication Message',
authenticationMessage: 'Homo Parameter Task',
taskRegulationComplianceTask: 'Regulation Compliance Task',
accept: 'Accept',
notLaunch: 'Not start',
refuse: 'Reject',
@@ -959,7 +960,9 @@ module.exports = {
question: 'Question',
ConfirmQuestion: 'Confirm Question',
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',
or: 'or',
warningTime: 'Warning time',
RegulationMonthlyManagement: 'Regulation Monthly Management',
+4 -2
View File
@@ -963,8 +963,10 @@ module.exports = {
documentLibraryDetails: '文档库详情',
question: '催办',
ConfirmQuestion: '确认催办',
OnlyOrTaskconfirmationOut: '只有清单确认状态或任务确认状态为待确认时才可以进行催办',
disableInput: '禁止输入',
OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办',
disableInput:'禁止输入',
taskConfirmationDeadline:'任务确认截止时间',
taskConfirmationResponsiblePerson:'责任人任务确认',
or: '或',
warningTime: '预警时间',
RegulationMonthlyManagement: '法规月报管理',
+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-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-group>
<a-select v-else-if="tagType=='select'" allowClear :getPopupContainer = "getPopupContainer" :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" :value="item.value">
<a-select v-else-if="tagType=='select'" allowClear :getPopupContainer="getPopupContainer"
show-search
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 ">
{{ item.text || item.label }}
</span>
@@ -18,19 +25,19 @@
</template>
<script>
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
export default {
name: "JDictSelectTag",
name: 'JDictSelectTag',
props: {
dictCode: String,
placeholder: String,
triggerChange: Boolean,
disabled: Boolean,
db_field_name:String,
db_field_name: String,
value: [String, Number],
type: String,
getPopupContainer:{
getPopupContainer: {
type: Function,
default: (node) => node.parentNode
}
@@ -38,36 +45,36 @@
data() {
return {
dictOptions: [],
tagType:""
tagType: ''
}
},
watch:{
dictCode:{
immediate:true,
watch: {
dictCode: {
immediate: true,
handler() {
this.initDictData()
},
}
}
},
created() {
// console.log(this.dictCode);
if(!this.type || this.type==="list"){
this.tagType = "select"
}else{
if (!this.type || this.type === 'list') {
this.tagType = 'select'
} else {
this.tagType = this.type
}
//获取字典数据
// this.initDictData();
},
computed: {
getValueSting(){
getValueSting() {
// update-begin author:wangshuai date:20200601 for: 不显示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的文字 ------
},
dictOptionsValue: function () {
return this.dictOptions.filter(function (dictOption) {
dictOptionsValue: function() {
return this.dictOptions.filter(function(dictOption) {
return dictOption.value
})
}
@@ -75,8 +82,8 @@
methods: {
initDictData() {
//优先从缓存中读取字典配置
if(getDictItemsFromCache(this.dictCode)){
this.dictOptions = getDictItemsFromCache(this.dictCode);
if (getDictItemsFromCache(this.dictCode)) {
this.dictOptions = getDictItemsFromCache(this.dictCode)
return
}
@@ -84,34 +91,34 @@
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result;
this.dictOptions = res.result
}
})
},
handleInput(e) {
let val;
if(this.tagType=="radio"){
let val
if (this.tagType == 'radio') {
val = e.target.value
}else{
} else {
val = e
}
let content = ''
this.dictOptions.forEach(res=>{
if (res.value == e){
content = res.text || res.label
}
this.dictOptions.forEach(res => {
if (res.value == e) {
content = res.text || res.label
}
})
if(this.triggerChange){
this.$emit('change', val);
}else{
this.$emit('input', val);
this.$emit('changeQuery', content,this.db_field_name);
if (this.triggerChange) {
this.$emit('change', val)
} else {
this.$emit('input', val)
this.$emit('changeQuery', content, this.db_field_name)
}
},
setCurrentDictOptions(dictOptions){
setCurrentDictOptions(dictOptions) {
this.dictOptions = dictOptions
},
getCurrentDictOptions(){
getCurrentDictOptions() {
return this.dictOptions
}
}
@@ -124,6 +131,6 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
-o-text-overflow: ellipsis;
}
</style>
@@ -387,7 +387,7 @@
return str
},
handleOk() {
if (!this.isNullArray(this.queryParamsModel)) {
// if (!this.isNullArray(this.queryParamsModel)) {
let event = {
matchType: this.matchType,
params: this.removeEmptyObject(this.queryParamsModel)
@@ -397,9 +397,9 @@
this.visible = false
}
this.emitCallback(event)
} else {
this.$message.warn(this.$t('CannotQueryEmpty'))
}
// } else {
// this.$message.warn(this.$t('CannotQueryEmpty'))
// }
},
emitCallback(event = {}) {
let { params = [], matchType = this.matchType } = event
@@ -408,6 +408,9 @@
if (Array.isArray(param.val)) {
param.val = param.val.join(',')
}
if (param.type == "Personnel" && !param.val){
param.val = ' is null '
}
}
console.debug('---高级查询参数--->', { params, matchType })
this.$emit(this.callback, params, matchType)
@@ -614,7 +617,6 @@
item.val = values[item.popup['destFields']]
},
PersonnelSelectionChange(value, id,index){
console.log(index)
this.queryParamsModel[index].val = id
this.queryParamsModel[index].valueId = id
console.log(this.queryParamsModel)
@@ -120,6 +120,11 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
},
+3 -1
View File
@@ -30,6 +30,7 @@
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'file',
@@ -69,6 +70,7 @@
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
...mapGetters(['userInfo']),
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
@@ -190,7 +192,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -30,6 +30,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'file',
@@ -66,6 +67,7 @@ export default {
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
...mapGetters(['userInfo']),
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
@@ -187,7 +189,7 @@ export default {
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -35,10 +35,11 @@
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'file',
@@ -76,153 +77,154 @@
if (item.type === 'file') {
this.template.templateId = item.templateId
this.template.templateName = item.templateName
}
})
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
...mapGetters(['userInfo']),
download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
},
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
} else {
this.myfileList = []
}
},
beforeUpload(file) {
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
//TODO 客户要求不拦截文件
// if(file.type){
// if (thisFileType.indexOf(file.type) != -1) {
// this.fileTypeSatus = true;
// }else{
// this.fileTypeSatus = false;
// }
// }else{
// if(file.name.slice(file.name.length - 3 , file.name.length) == 'rar'){
// this.fileTypeSatus = true
// }else if(file.type == 'application/x-zip-compressed'){
// this.fileTypeSatus = true
// }else{
// this.fileTypeSatus = false;
// }
// }
this.$message.destroy()
},
remove() {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
if(info.fileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
return
}
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
},
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
} else {
this.myfileList = []
}
},
beforeUpload(file) {
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
//TODO 客户要求不拦截文件
// if(file.type){
// if (thisFileType.indexOf(file.type) != -1) {
// this.fileTypeSatus = true;
// }else{
// this.fileTypeSatus = false;
// }
// }else{
// if(file.name.slice(file.name.length - 3 , file.name.length) == 'rar'){
// this.fileTypeSatus = true
// }else if(file.type == 'application/x-zip-compressed'){
// this.fileTypeSatus = true
// }else{
// this.fileTypeSatus = false;
// }
// }
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
},
remove() {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
if (info.fileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
return
}
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
}
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功`);
this.$message.error(this.$t('UploadMost'))
return
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
}
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功`);
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
}
}
}
</script>
<style>
@@ -36,6 +36,7 @@
<script>
import { Base64 } from 'js-base64'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'viewFileModel',
@@ -64,13 +65,14 @@
}
},
methods: {
...mapGetters(['userInfo']),
pdfPreview(fileQuery) {
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -82,7 +84,7 @@
}
},
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) {
this.loading = true
@@ -8,10 +8,10 @@
</div>
</div>
<div class="monthlyReportRegulations-box-content">
<div class="monthlyReportRegulations-text" v-for="item in 6">
<div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList">
<div class="yuan"></div>
<div class="text">文档库中新增了新的标准 GB 7258 机动车文件</div>
<div class="time">2022-04-04 12:00:00</div>
<div class="text" :title="item.name">{{item.name}}</div>
<div class="time">{{item.time}}</div>
</div>
</div>
</div>
@@ -19,7 +19,37 @@
<script>
export default {
name: 'monthlyReportRegulations'
name: 'monthlyReportRegulations',
data() {
return {
monthlyReportRegulationsList: [
{
name: '蔚来汽车法规月报_202201_主页面 CN.docx',
time: '2022-01-01 13:24:36'
},
{
name: '蔚来汽车法规月报_202202_主页面 CN.docx',
time: '2022-02-01 15:50:06'
},
{
name: '蔚来汽车法规月报_202203_主页面 CN.docx',
time: '2022-03-01 13:56:20'
},
{
name: '蔚来汽车法规月报_202204_主页面 CN.docx',
time: '2022-04-01 16:24:45'
},
{
name: '蔚来汽车法规月报_202205_主页面 CN.docx',
time: '2022-06-01 17:24:06'
},
{
name: '蔚来汽车法规月报_202206_主页面 CN.docx',
time: '2022-06-01 17:24:06'
}
]
}
}
}
</script>
@@ -1,7 +1,7 @@
<template>
<div class="myList-box">
<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">
More
<img src="../../../assets/gengduo.png" alt="">
@@ -264,6 +264,7 @@
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import uploadFile from '@/components/uploadFile/file'
import { mapGetters } from 'vuex'
export default {
name: 'docIndex',
@@ -351,6 +352,7 @@
})
},
methods: {
...mapGetters(['userInfo']),
getTitle(callback) {
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getTitle, { id: _id }).then((res) => {
@@ -399,7 +401,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -411,7 +413,7 @@
}
},
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() {
this.visible = true
@@ -151,13 +151,17 @@
},
//带文件导出
handleFileExport() {
let query = {
...this.$refs.searchRef.queryParam,
id: this.idList.join(','),
flag: 'file'
if (this.idList.length > 0) {
let query = {
...this.$refs.searchRef.queryParam,
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() {
@@ -253,7 +257,7 @@
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -276,7 +280,7 @@
getAction(url, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -96,6 +96,7 @@
import Vue from 'vue'
import eventBUs from '../../../common/event'
import axios from 'axios'
import { mapGetters } from 'vuex'
export default {
name: 'ocr',
@@ -177,6 +178,7 @@
},
methods:{
...mapGetters(['userInfo']),
initWebSocket: function () {
let token = Vue.ls.get(ACCESS_TOKEN)
// console.log("------------WebSocket连接成功");
@@ -443,7 +445,7 @@
},
//文件详情跳转
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){
// this.fileVisible=val
@@ -5,44 +5,46 @@
<div class="subscribtion-search-header">
<!-- <search :url="url" :flag="'1'"></search>-->
<div class="table-page-search-wrapper">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<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>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParams.serialNumber"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParams.title"></a-input>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParams.title"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('status')">
<span>{{$t('status')}}</span>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('status')">
<span>{{$t('status')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParams.state"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'state'"/>
</div>
<j-dict-select-tag class="box-input" v-model="queryParams.state"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'state'"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px"
class="table-page-search-submitButtons">
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px"
class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<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-col>
</span>
</a-row>
</a-row>
</a-form>
</div>
</div>
</div>
@@ -2,11 +2,10 @@
<div class="dic-list">
<div class="dic-list-content">
<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-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>
<div class="form-btn">
@@ -215,9 +215,13 @@
:title="$t('viewFile')"
:width="500"
:visible="visible"
@ok="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"
class="fileText" :title="item.fileName" @click="fileClick(item)">{{ item.fileName }}</p>
</a-modal>
@@ -230,6 +234,7 @@
import libraryPush from '@/components/libraryPush/index'
import moment from 'moment'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'DocumentLibrary',
@@ -376,6 +381,7 @@
},
methods: {
...mapGetters(['userInfo']),
handleChange() {
},
@@ -677,7 +683,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -90,6 +90,7 @@
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'whole',
@@ -130,6 +131,7 @@
// }
},
methods: {
...mapGetters(['userInfo']),
checkedClick(item) {
if (item.checked) {
this.checkboxText = this.checkboxText.filter(res => {
@@ -151,7 +153,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix)
window.open(url, '_blank')
@@ -13,6 +13,7 @@
</a-select>
<a-input
:maxLength="100"
@keyup.enter.native="onSearch(selectValueTwo)"
v-model="selectValueTwo"
style="width: calc(100% - 128px)"
:placeholder="$t('pleaseEnter')+$t('searchContent')"
@@ -21,6 +22,7 @@
<a-input
v-model="selectValueTwo"
:maxLength="100"
@keyup.enter.native="wholeOnSearch(selectValueTwo)"
v-else-if="active === $t('whole')"
class="inputSearch"
:placeholder="$t('pleaseEnter')+$t('searchContent')"
@@ -32,6 +34,7 @@
</a-button>
<a-button class="textSearch"
v-if="active === $t('whole')"
@keyup.enter.native="wholeOnSearch(selectValueTwo)"
@click="wholeOnSearch(selectValueTwo)"
>{{$t('query')}}
</a-button>
@@ -31,11 +31,15 @@
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel">
<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"/>
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
: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>
</div>
</a-col>
@@ -47,11 +51,15 @@
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel">
<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"/>
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
: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>
</div>
</a-col>
@@ -195,7 +195,7 @@
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</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"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
@@ -212,13 +212,11 @@
<span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationRank">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="disabled"
@input="handleInput('attestationRank')"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
<a-form-model-item class="itemModel-multi" prop="attestationRank">
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
</a-form-model-item>
</div>
</a-col>
@@ -84,7 +84,7 @@
</a-row>
</a-form>
</div>
<div class="table-operator">
<div class="table-operator" style="margin-bottom: 16px">
<!-- 导入-->
<!-- <div class="operator-text"-->
<!-- style="float: left;font-size: 16px;font-weight: 400;color: #040B29;">-->
@@ -140,10 +140,10 @@
<div style="width: 100%">
<a-table
ref="table"
class="ant-table"
class="ant-table tableList"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 200px)'}"
:scroll="{x: '100%',y:'calc(100vh - 170px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -247,6 +247,7 @@
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'virtualListDetails',
@@ -320,8 +321,7 @@
align: 'center',
dataIndex: 'subtitle',
width: 180,
fixed: 'left',
scopedSlots: { customRender: 'titleName' }
ellipsis: true
},
{
title: this.$t('zoneOfApplication'),
@@ -630,6 +630,7 @@
}
},
methods: {
...mapGetters(['userInfo']),
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
@@ -789,7 +790,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -806,7 +807,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank')
@@ -818,7 +819,7 @@
}
},
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) {
this.loading = true
@@ -1007,4 +1008,7 @@
border-top: none;
}
.tableList .ant-table-thead > tr > th {
padding: 7px 16px !important;
}
</style>
@@ -139,11 +139,12 @@
<a-col :span="24" v-if="title == $t('addFeedback') || title == $t('edit')">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<!-- <span class="Required">*</span>-->
<span class="title-text-text"
:title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="fileId">
<!-- prop="fileId"-->
<a-form-model-item class="itemModel">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('fileId')">
{{ (formInline.fileId === 'null' || formInline.fileId === '' ||
@@ -16,7 +16,7 @@
<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 value="0">
{{$t('agree')}}
{{$t('accept')}}
</a-radio>
<a-radio value="1">
{{$t('disagree')}}
@@ -44,6 +44,7 @@
<a-col :span="24">
<div class="box-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>
</div>
<a-form-model-item class="itemModel" prop="approvalOpinion">
@@ -148,6 +149,7 @@
<a-col :span="24">
<div class="box-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>
</div>
<a-form-model-item class="itemModel" prop="approvalOpinion">
@@ -197,6 +199,11 @@
}
],
approvalOpinion: [
{
required: true,
message: this.$t('feedbackMessage') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -227,6 +234,7 @@
},
mounted() {
this.formInline.approvalOpinion = ''
this.formInline = { ...this.formInline }
this.$route.query.isDisplay = JSON.parse(this.$route.query.isDisplay)
if (this.queryBy && this.$route.query.TaskKey == 'fqrsh') {
this.formInline.reviewResult = this.queryBy.reviewResult || undefined
@@ -56,6 +56,7 @@
<script>
import { Base64 } from 'js-base64'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'standardContentList',
@@ -168,13 +169,14 @@
})
},
methods: {
...mapGetters(['userInfo']),
pdfPreview(fileQuery) {
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -191,7 +193,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank')
@@ -203,7 +205,7 @@
}
},
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) {
this.loading = true
@@ -126,7 +126,7 @@
if (this.$route.query.taskDefinitionKey == 'dreqr') {
this.titleName = this.$t('engineerReply')
} else {
this.titleName = this.$t('confirmationEngineeringInterfacePerson')
this.titleName = this.$t('taskConfirmationResponsiblePerson')
}
this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo()
@@ -195,17 +195,17 @@
this.$message.success(this.$t('OperationSuccessful'))
if (this.$route.query.taskDefinitionKey == 'zrrjsrw' || this.$route.query.taskDefinitionKey == 'zrrqr') {
if (value.flag == 0) {
if (this.queryProject.verifyDeliverableType) {
if (this.queryProject.verifyRemark) {
this.startProcessDesign(this.queryBy, 4)
}
if (this.queryProject.prehomoDeliverableType) {
if (this.queryProject.prehomoRemark) {
this.startProcessDesign(this.queryBy, 3)
}
if (this.queryProject.designDeliverableType) {
if (this.queryProject.designRemark) {
this.startProcessDesign(this.queryBy, 2)
}
if (!this.queryProject.verifyDeliverableType && !this.queryProject.prehomoDeliverableType &&
!this.queryProject.designDeliverableType) {
if (!this.queryProject.verifyRemark && !this.queryProject.prehomoRemark &&
!this.queryProject.designRemark) {
setTimeout(() => {
this.loading = false
window.close()
@@ -320,15 +320,18 @@
putAction(this.url.dreSubmit, query).then((res) => {
if (res.success) {
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 {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
@@ -347,10 +350,6 @@
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.edit()
// this.$router.push({
// path: '/ProjectDetails',
// query: this.$route.query
// })
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
@@ -366,7 +365,13 @@
if (res.success) {
setTimeout(() => {
this.loading = false
window.close()
this.$router.push({
path: '/ProjectDetails',
query: {
type:'103',
...this.$route.query
}
})
}, 1000)
}
})
@@ -2,9 +2,10 @@
<div class="doc-detail">
<div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title">
<!-- <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;"/>-->
<!-- </span>-->
<span style="line-height: 74px;display: inline-block;float: left">
<a-icon @click="backClick" type="left-circle" theme="filled"
style="margin-right: 8px;font-size: 30px;color: #21c9cc;"/>
</span>
<span>
{{this.title}}
</span>
@@ -26,7 +27,7 @@
</div>
<div style="padding: 67px 0 0 0;background: #ffffff;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')"
v-has="'projectLawsInventory:projectDetails'"
v-if="isTrue"
@@ -36,28 +37,58 @@
</div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')"
@click="textClick(1,$t('listOfRegulations'))">
<a-icon type="container"/>
<a-icon type="control"/>
{{$t('listOfRegulations')}}
</div>
<div class="Virtual-detail-left-text" :title="$t('taskList')"
v-has="'projectLawsInventory:taskList'"
@click="textClick(2,$t('taskList'))">
<a-icon type="container"/>
<a-icon type="safety"/>
{{$t('taskList')}}
</div>
<div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"
@click="textClick(3,$t('nonConformance'))">
<a-icon type="container"/>
<a-icon type="safety-certificate"/>
{{$t('nonConformance')}}
</div>
<div class="Virtual-detail-left-text" v-has="'projectLawsInventory:TaskParameterCollection'"
:title="$t('TaskParameterCollection')"
@click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="container"/>
<a-icon type="profile"/>
{{$t('TaskParameterCollection')}}
</div>
<a-icon @click="textIconClick" type="menu-fold" class="text-icon"/>
</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')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
@@ -100,11 +131,13 @@
},
data() {
return {
title: this.$t('projectDetails'),
title: '',
isDisplayNum: '',
textTitle: '',
isTrue: true,
loading: false,
isDisplay: true,
url: {
logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '',
@@ -115,7 +148,8 @@
}
},
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() {
this.getTaskId()
@@ -149,6 +183,9 @@
}
},
methods: {
textIconClick() {
this.isDisplay = !this.isDisplay
},
...mapGetters(['userInfo']),
textColor(name) {
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
@@ -261,6 +298,11 @@
text[i].classList.add('Virtual-detail-left-text-color')
}
}
},
backClick() {
this.$router.push({
path: '/projectLibrary'
})
}
}
}
@@ -305,11 +347,13 @@
.Virtual-detail-left {
width: 240px;
flex: 0 0 240px;
padding: 16px 24px;
box-sizing: border-box;
font-size: 16px;
line-height: 3;
float: left;
transition: all 0.2s;
.Virtual-detail-left-text {
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 {
border-left: 2px #eff1f3 solid;
width: calc(100% - 240px);
height: 100%;
float: left;
float: right;
overflow: auto;
transition: all 0.2s;
}
}
@@ -337,4 +399,22 @@
.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>
@@ -5,7 +5,8 @@
{{$t('basicInformationOfParameters')}}
</div>
<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')}}
</a-button>
</div>
@@ -92,7 +93,8 @@
{{$t('regulatoryCertificationTaskPlan')}}
</div>
<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')}}
</a-button>
</div>
@@ -139,6 +141,7 @@
import currentStatusOfTheProjectEcharts from './currentStatusOfTheProjectEcharts'
import deliverableStatusEchart from './deliverableStatusEchart'
import certificationProgressEchart from './certificationProgressEchart'
import { mapGetters } from 'vuex'
export default {
name: 'ProjectDetails',
@@ -171,6 +174,7 @@
this.getSetting()
},
methods: {
...mapGetters(['userInfo']),
getForm() {
getAction(this.url.queryById, { id: this.$route.query.id }).then((res) => {
if (res.success) {
@@ -46,6 +46,7 @@
<a-table
ref="table"
bordered
class="taskTable"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
@@ -197,7 +198,7 @@
scopedSlots: { customRender: 'CertificationProgress' }
},
{
title: this.$t('CurrentProjectStatusEvaluation'),
title: this.$t('CurrentStatus'),
align: 'center',
width: 150,
dataIndex: 'CurrentProjectStatusEvaluation',
@@ -406,7 +407,7 @@
},
CurrentProjectClick(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() {
this.getList()
@@ -603,4 +604,9 @@
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.taskTable .ant-empty-normal {
padding: 32px 0 !important;
margin: 0 !important;
}
</style>
@@ -10,7 +10,7 @@
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<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('yellowSchedule')}}<br/>
{{this.$t('greenRequirements')}}<br/>
@@ -47,7 +47,7 @@
</div>
</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="title-text">
<span class="title-text-text"
@@ -84,7 +84,7 @@
</div>
</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="title-text">
<span class="title-text-text"
@@ -99,7 +99,7 @@
</div>
</a-col>
<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"
v-if="item.roleCode == 1"
style="margin-top: 10px">
@@ -196,7 +196,7 @@
getData(val, title) {
this.visible = true
this.title = title
if (title == this.$t('CurrentProjectStatusEvaluation')) {
if (title == this.$t('CurrentStatus')) {
val.remark = val.projectStatusAssessRemark || ''
val.conditionAssessment = val.projectStatusAssess || ''
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>
</div>
<a-form-model-item class="itemModel">
<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"/>
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
: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>
</div>
</a-col>
@@ -61,11 +65,15 @@
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel">
<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"/>
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
: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>
</div>
</a-col>
@@ -142,7 +142,7 @@
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</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"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
@@ -158,13 +158,12 @@
<span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationRank">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
@input="handleInput('attestationRank')"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
<a-form-model-item class="itemModel-multi" prop="attestationRank">
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
</a-form-model-item>
</div>
</a-col>
@@ -1,8 +1,8 @@
<template>
<a-card :bordered="false">
<div class="header-text">
{{ $t('DocumentStandard') }}
</div>
<!-- <div class="header-text">-->
<!-- {{ $t('DocumentStandard') }}-->
<!-- </div>-->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
@@ -46,8 +46,10 @@
</a-row>
</a-form>
</div>
<div class="table-operator" style="overflow:hidden;">
<div style="float: left;margin-bottom: 10px;margin-left: 20px" v-if="isDisplay">
<div class="table-operator"
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('清单')">
<a-icon type="solution"/>
{{ $t('initiateListConfirmation') }}
@@ -124,7 +126,7 @@
{{ $t('roleSwitching') }}
</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">
<a-icon type="check-circle"/>
{{ $t('submit') }}
@@ -148,9 +150,10 @@
<div style="width: 100%">
<a-table
ref="table"
class="tableList"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 420px)'}"
:scroll="{x: '100%',y:'calc(100vh - 170px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -220,7 +223,7 @@
<transferList :url="url" @transferListForm="addModelList" ref="transferListRef"/>
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
<a-modal
:title="$t('ListConfirmationDeadline')"
:title="listTitle"
:width="500"
:visible="visible"
:confirm-loading="confirmLoading"
@@ -228,39 +231,41 @@
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-index">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('TaskCutOffTime')">{{ $t('TaskCutOffTime') }}</span>
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-index">
<span class="Required">*</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>
<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>
</a-col>
</a-row>
</a-form-model>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</a-modal>
<a-modal
:title="fileTitle"
@@ -391,6 +396,7 @@
data() {
return {
roleSwitchingList: [],
listTitle: '',
columnsAll: [
{
title: this.$t('standard'),
@@ -412,9 +418,8 @@
title: this.$t('subtitle'),
align: 'center',
dataIndex: 'subtitle',
width: 180,
fixed: 'left',
scopedSlots: { customRender: 'titleName' }
ellipsis: true,
width: 180
},
{
title: this.$t('listConfirmationStatus'),
@@ -1215,10 +1220,10 @@
this.getList()
},
searchReset() {
this.queryParam = {}
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.queryParam = {}
this.getList()
// this.getList()
},
addModelList() {
this.getList()
@@ -1253,8 +1258,8 @@
roleCode: roleCode
}
this.loading = true
this.getRoleByUserId()
getAction(this.url.list, query).then((res) => {
this.getRoleByUserId()
if (res.success) {
this.dataSource = res.result
this.loading = false
@@ -1269,6 +1274,7 @@
this.getList()
},
initiateListConfirmationcClick(name) {
this.listTitle = this.$t('ListConfirmationDeadline')
this.timeName = name
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
@@ -1276,11 +1282,16 @@
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
if ((this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') &&
this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
isTrue = true
if (this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
if (this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
isTrue = true
} else {
this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
isTrue = false
return
}
} else {
this.$message.warning(this.$t('dataConfirmation'))
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
isTrue = false
return
}
@@ -1298,6 +1309,7 @@
initiateTaskConfirmationClick(name) {
this.timeName = name
this.listTitle = this.$t('taskConfirmationDeadline')
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true
@@ -1305,40 +1317,49 @@
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
if ((this.dataSource[i].taskAffirmStatus == 'Not started' || this.dataSource[i].taskAffirmStatus == 'Rejected') &&
this.dataSource[i].engineeringInterfacePerson && this.dataSource[i].inventoryAffirmStatus == 'Accepted') {
if ((this.dataSource[i].verifyDueDate && this.dataSource[i].verifyDutyId
&& this.dataSource[i].verifyInitiatorId && this.dataSource[i].verifyDeliverableType) ||
(!this.dataSource[i].verifyDueDate && !this.dataSource[i].verifyDutyId
&& !this.dataSource[i].verifyInitiatorId && !this.dataSource[i].verifyDeliverableType)) {
isTrue = true
this.dataSource[i].inventoryAffirmStatus == 'Accepted') {
if (this.dataSource[i].engineeringInterfacePerson) {
if (this.dataSource[i].verifyRemark) {
if (this.dataSource[i].verifyDueDate && this.dataSource[i].verifyDutyId
&& this.dataSource[i].verifyInitiatorId) {
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 {
isTrue = false
this.$message.warning(this.$t('pleaseConformityVerification'))
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'))
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
return
}
} else {
isTrue = false
this.$message.warning(this.$t('taskDataConfirmation'))
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
return
}
}
@@ -1578,7 +1599,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -1596,7 +1617,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank')
@@ -1604,12 +1625,12 @@
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', name, { id: id })
downloadFile('/sys/common/downLoadFile', name, { id: id, userName: this.userInfo().username })
}
},
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) {
@@ -1885,4 +1906,8 @@
.itemModelComment .ant-form-item-control-wrapper {
width: 100% !important;
}
.tableList .ant-table-thead > tr > th {
padding: 7px 16px !important;
}
</style>
@@ -84,10 +84,11 @@
<a-col :span="24">
<div class="box-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>
</div>
<a-form-model-item class="itemModel" :prop="'lawEngineerName'">
<!-- :prop="'lawEngineerName'"-->
<a-form-model-item class="itemModel">
<PersonnelSelection
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
:personneQuery="formInline"
@@ -101,10 +102,11 @@
<a-col :span="24">
<div class="box-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>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePersonName'">
<!-- :prop="'engineeringInterfacePersonName'"-->
<a-form-model-item class="itemModel">
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:personneQuery="formInline"
@@ -118,10 +120,11 @@
<a-col :span="24">
<div class="box-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>
</div>
<a-form-model-item class="itemModel" :prop="'certificationEngineer'">
<!-- :prop="'certificationEngineer'"-->
<a-form-model-item class="itemModel">
<a-select allowClear
v-model="formInline.certificationEngineer"
:placeholder="$t('certifiedEngineer')+$t('areaOfResponsibility')">
@@ -325,6 +328,9 @@
editOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
if (!this.formInline.certificationEngineer){
this.formInline.certificationEngineer = ''
}
this.confirmLoading = true
putAction(this.url.edit, this.formInline).then((res) => {
if (res.success) {
@@ -35,6 +35,7 @@
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile, putAction } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'resultReportedUpload',
@@ -74,6 +75,7 @@
}
},
methods: {
...mapGetters(['userInfo']),
clickButtonToUploadFile(item) {
this.uploadQuery = item
this.myfileList = []
@@ -208,7 +210,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -216,7 +218,7 @@
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} 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 fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
@@ -480,7 +480,7 @@
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank')
@@ -492,7 +492,7 @@
}
},
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) {
this.loading = true
@@ -107,10 +107,10 @@
<a-icon type="plus"/>
{{$t('newlyAdded')}}
</div>
<div @click="handleDel" class="operator-text" v-has="'projectLibraryBase:deleteBatch'">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<!-- <div @click="handleDel" class="operator-text" v-has="'projectLibraryBase:deleteBatch'">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('BatchDelete')}}-->
<!-- </div>-->
</div>
<div>
<a-table
@@ -129,7 +129,10 @@
</span>
<span slot="operation" slot-scope="text,record">
<!-- <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>-->
</span>
</a-table>
@@ -153,6 +156,7 @@
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import addModel from '../components/addModel'
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { mapGetters } from 'vuex'
export default {
name: 'index',
@@ -240,13 +244,16 @@
scopedSlots: { customRender: 'operation' }
}
],
userInfoQuery: {},
queryParam: {}
}
},
mounted() {
this.getList()
this.userInfoQuery = this.userInfo()
},
methods: {
...mapGetters(['userInfo']),
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
@@ -45,11 +45,12 @@
<div class="process-content-right-xian"></div>
<div class="process-content-content" :style="val.left"
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">
<template slot="title">
<span>{{val.time.slice(0,11)}}</span>
</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-else-if="val.status == 2" src="../../../../assets/open.svg"
class="process-content-left"
@@ -109,10 +110,73 @@
this.handlingTime = moment(new Date()).format('YYYY-MM-DD')
},
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() {
let query = {
startTime: this.startTime,
endTime: this.endTime
startTime: this.startTime || this.getNewDate('before', 6),
endTime: this.endTime || this.getNewDate('after', 5)
}
this.loadingMain = true
getAction(this.url.timeline, query).then((res) => {
@@ -143,8 +207,8 @@
},
getTimelineList(time) {
let query = {
startTime: this.startTime,
endTime: this.endTime
startTime: this.startTime || this.getNewDate('before', 6),
endTime: this.endTime || this.getNewDate('after', 5)
}
getAction(this.url.timelineList, query).then((res) => {
if (res.success) {
@@ -355,7 +419,7 @@
}
.box-top-content-left {
width: 160px;
width: 140px;
float: left;
padding-top: 100px;
margin-right: 20px;
@@ -364,8 +428,8 @@
.box-top-content-left-text {
color: #191E29;
font-weight: bold;
font-size: 14px;
height: 104px;
font-size: 12px;
height: 84px;
letter-spacing: 0px;
text-align: left;
text-overflow: ellipsis;
@@ -374,7 +438,7 @@
}
.box-top-content-right {
width: calc(100% - 180px);
width: calc(100% - 160px);
float: left;
}
@@ -392,7 +456,7 @@
height: 36px;
color: #54565A;
font-weight: bold;
font-size: 14px;
font-size: 13px;
line-height: 36px;
letter-spacing: 0px;
text-align: center;
@@ -409,7 +473,7 @@
.process-content {
position: relative;
height: 104px;
height: 84px;
.process-content-content {
background: #fff;
@@ -430,15 +494,22 @@
}
.process-content-right-top {
font-size: 14px;
font-size: 12px;
color: #040B29;
max-width: 155px;
text-overflow: ellipsis;
white-space: nowrap;
width: 50px;
overflow: hidden;
position: absolute;
top: -8px;
top: -14px;
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%);
}
@@ -71,11 +71,11 @@
<div class="process-content-right-xian"></div>
<div class="process-content-content" :style="val.left"
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">
<template slot="title">
<span>{{val.time.slice(0,11)}}</span>
</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-else-if="val.status == 2" src="../../../assets/open.svg"
@@ -242,10 +242,73 @@
this.handlingTime = moment(new Date()).format('YYYY-MM-DD')
},
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() {
let query = {
startTime: this.startTime,
endTime: this.endTime,
startTime: this.startTime || this.getNewDate('before',6),
endTime: this.endTime || this.getNewDate('after',5),
...this.queryParam
}
this.loadingMain = true
@@ -277,8 +340,8 @@
},
getTimelineList(time) {
let query = {
startTime: this.startTime,
endTime: this.endTime,
startTime: this.startTime || this.getNewDate('before',6),
endTime: this.endTime || this.getNewDate('after',5),
...this.queryParam
}
getAction(this.url.timelineList, query).then((res) => {
@@ -506,7 +569,7 @@
}
.box-top-content-left {
width: 160px;
width: 140px;
float: left;
padding-top: 100px;
margin-right: 20px;
@@ -515,8 +578,8 @@
.box-top-content-left-text {
color: #191E29;
font-weight: bold;
font-size: 14px;
height: 104px;
font-size: 12px;
height: 84px;
letter-spacing: 0px;
text-align: left;
text-overflow: ellipsis;
@@ -525,7 +588,7 @@
}
.box-top-content-right {
width: calc(100% - 180px);
width: calc(100% - 160px);
float: left;
}
@@ -544,7 +607,7 @@
padding-left: 10px;
color: #54565A;
font-weight: bold;
font-size: 14px;
font-size: 13px;
line-height: 36px;
letter-spacing: 0px;
text-align: center;
@@ -561,7 +624,7 @@
.process-content {
position: relative;
height: 104px;
height: 84px;
.process-content-content {
background: #fff;
@@ -582,15 +645,22 @@
}
.process-content-right-top {
font-size: 14px;
font-size: 12px;
color: #040B29;
max-width: 155px;
text-overflow: ellipsis;
white-space: nowrap;
width: 50px;
overflow: hidden;
position: absolute;
top: -8px;
top: -14px;
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%);
}
@@ -104,7 +104,8 @@
'1': this.$t('SubscriptionNotification'),
'2': this.$t('warningInformation'),
'3': this.$t('ForwardPush'),
'4': this.$t('authenticationMessage')
'4': this.$t('authenticationMessage'),
'5': this.$t('taskRegulationComplianceTask')
},
columns: [
{