Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhaomeijing
2022-06-15 18:16:14 +08:00
28 changed files with 897 additions and 463 deletions
@@ -45,4 +45,8 @@ ALTER TABLE `laws_weilai`.`params_collect_manifest_history`
CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`; CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`;
ALTER TABLE `laws_weilai`.`params_report_detail` ALTER TABLE `laws_weilai`.`params_report_detail`
CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`; CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`;
---2022-06-15
ALTER TABLE `laws_weilai`.`sys_user_role`
MODIFY COLUMN `role_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色id' AFTER `user_id`;
@@ -15,7 +15,7 @@ import java.util.List;
* @Date: Created in 10:56 2022/6/11 * @Date: Created in 10:56 2022/6/11
*/ */
public enum CollectManifestRoleIdEnum { public enum CollectManifestRoleIdEnum {
STUDIO_ID("R&H Studio","R&H Studio","studio","1534019911296118786",1), // STUDIO_ID("R&H Studio","R&H Studio","studio","1534019911296118786",1),
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2), ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3); MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3);
@@ -37,7 +37,9 @@ import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.ocr.util.LineHumpUtil; import com.jero.modules.ocr.util.LineHumpUtil;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectRelatedPersonnel; import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.service.IProjectRelatedPersonnelService; import com.jero.modules.project.service.IProjectRelatedPersonnelService;
import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysAnnouncement;
import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysDictItem;
@@ -109,6 +111,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
private IReportCertCategoryParamsInfoEOService reportCertCategoryParamsInfoEOService; private IReportCertCategoryParamsInfoEOService reportCertCategoryParamsInfoEOService;
@Autowired @Autowired
private ISysUserRoleService sysUserRoleService; private ISysUserRoleService sysUserRoleService;
@Autowired
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
@@ -804,15 +808,23 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
.distinct() .distinct()
.collect(Collectors.toList()); .collect(Collectors.toList());
// 查询当前登录用户角色 是否包含管理员/领导/studio // 查询当前登录用户角色 是否包含管理员/领导
List<SysUserRole> userRoles = sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, loginUser.getId())); // 查询用户所有角色 List<SysUserRole> userRoles = sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, loginUser.getId())); // 查询用户所有角色
List<String> userRoleIds = new ArrayList<>(); // 用户管理员/领导/studio角色 List<String> userRoleIds = new ArrayList<>(); // 用户管理员/领导
if (CollectionUtil.isNotEmpty(userRoles)) { if (CollectionUtil.isNotEmpty(userRoles)) {
List<String> roleIdList = CollectManifestRoleIdEnum.getIdList(); List<String> roleIdList = CollectManifestRoleIdEnum.getIdList();
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList()); List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
userRoleIds = roleIdList.stream().filter(e->userRoleIdList.contains(e)).collect(Collectors.toList()); userRoleIds = roleIdList.stream().filter(e->userRoleIdList.contains(e)).collect(Collectors.toList());
} }
if (CollectionUtil.isEmpty(userRoleIds) && !homoList.contains(loginUser.getUsername()) // TODO 查询当前登录用户角色 是否是当前项目的studio
List<String> studioList = new ArrayList<>();
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectId);
if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) {
studioList = projectLibraryBaseList.stream().map(ProjectLibraryBase::getStudioEngineerName).collect(Collectors.toList());
}
if (CollectionUtil.isEmpty(userRoleIds) && !studioList.contains(loginUser.getUsername())
&& !homoList.contains(loginUser.getUsername())
&& !sdtList.contains(loginUser.getUsername()) && !sdtList.contains(loginUser.getUsername())
&& !dreListOfPCM.contains(loginUser.getUsername())) { && !dreListOfPCM.contains(loginUser.getUsername())) {
@@ -860,6 +872,17 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
userTypeList.add(map); userTypeList.add(map);
} }
if (studioList.contains(loginUser.getUsername())) {
Map<String, String> map = new HashMap<>();
if (CutEnum.CN.getValue().equals(cut)) {
map.put("label", CollectManifestUserTypeEnum.STUDIO.getName());
} else {
map.put("label", CollectManifestUserTypeEnum.STUDIO.getEnName());
}
map.put("value", CollectManifestUserTypeEnum.STUDIO.getValue());
userTypeList.add(map);
}
if (CollectionUtil.isNotEmpty(userRoleIds)) { if (CollectionUtil.isNotEmpty(userRoleIds)) {
List<CollectManifestRoleIdEnum> collectManifestRoleIdEnumList = CollectManifestRoleIdEnum.getByIdList(userRoleIds); List<CollectManifestRoleIdEnum> collectManifestRoleIdEnumList = CollectManifestRoleIdEnum.getByIdList(userRoleIds);
for (CollectManifestRoleIdEnum collectManifestRoleIdEnum : collectManifestRoleIdEnumList) { for (CollectManifestRoleIdEnum collectManifestRoleIdEnum : collectManifestRoleIdEnumList) {
@@ -912,6 +935,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean goBack(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(","); String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
@@ -928,6 +954,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean withdraw(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean withdraw(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(","); String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
@@ -955,6 +984,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean updateDeadlineBatch(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean updateDeadlineBatch(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || paramsCollectManifestVO.getDeadline() == null) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
Date deadline = paramsCollectManifestVO.getDeadline(); Date deadline = paramsCollectManifestVO.getDeadline();
@@ -971,6 +1003,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean updateSdt(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean updateSdt(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || StringUtils.isEmpty(paramsCollectManifestVO.getSdt())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestId = paramsCollectManifestVO.getIds(); String paramsCollectManifestId = paramsCollectManifestVO.getIds();
String sdt = paramsCollectManifestVO.getSdt(); String sdt = paramsCollectManifestVO.getSdt();
@@ -982,6 +1017,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean updateDreBatch(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean updateDreBatch(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())
|| StringUtils.isEmpty(paramsCollectManifestVO.getDre()) || StringUtils.isEmpty(paramsCollectManifestVO.getProjectId())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
String dre = paramsCollectManifestVO.getDre(); String dre = paramsCollectManifestVO.getDre();
String projectId = paramsCollectManifestVO.getProjectId(); String projectId = paramsCollectManifestVO.getProjectId();
@@ -1024,7 +1063,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 发送飞书消息 // 发送飞书消息
try { try {
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.PUSH.getName(), hrefFeishu); feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
@@ -1034,6 +1073,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || StringUtils.isEmpty(paramsCollectManifestVO.getProjectId())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
String projectId = paramsCollectManifestVO.getProjectId(); String projectId = paramsCollectManifestVO.getProjectId();
@@ -1051,6 +1093,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 消息内容 // 消息内容
List<ParamsCollectManifestEO> paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr)); List<ParamsCollectManifestEO> paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr));
List<String> sdtList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getSdt).distinct().collect(Collectors.toList()); List<String> sdtList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getSdt).distinct().collect(Collectors.toList());
if (CollectionUtil.isEmpty(sdtList)) {
throw new JeroBootException("没有可下发的工程接口人!");
}
for(String sdt : sdtList) { for(String sdt : sdtList) {
StringBuilder connectBuilder = new StringBuilder(); StringBuilder connectBuilder = new StringBuilder();
@@ -1067,7 +1112,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
thirdIds[0] = sysUser.getThirdId(); thirdIds[0] = sysUser.getThirdId();
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + projectId; // TODO 后续可能有变动 String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + projectId; // TODO 后续可能有变动
String href = "<a href='/ParameterItemCollection?id=" + projectId + "'" + " target='_blank'>the link</a>,"; String href = "<a href='/ParameterItemCollection?id=" + projectId + "'" + " target='_blank'>the link</a>,";
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " to handle it."; String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
// 发送系统消息 // 发送系统消息
SysAnnouncement sysAnnouncement = new SysAnnouncement(); SysAnnouncement sysAnnouncement = new SysAnnouncement();
@@ -1083,7 +1128,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
// 发送飞书消息 // 发送飞书消息
try { try {
feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.PUSH.getName(), hrefFeishu); feishuService.batchSendMessage(thirdIds, content, MessageTypeEnum.COLLECT.getName(), hrefFeishu);
} catch (IOException e) { } catch (IOException e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
@@ -1123,6 +1168,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean lockConfigColumn(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean lockConfigColumn(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsConfigIds())) {
throw new JeroBootException("参数不能为空!");
}
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
String paramsConfigIds = paramsCollectManifestVO.getParamsConfigIds(); String paramsConfigIds = paramsCollectManifestVO.getParamsConfigIds();
List<String> paramsConfigIdList = Arrays.asList(paramsConfigIds.split(",")); List<String> paramsConfigIdList = Arrays.asList(paramsConfigIds.split(","));
@@ -1153,6 +1201,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean referParams(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean referParams(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())
|| StringUtils.isEmpty(paramsCollectManifestVO.getSourceConfigId()) || StringUtils.isEmpty(paramsCollectManifestVO.getTargetConfigIds())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
String sourceConfigId = paramsCollectManifestVO.getSourceConfigId(); String sourceConfigId = paramsCollectManifestVO.getSourceConfigId();
String targetConfigIds = paramsCollectManifestVO.getTargetConfigIds(); String targetConfigIds = paramsCollectManifestVO.getTargetConfigIds();
@@ -1199,6 +1251,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override @Override
public boolean syncReport(ParamsCollectManifestVO paramsCollectManifestVO) { public boolean syncReport(ParamsCollectManifestVO paramsCollectManifestVO) {
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) {
throw new JeroBootException("参数不能为空!");
}
String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
@@ -145,13 +145,15 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
*/ */
@Override @Override
public boolean editById(ParamsManifestEO paramsManifestEO) { public boolean editById(ParamsManifestEO paramsManifestEO) {
ParamsManifestEO oldParamsManifestEO = getById(paramsManifestEO.getTitle()); ParamsManifestEO oldParamsManifestEO = getById(paramsManifestEO.getId());
LambdaQueryWrapper<ParamsManifestEO> queryWrapper = new LambdaQueryWrapper<>(); if (!oldParamsManifestEO.getTitle().equals(paramsManifestEO.getTitle())) {
queryWrapper.eq(ParamsManifestEO::getTitle, oldParamsManifestEO.getTitle()); LambdaQueryWrapper<ParamsManifestEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ParamsManifestEO::getProjectId, oldParamsManifestEO.getProjectId()); queryWrapper.eq(ParamsManifestEO::getTitle, paramsManifestEO.getTitle());
List<ParamsManifestEO> paramsManifestEOList = list(queryWrapper); queryWrapper.eq(ParamsManifestEO::getProjectId, oldParamsManifestEO.getProjectId());
if (CollectionUtil.isNotEmpty(paramsManifestEOList)) { List<ParamsManifestEO> paramsManifestEOList = list(queryWrapper);
throw new JeroBootException("标题已存在!"); if (CollectionUtil.isNotEmpty(paramsManifestEOList)) {
throw new JeroBootException("标题已存在!");
}
} }
ParamsManifestEO updateEO = new ParamsManifestEO(); ParamsManifestEO updateEO = new ParamsManifestEO();
@@ -100,7 +100,7 @@ public class ParamsInfoEO implements Serializable {
private String description; private String description;
/**认证类别*/ /**认证类别*/
@Excel(name = "认证类别", width = 15, dicCode = "cert_category") @Excel(name = "*认证类别", width = 15, dicCode = "cert_category")
@Dict(dicCode = "cert_category") @Dict(dicCode = "cert_category")
@ApiModelProperty(value = "认证类别") @ApiModelProperty(value = "认证类别")
private String certCategory; private String certCategory;
@@ -97,7 +97,6 @@ public interface IParamsInfoEOService extends IService<ParamsInfoEO> {
String paramsTemplateId, String paramsTemplateId,
String cut); String cut);
int deleteByParamsTemplateIds(String paramsTemplateIds); int deleteByParamsTemplateIds(String paramsTemplateIds);
List<ParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds); List<ParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds);
@@ -13,6 +13,7 @@ import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.IsMustEnum; import com.jero.common.constant.enums.IsMustEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO; import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO;
import com.jero.modules.cert.template.entity.ParamsInfoEO; import com.jero.modules.cert.template.entity.ParamsInfoEO;
import com.jero.modules.cert.template.enums.ControlTypeEnum; import com.jero.modules.cert.template.enums.ControlTypeEnum;
@@ -34,6 +35,7 @@ import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.jeecgframework.poi.excel.ExcelExportUtil; import org.jeecgframework.poi.excel.ExcelExportUtil;
@@ -313,10 +315,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
Map<String, Object> bussExportMap = new HashMap<>(); Map<String, Object> bussExportMap = new HashMap<>();
bussExportMap.put("title", bussExportParams); bussExportMap.put("title", bussExportParams);
bussExportMap.put("entity", ParamsInfoEO.class);
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
bussExportMap.put("entity", ParamsInfoEO.class);
bussExportMap.put("data", new ArrayList<ParamsInfoEO>()); bussExportMap.put("data", new ArrayList<ParamsInfoEO>());
} else if (CutEnum.EN.getValue().equals(cut)) { } else if (CutEnum.EN.getValue().equals(cut)) {
bussExportMap.put("entity", ParamsInfoEnExport.class);
bussExportMap.put("data", new ArrayList<ParamsInfoEnExport>()); bussExportMap.put("data", new ArrayList<ParamsInfoEnExport>());
} }
sheetsList.add(bussExportMap); sheetsList.add(bussExportMap);
@@ -332,10 +336,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
certExportParams.setStyle(CommonExcelExportStyler.class); certExportParams.setStyle(CommonExcelExportStyler.class);
Map<String, Object> certExportMap = new HashMap<>(); Map<String, Object> certExportMap = new HashMap<>();
certExportMap.put("title", certExportParams); certExportMap.put("title", certExportParams);
certExportMap.put("entity", CertCategoryParamsInfoEO.class);
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
certExportMap.put("entity", CertCategoryParamsInfoEO.class);
certExportMap.put("data", new ArrayList<CertCategoryParamsInfoEO>()); certExportMap.put("data", new ArrayList<CertCategoryParamsInfoEO>());
} else if (CutEnum.EN.getValue().equals(cut)) { } else if (CutEnum.EN.getValue().equals(cut)) {
certExportMap.put("entity", CertCategoryParamsInfoEnExport.class);
certExportMap.put("data", new ArrayList<CertCategoryParamsInfoEnExport>()); certExportMap.put("data", new ArrayList<CertCategoryParamsInfoEnExport>());
} }
sheetsList.add(certExportMap); sheetsList.add(certExportMap);
@@ -613,15 +619,15 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
for(OSSFile fileExportDto : fileTemplateList){ for(OSSFile fileExportDto : fileTemplateList){
String oldPath = fileExportDto.getUrl(); String oldPath = fileExportDto.getUrl();
String newPath = fileNowPath + File.separator + fileExportDto.getFileName(); String newPath = fileNowPath + File.separator + fileExportDto.getFileName();
File oldFile = new File(oldPath); if (CosBootUtil.doesObjectExist(oldPath)){
if (oldFile.exists()){ InputStream in = CosBootUtil.download(oldPath);
copyFile(oldPath, newPath); copyFile(in, newPath);
} }
} }
} }
private void copyFile(String srcPath, String destPath) throws IOException { private void copyFile(InputStream in, String destPath) throws IOException {
BufferedInputStream bis = new BufferedInputStream(Files.newInputStream(Paths.get(srcPath))); BufferedInputStream bis = new BufferedInputStream(in);
BufferedOutputStream bos = BufferedOutputStream bos =
new BufferedOutputStream(Files.newOutputStream(Paths.get(destPath), new BufferedOutputStream(Files.newOutputStream(Paths.get(destPath),
StandardOpenOption.CREATE, StandardOpenOption.CREATE,
@@ -744,12 +750,25 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
String sheetName = workbook.getSheetName(numSheet); String sheetName = workbook.getSheetName(numSheet);
// 第几个sheet页 // 第几个sheet页
if (numSheet == 0) { // 企业参数表 if (numSheet == 0) { // 企业参数表
ExcelImportResult<ParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoCnImport.class, params); if (CutEnum.EN.getValue().equals(cut)) {
paramsInfoEOList = result.getList(); ExcelImportResult<ParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoEnImport.class, params);
List<ParamsInfoEnImport> paramsInfoEOListEn = resultEn.getList();
copyParamsInfoList(paramsInfoEOListEn, paramsInfoEOList);
} else {
ExcelImportResult<ParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, ParamsInfoCnImport.class, params);
paramsInfoEOList = result.getList();
}
} else { // 认证类别参数表 } else { // 认证类别参数表
if (certCategoryMap.containsKey(sheetName)) { if (certCategoryMap.containsKey(sheetName)) {
ExcelImportResult<CertCategoryParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params); List<CertCategoryParamsInfoCnImport> list = new ArrayList<>();
List<CertCategoryParamsInfoCnImport> list = result.getList(); if (CutEnum.EN.getValue().equals(cut)) {
ExcelImportResult<CertCategoryParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoEnImport.class, params);
List<CertCategoryParamsInfoEnImport> listEn = resultEn.getList();
copycertCategoryParamsInfoList(listEn, list);
} else {
ExcelImportResult<CertCategoryParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params);
list = result.getList();
}
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
for (CertCategoryParamsInfoCnImport certCategoryParamsInfoEO : list){ for (CertCategoryParamsInfoCnImport certCategoryParamsInfoEO : list){
//判断此行数据是否全部为空,是则不读取 //判断此行数据是否全部为空,是则不读取
@@ -822,6 +841,27 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
} }
} }
// 集合复制
private void copyParamsInfoList(List<ParamsInfoEnImport> sourceList, List<ParamsInfoCnImport> targetList) {
if (CollectionUtil.isNotEmpty(sourceList)) {
sourceList.forEach(item -> {
ParamsInfoCnImport target = new ParamsInfoCnImport();
BeanUtils.copyProperties(item, target);
targetList.add(target);
});
}
}
// 集合复制
private void copycertCategoryParamsInfoList(List<CertCategoryParamsInfoEnImport> sourceList, List<CertCategoryParamsInfoCnImport> targetList) {
if (CollectionUtil.isNotEmpty(sourceList)) {
sourceList.forEach(item -> {
CertCategoryParamsInfoCnImport target = new CertCategoryParamsInfoCnImport();
BeanUtils.copyProperties(item, target);
targetList.add(target);
});
}
}
@Override @Override
public Result<?> importParamsInfoData(List<ParamsInfoCnImport> paramsInfoEOList, public Result<?> importParamsInfoData(List<ParamsInfoCnImport> paramsInfoEOList,
Map<String,List<CertCategoryParamsInfoCnImport>> certCategoryParamsInfoEOListMap, Map<String,List<CertCategoryParamsInfoCnImport>> certCategoryParamsInfoEOListMap,
@@ -1129,7 +1169,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
MultipartFile multipartFile = MultipartFile multipartFile =
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input); new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
//文件存入文件表 //文件存入文件表
OSSFile ossFile = ossFileService.uploadLocal(multipartFile, "", null,null); OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null,null);
if (ObjectUtils.isNotEmpty(ossFile)) { if (ObjectUtils.isNotEmpty(ossFile)) {
sb.append(ossFile.getId() + ","); sb.append(ossFile.getId() + ",");
} }
@@ -0,0 +1,71 @@
package com.jero.modules.cert.template.vo;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @Author: liyawei
* @Description:
* @Date: Created in 10:41 2022/6/15
*/
@Data
public class CertCategoryParamsInfoEnImport {
/**主键*/
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**编号*/
@Excel(name = "*number", width = 15, orderNum = "2")
@ApiModelProperty(value = "编号")
private String paramsNumber;
/**参数名称*/
@Excel(name = "*params name", width = 15, orderNum = "3")
@ApiModelProperty(value = "参数名称")
private String paramsName;
/**参数说明*/
@Excel(name = "参数说明", width = 36, orderNum = "4")
@ApiModelProperty(value = "参数说明")
private String description;
/**nio编号*/
@Excel(name = "*nio number", width = 15, orderNum = "1")
@ApiModelProperty(value = "nio编号")
private String nioNumber;
/**所属认证类别*/
@ApiModelProperty(value = "所属认证类别")
private String certCategory;
/**参数模板id*/
@ApiModelProperty(value = "参数模板id")
private String paramsTemplateId;
}
@@ -48,7 +48,7 @@ public class ParamsInfoCnImport {
private String description; private String description;
/**认证类别*/ /**认证类别*/
@Excel(name = "认证类别", width = 15) @Excel(name = "*认证类别", width = 15)
@ApiModelProperty(value = "认证类别") @ApiModelProperty(value = "认证类别")
private String certCategory; private String certCategory;
@@ -83,7 +83,7 @@ public class ParamsInfoEnExport {
private String description; private String description;
/**认证类别*/ /**认证类别*/
@Excel(name = "cert category", width = 15, dicCode = "cert_category_en") @Excel(name = "*cert category", width = 15, dicCode = "cert_category_en")
@Dict(dicCode = "cert_category") @Dict(dicCode = "cert_category")
@ApiModelProperty(value = "认证类别") @ApiModelProperty(value = "认证类别")
private String certCategory; private String certCategory;
@@ -48,7 +48,7 @@ public class ParamsInfoEnImport {
private String description; private String description;
/**认证类别*/ /**认证类别*/
@Excel(name = "cert category", width = 15) @Excel(name = "*cert category", width = 15)
@ApiModelProperty(value = "认证类别") @ApiModelProperty(value = "认证类别")
private String certCategory; private String certCategory;
@@ -20,7 +20,7 @@ public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
@Select("SELECT * FROM sys_dict_item WHERE DICT_ID = #{mainId} order by sort_order asc, item_value asc") @Select("SELECT * FROM sys_dict_item WHERE DICT_ID = #{mainId} order by sort_order asc, item_value asc")
public List<SysDictItem> selectItemsByMainId(String mainId); public List<SysDictItem> selectItemsByMainId(String mainId);
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sort_order asc, item_value asc") @Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE sys_dict_item.DEL_FLAG = 0 and DICT_CODE = #{dictCode} order by sort_order asc, item_value asc")
public List<SysDictItem> selectItemsByDictCode(String dictCode); public List<SysDictItem> selectItemsByDictCode(String dictCode);
@Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.sort_order asc") @Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.sort_order asc")
@@ -2578,8 +2578,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
StringBuilder msgContentSb = new StringBuilder(); StringBuilder msgContentSb = new StringBuilder();
StringBuilder msgContentInfoSb = new StringBuilder(); StringBuilder msgContentInfoSb = new StringBuilder();
//适用车型 //适用车型
StringBuilder msgContentSbCarType = new StringBuilder("Applicable Models of the " + category + " " + serialNumber + " " + titleEn); StringBuilder msgContentSbCarType = new StringBuilder("Vehicle Type of the " + category + " " + serialNumber + " " + titleEn);
StringBuilder msgContentInfoSbCarType = new StringBuilder("Applicable Models of the " + category + " " + href); StringBuilder msgContentInfoSbCarType = new StringBuilder("Vehicle Type of the " + category + " " + href);
//状态 //状态
StringBuilder msgContentSbStatus = new StringBuilder("The Status of the " + category + " " + serialNumber + " " + titleEn); StringBuilder msgContentSbStatus = new StringBuilder("The Status of the " + category + " " + serialNumber + " " + titleEn);
StringBuilder msgContentInfoSbStatus = new StringBuilder("The Status of the " + category + " " + href); StringBuilder msgContentInfoSbStatus = new StringBuilder("The Status of the " + category + " " + href);
@@ -2616,8 +2616,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} }
// //
if(StringUtils.isBlank(value)){ if(StringUtils.isBlank(value)){
msgContentSbStatus.append(" has been modified to be empty ,"); msgContentSbStatus.append(" has been modified to be null ,");
msgContentInfoSbStatus.append(" has been modified to be empty ,"); msgContentInfoSbStatus.append(" has been modified to be null ,");
msgContentSb.append(msgContentSbStatus); msgContentSb.append(msgContentSbStatus);
msgContentInfoSb.append(msgContentInfoSbStatus); msgContentInfoSb.append(msgContentInfoSbStatus);
}else{ }else{
@@ -2652,8 +2652,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
value = substring; value = substring;
} }
if(StringUtils.isBlank(value)){ if(StringUtils.isBlank(value)){
msgContentSbCarType.append(" has been modified to be empty ,"); msgContentSbCarType.append(" has been modified to be null ,");
msgContentInfoSbCarType.append(" has been modified to be empty ,"); msgContentInfoSbCarType.append(" has been modified to be null ,");
msgContentSb.append(msgContentSbCarType); msgContentSb.append(msgContentSbCarType);
msgContentInfoSb.append(msgContentInfoSbCarType); msgContentInfoSb.append(msgContentInfoSbCarType);
}else{ }else{
@@ -2887,13 +2887,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (ObjectUtils.isNotEmpty(value)) { if (ObjectUtils.isNotEmpty(value)) {
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt +" "+ value + " to " + valueTemp + ","); sb.append(dbFieldTxt +" from "+ value + " to " + valueTemp + ",");
}else{ }else{
sb.append(dbFieldTxt + "" + value + "改为" + valueTemp + ","); sb.append(dbFieldTxt + "" + value + "改为" + valueTemp + ",");
} }
} else if (ObjectUtils.isEmpty(valueTemp)) { } else if (ObjectUtils.isEmpty(valueTemp)) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt + " "+value + " to empty " + ","); sb.append(dbFieldTxt + " from "+value + " to null " + ",");
}else{ }else{
sb.append(dbFieldTxt + "" + value + "改为空" + ","); sb.append(dbFieldTxt + "" + value + "改为空" + ",");
} }
@@ -2901,7 +2901,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} else { } else {
if (ObjectUtils.isNotEmpty(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp)) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt + " empty to " + valueTemp + ","); sb.append(dbFieldTxt + " from null to " + valueTemp + ",");
}else{ }else{
sb.append(dbFieldTxt + "由空改为" + valueTemp + ","); sb.append(dbFieldTxt + "由空改为" + valueTemp + ",");
} }
@@ -2930,13 +2930,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (fileNameListTemp.size() != 0 && !checkDiffrent) { if (fileNameListTemp.size() != 0 && !checkDiffrent) {
if("1".equals(flag)){ if("1".equals(flag)){
//sysUser //sysUser
sb.append(dbFieldTxt +" "+ StringUtils.join(fileNameList, ",") + " to " + StringUtils.join(fileNameListTemp, ",") + ","); sb.append(dbFieldTxt +" from "+ StringUtils.join(fileNameList, ",") + " to " + StringUtils.join(fileNameListTemp, ",") + ",");
}else{ }else{
sb.append(dbFieldTxt + "" + StringUtils.join(fileNameList, ",") + "改为" + StringUtils.join(fileNameListTemp, ",") + ","); sb.append(dbFieldTxt + "" + StringUtils.join(fileNameList, ",") + "改为" + StringUtils.join(fileNameListTemp, ",") + ",");
} }
} else if (fileNameListTemp.size() == 0) { } else if (fileNameListTemp.size() == 0) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt + " "+StringUtils.join(fileNameList, ",") + " to empty " + ","); sb.append(dbFieldTxt + " from "+StringUtils.join(fileNameList, ",") + " to null " + ",");
}else{ }else{
sb.append(dbFieldTxt + "" + StringUtils.join(fileNameList, ",") + "改为空" + ","); sb.append(dbFieldTxt + "" + StringUtils.join(fileNameList, ",") + "改为空" + ",");
} }
@@ -2945,7 +2945,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} else { } else {
if (fileNameListTemp.size() != 0) { if (fileNameListTemp.size() != 0) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt + " empty to " + StringUtils.join(fileNameListTemp, ",") + ","); sb.append(dbFieldTxt + " from null to " + StringUtils.join(fileNameListTemp, ",") + ",");
}else{ }else{
sb.append(dbFieldTxt + "由空改为" + StringUtils.join(fileNameListTemp, ",") + ","); sb.append(dbFieldTxt + "由空改为" + StringUtils.join(fileNameListTemp, ",") + ",");
} }
@@ -2966,13 +2966,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (ObjectUtils.isNotEmpty(value)) { if (ObjectUtils.isNotEmpty(value)) {
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt +" "+ value + " to " + valueTemp + ","); sb.append(dbFieldTxt +" from "+ value + " to " + valueTemp + ",");
}else{ }else{
sb.append(dbFieldTxt + "" + value + "改为" + valueTemp + ","); sb.append(dbFieldTxt + "" + value + "改为" + valueTemp + ",");
} }
} else if (ObjectUtils.isEmpty(valueTemp)) { } else if (ObjectUtils.isEmpty(valueTemp)) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt + " "+value + " to empty " + ","); sb.append(dbFieldTxt + " from "+value + " to null " + ",");
}else{ }else{
sb.append(dbFieldTxt + "" + value + "改为空" + ","); sb.append(dbFieldTxt + "" + value + "改为空" + ",");
} }
@@ -2980,7 +2980,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} else { } else {
if (ObjectUtils.isNotEmpty(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp)) {
if("1".equals(flag)){ if("1".equals(flag)){
sb.append(dbFieldTxt + " empty to " + valueTemp + ","); sb.append(dbFieldTxt + " from null to " + valueTemp + ",");
}else{ }else{
sb.append(dbFieldTxt + "由空改为" + valueTemp + ","); sb.append(dbFieldTxt + "由空改为" + valueTemp + ",");
} }
@@ -4712,8 +4712,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you, Please pay attention to check."; String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you, Please pay attention to check."; String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
//封装消息的实体类 //封装消息的实体类
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo); SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
sysAnnouncementService.saveAnnouncement(sysAnnouncement); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
@@ -4729,7 +4729,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
list.add(serialNumber); list.add(serialNumber);
} }
}); });
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you, Please pay attention to check."; String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode); iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
} }
} catch (IOException e) { } catch (IOException e) {
@@ -350,7 +350,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
LambdaQueryWrapper<DummyInventoryInfoEO> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DummyInventoryInfoEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(DummyInventoryInfoEO::getDummyInventoryBaseId,dummyInventoryBaseEO.getId()); lambdaQueryWrapper.in(DummyInventoryInfoEO::getDummyInventoryBaseId,dummyInventoryBaseEO.getId());
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(lambdaQueryWrapper); List<DummyInventoryInfoEO> dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(lambdaQueryWrapper);
String contentLog = null; String contentLog = "";
if(dummyContentChangeEOList.size() == 0){ if(dummyContentChangeEOList.size() == 0){
//没有添加过需要进行第一次添加 //没有添加过需要进行第一次添加
@@ -418,11 +418,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
.eq("is_en_log",CutEnum.EN.getValue()); .eq("is_en_log",CutEnum.EN.getValue());
List<DummyLogEO> updateLogList = dummyLogEOService.list(logEOQueryWrapper); List<DummyLogEO> updateLogList = dummyLogEOService.list(logEOQueryWrapper);
if(CollectionUtils.isNotEmpty(updateLogList)){ if(CollectionUtils.isNotEmpty(updateLogList)){
contentLog = updateLogList.stream().map(e -> e.getLogContent()).collect(Collectors.joining("</br></br>")); List<String> contentLogList = updateLogList.stream().map(e -> e.getLogContent()).collect(Collectors.toList());
for(int i=0 ; i < contentLogList.size() ;i++){
contentLog += ""+ (i+1) +"" + contentLogList.get(i) + "</br>";
}
} }
} }
//列表,维护清单不同的字段,addSerialNumber,deleteSerialNumber都为空->证明是没有更新的数据,不发送消息,数据不处理 //列表,维护清单不同的字段,addSerialNumber,deleteSerialNumber都为空->证明是没有更新的数据,不发送消息,数据不处理
if(MapUtils.isNotEmpty(baseDiff) || StringUtils.isNotEmpty(contentLog)) { if(MapUtils.isNotEmpty(baseDiff) || StringUtils.isNotEmpty(contentLog)) {
//向订阅该领域管理的人发消息和飞书 //向订阅该领域管理的人发消息和飞书
@@ -1130,8 +1132,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
}else{//撤回的消息 }else{//撤回的消息
content = "The " + baseName + " virtual list you subscribed to has been withdrawn,please note."; content = "Please note that the "+baseName+" virtual list you subscribed to has been withdrawn.";
contentInfo = "The " + baseName + " virtual list you subscribed to has been withdrawn,please note."; contentInfo = "Please note that the "+baseName+" virtual list you subscribed to has been withdrawn.";
//封装消息的实体类 //封装消息的实体类
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo); SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo);
@@ -1172,7 +1174,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
} }
} }
if (StringUtils.isNotBlank(contentLog)){ if (StringUtils.isNotBlank(contentLog)){
contentInfo += contentLog; contentInfo += row +". Maintenance list has been modified as follows :</br>"+ contentLog;
} }
return contentInfo; return contentInfo;
@@ -127,7 +127,7 @@ public class InventoryAffirmJob implements Job {
// XXX . // XXX .
String msgContentEN = "The remaining processing time for the regulation list confirmation of" String msgContentEN = "The remaining processing time for the regulation list confirmation of"
+ projectNameInfoEO.getProjectName() + projectNameInfoEO.getProjectName()
+ " is 3 days. Please check and handle it in time."; + " are 3 days. Please check and handle it in time.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType();
@@ -148,9 +148,9 @@ public class InventoryAffirmJob implements Job {
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList()); currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/ /*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
String msgContentEN = "The the regulation list confirmation of " String msgContentEN = "The the regulation list confirmation for "
+ projectNameInfoEO.getProjectName() + projectNameInfoEO.getProjectName()
+ " is coming to an end today. Please check and deal with it in time"; + " will expire today. Please check and address it in a timely manner.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType();
@@ -133,7 +133,7 @@ public class PrehomoJob implements Job {
//The remaining processing time for the Pre-Homo confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time. //The remaining processing time for the Pre-Homo confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of " String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " is 3 days. Please check and handle it in time."; + " are 3 days. Please check and handle it in time.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType();
@@ -157,7 +157,7 @@ public class PrehomoJob implements Job {
//The the Pre-Homo confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time //The the Pre-Homo confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
String msgContentEN = "The the Pre-Homo confirmation of " String msgContentEN = "The the Pre-Homo confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " is coming to an end today. Please check and deal with it in time."; + " will expire today. Please check and address it in time.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType();
@@ -130,9 +130,9 @@ public class VerifyComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理 //您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理
//The remaining processing time for the Verify compliance confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time. //The remaining processing time for the Verify compliance confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
String msgContentEN = "The remaining processing time for the Verify compliance confirmation of " String msgContentEN = "The remaining processing time for the validation compliance confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " is 3 days. Please check and handle it in time."; + " are 3 days. Please check and handle it in time.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType();
@@ -154,9 +154,9 @@ public class VerifyComplianceJob implements Job {
//您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理 //您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理
//The the Verify compliance confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time //The the Verify compliance confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
String msgContentEN = "The the Verify compliance confirmation of " String msgContentEN = "The the validation compliance confirmation of "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " is coming to an end today. Please check and deal with it in time."; + " will expire today. Please check and address it in time.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType();
@@ -128,9 +128,9 @@ public class designComplianceJob implements Job {
threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList()); threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList());
//您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理 //您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理
String msgContentEN = "The remaining processing time for the design compliance confirmation of " String msgContentEN = "The remaining processing time for the design compliance confirmation for "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " is 3 days. Please check and handle it in time."; + " are 3 days. Please check and address it in a timely manner.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
@@ -151,9 +151,9 @@ public class designComplianceJob implements Job {
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList()); currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
//您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理 //您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理
String msgContentEN = "The the design compliance confirmation of " String msgContentEN = "The the design compliance confirmation for "
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
+ " is coming to an end today. Please check and deal with it in time."; + " will expire today. Please check and address it in time.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
@@ -1085,8 +1085,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper); ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
//消息内容 //消息内容
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation of " + projectNameInfoEO.getProjectName() String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for " + projectNameInfoEO.getProjectName()
+ ". The due date is" +inventoryAffirmDueDate+ ". Please check and deal with it in time."; + ". The due date is" +inventoryAffirmDueDate+ " .Please check and address it in a timely manner.";
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType();
@@ -1591,12 +1591,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) { if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " assigned the regulation task confirmation of " + projectNameInfoEO.getProjectName()
+ ".The due date is" +taskAffirmDueDate+ " Please check and deal with it in time."; + ".The due date is" +taskAffirmDueDate+ " Please check and address it in a timely manner.";
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
userIdList.add(dreUserId); userIdList.add(dreUserId);
msgContentEN = sysUser.getUsername() + " has distributed the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ ".to you. the due date is " +taskAffirmDueDate+ " Please check and handle it in time."; + ".to you. the due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
@@ -3,12 +3,16 @@ package com.jero.modules.project.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.*; import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum; import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.mapper.*; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryDetailEOMapper;
import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService; import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService;
import com.jero.modules.project.service.IProjectTaskInventoryFeedbackEOService; import com.jero.modules.project.service.IProjectTaskInventoryFeedbackEOService;
import com.jero.modules.project.util.SendMessageUtils; import com.jero.modules.project.util.SendMessageUtils;
@@ -23,8 +27,6 @@ import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: 项目库-任务清单明细表 * @Description: 项目库-任务清单明细表
* @Author: jero-boot * @Author: jero-boot
@@ -263,12 +265,12 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
+ " to you. Please check and handle it in time."; + " to you. Please check and handle it in time.";
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.PREHOMO_ISSUE_DRE_MSG.getValue())){ }else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.PREHOMO_ISSUE_DRE_MSG.getValue())){
//XXX has distributed the Pre-Homo confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time. //XXX has distributed the Pre-Homo confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
msgContentEN = currentUser.getUsername() + " has distributed the Pre-Homo confirmation process of " msgContentEN = currentUser.getUsername() + " has assigned the Pre-Homo confirmation process of "
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
+ " to you. Please check and handle it in time."; + " to you. Please check and handle it in time.";
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.VERIFY_ISSUE_DRE_MSG.getValue())){ }else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.VERIFY_ISSUE_DRE_MSG.getValue())){
//XXX has distributed the Verify compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time. //XXX has distributed the Verify compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
msgContentEN = currentUser.getUsername() + " has distributed the Verify compliance confirmation process of " msgContentEN = currentUser.getUsername() + " has assigned the validation compliance confirmation process of "
+ projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName() + projectLawsInventoryEO.getSerialNumber() + " in "+ projectNameInfoEO.getProjectName()
+ " to you. Please check and handle it in time."; + " to you. Please check and handle it in time.";
} }
@@ -3,6 +3,7 @@ package com.jero.modules.project.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
@@ -31,17 +32,14 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** /**
* @Description: 项目库-任务清单表 * @Description: 项目库-任务清单表
* @Author: jero-boot * @Author: jero-boot
@@ -317,12 +315,12 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
+ " in time."; + " in time.";
}else if(StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_REMIND_MSG.getValue())){ }else if(StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_REMIND_MSG.getValue())){
//Please check and deal with the Pre-Homo confirmation process of GB 7258 in XXX (project name) in time. //Please check and deal with the Pre-Homo confirmation process of GB 7258 in XXX (project name) in time.
msgContentEN = "Please check and deal with the Pre-Homo confirmation process of " msgContentEN = "Please check and address the Pre-Homo confirmation process of "
+ serialNumber + " in "+ projectNameInfoEO.getProjectName() + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " in time."; + " in time.";
}else if(StringUtils.equals(msgType,MsgTypeEnum.VERIFY_REMIND_MSG.getValue())){ }else if(StringUtils.equals(msgType,MsgTypeEnum.VERIFY_REMIND_MSG.getValue())){
//Please check and deal with the Verify compliance confirmation process of GB 7258 in XXX (project name) in time. //Please check and deal with the Verify compliance confirmation process of GB 7258 in XXX (project name) in time.
msgContentEN = "Please check and deal with the Verify compliance confirmation process of " msgContentEN = "Please check and address the Verify compliance confirmation process of "
+ serialNumber + " in "+ projectNameInfoEO.getProjectName() + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " in time."; + " in time.";
} }
@@ -606,7 +604,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
userIdList.addAll(Arrays.asList(dreUserIds.split(","))); userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) { if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) {
msgContentEN = sysUser.getUsername() + "has distributed the design compliance confirmation process of " + serialNumber + " in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
+ " to you. Please check and handle it in time."; + " to you. Please check and handle it in time.";
} }
@@ -306,7 +306,9 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStart(nowStart.get(i)); nowStart = getNewNowStart(nowStart.get(i));
menuCanAdd = true; menuCanAdd = true;
@@ -544,7 +546,9 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStart(nowStart.get(i)); nowStart = getNewNowStart(nowStart.get(i));
menuCanAdd = true; menuCanAdd = true;
@@ -728,7 +732,9 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStartUS(nowStart.get(i)); nowStart = getNewNowStartUS(nowStart.get(i));
menuCanAdd = true; menuCanAdd = true;
@@ -1102,7 +1108,9 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(name, treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(name, treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStartJapanTwo(lastStrTemp, secondStrTemp, nowStart.get(i)); nowStart = getNewNowStartJapanTwo(lastStrTemp, secondStrTemp, nowStart.get(i));
menuCanAdd = true; menuCanAdd = true;
@@ -1276,7 +1284,10 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(nowStart.get(i), treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); // addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStartEU(nowStart.get(i)); nowStart = getNewNowStartEU(nowStart.get(i));
menuCanAdd = true; menuCanAdd = true;
@@ -1453,7 +1464,9 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(name, treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(name, treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStartKmvssArticle(lastStr, nowStart.get(i)); nowStart = getNewNowStartKmvssArticle(lastStr, nowStart.get(i));
menuCanAdd = true; menuCanAdd = true;
@@ -1676,7 +1689,9 @@ public class FileSpiltService {
SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(name, treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue); SarFileSplitMenuEO sarFileSplitMenuEO = getTreeList(name, treeList, generalCatalogueId, sarFileSplitInfoEO, treeListDisplay++, itemName, enumByValue);
treeList.add(sarFileSplitMenuEO); treeList.add(sarFileSplitMenuEO);
message.setMenuId(sarFileSplitMenuEO.getId()); message.setMenuId(sarFileSplitMenuEO.getId());
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length())); if(!StringUtils.isEmpty(itemName)){
addItermsConditionsText(message, itemValList, paragraphString.substring(nowStart.get(i).length()));
}
messageList.add(message); messageList.add(message);
nowStart = getNewNowStartKmvssTable(catalogerArr, nowStart.get(i), menuLevel); nowStart = getNewNowStartKmvssTable(catalogerArr, nowStart.get(i), menuLevel);
menuCanAdd = true; menuCanAdd = true;
@@ -3300,7 +3300,6 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
for(OSSFile fileExportDto : allRelevFileList){ for(OSSFile fileExportDto : allRelevFileList){
String oldPath = fileExportDto.getUrl(); String oldPath = fileExportDto.getUrl();
String newPath = fileNowPath + File.separator + fileExportDto.getFileName(); String newPath = fileNowPath + File.separator + fileExportDto.getFileName();
File oldFile = new File(oldPath);
if (CosBootUtil.doesObjectExist(oldPath)){ if (CosBootUtil.doesObjectExist(oldPath)){
InputStream in = CosBootUtil.download(oldPath); InputStream in = CosBootUtil.download(oldPath);
copyFile1(in, newPath); copyFile1(in, newPath);
+4 -1
View File
@@ -934,5 +934,8 @@ module.exports = {
pleaseWaitWhileRunning: 'Please wait while running', pleaseWaitWhileRunning: 'Please wait while running',
roleSwitching: 'Role switching', roleSwitching: 'Role switching',
setCreator: 'Set Creator', setCreator: 'Set Creator',
documentLibraryDetails: 'Document library details' documentLibraryDetails: 'Document library details',
question:'Question',
ConfirmQuestion:'Confirm Question',
OnlyOrTaskconfirmationOut:'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out',
} }
+60 -57
View File
@@ -604,7 +604,7 @@ module.exports = {
StandardImplementationDate: '标准实施日期', StandardImplementationDate: '标准实施日期',
regulatoryEngineer: '法规工程师', regulatoryEngineer: '法规工程师',
certifiedEngineer: '认证工程师', certifiedEngineer: '认证工程师',
regulatoryEngineerOrcertifiedEngineer:'法规工程师/认证工程师', regulatoryEngineerOrcertifiedEngineer: '法规工程师/认证工程师',
judge: '判断', judge: '判断',
engineeringInterfacePerson: '工程接口人', engineeringInterfacePerson: '工程接口人',
typeOfDeliverables: '交付物类型', typeOfDeliverables: '交付物类型',
@@ -636,7 +636,7 @@ module.exports = {
ListOfRelevantPersonnel: '相关人员名单', ListOfRelevantPersonnel: '相关人员名单',
DeliverableStatus: '交付物状态', DeliverableStatus: '交付物状态',
CurrentStatusOfTheProject: '项目当前状态', CurrentStatusOfTheProject: '项目当前状态',
CurrentStatus:'当前状态', CurrentStatus: '当前状态',
NonConformance: '未符合项', NonConformance: '未符合项',
listSubclauses: '清单条目', listSubclauses: '清单条目',
fileType: '文件类型', fileType: '文件类型',
@@ -733,7 +733,7 @@ module.exports = {
OneDecimalPlace: '一位小数', OneDecimalPlace: '一位小数',
TwoDecimalplaces: '两位小数', TwoDecimalplaces: '两位小数',
Threedecimalplaces: '三位小数', Threedecimalplaces: '三位小数',
FourDecimalplaces:'四位小数', FourDecimalplaces: '四位小数',
Positivefloatingpointnumber: '正浮点数', Positivefloatingpointnumber: '正浮点数',
oneconfigurationInformation: '至少含有一个配置信息', oneconfigurationInformation: '至少含有一个配置信息',
Correspondingstandarddeleted: '对应标准已删除', Correspondingstandarddeleted: '对应标准已删除',
@@ -872,57 +872,57 @@ module.exports = {
totalTable: '总数', totalTable: '总数',
applicableSupplement: '适用增补件', applicableSupplement: '适用增补件',
taskDescription: '任务说明', taskDescription: '任务说明',
descriptionDeliverables:'交付物说明', descriptionDeliverables: '交付物说明',
startMonth:'开始日期', startMonth: '开始日期',
endMonth:'结束日期', endMonth: '结束日期',
Importing:'导入中...', Importing: '导入中...',
projectDeliveryDescription:'工程交付说明', projectDeliveryDescription: '工程交付说明',
cancelConfirm:'取消确认', cancelConfirm: '取消确认',
currentInformation:'当前信息', currentInformation: '当前信息',
deliveryHistory:'交付历史', deliveryHistory: '交付历史',
projectDeliveryRequirements:'工程交付说明', projectDeliveryRequirements: '工程交付说明',
personLiableConfirm:'责任人确认', personLiableConfirm: '责任人确认',
complianceResults:'符合性结果', complianceResults: '符合性结果',
noData:'暂无数据', noData: '暂无数据',
confirmOperation:'确认操作', confirmOperation: '确认操作',
sponsorReview:'发起人审查', sponsorReview: '发起人审查',
fillInProjectDelivery:'填写工程交付', fillInProjectDelivery: '填写工程交付',
Resubmit:'重新提交', Resubmit: '重新提交',
Quantity:'数量', Quantity: '数量',
pleaseConfirmationResults:'请根据工程确认结果选择符合性状态', pleaseConfirmationResults: '请根据工程确认结果选择符合性状态',
pleaseReviewTask:'请您添加对该条审查任务的工程确认信息', pleaseReviewTask: '请您添加对该条审查任务的工程确认信息',
pleaseWillBeReturned:'请对工程确认结果和责任人审查结果进行再次确认若符合要求则进行提交否则进行退回', pleaseWillBeReturned: '请对工程确认结果和责任人审查结果进行再次确认若符合要求则进行提交否则进行退回',
pleaseSubmitStatus:'请把工程确认的数据都点为确认状态进行提交', pleaseSubmitStatus: '请把工程确认的数据都点为确认状态进行提交',
modelName:'车型名称', modelName: '车型名称',
modelYear:'年款', modelYear: '年款',
NoteConfirmTheChange:'注意变更后该条清单变为未审查状态将从内部审查工作开始从头进行历史数据都将丢弃是否确认变更', NoteConfirmTheChange: '注意变更后该条清单变为未审查状态将从内部审查工作开始从头进行历史数据都将丢弃是否确认变更',
onlyDataChanged:'只能变更任务确认状态为接受的数据', onlyDataChanged: '只能变更任务确认状态为接受的数据',
inquiry:'询问', inquiry: '询问',
ConfirmationDeadline:'确认截止时间', ConfirmationDeadline: '确认截止时间',
regulatoryCertificationTaskConfirmation:'法规认证任务确认', regulatoryCertificationTaskConfirmation: '法规认证任务确认',
confirmationEngineeringInterfacePerson:'工程接口人确认', confirmationEngineeringInterfacePerson: '工程接口人确认',
engineerReply:'工程师回复', engineerReply: '工程师回复',
catalogFile:'目录文件', catalogFile: '目录文件',
testScheme:'试验方案', testScheme: '试验方案',
testReportLocation:'检测报告位置', testReportLocation: '检测报告位置',
explain:'说明', explain: '说明',
dataCannotEmpty:'数据不能为空', dataCannotEmpty: '数据不能为空',
documentDynamics:'文档动态', documentDynamics: '文档动态',
theNumberAgain:'编号已存在不能重复添加', theNumberAgain: '编号已存在不能重复添加',
myList:'我的待办', myList: '我的待办',
myNews:'我的消息', myNews: '我的消息',
monthlyReportRegulations:'法规月报', monthlyReportRegulations: '法规月报',
Pending:'待处理', Pending: '待处理',
custom:'自定义', custom: '自定义',
notSelected:'未选择', notSelected: '未选择',
ExportReport:'导出报告', ExportReport: '导出报告',
basicInformation:'基础信息', basicInformation: '基础信息',
replyFromProjectContact:'工程接口人回复', replyFromProjectContact: '工程接口人回复',
pleaseUpload:'请上传', pleaseUpload: '请上传',
fullScreenView:'全屏查看', fullScreenView: '全屏查看',
systemPrompt:'系统提示', systemPrompt: '系统提示',
loginExpired:'登录已过期', loginExpired: '登录已过期',
reportNotUploaded:'报告未上传', reportNotUploaded: '报告未上传',
position: '职位', position: '职位',
// 认证权限状态 // 认证权限状态
CollectionInitiated: '待发起收集', CollectionInitiated: '待发起收集',
@@ -937,7 +937,10 @@ module.exports = {
toHavePermission: '才有权限', toHavePermission: '才有权限',
and: '并且', and: '并且',
pleaseWaitWhileRunning: '运行中请稍等', pleaseWaitWhileRunning: '运行中请稍等',
roleSwitching:'角色切换', roleSwitching: '角色切换',
setCreator:'设置创建人', setCreator: '设置创建人',
documentLibraryDetails:'文档库详情', documentLibraryDetails: '文档库详情',
question: '催办',
ConfirmQuestion: '确认催办',
OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办',
} }
@@ -89,13 +89,17 @@
{{ $t('bringInRelevantPersonnel') }} {{ $t('bringInRelevantPersonnel') }}
</div> </div>
<div class="operator-text-title" @click="ExportReportClick"> <div class="operator-text-title" @click="ExportReportClick">
<a-icon type="user"/> <a-icon type="export"/>
{{ $t('ExportReport') }} {{ $t('ExportReport') }}
</div> </div>
<div class="operator-text-title" @click="batSettingClick"> <div class="operator-text-title" @click="batSettingClick">
<a-icon type="setting"/> <a-icon type="setting"/>
{{ $t('batSetting') }} {{ $t('batSetting') }}
</div> </div>
<div class="operator-text-title" @click="questionClick">
<a-icon type="apartment"/>
{{ $t('question') }}
</div>
</template> </template>
<div class="operator-text" style="position: relative"> <div class="operator-text" style="position: relative">
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }} <span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
@@ -971,6 +975,49 @@
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
questionClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
if (this.dataSource[i].taskAffirmStatus == 'List to confirm' ||
this.dataSource[i].inventoryAffirmStatus == 'List to confirm') {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('OnlyOrTaskconfirmationOut'))
return
}
}
}
}
if (isTrue) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmQuestion'),
onOk() {
let query = {
ids: selectedRowKeys.join(','),
projectLibraryId: _this.$route.query.id
}
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
fixedPlateClick() { fixedPlateClick() {
if (this.dataSource && this.dataSource.length > 0) { if (this.dataSource && this.dataSource.length > 0) {
let isTrue let isTrue
@@ -27,9 +27,40 @@
</div> </div>
</a-range-picker> </a-range-picker>
</span> </span>
<div class="box-top-content"> <div class="box-top-content" style="position: relative">
<div id="main"></div> <!-- <div id="main"></div>-->
<div class="axis-tip"></div> <!-- <div class="axis-tip"></div>-->
<div class="box-top-content-left">
<div class="box-top-content-left-text" :title="item.projectName"
v-for="(item,index) in timeData" :key="index">
{{item.projectName}}
</div>
</div>
<div class="box-top-content-right">
<div class="box-top-content-right-top">
<div class="box-top-content-right-top-text" v-for="(item,index) in timeList" :key="index">{{item}}</div>
</div>
<div class="box-top-content-right-bottom">
<div class="process-content" v-for="(item,index) in timeData" :key="index">
<div class="process-content-right-xian"></div>
<div class="process-content-content" :style="val.left"
v-for="(val,indexOne) in item.data[0]" :key="indexOne">
<div class="process-content-right-top">{{val.name}}</div>
<img v-if="val.status == 1" src="../../../../assets/wancheng.png" class="process-content-left" alt="">
<img v-else-if="val.status == 2" src="../../../../assets/shijian.png" class="process-content-left"
alt="">
<img v-else-if="val.status == 3" src="../../../../assets/xian.png" class="process-content-left"
alt="">
<div class="process-content-right-button">{{val.time.slice(0,11)}}</div>
</div>
</div>
<div class="box-top-content-right-xian"></div>
<div class="box-top-content-right-text">
{{handlingTime}}
</div>
</div>
</div>
<JLoading :loading="loadingMain">{{this.$t('dataLoading')}}</JLoading> <JLoading :loading="loadingMain">{{this.$t('dataLoading')}}</JLoading>
</div> </div>
</div> </div>
@@ -57,7 +88,10 @@
loadingMain: false, loadingMain: false,
dataSource: [], dataSource: [],
open: false, open: false,
getTime: [] getTime: [],
timeList: [],
timeData: [],
handlingTime: ''
} }
}, },
created() { created() {
@@ -65,6 +99,7 @@
}, },
mounted() { mounted() {
this.getTimeline() this.getTimeline()
this.handlingTime = moment(new Date()).format('YYYY-MM-DD')
}, },
methods: { methods: {
getTimeline() { getTimeline() {
@@ -104,166 +139,100 @@
} }
getAction(this.url.timelineList, query).then((res) => { getAction(this.url.timelineList, query).then((res) => {
if (res.success) { if (res.success) {
this.getEcharts(time, res.result.reverse()) this.getEcharts(time, res.result)
} }
}) })
}, },
getEcharts(timeList, timeData) { getEcharts(timeList, timeData) {
var chartDom = document.getElementById('main') this.timeList = []
var myChart = echarts.init(chartDom) if (timeList.length <= 12) {
var option this.timeList = timeList
let list = [] } else if (timeList.length <= 24) {
let listTime = [] timeList.forEach((res, index) => {
for (let i = 0; i < timeList.length; i++) { if (index == 0) {
for (let j = 0; j < 31; j++) { this.timeList.push(res)
let num } else if (index == timeList.length - 1) {
if ((j + 1) < 10) { this.timeList.push(res)
num = '0' + (j + 1) } else if (index % 2 == 0) {
} else { if (this.timeList.length < 11) {
num = (j + 1) this.timeList.push(res)
}
}
})
} else if (timeList.length <= 36) {
timeList.forEach((res, index) => {
if (index == 0) {
this.timeList.push(res)
} else if (index == timeList.length - 1) {
this.timeList.push(res)
} else if (index % 3 == 0) {
if (this.timeList.length < 11) {
this.timeList.push(res)
}
}
})
} else if (timeList.length <= 48) {
timeList.forEach((res, index) => {
if (index == 0) {
this.timeList.push(res)
} else if (index == timeList.length - 1) {
this.timeList.push(res)
} else if (index % 4 == 0) {
if (this.timeList.length < 11) {
this.timeList.push(res)
}
}
})
} else if (timeList.length <= 60) {
timeList.forEach((res, index) => {
if (index == 0) {
this.timeList.push(res)
} else if (index == timeList.length - 1) {
this.timeList.push(res)
} else if (index % 5 == 0) {
if (this.timeList.length < 11) {
this.timeList.push(res)
}
} }
listTime.push(timeList[i])
list.push(timeList[i] + '-' + num)
}
}
const hours = listTime
const days = []
let content = []
if (timeData && timeData.length > 0) {
timeData.forEach(res => {
days.push(res.projectName)
content.push(res.data[0])
}) })
} }
let timeDataList = [] let dataList = document.getElementsByClassName('box-top-content-right-top-text')
let data = [] let contentRightText = document.getElementsByClassName('box-top-content-right-text')
for (let j = 0; j < content.length; j++) { let contentRightXian = document.getElementsByClassName('box-top-content-right-xian')
for (let k = 0; k < content[j].length; k++) {
content[j][k].index = j setTimeout(() => {
timeDataList.push(content[j][k]) let length = timeList.length / dataList.length
} let clientWidth = dataList[0].clientWidth
} clientWidth = clientWidth / length
for (let i = 0; i < list.length; i++) { for (let i = 0; i < timeData.length; i++) {
for (let j = 0; j < timeDataList.length; j++) { for (let j = 0; j < timeData[i].data[0].length; j++) {
let time = JSON.stringify(timeDataList[j].time).slice(1, 11) for (let k = 0; k < dataList.length; k++) {
if (time == list[i]) { let num = (Math.ceil(clientWidth / 31)) * parseInt(timeData[i].data[0][j].time.slice(8, 10))
data.push([i, timeDataList[j].index, 12, j]) timeList.forEach((res, index) => {
if (timeData[i].data[0][j].time.slice(0, 7) == res.slice(0, 7)) {
timeData[i].data[0][j].left = 'left:' + ((clientWidth * index + num) + 4) + 'px'
}
})
}
} }
} }
} contentRightText[0].style = 'display:none'
let num = timeList.length * 3 contentRightXian[0].style = 'display:none'
if (num < 31) { let clientWidthOne = dataList[0].clientWidth
num = 31 clientWidthOne = clientWidthOne / length
} let num = Math.ceil(clientWidthOne / 31) * parseInt(this.handlingTime.slice(8, 10))
option = { timeList.forEach((res, index) => {
legend: { if (res.slice(0, 7) == this.handlingTime.slice(0, 7)) {
data: ['Punch Card'], contentRightText[0].style = 'left:' + ((clientWidthOne * index + num) - 24) + 'px;' + 'display:block'
left: 'right' contentRightXian[0].style = 'left:' + ((clientWidthOne * index + num) + 10) + 'px;' + 'display:block'
},
tooltip: {
position: 'left',
formatter: function(params) {
return (
timeDataList[params.value[3]].name + '<br/>' +
timeDataList[params.value[3]].time.slice(0, 11)
)
} }
}, })
grid: {
top: 10, this.timeData = timeData
left: 40, this.timeData = [...this.timeData]
right: 40, this.loadingMain = false
containLabel: true }, 500)
},
xAxis: {
type: 'category',
data: hours,
boundaryGap: false,
splitLine: {
show: false
},
axisTick: {
show: false
},
position: 'top',
axisLabel: {
showMinLabel: true,
interval: num,
textStyle: {
fontFamily: 'Blue Sky Noto',
color: '#000F16',
fontSize: '16'
}
},
axisLine: {
show: false
}
},
yAxis: {
type: 'category',
data: days,
splitLine: {
show: false
},
axisLine: {
show: false
},
axisTick: {
show: false
},
scale: true,
triggerEvent: true,
axisLabel: {
textStyle: {
fontFamily: 'Blue Sky Noto',
color: '#000F16',
fontSize: '16'
},
margin: 50,
formatter: function(params) {
var val = ''
if (params.length > 8) {
val = params.substr(0, 8) + '...'
return val
} else {
return params
}
}
}
},
series: [
{
type: 'scatter',
color:['#21c9cc'],
symbolSize: function(val) {
return val[2] * 2
},
data: data,
animationDelay: function(idx) {
return idx * 5
}
}
]
}
this.loadingMain = false
option && myChart.setOption(option, true)
window.onresize = () => {
myChart.resize()
}
myChart.on('mouseover', 'yAxis.category', function(e) {
console.log(e)
let axisTip = document.querySelector('.axis-tip')
console.log(axisTip)
axisTip.innerText = e.value
axisTip.style.left = 100 + 'px'
axisTip.style.top = (e.event.event.y) - 180 + 'px'
axisTip.style.display = 'block'
})
myChart.on('mouseout', 'yAxis.category', function(e) {
let axisTip = document.querySelector('.axis-tip')
axisTip.innerText = ''
axisTip.style.display = 'none'
})
} }
} }
} }
@@ -339,7 +308,7 @@
width: 100%; width: 100%;
height: calc(100vh - 160px); height: calc(100vh - 160px);
margin-bottom: 20px; margin-bottom: 20px;
padding: 10px 20px; padding: 25px 20px 10px 20px;
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
} }
@@ -373,4 +342,132 @@
margin-top: -4px; margin-top: -4px;
margin-right: 20px; margin-right: 20px;
} }
.box-top-content-left {
width: 160px;
float: left;
padding-top: 100px;
margin-right: 20px;
}
.box-top-content-left-text {
color: #191E29;
font-weight: bold;
font-size: 14px;
height: 104px;
letter-spacing: 0px;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.box-top-content-right {
width: calc(100% - 180px);
float: left;
}
.box-top-content-right-top {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.box-top-content-right-top-text {
border-left: 1px #EAEAEC solid;
border-top: 1px #EAEAEC solid;
border-bottom: 1px #EAEAEC solid;
flex: 1;
height: 36px;
padding-left: 10px;
color: #54565A;
font-weight: bold;
font-size: 14px;
line-height: 36px;
letter-spacing: 0px;
text-align: center;
}
.box-top-content-right-top-text:last-child {
border-right: 1px #EAEAEC solid;
}
.box-top-content-right-bottom {
position: relative;
padding-top: 60px;
}
.process-content {
position: relative;
height: 104px;
.process-content-content {
background: #fff;
z-index: 98;
/*padding: 0 6px;*/
position: absolute;
left: 40px;
text-align: center;
width: 24px;
height: 24px;
border-radius: 50%;
margin-top: 5px;
.process-content-left {
width: 24px;
height: 24px;
/*margin-top: 5px;*/
}
.process-content-right-top {
font-size: 14px;
color: #040B29;
max-width: 155px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: absolute;
top: -8px;
left: 50%;
transform: translate(-50%, -50%);
}
.process-content-right-button {
width: 70px;
font-size: 12px;
font-weight: 400;
color: #6F7385;
position: absolute;
left: 50%;
top: 34px;
transform: translate(-50%, -50%);
}
}
.process-content-right-xian {
height: 2px;
width: 100%;
background: #E6E6E9;
position: absolute;
top: 16px;
}
}
.box-top-content-right-xian {
width: 2px;
height: 100%;
border: 1px #21c9cc dashed;
position: absolute;
top: -36px;
z-index: 999;
}
.box-top-content-right-text {
position: absolute;
top: -60px;
color: #21c9cc;
font-weight: bold;
font-size: 14px;
width: 100px;
}
</style> </style>
@@ -54,8 +54,37 @@
</a-range-picker> </a-range-picker>
</span> </span>
<div class="box-top-content" style="position: relative"> <div class="box-top-content" style="position: relative">
<div id="main"></div> <!-- <div id="main"></div>-->
<div class="axis-tip"></div> <!-- <div class="axis-tip"></div>-->
<div class="box-top-content-left">
<div class="box-top-content-left-text" :title="item.projectName"
v-for="(item,index) in timeData" :key="index">
{{item.projectName}}
</div>
</div>
<div class="box-top-content-right">
<div class="box-top-content-right-top">
<div class="box-top-content-right-top-text" v-for="(item,index) in timeList" :key="index">{{item}}</div>
</div>
<div class="box-top-content-right-bottom">
<div class="process-content" v-for="(item,index) in timeData" :key="index">
<div class="process-content-right-xian"></div>
<div class="process-content-content" :style="val.left"
v-for="(val,indexOne) in item.data[0]" :key="indexOne">
<div class="process-content-right-top">{{val.name}}</div>
<img v-if="val.status == 1" src="../../../assets/wancheng.png" class="process-content-left" alt="">
<img v-else-if="val.status == 2" src="../../../assets/shijian.png" class="process-content-left" alt="">
<img v-else-if="val.status == 3" src="../../../assets/xian.png" class="process-content-left" alt="">
<div class="process-content-right-button">{{val.time.slice(0,11)}}</div>
</div>
</div>
<div class="box-top-content-right-xian"></div>
<div class="box-top-content-right-text">
{{handlingTime}}
</div>
</div>
</div>
<JLoading :loading="loadingMain">{{this.$t('dataLoading')}}</JLoading> <JLoading :loading="loadingMain">{{this.$t('dataLoading')}}</JLoading>
</div> </div>
</div> </div>
@@ -116,6 +145,8 @@
data() { data() {
return { return {
queryParam: {}, queryParam: {},
timeList: [],
timeData: [],
loading: false, loading: false,
loadingMain: false, loadingMain: false,
dataSource: [], dataSource: [],
@@ -191,12 +222,14 @@
} }
], ],
startTime: undefined, startTime: undefined,
endTime: undefined endTime: undefined,
handlingTime: ''
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.getTimeline() this.getTimeline()
this.handlingTime = moment(new Date()).format('YYYY-MM-DD')
}, },
methods: { methods: {
getTimeline() { getTimeline() {
@@ -238,164 +271,100 @@
} }
getAction(this.url.timelineList, query).then((res) => { getAction(this.url.timelineList, query).then((res) => {
if (res.success) { if (res.success) {
this.getEcharts(time, res.result.reverse()) this.getEcharts(time, res.result)
} }
}) })
}, },
getEcharts(timeList, timeData) { getEcharts(timeList, timeData) {
var chartDom = document.getElementById('main') this.timeList = []
var myChart = echarts.init(chartDom) if (timeList.length <= 12) {
var option this.timeList = timeList
let list = [] } else if (timeList.length <= 24) {
let listTime = [] timeList.forEach((res, index) => {
for (let i = 0; i < timeList.length; i++) { if (index == 0) {
for (let j = 0; j < 31; j++) { this.timeList.push(res)
let num } else if (index == timeList.length - 1) {
if ((j + 1) < 10) { this.timeList.push(res)
num = '0' + (j + 1) } else if (index % 2 == 0) {
} else { if (this.timeList.length < 11) {
num = (j + 1) this.timeList.push(res)
}
}
})
} else if (timeList.length <= 36) {
timeList.forEach((res, index) => {
if (index == 0) {
this.timeList.push(res)
} else if (index == timeList.length - 1) {
this.timeList.push(res)
} else if (index % 3 == 0) {
if (this.timeList.length < 11) {
this.timeList.push(res)
}
}
})
} else if (timeList.length <= 48) {
timeList.forEach((res, index) => {
if (index == 0) {
this.timeList.push(res)
} else if (index == timeList.length - 1) {
this.timeList.push(res)
} else if (index % 4 == 0) {
if (this.timeList.length < 11) {
this.timeList.push(res)
}
}
})
} else if (timeList.length <= 60) {
timeList.forEach((res, index) => {
if (index == 0) {
this.timeList.push(res)
} else if (index == timeList.length - 1) {
this.timeList.push(res)
} else if (index % 5 == 0) {
if (this.timeList.length < 11) {
this.timeList.push(res)
}
} }
listTime.push(timeList[i])
list.push(timeList[i] + '-' + num)
}
}
const hours = listTime
const days = []
let content = []
if (timeData && timeData.length > 0) {
timeData.forEach(res => {
days.push(res.projectName)
content.push(res.data[0])
}) })
} }
let timeDataList = [] let dataList = document.getElementsByClassName('box-top-content-right-top-text')
let data = [] let contentRightText = document.getElementsByClassName('box-top-content-right-text')
for (let j = 0; j < content.length; j++) { let contentRightXian = document.getElementsByClassName('box-top-content-right-xian')
for (let k = 0; k < content[j].length; k++) {
content[j][k].index = j setTimeout(() => {
timeDataList.push(content[j][k]) let length = timeList.length / dataList.length
} let clientWidth = dataList[0].clientWidth
} clientWidth = clientWidth / length
for (let i = 0; i < list.length; i++) { for (let i = 0; i < timeData.length; i++) {
for (let j = 0; j < timeDataList.length; j++) { for (let j = 0; j < timeData[i].data[0].length; j++) {
let time = JSON.stringify(timeDataList[j].time).slice(1, 11) for (let k = 0; k < dataList.length; k++) {
if (time == list[i]) { let num = (Math.ceil(clientWidth / 31)) * parseInt(timeData[i].data[0][j].time.slice(8, 10))
data.push([i, timeDataList[j].index, 12, j]) timeList.forEach((res, index) => {
if (timeData[i].data[0][j].time.slice(0, 7) == res.slice(0, 7)) {
timeData[i].data[0][j].left = 'left:' + ((clientWidth * index + num) + 4) + 'px'
}
})
}
} }
} }
} contentRightText[0].style = 'display:none'
let num = timeList.length * 3 contentRightXian[0].style = 'display:none'
if (num < 31) { let clientWidthOne = dataList[0].clientWidth
num = 31 clientWidthOne = clientWidthOne / length
} let num = Math.ceil(clientWidthOne / 31) * parseInt(this.handlingTime.slice(8, 10))
option = { timeList.forEach((res, index) => {
legend: { if (res.slice(0, 7) == this.handlingTime.slice(0, 7)) {
data: ['Punch Card'], contentRightText[0].style = 'left:' + ((clientWidthOne * index + num) - 24) + 'px;' + 'display:block'
left: 'right' contentRightXian[0].style = 'left:' + ((clientWidthOne * index + num) + 10) + 'px;' + 'display:block'
},
tooltip: {
position: 'left',
formatter: function(params) {
return (
timeDataList[params.value[3]].name + '<br/>' +
timeDataList[params.value[3]].time.slice(0, 11)
)
} }
}, })
grid: {
top: 10, this.timeData = timeData
left: 40, this.timeData = [...this.timeData]
right: 40, this.loadingMain = false
containLabel: true }, 500)
},
xAxis: {
type: 'category',
data: hours,
boundaryGap: false,
splitLine: {
show: false
},
axisTick: {
show: false
},
position: 'top',
axisLabel: {
showMinLabel: true,
interval: num,
textStyle: {
fontFamily: 'Blue Sky Noto',
color: '#000F16',
fontSize: '16'
}
},
axisLine: {
show: false
}
},
yAxis: {
type: 'category',
data: days,
splitLine: {
show: false
},
axisLine: {
show: false
},
axisTick: {
show: false
},
scale: true,
triggerEvent: true,
axisLabel: {
textStyle: {
fontFamily: 'Blue Sky Noto',
color: '#000F16',
fontSize: '16'
},
margin: 50,
formatter: function(params) {
var val = ''
if (params.length > 8) {
val = params.substr(0, 8) + '...'
return val
} else {
return params
}
}
}
},
series: [
{
type: 'scatter',
color:['#21c9cc'],
symbolSize: function(val) {
return val[2] * 2
},
data: data,
animationDelay: function(idx) {
return idx * 5
}
}
]
}
this.loadingMain = false
option && myChart.setOption(option, true)
window.onresize = () => {
myChart.resize()
}
myChart.on('mouseover', 'yAxis.category', function(e) {
let axisTip = document.querySelector('.axis-tip')
axisTip.innerText = e.value
axisTip.style.left = 100 + 'px'
axisTip.style.top = (e.event.event.y) - 180 + 'px'
axisTip.style.display = 'block'
})
myChart.on('mouseout', 'yAxis.category', function(e) {
let axisTip = document.querySelector('.axis-tip')
axisTip.innerText = ''
axisTip.style.display = 'none'
})
}, },
TaskPlanListClick() { TaskPlanListClick() {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
@@ -439,7 +408,7 @@
width: 300px; width: 300px;
} }
</style> </style>
<style scoped> <style scoped lang="less">
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.box-title-text { .box-title-text {
@@ -480,7 +449,7 @@
.box-top-content { .box-top-content {
width: 100%; width: 100%;
height: 400px; height: 500px;
margin-bottom: 20px; margin-bottom: 20px;
padding: 20px 0; padding: 20px 0;
box-sizing: border-box; box-sizing: border-box;
@@ -521,4 +490,132 @@
color: #21c9cc; color: #21c9cc;
cursor: pointer; cursor: pointer;
} }
.box-top-content-left {
width: 160px;
float: left;
padding-top: 100px;
margin-right: 20px;
}
.box-top-content-left-text {
color: #191E29;
font-weight: bold;
font-size: 14px;
height: 104px;
letter-spacing: 0px;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.box-top-content-right {
width: calc(100% - 180px);
float: left;
}
.box-top-content-right-top {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.box-top-content-right-top-text {
border-left: 1px #EAEAEC solid;
border-top: 1px #EAEAEC solid;
border-bottom: 1px #EAEAEC solid;
flex: 1;
height: 36px;
padding-left: 10px;
color: #54565A;
font-weight: bold;
font-size: 14px;
line-height: 36px;
letter-spacing: 0px;
text-align: center;
}
.box-top-content-right-top-text:last-child {
border-right: 1px #EAEAEC solid;
}
.box-top-content-right-bottom {
position: relative;
padding-top: 60px;
}
.process-content {
position: relative;
height: 104px;
.process-content-content {
background: #fff;
z-index: 98;
/*padding: 0 6px;*/
position: absolute;
left: 40px;
text-align: center;
width: 24px;
height: 24px;
border-radius: 50%;
margin-top: 5px;
.process-content-left {
width: 24px;
height: 24px;
/*margin-top: 5px;*/
}
.process-content-right-top {
font-size: 14px;
color: #040B29;
max-width: 155px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: absolute;
top: -8px;
left: 50%;
transform: translate(-50%, -50%);
}
.process-content-right-button {
width: 70px;
font-size: 12px;
font-weight: 400;
color: #6F7385;
position: absolute;
left: 50%;
top: 34px;
transform: translate(-50%, -50%);
}
}
.process-content-right-xian {
height: 2px;
width: 100%;
background: #E6E6E9;
position: absolute;
top: 16px;
}
}
.box-top-content-right-xian {
width: 2px;
height: 100%;
border: 1px #21c9cc dashed;
position: absolute;
top: -36px;
z-index: 999;
}
.box-top-content-right-text {
position: absolute;
top: -60px;
color: #21c9cc;
font-weight: bold;
font-size: 14px;
width: 100px;
}
</style> </style>