Merge remote-tracking branch 'origin/fix_bug_first_stage' into fix_bug_first_stage

This commit is contained in:
zer0Black
2022-07-02 12:10:04 +08:00
16 changed files with 458 additions and 133 deletions
@@ -8,3 +8,5 @@ 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`;
-- 2022年7月2日部署到正式环境
@@ -7,7 +7,7 @@ public enum ProjectRoleEnum {
STUDIO_ENGINEER("studio工程师","0","R&H Studio"),
REGULATI_ENGINEER("法规工程师","1","studio"),
HOMOLOGATION_ENGINEER("认证工程师","2","homo"),
REGULATI_AND_HOMOLOGATION_ENGINEER("法规工程师/认证工程师","4",""),
REGULATI_AND_HOMOLOGATION_ENGINEER("法规工程师/认证工程师","4","Regulatory Engineer/Certification Engineer"),
MANAGER("领导角色","11","R&H Manager"),
ADMIN("系统管理员","12","admin"),
;
@@ -443,9 +443,9 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
*/
@ApiOperation(value = "当前登录用户角色")
@RequestMapping(value = "/getRoleByUserId", method = RequestMethod.GET)
public Result<List<SysRole>> getRoleByUserId(String projectLibraryId) {
public Result<List<SysRole>> getRoleByUserId(String projectLibraryId,String cut) {
Result<List<SysRole>> result = new Result<>();
List<SysRole> list = projectLawsInventoryEOService.getRoleByUserId(projectLibraryId);
List<SysRole> list = projectLawsInventoryEOService.getRoleByUserId(projectLibraryId,cut);
if(list==null||list.size()<=0) {
result.error500("未找到角色信息");
}else {
@@ -107,4 +107,5 @@ public class ProjectTaskInventoryFeedbackEO implements Serializable {
@ApiModelProperty(value = "序号")
private String serialNumber;
}
@@ -1,30 +1,35 @@
package com.jero.modules.project.enums;
import com.jero.common.constant.enums.CutEnum;
import com.jero.modules.system.util.StringUtils;
/**
* 项目角色枚举类
*/
public enum ProjectRoleEnum {
STUDIO_ENGINEER("studio工程师","0"),
REGULATI_ENGINEER("法规工程师","1"),
HOMOLOGATION_ENGINEER("认证工程师","2"),
ENGINEERING_INTERFACE_PERSON("工程接口人","3"),
REGULATI_AND_HOMOLOGATION_ENGINEER("法规与认证工程师","4"),
DESIGNINITIATOR("设计符合性确认-发起人","5"),
DESIGNDUTY("设计符合性确认-责任人","6"),
PREHOMOINITIATOR("prehomo确认-发起人","7"),
PREHOMODUTY("prehomo确认-责任人","8"),
VERIFYINITIATOR("验证符合性确认-发起人","9"),
VERIFYDUTY("验证符合性确认-责任人","10"),
MANAGER("验证符合性确认-责任人","11"),
ADMIN("系统管理员","12"),
STUDIO_ENGINEER("studio工程师","0","R&H Studio"),
REGULATI_ENGINEER("法规工程师","1","Regulatory Engineer"),
HOMOLOGATION_ENGINEER("认证工程师","2","Certification Engineer"),
ENGINEERING_INTERFACE_PERSON("工程接口人","3","Engineering interface person"),
REGULATI_AND_HOMOLOGATION_ENGINEER("法规与认证工程师","4","Regulatory and certification engineer"),
DESIGNINITIATOR("设计符合性确认-发起人","5",""),
DESIGNDUTY("设计符合性确认-责任人","6",""),
PREHOMOINITIATOR("prehomo确认-发起人","7",""),
PREHOMODUTY("prehomo确认-责任人","8",""),
VERIFYINITIATOR("验证符合性确认-发起人","9",""),
VERIFYDUTY("验证符合性确认-责任人","10",""),
MANAGER("验证符合性确认-责任人","11",""),
ADMIN("系统管理员","12",""),
;
String name;
String value;
String enName;
private ProjectRoleEnum(String name, String value) {
private ProjectRoleEnum(String name, String value,String enName) {
this.name = name;
this.value = value;
this.enName = enName;
}
public String getName() {
@@ -43,11 +48,23 @@ public enum ProjectRoleEnum {
this.value = value;
}
public static String getTextByValue(String value) {
public String getEnName() {
return enName;
}
public void setEnName(String enName) {
this.enName = enName;
}
public static String getTextByValue(String value,String cut) {
ProjectRoleEnum[] values = values();
for (ProjectRoleEnum projectRoleEnum : values) {
if (projectRoleEnum.value.equals(value)) {
return projectRoleEnum.name;
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
return projectRoleEnum.name;
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
return projectRoleEnum.enName;
}
}
}
return null;
@@ -148,5 +148,5 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
*/
Result<?> expediting(JSONObject json);
List<SysRole> getRoleByUserId(String projectLibraryId);
List<SysRole> getRoleByUserId(String projectLibraryId,String cut);
}
@@ -3310,8 +3310,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
fileTemp.mkdirs();
//文件
exportFile(dataList,fileInfos);
String excelName = "";
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
excelName = "法规清单.xlsx";
}else{
excelName = "Regulation List.xlsx";
}
//excel
OutputStream excelOS = new FileOutputStream(path + File.separator + "法规清单.xlsx");
OutputStream excelOS = new FileOutputStream(path + File.separator + excelName);
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
@@ -3450,6 +3456,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isNotBlank(pullVerifyDeliverableType)){
projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType);
}
//清单确认状态
String inventoryAffirmStatus = projectLawsInventoryEOEn.getInventoryAffirmStatus();
if(StringUtils.isNotBlank(inventoryAffirmStatus)){
projectLawsInventoryEOEn.setInventoryAffirmStatusName(inventoryAffirmStatus);
}
//任务确认状态
String taskAffirmStatus = projectLawsInventoryEOEn.getTaskAffirmStatus();
if(StringUtils.isNotBlank(taskAffirmStatus)){
projectLawsInventoryEOEn.setTaskAffirmStatusName(taskAffirmStatus);
}
}
}
@@ -6276,7 +6293,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@Override
public List<SysRole> getRoleByUserId(String projectLibraryId) {
public List<SysRole> getRoleByUserId(String projectLibraryId,String cut) {
List<SysRole> sysRoles = new LinkedList<>();
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//项目详情中取R&H Studio和认证工程师
@@ -6288,7 +6305,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isNotBlank(studioEngineerName) && studioEngineerName.equals(loginUser.getUsername())){
SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue());
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getName());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getName());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getCode());
}
sysRoles.add(sysRole);
}
}
@@ -6308,7 +6330,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|| lawEngineerNameList.contains(loginUser.getUsername())){
SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue());
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getName());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getName());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getCode());
}
sysRoles.add(sysRole);
}
@@ -6318,14 +6344,28 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if (roleList.size() != 0) {
List<SysRole> manager = roleList.stream().filter(e -> com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode().equals(e.getRoleCode())).collect(Collectors.toList());
List<SysRole> admin = roleList.stream().filter(e -> com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode().equals(e.getRoleCode())).collect(Collectors.toList());
if (manager.size() != 0) {
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getValue());
sysRoles.addAll(manager);
}
if (admin.size() != 0) {
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getValue());
sysRoles.addAll(admin);
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
if (manager.size() != 0) {
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getValue());
sysRoles.addAll(manager);
}
if (admin.size() != 0) {
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getValue());
sysRoles.addAll(admin);
}
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if (manager.size() != 0) {
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
manager.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
sysRoles.addAll(manager);
}
if (admin.size() != 0) {
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
admin.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
sysRoles.addAll(admin);
}
}
}
return sysRoles;
}
@@ -845,23 +845,38 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
String engineeringInterfacePersonName = row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
String certificationEngineerName = row.getCell(3,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
//除了责任领域全有值->可以
if(StringUtils.isNotBlank(lawEngineerName) && StringUtils.isNotBlank(engineeringInterfacePersonName) && StringUtils.isNotBlank(certificationEngineerName)) {
projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
}else if(StringUtils.isBlank(lawEngineerName) && StringUtils.isBlank(engineeringInterfacePersonName) && StringUtils.isBlank(certificationEngineerName)) {
//除了责任领域,其他的可以全为空->可以
if(StringUtils.isBlank(lawEngineerName)){
projectRelatedPersonnel.setLawEngineerName("");
projectRelatedPersonnel.setEngineeringInterfacePersonName("");
projectRelatedPersonnel.setCertificationEngineerName("");
}else {//除了责任领域,备注,有一个为空都报错
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("法规工程师、工程接口人、认证工程师三个为必填字段.请检查第 "+ (i+1) + "");
}else{
throw new JeroBootException("Regulation Engineer,Engineering Interface and Homologation Engineer are required fields..Please check line" + (i+1));
}
}else{
projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
}
if(StringUtils.isBlank(engineeringInterfacePersonName)){
projectRelatedPersonnel.setEngineeringInterfacePersonName("");
}else{
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
}
if(StringUtils.isBlank(certificationEngineerName)){
projectRelatedPersonnel.setCertificationEngineerName("");
}else{
projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
}
// //除了责任领域全有值->可以
// if(StringUtils.isNotBlank(lawEngineerName) && StringUtils.isNotBlank(engineeringInterfacePersonName) && StringUtils.isNotBlank(certificationEngineerName)) {
// projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
// projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
// projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
// }else if(StringUtils.isBlank(lawEngineerName) && StringUtils.isBlank(engineeringInterfacePersonName) && StringUtils.isBlank(certificationEngineerName)) {
// //除了责任领域,其他的可以全为空->可以
// projectRelatedPersonnel.setLawEngineerName("");
// projectRelatedPersonnel.setEngineeringInterfacePersonName("");
// projectRelatedPersonnel.setCertificationEngineerName("");
// }else {//除了责任领域,备注,有一个为空都报错
// if(CutEnum.CN.getValue().equals(cut)){
// throw new JeroBootException("法规工程师、工程接口人、认证工程师三个为必填字段.请检查第 "+ (i+1) + "行");
// }else{
// throw new JeroBootException("Regulation Engineer,Engineering Interface and Homologation Engineer are required fields..Please check line" + (i+1));
// }
// }
//导入的备注为数字,被识别成小数点后一位
Cell remarkCell = row.getCell(4, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
@@ -1,27 +1,31 @@
package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.FeedbackHistory;
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO;
import com.jero.modules.project.entity.ProjectTaskInventoryFeedbackEO;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.FeedBackHistoryDataStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.mapper.FeedbackHistoryMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryDetailEOMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryFeedbackEOMapper;
import com.jero.modules.project.service.IProjectTaskInventoryFeedbackEOService;
import com.jero.modules.project.service.*;
import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -41,6 +45,24 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
@Autowired
private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper;
@Autowired
private ISysUserService sysUserService;
@Autowired
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
@Autowired
private IProjectLibraryBaseService projectLibraryBaseService;
@Autowired
private IProjectNameInfoEOService projectNameInfoEOService;
@Autowired
private IProjectYearNameInfoEOService projectYearNameInfoEOService;
@Value(value = "${jero.backUrl}")
private String backUrl;
/**
* 保存
*
@@ -95,6 +117,93 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
Date now = new Date();
projectTaskInventoryFeedbackEO.setUpdateTime(now);
saveOrUpdate(projectTaskInventoryFeedbackEO);
//获取这条数据的dre工程师,给他发送消息。
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
sysUserQueryWrapper.lambda().eq(SysUser::getUsername,projectTaskInventoryFeedbackEO.getCreateBy());
List<SysUser> sysUserList = this.sysUserService.list(sysUserQueryWrapper);
if (CollectionUtils.isNotEmpty(sysUserList)) {
List<String> userIdList = sysUserList.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
ProjectTaskInventoryDetailEO projectTaskInventoryDetailEO = this.projectTaskInventoryDetailEOMapper.selectOne(
new QueryWrapper<ProjectTaskInventoryDetailEO>().lambda().eq(ProjectTaskInventoryDetailEO::getId, projectTaskInventoryFeedbackEO.getProjectTaskInventoryId())
);
ProjectLawsInventoryEO projectLawsInventoryEO = this.projectLawsInventoryEOService.getOne(
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, projectTaskInventoryDetailEO.getProjectTaskInventoryId())
);
ProjectLibraryBase projectLibraryBaseInfo = this.projectLibraryBaseService.getOne(
new QueryWrapper<ProjectLibraryBase>().lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId())
);
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBaseInfo.getProjectNameId())
);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has reply to your engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
//消息内容
String msgContentEN = "";
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
}
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
+ projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
/**
@@ -193,6 +302,94 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
feedbackHistoryMapper.insert(feedbackHistory);
this.baseMapper.updateById(projectTaskInventoryFeedbackEO);
//获取责任人,给责任人发送消息
projectTaskInventoryFeedbackEO.getActiProcInstId();
QueryWrapper<ProjectTaskInventoryDetailEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getActiProcInstId,projectTaskInventoryFeedbackEO.getActiProcInstId());
queryWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getFlowType,projectTaskInventoryFeedbackEO.getFlowType());
queryWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getTaskDefinitionKey, DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey());
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOS = this.projectTaskInventoryDetailEOMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailEOS)){
List<String> userIdList = projectTaskInventoryDetailEOS.stream().map(ProjectTaskInventoryDetailEO::getUserId).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(userIdList)){
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
ProjectLawsInventoryEO projectLawsInventoryEO = this.projectLawsInventoryEOService.getOne(
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, projectTaskInventoryDetailEOS.get(0).getProjectTaskInventoryId())
);
ProjectLibraryBase projectLibraryBaseInfo = this.projectLibraryBaseService.getOne(
new QueryWrapper<ProjectLibraryBase>().lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId())
);
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBaseInfo.getProjectNameId())
);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has submitted the engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
//消息内容
String msgContentEN = "";
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + "for design compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for Pre-Homo confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
}
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
+ projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
}
/**
+4
View File
@@ -1068,4 +1068,8 @@ module.exports = {
newNiONumber: 'Number',
English: 'English',
requiredParametersEmpty:'Required parameters cannot be empty',
PleaseTaskConfirmationRejected:'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected',
theProjectContactEmpty:'The project contact person of cannot be empty',
pleaseSelectinitiatedOrRejected:'Please select the data whose list confirmation status is not initiated or rejected',
TheEngineerAndCertification:'The regulatory engineer and Certification Engineer of cannot be empty',
}
+4
View File
@@ -681,7 +681,11 @@ module.exports = {
listConfirmation: '清单确认',
ListConfirmationDeadline: '清单确认截止时间',
dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
pleaseSelectinitiatedOrRejected:'请选择清单确认状态为未发起或拒绝的数据',
TheEngineerAndCertification:'的法规工程师认证工程师不能为空',
taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空',
theProjectContactEmpty:'的工程接口人不能为空',
PleaseTaskConfirmationRejected:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据',
pleaseSelectPersonFirst: '请先选择人员',
onlyOnePersonCanBeSelected: '只能选择一个人员',
overrule: '驳回',
@@ -509,7 +509,6 @@
distributionEngineerList: this.distributionEngineerList
}
postAction(this.url.DetailEOAdd, query).then((res) => {
if (res.success) {
if (res.success) {
this.confirmLoading = false
this.getList()
@@ -519,7 +518,6 @@
this.confirmLoading = false
this.$message.warning(res.message)
}
}
})
},
feedbackData(url, Action) {
@@ -158,7 +158,7 @@
this.textLoading = this.$t('Submitting')
this.loading = true
if (!this.isFlag) {
res.flag = ''
res.flag = 0
}
this.completeTask(res, handlingTime)
})
@@ -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.verifyRemark) {
if (this.queryProject.verifyDeliverableType) {
this.startProcessDesign(this.queryBy, 4)
}
if (this.queryProject.prehomoRemark) {
if (this.queryProject.prehomoDeliverableType) {
this.startProcessDesign(this.queryBy, 3)
}
if (this.queryProject.designRemark) {
if (this.queryProject.designDeliverableType) {
this.startProcessDesign(this.queryBy, 2)
}
if (!this.queryProject.verifyRemark && !this.queryProject.prehomoRemark &&
!this.queryProject.designRemark) {
if (!this.queryProject.verifyDeliverableType && !this.queryProject.prehomoDeliverableType &&
!this.queryProject.designDeliverableType) {
setTimeout(() => {
this.loading = false
window.close()
@@ -321,6 +321,7 @@
DueDate: 'designDueDate',
remarks: 'designRemark',
projectName: this.$route.query.projectName,
targetMarket:this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.designTaskDetailId,
PersonChargeFeedback: val.designPersonChargeFeedback
@@ -345,6 +346,7 @@
DueDate: 'prehomoDueDate',
remarks: 'prehomoRemark',
projectName: this.$route.query.projectName,
targetMarket:this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.prehomoTaskDetailId,
PersonChargeFeedback: val.prehomoPersonChargeFeedback
@@ -369,6 +371,7 @@
DueDate: 'verifyDueDate',
remarks: 'verifyRemark',
projectName: this.$route.query.projectName,
targetMarket:this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.verifyTaskDetailId,
PersonChargeFeedback: val.verifyPersonChargeFeedback
@@ -46,7 +46,7 @@
</div>
<a-form-model-item class="itemModel" prop="subtitle">
<a-input class="box-input"
:disabled="formInline.roleCode == 0 ? false : true"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.subtitle"
:placeholder="$t('PleaseEnter')+$t('subtitle')"/>
</a-form-model-item>
@@ -60,7 +60,7 @@
</div>
<a-form-model-item class="itemModel" prop="applicableSupplement">
<a-input class="box-input"
:disabled="formInline.roleCode == 0 ? false : true"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.applicableSupplement"
:placeholder="$t('PleaseEnter')+$t('applicableSupplement')"/>
</a-form-model-item>
@@ -158,7 +158,8 @@
</div>
<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"
:disabled="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.homologationEngineerId == userInfoQuery.id) ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_type'"/>
@@ -168,13 +169,14 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<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"
:disabled="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.homologationEngineerId == userInfoQuery.id) ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/>
@@ -186,24 +188,24 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
@change="dutyTerritoryChange"
:disabled="formInline.roleCode == 0 ? false : true"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-if="formInline.roleCode == 0">
<a-col :span="12" v-if="formInline.roleCodeIndex == 0">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'regulationOwnerId'">
@@ -211,7 +213,7 @@
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
:disabled="formInline.roleCode == 0 ? false : true"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
@@ -225,11 +227,11 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="formInline.roleCode == 0">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'homologationEngineerId'">
@@ -237,7 +239,7 @@
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="formInline.roleCode == 0 ? false : true"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.homologationEngineerId">
<a-select-option v-for="(item, key) in certificationEngineerList"
:key="key"
@@ -253,7 +255,7 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
@@ -261,7 +263,7 @@
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="formInline.roleCode == 0 ? false : true"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key"
@@ -310,10 +312,14 @@
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<div class="header-text">
<div class="header-text" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId)">
&nbsp;{{$t('confirmationOfDesignConformity')}}
</div>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -325,7 +331,6 @@
tree-node-filter-prop="title"
v-model="formInline.designDeliverableType"
:maxTagCount="1"
:disabled="formInline.taskAffirmStatus != 'Not started' ? true : false"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
@@ -349,7 +354,6 @@
</div>
<a-form-model-item class="itemModel" prop="designDeliverableTemplate">
<a-button type="primary" class="button-text"
:disabled="formInline.taskAffirmStatus != 'Not started' ? true : false"
@click="clickButtonToUpload('designDeliverableTemplate')">
{{ (formInline.designDeliverableTemplate === 'null' || formInline.designDeliverableTemplate === '' ||
formInline.designDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
@@ -359,7 +363,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -368,7 +374,7 @@
</div>
<a-form-model-item class="itemModel" prop="designInitiatorId">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:disabled="designInitiatorDisabled"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
@@ -420,7 +426,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -439,7 +447,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId)">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
@@ -455,10 +465,14 @@
</div>
</a-col>
</a-row>
<div class="header-text">
<div class="header-text" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId)">
&nbsp;{{$t('PrehomoConfirmation')}}
</div>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -504,7 +518,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -513,7 +529,7 @@
</div>
<a-form-model-item class="itemModel" prop="prehomoInitiatorId">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:disabled="prehomoInitiatorIdDisabled"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
@@ -565,7 +581,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -584,7 +602,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId)">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
@@ -600,10 +620,14 @@
</div>
</a-col>
</a-row>
<div class="header-text">
<div class="header-text" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId)">
&nbsp;{{$t('verificationAndConformityconfirmation')}}
</div>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -648,7 +672,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -660,7 +686,7 @@
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="verifyInitiatorIdDisabled"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.verifyInitiatorId">
<a-select-option v-for="(item, key) in verifyInitiatorList"
:key="key"
@@ -709,7 +735,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId)">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -728,7 +756,9 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId)">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
@@ -760,6 +790,7 @@
import { getAction, postAction, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import moment from 'moment'
import { mapGetters } from 'vuex'
export default {
name: 'listEditModel',
@@ -842,13 +873,16 @@
prehomoDutyIdDisabled: false,
verifyDutyIdDisabled: false,
verifyInitiatorIdDisabled: false,
DeliverableTreeList: []
DeliverableTreeList: [],
userInfoQuery:{},
}
},
mounted() {
this.getDeliverableTree()
this.userInfoQuery = this.userInfo()
},
methods: {
...mapGetters(['userInfo']),
getDeliverableTree() {
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
if (res.success) {
@@ -1197,6 +1197,16 @@
}
},
edit(item) {
let roleCodeIndex
if (this.isDisplay) {
roleCodeIndex = 0
} else {
roleCodeIndex = 4
}
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
roleCodeIndex = 0
}
item.roleCodeIndex = roleCodeIndex
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
deleteLib(val) {
@@ -1290,13 +1300,13 @@
if (this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
this.detailedSuccessList.push(this.dataSource[i])
} else {
this.detailedWarningList.push(<div> {this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } </div>)
this.detailedWarningList.push( < div > { this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } < /div>)
// this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
// isTrue = false
// return
}
} else {
this.detailedWarningList.push(<div> {this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected') } </div>)
this.detailedWarningList.push( < div > {this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected')} < /div>)
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
// isTrue = false
// return
@@ -1307,12 +1317,12 @@
if (this.detailedSuccessList && this.detailedSuccessList.length > 0) {
this.visible = true
this.formInline = {}
}else{
} else {
let that = this
this.$warning({
content: (
< div >
{that.detailedWarningList}
{ that.detailedWarningList }
< /div>
)
})
@@ -1342,36 +1352,36 @@
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList.taskAffirmStatus == 'Rejected') &&
dataList[i].inventoryAffirmStatus == 'Accepted') {
if (dataList[i].engineeringInterfacePerson) {
if (dataList[i].verifyRemark) {
if (dataList[i].verifyDeliverableType) {
if (dataList[i].verifyDueDate && dataList[i].verifyDutyId
&& dataList[i].verifyInitiatorId) {
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } </div>)
continue;
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } < /div>)
continue
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
// return
}
}
if (dataList[i].prehomoRemark) {
if (dataList[i].prehomoDeliverableType) {
if (dataList[i].prehomoDueDate && dataList[i].prehomoDutyId
&& dataList[i].prehomoInitiatorId) {
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } </div>)
continue;
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } < /div>)
continue
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
// return
}
}
if (dataList[i].designRemark) {
if (dataList[i].designDeliverableType) {
if (dataList[i].designDueDate && dataList[i].designDutyId
&& dataList[i].designInitiatorId) {
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('pleaseDesignConformityConfirmation') } </div>)
continue;
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('pleaseDesignConformityConfirmation') } < /div>)
continue
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
// return
@@ -1379,27 +1389,27 @@
}
this.TaskSuccessList.push(dataList[i])
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('theProjectContactEmpty') } </div>)
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('theProjectContactEmpty') } < /div>)
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
// return
}
} else {
this.TaskWarningList.push(<div> {dataList[i].serialNumber + this.$t('PleaseTaskConfirmationRejected') } </div>)
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('PleaseTaskConfirmationRejected') } < /div>)
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
// return
}
}
if (this.TaskWarningList && this.TaskWarningList.length > 0) {
if (this.TaskSuccessList && this.TaskSuccessList.length > 0) {
this.visible = true
this.formInline = {}
}else{
} else {
let that = this
this.$warning({
content: (
< div >
{that.TaskWarningList}
{ that.TaskWarningList }
< /div>
)
})
@@ -1436,11 +1446,11 @@
this.confirmLoading = false
}
let that = this
if (this.detailedWarningList.length > 0){
if (this.detailedWarningList.length > 0) {
this.$warning({
content: (
< div >
{that.detailedWarningList}
{ that.detailedWarningList }
< /div>
)
})
@@ -1449,20 +1459,20 @@
this.detailedWarningList = []
})
} else {
let index = 0
for (let i = 0; i < this.TaskSuccessList.length; i++) {
index++
this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(this.TaskSuccessList[i]).forEach(res => {
if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) {
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“')
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '')
}
})
setTimeout(() => {
this.confirmLoading = true
this.startProcess(this.TaskSuccessList[i], index)
}, 500)
((i) => {
this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(this.TaskSuccessList[i]).forEach(res => {
if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) {
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“')
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '')
}
})
setTimeout(() => {
this.confirmLoading = true
this.startProcess(this.TaskSuccessList[i], (i + 1))
}, 500)
})(i)
}
}
}
@@ -1502,11 +1512,11 @@
this.confirmLoading = false
this.getList()
let that = this
if (this.TaskWarningList.length > 0){
if (this.TaskWarningList.length > 0) {
this.$warning({
content: (
< div >
{that.TaskWarningList}
{ that.TaskWarningList }
< /div>
)
})