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

This commit is contained in:
高嵩
2023-03-28 15:55:45 +08:00
16 changed files with 554 additions and 187 deletions
@@ -311,4 +311,12 @@ public interface ISysUserService extends IService<SysUser> {
* @return
*/
String getUserThirdIdByUserId(List<SysUser> sysUserList, String userId);
/**
* 根据用户id,获取用户名
* @param sysUserList
* @param userId
* @return
*/
String getUsernameByUserId(List<SysUser> sysUserList, String userId);
}
@@ -782,4 +782,19 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
return result;
}
@Override
public String getUsernameByUserId(List<SysUser> sysUserList, String userId) {
String result = "";
if(CollectionUtils.isNotEmpty(sysUserList)){
result = sysUserList.stream().filter(user -> {
boolean flag = false;
if (org.apache.commons.lang3.StringUtils.equals(userId, user.getId())) {
flag = true;
}
return flag;
}).map(SysUser::getUsername).collect(Collectors.joining(","));
}
return result;
}
}
@@ -248,7 +248,7 @@ public class HeadCustomEOServiceImpl extends ServiceImpl<HeadCustomEOMapper, Hea
headCustomVOOneList.add(headCustomVO);
}
if ("法规清单".equals(moduleFlag) || "虚拟清单详情".equals(moduleFlag) || "维护清单".equals(moduleFlag)) {
res = checkDefaultHead(headCustomVOOneList, cut, moduleFlag);
res = checkDefaultHead(headCustomVOOneList, cut, moduleFlag).stream().distinct().collect(Collectors.toList());
} else {
res = headCustomVOOneList;
}
@@ -220,8 +220,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
// 获取编辑前的数据
ProjectCertificationInventoryEO editBeforePciEo = this.queryById(projectCertificationInventoryEO.getId());
Map<String,Object> savePciLogParams = new HashMap<>();
List<ProjectCertificationInventoryEO> editBeforePciList = new ArrayList<>();
editBeforePciList.add(editBeforePciEo);
List<ProjectCertificationInventoryEO> editAfterPciList = new ArrayList<>();
editAfterPciList.add(projectCertificationInventoryEO);
savePciLogParams.put("editBeforePciList",editBeforePciList);
savePciLogParams.put("editAfterPciList",editAfterPciList);
savePciLogParams.put("operatorType",OperatorTypeEnum.CERTIFICATION_INVENTORY_EDIT.getValue());
this.saveProjectCertificationInventoryLog(savePciLogParams);
Date now = new Date();
Date now = new Date();
projectCertificationInventoryEO.setUpdateTime(now);
saveOrUpdate(projectCertificationInventoryEO);
//设置权限 先删后加
@@ -325,32 +336,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(CollectionUtils.isNotEmpty(saveDataList)){
this.saveBatch(saveDataList);
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO certificationInventoryEO : saveDataList) {
StringBuilder contentCnSb = new StringBuilder();
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" 添加了 ");
contentCnSb.append("\"").append(certificationInventoryEO.getCategory()).append("\"").append(" ");
contentCnSb.append("\"").append(certificationInventoryEO.getInspectionItem()).append("\"").append(" ");
contentCnSb.append("\"").append(certificationInventoryEO.getConfigItem()).append("\"").append(" ");
contentCnSb.append("\"").append(certificationInventoryEO.getSerialNumber()).append("\"").append(" ");
StringBuilder contentEnSb = new StringBuilder();
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" added ");
contentEnSb.append("\"").append(certificationInventoryEO.getCategory()).append("\"").append(" ");
contentEnSb.append("\"").append(certificationInventoryEO.getInspectionItem()).append("\"").append(" ");
contentEnSb.append("\"").append(certificationInventoryEO.getConfigItem()).append("\"").append(" ");
contentEnSb.append("\"").append(certificationInventoryEO.getSerialNumber()).append("\"");
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(certificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCnSb.toString());
projectCertificationInventoryLogEO.setContentEn(contentEnSb.toString());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
this.saveProjectCertificationInventoryLog(saveDataList,OperatorTypeEnum.CERTIFICATION_INVENTORY_ADD.getValue());
}
}catch (Exception ex){
throw new JeroBootException("添加失败!");
@@ -804,6 +790,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// projectCertificationInventoryEO.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_ISSUE.getValue());
this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList);
Date endTime = projectCertificationInventoryEOList.get(0).getEndTime();
@@ -1250,23 +1238,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("至少选择一条数据流程状态为'结果待审查'的数据!");
}
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue());
String contentCn = "\"" + currentUser.getUsername() + "\"" +"审核退回";
String contentEn = "\"" + currentUser.getUsername() + "\"" +" review and returned";
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_RETURNED.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_RETURNED.getValue());
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
@@ -1323,24 +1299,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("至少选择一条数据流程状态为'结果待审查'的数据!");
}
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
String contentCn = "\"" + currentUser.getUsername() + "\"" +"审核通过";
String contentEn = "\"" + currentUser.getUsername() + "\"" +" pass the audit";
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_THROUGH.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_THROUGH.getValue());
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
@@ -1449,36 +1412,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
// 数据更新为结果待审查
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue());
String contentCn = "";
String contentEn = "";
if (StringUtils.equals(projectCertificationInventoryEO.getValueType(), SysCategoryValueTypeEnum.FILE.getValue())) {
String fileName = "N/A";
if (StringUtils.isNotEmpty(projectCertificationInventoryEO.getDeliveryResult())) {
fileName = this.ossFileService.getFileInfos(projectCertificationInventoryEO.getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
}
contentCn = "\"" + currentUser.getUsername() + "\"" +"提交了附件 " + fileName;
contentEn = "\"" + currentUser.getUsername() + "\"" +" submitted attachment " + fileName;
}else {
String deliveryResult = (StringUtils.isNotEmpty(projectCertificationInventoryEO.getDeliveryResult()) ? projectCertificationInventoryEO.getDeliveryResult() : "N/A");
contentCn = "\"" + currentUser.getUsername() + "\"" +"提交了交付结果为" + deliveryResult;
contentEn = "\"" + currentUser.getUsername() + "\"" +" submitted a delivery result of " + deliveryResult;
}
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK.getValue());
List<SysUser> certificationEngineers = this.sysUserService.querySysUserListByIdList(certificationEngineerList);
@@ -1546,7 +1485,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("该项目中认证工程师为空,请先维护认证工程师!");
}
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue());
@@ -1556,20 +1494,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
String contentCn = "\"" + currentUser.getUsername() + "\"" +"接受了任务信息";
String contentEn = "\"" + currentUser.getUsername() + "\"" +" accepts the task information";
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_ACCEPT_TASK.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_ACCEPT_TASK.getValue());
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
@@ -1677,24 +1604,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("该项目中认证工程师为空,请先维护认证工程师!");
}
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue());
String contentCn = "\"" + currentUser.getUsername() + "\"" +"退回了任务信息";
String contentEn = "\"" + currentUser.getUsername() + "\"" +" returned the task information";
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_REJECT_TASK.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_REJECT_TASK.getValue());
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
@@ -1842,22 +1756,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
});
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
}
String contentCn = "\"" + currentUser.getUsername() + "\"" +"拒绝,流程退回至" + "\"" +studioEngineerUserInfo.get(0).getUsername()+"\"";
String contentEn = "\"" + currentUser.getUsername() + "\"" +" refuses, and the process returns to " + "\"" +studioEngineerUserInfo.get(0).getUsername()+"\"";
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_RETURNED_STUDIO_TASK.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_RETURNED_STUDIO_TASK.getValue());
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList);
String standName = (String) standNameAndItemName.get("standName");
@@ -1959,7 +1862,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
Map<String, List<ProjectCertificationInventoryEO>> certifycationInventoryListByDutyPersonMap = projectCertificationInventoryEOList.stream().collect(Collectors.groupingBy(ProjectCertificationInventoryEO::getDutyPerson));
try {
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = new ArrayList<>();
// 给责任人分配待办中心的任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
@@ -1970,20 +1872,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
String contentCn = "\"" + currentUser.getUsername() + "\"" +"发起了Pre-Homo流程";
String contentEn = "The \"" + currentUser.getUsername() + "\"" +" initiates the Pre-Homo process";
ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO();
projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId());
projectCertificationInventoryLogEO.setContentCn(contentCn);
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_INITIATING_TASK.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
}
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_INITIATING_TASK.getValue());
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey());
@@ -2100,6 +1991,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行流程重置!");
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String operatorType = json.getString("operatorType");
@@ -2110,6 +2002,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
@@ -2122,6 +2015,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList);
queryWrapper.lambda().ne(ProjectCertificationInventoryEO::getFlowStatus,CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
@@ -2144,7 +2038,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// 把交付结果、截止日期清空,流程状态 设置为 清单待发布
LambdaUpdateWrapper<ProjectCertificationInventoryEO> updateWrap = new LambdaUpdateWrapper<>();
updateWrap.set(ProjectCertificationInventoryEO::getDeliveryResult,null);
// 流程重置,清空截止日期, 撤回不清空。 对应禅道问题:67048
if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_RESET.getValue())){
updateWrap.set(ProjectCertificationInventoryEO::getEndTime,null);
@@ -2155,6 +2048,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
this.update(updateWrap);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,operatorType);
// 处理待办中心相关数据
// 更新该项目认证流程中,认证工程师的任务状态。
// 认证工程师接受任务节点
@@ -2176,7 +2071,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
this.processInfoDetailEOService.remove(detailRemoveWrap);
try {
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
if(CollectionUtils.isNotEmpty(certificationEngineerList)){
for (String certificationEngineerId : certificationEngineerIdList) {
String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineerList,certificationEngineerId);
@@ -3348,4 +3242,389 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
permission.setUpdateTime(now);
adds.add(permission);
}
/**
* 保存认证清单修改历史
* @param pciList
* @param operateType
*/
public void saveProjectCertificationInventoryLog(List<ProjectCertificationInventoryEO> pciList,String operateType){
if(CollectionUtils.isNotEmpty(pciList)){
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String projectLibraryId = pciList.get(0).getProjectLibraryId();
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
List<SysUser> studioEngineerUserInfo = this.sysUserService.querySysUserListByIdList(Arrays.asList(projectLibraryBase.getStudioEngineer().split(",")));
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
String certificationEngineerUserNames = certificationEngineerList.stream().map(SysUser::getUsername).distinct().collect(Collectors.joining(","));
List<ProjectCertificationInventoryLogEO> pciLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO pci : pciList) {
StringBuilder contentCnSb = new StringBuilder();
StringBuilder contentEnSb = new StringBuilder();
if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_ADD.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" 添加了 ");
contentCnSb.append("\"").append(pci.getCategory()).append("\"").append(" ");
contentCnSb.append("\"").append(pci.getInspectionItem()).append("\"").append(" ");
contentCnSb.append("\"").append(pci.getConfigItem()).append("\"").append(" ");
contentCnSb.append("\"").append(pci.getSerialNumber()).append("\"").append(" ");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" added ");
contentEnSb.append("\"").append(pci.getCategory()).append("\"").append(" ");
contentEnSb.append("\"").append(pci.getInspectionItem()).append("\"").append(" ");
contentEnSb.append("\"").append(pci.getConfigItem()).append("\"").append(" ");
contentEnSb.append("\"").append(pci.getSerialNumber()).append("\"");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_ISSUE.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("发布了认证清单");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" has published a certification list");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_RETURNED.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("审核退回");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" review and returned");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_THROUGH.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("审核通过");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" pass the audit");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK.getValue())){
if (StringUtils.equals(pci.getValueType(), SysCategoryValueTypeEnum.FILE.getValue())) {
String fileName = "N/A";
if (StringUtils.isNotEmpty(pci.getDeliveryResult())) {
fileName = this.ossFileService.getFileInfos(pci.getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
}
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("提交了附件 ").append(fileName);
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" submitted attachment ").append(fileName);
}else {
String deliveryResult = (StringUtils.isNotEmpty(pci.getDeliveryResult()) ? pci.getDeliveryResult() : "N/A");
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("提交了交付结果为").append(deliveryResult);
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" submitted a delivery result of ").append(deliveryResult);
}
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_ACCEPT_TASK.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("接受了任务信息");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" accepts the task information");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_REJECT_TASK.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("退回了任务信息");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" returned the task information");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_RETURNED_STUDIO_TASK.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("拒绝,流程退回至")
.append("\"").append(studioEngineerUserInfo.get(0).getUsername()).append("\"");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" refuses, and the process returns to ")
.append("\"").append(studioEngineerUserInfo.get(0).getUsername()).append("\"");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_INITIATING_TASK.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("发起了Pre-Homo流程");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" initiates the Pre-Homo process");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_RESET.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("操作了流程重置功能");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" has operated the process reset function");
} else if(StringUtils.equals(operateType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_WITHDRAW.getValue())){
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("").append("\"").append(certificationEngineerUserNames).append("\"撤回了流程");
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" withdrew the process from \"").append(certificationEngineerUserNames).append("\"");
}
ProjectCertificationInventoryLogEO pciLogEO = new ProjectCertificationInventoryLogEO();
pciLogEO.setProjectCertificationInventoryId(pci.getId());
pciLogEO.setContentCn(contentCnSb.toString());
pciLogEO.setContentEn(contentEnSb.toString());
pciLogEO.setOperatorType(operateType);
pciLogEOList.add(pciLogEO);
}
if(CollectionUtils.isNotEmpty(pciLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(pciLogEOList);
}
}
}
/**
* 保存认证清单修改历史(编辑、批量设置专用)
* @param params
*/
public void saveProjectCertificationInventoryLog(Map<String,Object> params){
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<ProjectCertificationInventoryEO> editBeforePciList = (List<ProjectCertificationInventoryEO>) params.get("editBeforePciList");
List<ProjectCertificationInventoryEO> editAfterPciList = (List<ProjectCertificationInventoryEO>) params.get("editAfterPciList");
String operatorType = (String) params.get("operatorType");
if(CollectionUtils.isNotEmpty(editBeforePciList) && CollectionUtils.isNotEmpty(editAfterPciList)){
List<SysCategory> categoryList = this.sysCategoryService.list();
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
List<String> beforeSdtUserIdList = editBeforePciList.stream().map(ProjectCertificationInventoryEO::getSdt).distinct().collect(Collectors.toList());
List<String> beforeDutyPersonUserIdList = editBeforePciList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
List<String> afterSdtUserIdList = editAfterPciList.stream().map(ProjectCertificationInventoryEO::getSdt).distinct().collect(Collectors.toList());
List<String> afterDutyPersonUserIdList = editAfterPciList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
List<String> userIdList = new ArrayList<>();
userIdList.addAll(beforeSdtUserIdList);
userIdList.addAll(beforeDutyPersonUserIdList);
userIdList.addAll(afterSdtUserIdList);
userIdList.addAll(afterDutyPersonUserIdList);
List<SysUser> userList = this.sysUserService.querySysUserListByIdList(userIdList);
List<String> beforeDeliverableTemplateIdList = editBeforePciList.stream().map(ProjectCertificationInventoryEO::getDeliverableTemplate).distinct().collect(Collectors.toList());
List<String> afterDeliverableTemplateIdList = editAfterPciList.stream().map(ProjectCertificationInventoryEO::getDeliverableTemplate).distinct().collect(Collectors.toList());
List<String> allDeliverableTemplateIdList = new ArrayList<>();
allDeliverableTemplateIdList.addAll(beforeDeliverableTemplateIdList);
allDeliverableTemplateIdList.addAll(afterDeliverableTemplateIdList);
List<OSSFile> allDeliverableTemplateList = this.ossFileService.getFileInfos(allDeliverableTemplateIdList.stream().distinct().collect(Collectors.joining(",")));
List<ProjectCertificationInventoryLogEO> pciLogEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO editAfterPciEo : editAfterPciList) {
List<ProjectCertificationInventoryEO> editBeforePciListTemp = editBeforePciList.stream().filter(editBeforePciEo -> {
boolean flag = false;
if (StringUtils.equals(editAfterPciEo.getId(), editBeforePciEo.getId())) {
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(editBeforePciListTemp)){
boolean savePciLogFlag = false;
ProjectCertificationInventoryEO editBeforePciEo = editBeforePciListTemp.get(0);
if(ObjectUtils.isNotEmpty(editBeforePciEo)){
StringBuilder contentCnSb = new StringBuilder();
contentCnSb.append("\"").append(currentUser.getUsername()).append("\"").append("");
StringBuilder contentEnSb = new StringBuilder();
contentEnSb.append("\"").append(currentUser.getUsername()).append("\"").append(" changes the ");
if(!StringUtils.equals(editBeforePciEo.getWvtaId(),editAfterPciEo.getWvtaId())){
contentCnSb.append("\"").append("WVTA ID").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getWvtaId()) ? editBeforePciEo.getWvtaId() : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getWvtaId()) ? editAfterPciEo.getWvtaId() : "")
.append(",");
contentEnSb.append("\"").append("WVTA ID").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getWvtaId()) ? editBeforePciEo.getWvtaId() : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getWvtaId()) ? editAfterPciEo.getWvtaId() : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getCategory(),editAfterPciEo.getCategory())){
contentCnSb.append("\"").append("类别").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getCategory()) ? editBeforePciEo.getCategory() : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getCategory()) ? editAfterPciEo.getCategory() : "")
.append(",");
contentEnSb.append("\"").append("Category").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getCategory()) ? editBeforePciEo.getCategory() : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getCategory()) ? editAfterPciEo.getCategory() : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getInspectionItem(),editAfterPciEo.getInspectionItem())){
contentCnSb.append("\"").append("检验项目").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getInspectionItem()) ? editBeforePciEo.getInspectionItem() : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getInspectionItem()) ? editAfterPciEo.getInspectionItem() : "")
.append(",");
contentEnSb.append("\"").append("Inspection Items").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getInspectionItem()) ? editBeforePciEo.getInspectionItem() : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getInspectionItem()) ? editAfterPciEo.getInspectionItem() : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getConfigItem(),editAfterPciEo.getConfigItem())){
contentCnSb.append("\"").append("配置项").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getConfigItem()) ? editBeforePciEo.getConfigItem() : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getConfigItem()) ? editAfterPciEo.getConfigItem() : "")
.append(",");
contentEnSb.append("\"").append("Configuration Item").append("\" ")
.append(StringUtils.isNotEmpty(editBeforePciEo.getConfigItem()) ? editBeforePciEo.getConfigItem() : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(editAfterPciEo.getConfigItem()) ? editAfterPciEo.getConfigItem() : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getDutyTerritory(),editAfterPciEo.getDutyTerritory())){
String beforeDutyTerritoryNameCn = this.sysDictItemService.disposeShowDictItemValue(
sysDictItems,
editBeforePciEo.getDutyTerritory(),
CutEnum.CN.getValue(),
ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()
);
String beforeDutyTerritoryNameEn = this.sysDictItemService.disposeShowDictItemValue(
sysDictItems,
editBeforePciEo.getDutyTerritory(),
CutEnum.EN.getValue(),
ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()
);
String afterDutyTerritoryNameCn = this.sysDictItemService.disposeShowDictItemValue(
sysDictItems,
editAfterPciEo.getDutyTerritory(),
CutEnum.CN.getValue(),
ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()
);
String afterDutyTerritoryNameEn = this.sysDictItemService.disposeShowDictItemValue(
sysDictItems,
editAfterPciEo.getDutyTerritory(),
CutEnum.EN.getValue(),
ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()
);
contentCnSb.append("\"").append("责任领域").append("\" ")
.append(StringUtils.isNotEmpty(beforeDutyTerritoryNameCn) ? beforeDutyTerritoryNameCn : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(afterDutyTerritoryNameCn) ? afterDutyTerritoryNameCn : "")
.append(",");
contentEnSb.append("\"").append("Responsible Field").append("\" ")
.append(StringUtils.isNotEmpty(beforeDutyTerritoryNameEn) ? beforeDutyTerritoryNameEn : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(afterDutyTerritoryNameEn) ? afterDutyTerritoryNameEn : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getDeliverableType(),editAfterPciEo.getDeliverableType())){
String beforeDeliverableTypeNameCn = this.getTreeName(CutEnum.CN.getValue(), categoryList, Arrays.asList(editBeforePciEo.getDeliverableType().split(",")));
String beforeDeliverableTypeNameEn = this.getTreeName(CutEnum.EN.getValue(), categoryList, Arrays.asList(editBeforePciEo.getDeliverableType().split(",")));
String afterDeliverableTypeNameCn = this.getTreeName(CutEnum.CN.getValue(), categoryList, Arrays.asList(editAfterPciEo.getDeliverableType().split(",")));
String afterDeliverableTypeNameEn = this.getTreeName(CutEnum.EN.getValue(), categoryList, Arrays.asList(editAfterPciEo.getDeliverableType().split(",")));
contentCnSb.append("\"").append("交付物类型").append("\" ")
.append(StringUtils.isNotEmpty(beforeDeliverableTypeNameCn) ? beforeDeliverableTypeNameCn : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(afterDeliverableTypeNameCn) ? afterDeliverableTypeNameCn : "")
.append(",");
contentEnSb.append("\"").append("Deliverable Type").append("\" ")
.append(StringUtils.isNotEmpty(beforeDeliverableTypeNameEn) ? beforeDeliverableTypeNameEn : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(afterDeliverableTypeNameEn) ? afterDeliverableTypeNameEn : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getDeliverableTemplate(),editAfterPciEo.getDeliverableTemplate())){
String[] beforeDeliverableTemplateArr = StringUtils.isNotEmpty(editBeforePciEo.getDeliverableTemplate()) ? editBeforePciEo.getDeliverableTemplate().split(",") : null;
String[] afterDeliverableTemplateArr = StringUtils.isNotEmpty(editAfterPciEo.getDeliverableTemplate()) ? editAfterPciEo.getDeliverableTemplate().split(",") : null;
String beforeDeliverableTemplateName = allDeliverableTemplateList.stream().filter(file -> {
boolean flag = false;
if(beforeDeliverableTemplateArr != null){
for (String beforeDeliverableTemplate : beforeDeliverableTemplateArr) {
if(StringUtils.equals(file.getId(),beforeDeliverableTemplate)){
flag = true;
}
}
}
return flag;
}).map(OSSFile::getFileName).collect(Collectors.joining(","));
String afterDeliverableTemplateName = allDeliverableTemplateList.stream().filter(file -> {
boolean flag = false;
if(afterDeliverableTemplateArr != null){
for (String afterDeliverableTemplate : afterDeliverableTemplateArr) {
if(StringUtils.equals(file.getId(),afterDeliverableTemplate)){
flag = true;
}
}
}
return flag;
}).map(OSSFile::getFileName).collect(Collectors.joining(","));
contentCnSb.append("\"").append("交付物模板").append("\" ")
.append(StringUtils.isNotEmpty(beforeDeliverableTemplateName) ? beforeDeliverableTemplateName : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(afterDeliverableTemplateName) ? afterDeliverableTemplateName : "")
.append(",");
contentEnSb.append("\"").append("Deliverable Template").append("\" ")
.append(StringUtils.isNotEmpty(beforeDeliverableTemplateName) ? beforeDeliverableTemplateName : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(afterDeliverableTemplateName) ? afterDeliverableTemplateName : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getSdt(),editAfterPciEo.getSdt())){
String beforeSdtUserName = this.sysUserService.getUsernameByUserId(userList,editBeforePciEo.getSdt());
String afterSdtUserName = this.sysUserService.getUsernameByUserId(userList,editAfterPciEo.getSdt());
contentCnSb.append("\"").append("工程接口人").append("\" ")
.append(StringUtils.isNotEmpty(beforeSdtUserName) ? beforeSdtUserName : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(afterSdtUserName) ? afterSdtUserName : "")
.append(",");
contentEnSb.append("\"").append("Eng. Interface").append("\" ")
.append(StringUtils.isNotEmpty(beforeSdtUserName) ? beforeSdtUserName : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(afterSdtUserName) ? afterSdtUserName : "null")
.append(",");
savePciLogFlag = true;
}
String beforeEndTimeStr = "";
if(editBeforePciEo.getEndTime() != null){
beforeEndTimeStr = DateUtils.formatDate(editBeforePciEo.getEndTime());
}
String afterEndTimeStr = "";
if(editAfterPciEo.getEndTime() != null){
afterEndTimeStr = DateUtils.formatDate(editAfterPciEo.getEndTime());
}
if(!StringUtils.equals(beforeEndTimeStr,afterEndTimeStr)){
contentCnSb.append("\"").append("截止日期").append("\" ")
.append(StringUtils.isNotEmpty(beforeEndTimeStr) ? beforeEndTimeStr : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(afterEndTimeStr) ? afterEndTimeStr : "")
.append(",");
contentEnSb.append("\"").append("Due Date").append("\" ")
.append(StringUtils.isNotEmpty(beforeEndTimeStr) ? beforeEndTimeStr : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(afterEndTimeStr) ? afterEndTimeStr : "null")
.append(",");
savePciLogFlag = true;
}
if(!StringUtils.equals(editBeforePciEo.getDutyPerson(),editAfterPciEo.getDutyPerson())){
String beforeDutyPersonUserName = this.sysUserService.getUsernameByUserId(userList,editBeforePciEo.getDutyPerson());
String afterDutyPersonUserName = this.sysUserService.getUsernameByUserId(userList,editAfterPciEo.getDutyPerson());
contentCnSb.append("\"").append("责任人").append("\" ")
.append(StringUtils.isNotEmpty(beforeDutyPersonUserName) ? beforeDutyPersonUserName : "")
.append(" 修改为 ")
.append(StringUtils.isNotEmpty(afterDutyPersonUserName) ? afterDutyPersonUserName : "")
.append(",");
contentEnSb.append("\"").append("Assignee").append("\" ")
.append(StringUtils.isNotEmpty(beforeDutyPersonUserName) ? beforeDutyPersonUserName : "null")
.append(" to ")
.append(StringUtils.isNotEmpty(afterDutyPersonUserName) ? afterDutyPersonUserName : "null")
.append(",");
savePciLogFlag = true;
}
if(savePciLogFlag){
ProjectCertificationInventoryLogEO pciLogEO = new ProjectCertificationInventoryLogEO();
pciLogEO.setProjectCertificationInventoryId(editAfterPciEo.getId());
pciLogEO.setContentCn(contentCnSb.toString().substring(0,contentCnSb.toString().length()-1));
pciLogEO.setContentEn(contentEnSb.toString().substring(0,contentEnSb.toString().length()-1));
pciLogEO.setOperatorType(operatorType);
pciLogEOList.add(pciLogEO);
}
}
}
}
if(CollectionUtils.isNotEmpty(pciLogEOList)){
this.projectCertificationInventoryLogEOService.insertBatch(pciLogEOList);
}
}
}
}
+1 -1
View File
@@ -619,7 +619,7 @@ module.exports = {
Deliverables: 'Deliverables',
personLiable: 'Assignee',
PrehomoConfirmation: 'Pre-Homo Confirmation',
verificationAndConformityconfirmation: 'Validation Compliance Check ',
verificationAndConformityconfirmation: 'Validation Compliance Check',
StandardImplementationDate: 'New Type Execution Date',
regulatoryEngineer: 'Regulation Engineer',
certifiedEngineer: 'Homo Engineer',
+2 -2
View File
@@ -1819,8 +1819,8 @@ module.exports = {
pleaseFillInTheInformationTaskProcess:'请填写工程接口人和责任人信息后再发起任务流程',
complianceReporting:'合规报告',
youCanOnlySelectStatusClearSubmit:'只能选择流程状态为清单待提交的数据',
note:':附件包括测试项目清单测试报告测试标准或技术规范',
format:'支持doc/docx/pdf格式,大小50M以内',
note:':附件包括测试项目清单测试报告测试标准或技术规范',
format:'支持doc/docx/pdf格式大小50M以内',
cantTransferToYourself:"不能转办给自己",
noteone:':支持CSV格式大小20M以内数量1-20个',
notecsv:':支持CSV格式大小20M以内',
+11 -4
View File
@@ -67,7 +67,8 @@
departId: '',
defaultExpandedKeys: [],
submitLoading: false,
visibleTree: false
visibleTree: false,
userName: []
}
},
mounted() {
@@ -110,7 +111,7 @@
}
if (this.userIds && this.userIds.length > 0) {
this.submitLoading = true
this.$emit('SelectedByForm', this.userIds.join(','))
this.$emit('SelectedByForm', this.userIds.join(','),this.userName.join(','))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
@@ -142,7 +143,7 @@
postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId,
json: gData,
flag:'1'
flag: '1'
}).then((res) => {
this.confirmLoading = false
if (res.success) {
@@ -155,8 +156,14 @@
}
})
},
checkChange(e) {
checkChange(e, name) {
this.userName = []
this.userIds = e
if (name.checkedNodes && name.checkedNodes.length > 0) {
name.checkedNodes.forEach(res => {
this.userName.push(res.data.props.dataRef.title)
})
}
}
}
}
@@ -243,6 +243,7 @@ export default {
}
this.record=record
this.visible = true
this.confirmLoading = false
this.formInline = {}
this.formInline.dataList = [{}]
this.$nextTick(() => {
@@ -447,7 +447,7 @@ export default {
this.$refs.upgradecompletionRef.addModel(record,flag)
},
// 查看
detailclick(){
detailclick(record){
},
// 维护
@@ -23,6 +23,7 @@
:disabled="disabled"
v-model="formInline.zsl"
:title='formInline.zsl'
:max-length="50"
:placeholder="$t('PleaseSelect')"></a-input>
</a-form-model-item>
</div>
@@ -145,6 +146,7 @@ export default {
this.formInline.dateofproduction=[]
this.formInline.dateofproduction.push(res.result.scrqks)
this.formInline.dateofproduction.push(res.result.scrqjs)
this.formInline.id = res.result.vinList
this.$forceUpdate()
}
@@ -57,7 +57,7 @@
<span slot="upgradepackagesize" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbdx" :title='record.sjbdx' :max-length="50"></a-input>
</span>
<span slot="differentialupgradeornot" slot-scope="text,record">
<span slot="differentialupgradeornot" slot-scope="text,record" :max-length="50">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sfcfsj" :title='record.sfcfsj'></a-input>
</span>
<!-- 操作列-->
@@ -41,7 +41,7 @@
</div>
<div class="title-text-add-input">
<!-- <span class="title-text-text">中文</span> -->
<a-input class="box-input" v-model="form.babh" :title='form.babh' :placeholder="$t('pleaseEnter')" disabled style="width:93%"></a-input>
<a-input class="box-input" v-model="form.babh" :title='form.babh' :placeholder="$t('pleaseEnter')" disabled style="width:93%" :max-length="50"></a-input>
</div>
</div>
</a-col>
@@ -52,7 +52,7 @@
</div>
<div class="title-text-add-input">
<!-- <span class="title-text-text">中文</span> -->
<a-input class="box-input" v-model="form.qymc" :title='form.qymc' :placeholder="$t('pleaseEnter')" disabled style="width:93%"></a-input>
<a-input class="box-input" v-model="form.qymc" :title='form.qymc' :placeholder="$t('pleaseEnter')" disabled style="width:93%" :max-length="50"></a-input>
</div>
</div>
</a-col>
@@ -77,7 +77,7 @@
<span class="title-text-text" :title="$t('producttrademark')">{{$t('producttrademark')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpsb' v-model="form.cpsb"></a-input>
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpsb' v-model="form.cpsb" :max-length="50"></a-input>
</a-form-model-item>
</div>
@@ -88,7 +88,7 @@
<span class="title-text-text" :title="$t('productname')">{{$t('productname')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpmc' v-model="form.cpmc"></a-input>
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpmc' v-model="form.cpmc" :max-length="50"></a-input>
</a-form-model-item>
</div>
@@ -99,7 +99,7 @@
<span class="title-text-text" :title="$t('productModel')">{{$t('productModel')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpxh' v-model="form.cpxh"></a-input>
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpxh' v-model="form.cpxh" :max-length="50"></a-input>
</a-form-model-item>
</div>
@@ -197,7 +197,15 @@ import ImportFile from '@/components/ImportFileData/index'
}
getAction('/ota/otaBaSjSjmbcx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
if(res.code == 200){
this.form=res.result ==null?{}:res.result
if(res.result==null){
this.form=res.result
this.form.cxmb=undefined
this.form.bapc=undefined
this.form.dllx1=undefined
this.form.dllx2=undefined
}else{
this.form=res.result
}
}
})
@@ -11,6 +11,7 @@
<a-form-model-item class="itemModel" prop="sjbbhcs" >
<a-textarea
:placeholder="$t('controlsystem')"
:max-length="500"
v-model.trim="queryParam.sjbbhcs" :rows="4"/>
</a-form-model-item>
</div>
@@ -10,14 +10,14 @@
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" ref="ruleForm">
<a-form-model :model="formInline" :rules="rules" class="formAdd" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('directoryName')">{{$t('directoryName')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="directoryName">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.directoryName"
@@ -30,7 +30,7 @@
<div class="title-text">
<span class="title-text-text" :title="$t('batch')">{{$t('batch')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="lot">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.lot"
@@ -77,7 +77,7 @@
<div class="title-text">
<span class="title-text-text" :title="$t('testReportLocation')">{{$t('testReportLocation')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="detectionReportLocation">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.detectionReportLocation"
@@ -93,7 +93,7 @@
<span class="title-text-text"
:title="$t('explain')">{{$t('explain')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="explainInfo">
<a-textarea
style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('explain')"
@@ -127,6 +127,36 @@
return {
visible: false,
formInline: {},
rules:{
directoryName: [
{
max: 100,
message: this.$t('directoryName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
lot: [
{
max: 100,
message: this.$t('batch') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
detectionReportLocation:[
{
max: 100,
message: this.$t('testReportLocation') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
explainInfo:[
{
max: 300,
message: this.$t('explain') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
},
confirmLoading: false,
disabled: false,
url: {
@@ -142,47 +172,55 @@
add() {
this.visible = true
this.formInline = {}
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
edit(val) {
this.visible = true
this.$nextTick(() => {
this.formInline = val
this.$refs.ruleForm.clearValidate()
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
if (!this.formInline.directoryName && !this.formInline.lot && !this.formInline.directoryFile &&
!this.formInline.experimentFile && !this.formInline.detectionReportLocation && !this.formInline.explainInfo) {
this.$message.warning(this.$t('dataCannotEmpty'))
} else {
let Action
let url = ''
if (this.formInline.id) {
url = this.url.edit
Action = putAction
} else {
url = this.url.add
Action = postAction
}
let query = {
projectLibraryId: this.$route.query.id,
...this.formInline
}
this.confirmLoading = true
Action(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('certificationDirectoryList')
} else {
this.confirmLoading = false
this.$message.warning(res.message)
}
})
}
this.$refs.ruleForm.validate(valid => {
if (valid){
if (!this.formInline.directoryName && !this.formInline.lot && !this.formInline.directoryFile &&
!this.formInline.experimentFile && !this.formInline.detectionReportLocation && !this.formInline.explainInfo) {
this.$message.warning(this.$t('dataCannotEmpty'))
} else {
let Action
let url = ''
if (this.formInline.id) {
url = this.url.edit
Action = putAction
} else {
url = this.url.add
Action = postAction
}
let query = {
projectLibraryId: this.$route.query.id,
...this.formInline
}
this.confirmLoading = true
Action(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('certificationDirectoryList')
} else {
this.confirmLoading = false
this.$message.warning(res.message)
}
})
}
}
})
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
@@ -1305,7 +1305,7 @@
actiProcInstId: row.verifyPId,
projectTaskInventoryId: row.id,
projectLibraryId: row.projectLibraryId,
TaskKey: row.taskDefinitionKey,
TaskKey: TaskKey,
flowType: 4,
isDisplay: false,
Sponsor: 'regulationOwnerName',
@@ -49,6 +49,9 @@
<a-radio value="Transfer" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'zrrqr'">
{{$t('turnToDo')}}
</a-radio>
<span>
{{this.formInline.dezrrSubmitUserName}}
</span>
</a-radio-group>
</a-form-model-item>
</a-col>
@@ -184,16 +187,21 @@
} else {
this.$refs.SelectedByRef.visible = false
this.formInline.secondChargePersonUserId = ''
this.formInline.dezrrSubmitUserName = ''
this.formInline.dezrrSubmitUserId = ''
}
},
//转办接口
SelectedByForm(userIds) {
SelectedByForm(userIds, name) {
if (this.query.TaskKey == 'zrrtjjfw') {
this.formInline.dezrrSubmitUserId = userIds
} else {
this.formInline.secondChargePersonUserId = userIds
}
this.formInline.dezrrSubmitUserName = name
this.formInline = { ...this.formInline }
this.$refs.SelectedByRef.visible = false
this.$refs.SelectedByRef.submitLoading = false
},
submitNoRule(callBack) {
callBack(this.formInline)