参数收集清单
1.同步上报库 2.认证工程师、工程接口人、填写人 退回 3.认证工程师、工程接口人 强制撤回 4.工程接口人分配填写人 5.填写人提交 操作增加历史log
This commit is contained in:
+231
-5
@@ -1169,10 +1169,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<ParamsConfigDataEO> newConfigDataEOList = new ArrayList<>();
|
List<ParamsConfigDataEO> newConfigDataEOList = new ArrayList<>();
|
||||||
|
|
||||||
List<ParamsCollectManifestEO> updateCollectManifestEOList = new ArrayList<>();
|
List<ParamsCollectManifestEO> updateCollectManifestEOList = new ArrayList<>();
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
List<ParamsCollectManifestLogEO> paramsCollectManifestLogEOList = new ArrayList<>();
|
||||||
|
|
||||||
// 处理数据
|
// 处理数据
|
||||||
for (Map<String, Object> map : configDataList) {
|
for (Map<String, Object> map : configDataList) {
|
||||||
String paramsCollectManifestId = (String) map.get("id");
|
String paramsCollectManifestId = (String) map.get("id");
|
||||||
|
ParamsCollectManifestEO paramsCollectManifestEO = this.paramsCollectManifestEOMapper.selectById(paramsCollectManifestId);
|
||||||
|
|
||||||
// 修改参数项状态
|
// 修改参数项状态
|
||||||
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
|
ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO();
|
||||||
@@ -1180,6 +1183,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
updateCollectManifestEO.setState(CollectManifestStateEnum.SUBMIT.getValue());
|
updateCollectManifestEO.setState(CollectManifestStateEnum.SUBMIT.getValue());
|
||||||
updateCollectManifestEOList.add(updateCollectManifestEO);
|
updateCollectManifestEOList.add(updateCollectManifestEO);
|
||||||
|
|
||||||
|
StringBuilder logCnContentSb = new StringBuilder();
|
||||||
|
logCnContentSb.append("填写人").append("\"").append(currentUser.getUsername()).append("\"").append("提交");
|
||||||
|
StringBuilder logEnContentSb = new StringBuilder();
|
||||||
|
logEnContentSb.append("\"").append(currentUser.getUsername()).append("\"").append(" submits ");
|
||||||
|
|
||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||||
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
||||||
@@ -1201,17 +1209,39 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||||
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
||||||
|
ParamsConfigEO paramsConfigEO = this.paramsConfigEOService.queryById(paramsConfigEOId);
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||||
|
boolean appendFlag = false; // 拼接标识
|
||||||
|
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
||||||
|
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
||||||
|
// 只要其中有一个值就可以进行拼接
|
||||||
|
if(StringUtils.isNotEmpty(dataValue)){
|
||||||
|
appendFlag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(appendFlag){
|
||||||
|
logCnContentSb.append(paramsConfigEO.getConfigName()).append("为");
|
||||||
|
logEnContentSb.append(" configuration ").append(paramsConfigEO.getConfigName()).append(" as ");
|
||||||
|
}
|
||||||
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
||||||
String type = (String) paramsConfigDataVO.get("type");
|
String type = (String) paramsConfigDataVO.get("type");
|
||||||
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
String dataValue = (String) paramsConfigDataVO.get("dataValue");
|
||||||
|
|
||||||
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
|
||||||
paramsConfigDataEO.setTextData(dataValue);
|
paramsConfigDataEO.setTextData(dataValue);
|
||||||
|
if (StringUtils.isNotEmpty(dataValue)) {
|
||||||
|
logCnContentSb.append("\"").append(dataValue).append("\"");
|
||||||
|
logEnContentSb.append("\"").append(dataValue).append("\"");
|
||||||
|
}
|
||||||
|
|
||||||
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|
||||||
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
|
||||||
paramsConfigDataEO.setPullData(dataValue);
|
paramsConfigDataEO.setPullData(dataValue);
|
||||||
|
if (StringUtils.isNotEmpty(dataValue)) {
|
||||||
|
logCnContentSb.append("\"").append(dataValue).append("\"");
|
||||||
|
logEnContentSb.append("\"").append(dataValue).append("\"");
|
||||||
|
}
|
||||||
|
|
||||||
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
|
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
|
||||||
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件
|
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件
|
||||||
@@ -1245,15 +1275,37 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
paramsConfigDataEO.setFileConnectId(dataValue);
|
paramsConfigDataEO.setFileConnectId(dataValue);
|
||||||
|
|
||||||
|
List<OSSFile> fileInfos = ossFileService.getFileInfos(dataValue);
|
||||||
|
String fileNames = fileInfos.stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||||
|
if (StringUtils.isNotEmpty(fileNames)) {
|
||||||
|
logCnContentSb.append("\"").append(fileNames).append("\"");
|
||||||
|
logEnContentSb.append("\"").append(fileNames).append("\"");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(appendFlag){
|
||||||
|
logCnContentSb.append(",");
|
||||||
|
logEnContentSb.append(" and ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
newConfigDataEOList.add(paramsConfigDataEO);
|
newConfigDataEOList.add(paramsConfigDataEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
|
paramsCollectManifestLogEO.setLogCnContent(logCnContentSb.toString().substring(0,logCnContentSb.toString().length()-1));
|
||||||
|
paramsCollectManifestLogEO.setLogEnContent(logEnContentSb.toString().substring(0,logEnContentSb.toString().length()-5));
|
||||||
|
paramsCollectManifestLogEO.setParamsManifestId(paramsCollectManifestEO.getParamsManifestId());
|
||||||
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量更新
|
// 批量更新
|
||||||
paramsConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
paramsConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsCollectManifestLogEOList)){
|
||||||
|
this.paramsCollectManifestLogEOService.saveBatch(paramsCollectManifestLogEOList);
|
||||||
|
}
|
||||||
return updateBatchById(updateCollectManifestEOList);
|
return updateBatchById(updateCollectManifestEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1640,10 +1692,16 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
|
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())) {
|
||||||
throw new JeroBootException("参数不能为空!");
|
throw new JeroBootException("参数不能为空!");
|
||||||
}
|
}
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
||||||
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
||||||
|
|
||||||
|
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||||
|
// 配置
|
||||||
|
List<ParamsConfigEO> paramsConfigEOList = this.paramsConfigEOService.queryList(paramsManifestId);
|
||||||
|
|
||||||
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
||||||
|
List<ParamsCollectManifestLogEO> paramsCollectManifestLogEOList = new ArrayList<>();
|
||||||
for (int i=0; i<paramsCollectManifestIdStr.length; i++) {
|
for (int i=0; i<paramsCollectManifestIdStr.length; i++) {
|
||||||
ParamsCollectManifestEO paramsCollectManifestEO = getById(paramsCollectManifestIdStr[i]);
|
ParamsCollectManifestEO paramsCollectManifestEO = getById(paramsCollectManifestIdStr[i]);
|
||||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||||
@@ -1657,10 +1715,82 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
updateEO.setState(String.valueOf(Integer.parseInt(paramsCollectManifestEO.getState()) + 1)); // 设置对应状态
|
updateEO.setState(String.valueOf(Integer.parseInt(paramsCollectManifestEO.getState()) + 1)); // 设置对应状态
|
||||||
}
|
}
|
||||||
updateEOList.add(updateEO);
|
updateEOList.add(updateEO);
|
||||||
|
|
||||||
|
StringBuilder logCnContentSb = new StringBuilder();
|
||||||
|
StringBuilder logEnContentSb = new StringBuilder();
|
||||||
|
|
||||||
|
String currentPersonRole = paramsCollectManifestVO.getCurrentPersonRole();
|
||||||
|
if(StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.HOMO.getValue()) || StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.SDT.getValue())){
|
||||||
|
if(StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.HOMO.getValue())){
|
||||||
|
logCnContentSb.append("认证工程师").append("\"").append(currentUser.getUsername()).append("\"").append("将");
|
||||||
|
logEnContentSb.append("The Homo Engineer ").append("\"").append(currentUser.getUsername()).append("\"").append(" returns the ");
|
||||||
|
}else if(StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.SDT.getValue())){
|
||||||
|
logCnContentSb.append("工程接口人").append("\"").append(currentUser.getUsername()).append("\"").append("将");
|
||||||
|
logEnContentSb.append("Eng. Interface ").append("\"").append(currentUser.getUsername()).append("\"").append(" will return the ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加配置数据
|
||||||
|
int paramsConfigLenth = 1;
|
||||||
|
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
||||||
|
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), paramsCollectManifestEO.getId());
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getPullData()) || StringUtils.isNotEmpty(configDataEO.getTextData()) || StringUtils.isNotEmpty(configDataEO.getFileConnectId())){
|
||||||
|
logCnContentSb.append(configEO.getConfigName());
|
||||||
|
logCnContentSb.append(" 的");
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getPullData())){
|
||||||
|
logCnContentSb.append("\"" +configDataEO.getPullData()+ "\"");
|
||||||
|
logEnContentSb.append("\"" +configDataEO.getPullData()+ "\"");
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getTextData())){
|
||||||
|
logCnContentSb.append("\"" +configDataEO.getTextData()+ "\"");
|
||||||
|
logEnContentSb.append("\"" +configDataEO.getTextData()+ "\"");
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getFileConnectId())){
|
||||||
|
List<OSSFile> fileInfos = ossFileService.getFileInfos(configDataEO.getFileConnectId());
|
||||||
|
String fileNames = fileInfos.stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||||
|
if (StringUtils.isNotEmpty(fileNames)) {
|
||||||
|
logCnContentSb.append("\"" +fileNames+ "\"");
|
||||||
|
logEnContentSb.append("\"" +fileNames+ "\"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logEnContentSb.append(" of configuration " +configEO.getConfigName()+ "");
|
||||||
|
|
||||||
|
// 如果配置有两条或两条以上,并且不是最后一次循环
|
||||||
|
if(paramsConfigEOList.size() > 1 && paramsConfigLenth != paramsConfigEOList.size()){
|
||||||
|
logCnContentSb.append(",");
|
||||||
|
logEnContentSb.append(" and ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
paramsConfigLenth ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.HOMO.getValue())){
|
||||||
|
logCnContentSb.append("退回给填写人").append("\"").append(paramsCollectManifestEO.getDre()).append("\"");
|
||||||
|
logEnContentSb.append(" to the person ").append("\"").append(paramsCollectManifestEO.getDre()).append("\".");
|
||||||
|
}else if(StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.SDT.getValue())){
|
||||||
|
logCnContentSb.append("退回给认证工程师");
|
||||||
|
logEnContentSb.append(" to the Homo Engineer.");
|
||||||
|
}
|
||||||
|
} else if(StringUtils.equals(currentPersonRole,CollectManifestUserTypeEnum.DRE.getValue())){
|
||||||
|
logCnContentSb.append("填写人").append("\"").append(currentUser.getUsername()).append("\"").append("退回给工程接口人").append("\"").append(paramsCollectManifestEO.getSdt()).append("\"");
|
||||||
|
logEnContentSb.append("DRE ").append("\"").append(currentUser.getUsername()).append("\"").append(" return to project Eng. Interface ").append("\"").append(paramsCollectManifestEO.getSdt()).append("\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
|
paramsCollectManifestLogEO.setLogCnContent(logCnContentSb.toString());
|
||||||
|
paramsCollectManifestLogEO.setLogEnContent(logEnContentSb.toString());
|
||||||
|
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
||||||
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
}
|
}
|
||||||
boolean update = updateBatchById(updateEOList);
|
boolean update = updateBatchById(updateEOList);
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsCollectManifestLogEOList)){
|
||||||
|
this.paramsCollectManifestLogEOService.saveBatch(paramsCollectManifestLogEOList);
|
||||||
|
}
|
||||||
if (update) {
|
if (update) {
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
|
||||||
//飞书
|
//飞书
|
||||||
for (ParamsCollectManifestEO paramsCollectManifestEO : updateEOList) {
|
for (ParamsCollectManifestEO paramsCollectManifestEO : updateEOList) {
|
||||||
paramsCollectManifestEO = getById(paramsCollectManifestEO.getId());
|
paramsCollectManifestEO = getById(paramsCollectManifestEO.getId());
|
||||||
@@ -1767,6 +1897,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
||||||
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
List<ParamsCollectManifestLogEO> paramsCollectManifestLogEOList = new ArrayList<>();
|
||||||
|
|
||||||
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
||||||
for (int i=0; i<paramsCollectManifestIdStr.length; i++) {
|
for (int i=0; i<paramsCollectManifestIdStr.length; i++) {
|
||||||
@@ -1787,6 +1919,16 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
updateEO.setId(paramsCollectManifestIdStr[i]);
|
updateEO.setId(paramsCollectManifestIdStr[i]);
|
||||||
updateEOList.add(updateEO);
|
updateEOList.add(updateEO);
|
||||||
|
|
||||||
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
|
paramsCollectManifestLogEO.setLogCnContent("工程接口人\"" +currentUser.getUsername()+ "\"将参数数据强制撤回");
|
||||||
|
paramsCollectManifestLogEO.setLogEnContent("The Eng. Interface \""+ currentUser.getUsername() +"\" will forcibly withdraw the parameter data");
|
||||||
|
paramsCollectManifestLogEO.setParamsManifestId(paramsCollectManifestEO.getParamsManifestId());
|
||||||
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsCollectManifestLogEOList)){
|
||||||
|
this.paramsCollectManifestLogEOService.saveBatch(paramsCollectManifestLogEOList);
|
||||||
}
|
}
|
||||||
return updateBatchById(updateEOList);
|
return updateBatchById(updateEOList);
|
||||||
}
|
}
|
||||||
@@ -1890,12 +2032,28 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<ParamsCollectManifestEO> paramsCollectManifestEOList = list(queryWrapper);
|
List<ParamsCollectManifestEO> paramsCollectManifestEOList = list(queryWrapper);
|
||||||
Date deadline = paramsCollectManifestEOList.get(0).getDeadline();
|
Date deadline = paramsCollectManifestEOList.get(0).getDeadline();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
List<ParamsCollectManifestLogEO> paramsCollectManifestLogEOList = new ArrayList<>();
|
||||||
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
|
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
|
||||||
if (i < 3) {
|
if (i < 3) {
|
||||||
connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(",");
|
connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(",");
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
String logCnContent = "工程接口人\"" +currentUser.getUsername()+ "\"将参数填写人由\"空\"修改为\"" + dre + "\"";
|
||||||
|
String logEnContent = "Eng. Interface \"" +currentUser.getUsername()+ "\" Change the parameter person from \"null\" to \"" +dre+ "\".";
|
||||||
|
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) {
|
||||||
|
logCnContent = "工程接口人\"" +currentUser.getUsername()+ "\"将参数填写人由\""+ paramsCollectManifestEO.getDre() +"\"修改为\"" + dre + "\"";
|
||||||
|
logEnContent = "Eng. Interface \"" +currentUser.getUsername()+ "\" Change the parameter person from \""+ paramsCollectManifestEO.getDre() +"\" to \"" + dre + "\".";
|
||||||
|
}
|
||||||
|
|
||||||
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
|
paramsCollectManifestLogEO.setLogCnContent(logCnContent);
|
||||||
|
paramsCollectManifestLogEO.setLogEnContent(logEnContent);
|
||||||
|
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
||||||
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
|
|
||||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||||
updateEO.setId(paramsCollectManifestEO.getId());
|
updateEO.setId(paramsCollectManifestEO.getId());
|
||||||
updateEO.setDre(dre); // 设置填写人
|
updateEO.setDre(dre); // 设置填写人
|
||||||
@@ -1904,6 +2062,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
boolean isSuccess = updateBatchById(updateEOList);
|
boolean isSuccess = updateBatchById(updateEOList);
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsCollectManifestLogEOList)){
|
||||||
|
this.paramsCollectManifestLogEOService.saveBatch(paramsCollectManifestLogEOList);
|
||||||
|
}
|
||||||
|
|
||||||
// 消息内容
|
// 消息内容
|
||||||
SysUser sysUser = sysUserService.getUserByName(dre);
|
SysUser sysUser = sysUserService.getUserByName(dre);
|
||||||
String[] thirdIds = new String[1];
|
String[] thirdIds = new String[1];
|
||||||
@@ -2020,7 +2182,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"开始了下发收集,工程接口人为\""+paramsCollectManifestEO.getSdt()+"\"");
|
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"开始了下发收集,工程接口人为\""+paramsCollectManifestEO.getSdt()+"\"");
|
||||||
paramsCollectManifestLogEO.setLogEnContent("The certified engineer \""+currentUser.getUsername()+"\" starts to deliver the collection, and the engineering interface is \""+paramsCollectManifestEO.getSdt()+"\".");
|
paramsCollectManifestLogEO.setLogEnContent("The Homo Engineer \""+currentUser.getUsername()+"\" starts to deliver the collection, and the Eng. Interface is \""+paramsCollectManifestEO.getSdt()+"\".");
|
||||||
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
||||||
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
@@ -2171,7 +2333,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"开始了下发收集,工程接口人为\""+paramsCollectManifestEO.getSdt()+"\"");
|
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"开始了下发收集,工程接口人为\""+paramsCollectManifestEO.getSdt()+"\"");
|
||||||
paramsCollectManifestLogEO.setLogEnContent("The certified engineer \""+currentUser.getUsername()+"\" starts to deliver the collection, and the engineering interface is \""+paramsCollectManifestEO.getSdt()+"\".");
|
paramsCollectManifestLogEO.setLogEnContent("The Homo Engineer \""+currentUser.getUsername()+"\" starts to deliver the collection, and the Eng. Interface is \""+paramsCollectManifestEO.getSdt()+"\".");
|
||||||
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
||||||
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
@@ -2478,6 +2640,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) {
|
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) {
|
||||||
throw new JeroBootException("参数不能为空!");
|
throw new JeroBootException("参数不能为空!");
|
||||||
}
|
}
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
String paramsCollectManifestIds = paramsCollectManifestVO.getIds();
|
||||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||||
|
|
||||||
@@ -2522,6 +2685,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<ParamsCollectManifestEO> paramsCollectManifestEOList = paramsCollectManifestEOMapper.selectBatchIds(paramsCollectManifestIdList);
|
List<ParamsCollectManifestEO> paramsCollectManifestEOList = paramsCollectManifestEOMapper.selectBatchIds(paramsCollectManifestIdList);
|
||||||
List<ParamsReportDetailEO> addReportDetailEOList = new ArrayList<>();
|
List<ParamsReportDetailEO> addReportDetailEOList = new ArrayList<>();
|
||||||
List<ParamsReportConfigDataEO> addReportConfigDataEOList = new ArrayList<>(); // 需要添加的配置数据
|
List<ParamsReportConfigDataEO> addReportConfigDataEOList = new ArrayList<>(); // 需要添加的配置数据
|
||||||
|
List<ParamsCollectManifestLogEO> paramsCollectManifestLogEOList = new ArrayList<>();
|
||||||
Date syncTime = new Date();
|
Date syncTime = new Date();
|
||||||
for (ParamsCollectManifestEO collectManifestEO : paramsCollectManifestEOList) {
|
for (ParamsCollectManifestEO collectManifestEO : paramsCollectManifestEOList) {
|
||||||
ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO();
|
ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO();
|
||||||
@@ -2532,7 +2696,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
addReportDetailEO.setSyncTime(syncTime);
|
addReportDetailEO.setSyncTime(syncTime);
|
||||||
addReportDetailEOList.add(addReportDetailEO);
|
addReportDetailEOList.add(addReportDetailEO);
|
||||||
|
|
||||||
|
StringBuilder logCnContentSb = new StringBuilder();
|
||||||
|
logCnContentSb.append("认证工程师").append("\"").append(currentUser.getUsername()).append("\"").append("将");
|
||||||
|
StringBuilder logEnContentSb = new StringBuilder();
|
||||||
|
logEnContentSb.append("The Homo Engineer ").append("\"").append(currentUser.getUsername()).append("\"").append(" will synchronize the");
|
||||||
|
|
||||||
// 添加配置数据
|
// 添加配置数据
|
||||||
|
int paramsConfigLenth = 1;
|
||||||
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
for (ParamsConfigEO configEO : paramsConfigEOList) {
|
||||||
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
|
||||||
|
|
||||||
@@ -2543,7 +2713,48 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
addReportConfigDataEO.setParamsCollectManifestId(reportDetailId);
|
addReportConfigDataEO.setParamsCollectManifestId(reportDetailId);
|
||||||
addReportConfigDataEOList.add(addReportConfigDataEO);
|
addReportConfigDataEOList.add(addReportConfigDataEO);
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getPullData()) || StringUtils.isNotEmpty(configDataEO.getTextData()) || StringUtils.isNotEmpty(configDataEO.getFileConnectId())){
|
||||||
|
logCnContentSb.append(configEO.getConfigName());
|
||||||
|
logCnContentSb.append(" 的");
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getPullData())){
|
||||||
|
logCnContentSb.append("\"" +configDataEO.getPullData()+ "\"");
|
||||||
|
logEnContentSb.append("\"" +configDataEO.getPullData()+ "\"");
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getTextData())){
|
||||||
|
logCnContentSb.append("\"" +configDataEO.getTextData()+ "\"");
|
||||||
|
logEnContentSb.append("\"" +configDataEO.getTextData()+ "\"");
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(configDataEO.getFileConnectId())){
|
||||||
|
List<OSSFile> fileInfos = ossFileService.getFileInfos(configDataEO.getFileConnectId());
|
||||||
|
String fileNames = fileInfos.stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||||
|
if (StringUtils.isNotEmpty(fileNames)) {
|
||||||
|
logCnContentSb.append("\"" +fileNames+ "\"");
|
||||||
|
logEnContentSb.append("\"" +fileNames+ "\"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logEnContentSb.append("of configuration " +configEO.getConfigName()+ "");
|
||||||
|
|
||||||
|
// 如果配置有两条或两条以上,并且不是最后一次循环
|
||||||
|
if(paramsConfigEOList.size() > 1 && paramsConfigLenth != paramsConfigEOList.size()){
|
||||||
|
logCnContentSb.append(",");
|
||||||
|
logEnContentSb.append(" and ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
paramsConfigLenth ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logCnContentSb.append(" 同步至上报库");
|
||||||
|
logEnContentSb.append(" to the report database");
|
||||||
|
|
||||||
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
|
paramsCollectManifestLogEO.setLogCnContent(logCnContentSb.toString());
|
||||||
|
paramsCollectManifestLogEO.setLogEnContent(logEnContentSb.toString());
|
||||||
|
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
||||||
|
paramsCollectManifestLogEO.setParamsCollectManifestId(collectManifestEO.getId());
|
||||||
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
|
List<String> nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
|
||||||
@@ -2625,6 +2836,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
boolean isSuccess = updateBatchById(updateEOList);
|
boolean isSuccess = updateBatchById(updateEOList);
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsCollectManifestLogEOList)){
|
||||||
|
this.paramsCollectManifestLogEOService.saveBatch(paramsCollectManifestLogEOList);
|
||||||
|
}
|
||||||
|
|
||||||
// 判断清单是否已完成,修改清单状态
|
// 判断清单是否已完成,修改清单状态
|
||||||
Map<String, Object> map = isCollectFinished(paramsManifestId);
|
Map<String, Object> map = isCollectFinished(paramsManifestId);
|
||||||
Boolean finish = (Boolean) map.get("finish");
|
Boolean finish = (Boolean) map.get("finish");
|
||||||
@@ -2640,7 +2855,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
webSocketServer.sendMessage();
|
webSocketServer.sendMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return isSuccess;
|
return isSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3323,7 +3537,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"将参数责任领域信息由\""+oldDutyTerritoryNameCn+"\"修改为\""+newDutyTerritoryNameCn+"\"");
|
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"将参数责任领域信息由\""+oldDutyTerritoryNameCn+"\"修改为\""+newDutyTerritoryNameCn+"\"");
|
||||||
paramsCollectManifestLogEO.setLogEnContent("The certified engineer \""+currentUser.getUsername()+"\" changed the parameter responsibility domain information from \""+oldDutyTerritoryNameEn+"\" to " + "\""+newDutyTerritoryNameEn+"\"");
|
paramsCollectManifestLogEO.setLogEnContent("The Homo Engineer \""+currentUser.getUsername()+"\" changed the parameter responsibility field information from \""+oldDutyTerritoryNameEn+"\" to " + "\""+newDutyTerritoryNameEn+"\"");
|
||||||
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
paramsCollectManifestLogEO.setParamsManifestId(paramsManifestId);
|
||||||
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
paramsCollectManifestLogEO.setParamsCollectManifestId(paramsCollectManifestEO.getId());
|
||||||
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
@@ -5250,6 +5464,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
QueryWrapper<ParamsConfigDataEO> configDataQueryWrap = new QueryWrapper<>();
|
QueryWrapper<ParamsConfigDataEO> configDataQueryWrap = new QueryWrapper<>();
|
||||||
configDataQueryWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdArr);
|
configDataQueryWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdArr);
|
||||||
List<ParamsConfigDataEO> paramsConfigDataList = this.paramsConfigDataEOService.list(configDataQueryWrap);
|
List<ParamsConfigDataEO> paramsConfigDataList = this.paramsConfigDataEOService.list(configDataQueryWrap);
|
||||||
|
List<ParamsCollectManifestLogEO> paramsCollectManifestLogEOList = new ArrayList<>();
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
for (int i=0; i<paramsCollectManifestIdArr.length; i++) {
|
for (int i=0; i<paramsCollectManifestIdArr.length; i++) {
|
||||||
String paramsCollectManifestId = paramsCollectManifestIdArr[i];
|
String paramsCollectManifestId = paramsCollectManifestIdArr[i];
|
||||||
@@ -5290,6 +5506,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParamsCollectManifestLogEO paramsCollectManifestLogEO = new ParamsCollectManifestLogEO();
|
||||||
|
paramsCollectManifestLogEO.setLogCnContent("认证工程师\""+currentUser.getUsername()+"\"将参数数据强制撤回");
|
||||||
|
paramsCollectManifestLogEO.setLogEnContent("The Homo Engineer \""+currentUser.getUsername()+"\" will forcibly withdraw the parameter data");
|
||||||
|
paramsCollectManifestLogEO.setParamsManifestId(collectManifestEO.getParamsManifestId());
|
||||||
|
paramsCollectManifestLogEO.setParamsCollectManifestId(collectManifestEO.getId());
|
||||||
|
paramsCollectManifestLogEOList.add(paramsCollectManifestLogEO);
|
||||||
|
|
||||||
LambdaUpdateWrapper<ParamsCollectManifestEO> updateWrap = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<ParamsCollectManifestEO> updateWrap = new LambdaUpdateWrapper<>();
|
||||||
updateWrap.set(ParamsCollectManifestEO::getSdt,null);
|
updateWrap.set(ParamsCollectManifestEO::getSdt,null);
|
||||||
updateWrap.set(ParamsCollectManifestEO::getDre,null);
|
updateWrap.set(ParamsCollectManifestEO::getDre,null);
|
||||||
@@ -5304,6 +5527,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
throw new JeroBootException("强制撤回,更新参数收集清单失败!");
|
throw new JeroBootException("强制撤回,更新参数收集清单失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(paramsCollectManifestLogEOList)){
|
||||||
|
this.paramsCollectManifestLogEOService.saveBatch(paramsCollectManifestLogEOList);
|
||||||
|
}
|
||||||
return Result.OK("强制撤回成功!");
|
return Result.OK("强制撤回成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -92,5 +92,7 @@ public class ParamsCollectManifestVO {
|
|||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
private String allNumber;
|
private String allNumber;
|
||||||
|
|
||||||
|
// 退回操作人角色
|
||||||
|
private String currentPersonRole;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,6 +359,8 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
|
pageNohistory: 1,
|
||||||
|
pageSizehistory: 10,
|
||||||
pageSizeOptions: ['100', '200'],
|
pageSizeOptions: ['100', '200'],
|
||||||
total: 0,
|
total: 0,
|
||||||
searchParmes: {},
|
searchParmes: {},
|
||||||
@@ -413,14 +415,6 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
scopedSlots: { customRender: 'content' }
|
scopedSlots: { customRender: 'content' }
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: this.$t('remarks'),
|
|
||||||
dataIndex: 'remarks',
|
|
||||||
align: 'center',
|
|
||||||
ellipsis: true,
|
|
||||||
width: 180,
|
|
||||||
scopedSlots: { customRender: 'detailText' }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: this.$t('OperationTime'),
|
title: this.$t('OperationTime'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
@@ -678,6 +672,16 @@
|
|||||||
this.paramsReportDetailId = val.id
|
this.paramsReportDetailId = val.id
|
||||||
this.bussLogList(val)
|
this.bussLogList(val)
|
||||||
},
|
},
|
||||||
|
onChangehistory(page, pageSize) {
|
||||||
|
console.log(1)
|
||||||
|
this.pageNohistory = page
|
||||||
|
this.bussLogList()
|
||||||
|
},
|
||||||
|
SizeChangehistory(page, pageSize) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSizehistory = pageSize
|
||||||
|
this.bussLogList()
|
||||||
|
},
|
||||||
bussLogList(val) {
|
bussLogList(val) {
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNohistory,
|
pageNo: this.pageNohistory,
|
||||||
|
|||||||
@@ -1654,7 +1654,10 @@
|
|||||||
_array.push(item.id)
|
_array.push(item.id)
|
||||||
})
|
})
|
||||||
let _this = this
|
let _this = this
|
||||||
let param = { ids: _array.join(',') }
|
let param = { ids: _array.join(','),
|
||||||
|
currentPersonRole: this.currentPersonRole,
|
||||||
|
paramsManifestId: this.$route.query.id
|
||||||
|
}
|
||||||
this.textLoading = true
|
this.textLoading = true
|
||||||
axios({
|
axios({
|
||||||
url: '/jero-boot/params/collectManifest/back',
|
url: '/jero-boot/params/collectManifest/back',
|
||||||
|
|||||||
Reference in New Issue
Block a user