上报库管理--解决历史记录操作详情回显问题

This commit is contained in:
yjq
2023-02-01 15:01:57 +08:00
parent b5b214099f
commit e0af0f4f83
2 changed files with 34 additions and 3 deletions
@@ -1725,7 +1725,10 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
// 变更标识
boolean changeFlag = false;
// 添加配置数据
String configNameCn = "";
String configNameEn = "";
// 添加配置数据*****循环同一个配置里的内容
for (Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
if ("id".equals(key)) {
@@ -1753,8 +1756,11 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
}
//******************配置2被添加了**********************
logCnContent.append(paramsReportConfigEO.getConfigName()).append("");
logEnContent.append(paramsReportConfigEO.getConfigName());
configNameCn = paramsReportConfigEO.getConfigName()+"";
configNameEn = paramsReportConfigEO.getConfigName();
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
@@ -1867,7 +1873,27 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
newConfigDataEOList.add(paramsReportConfigDataEO);
//******************这里是当前配置的循环结束了******************
//判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字
//configNameCn = paramsReportConfigEO.getConfigName()+"的";
//configNameEn = paramsReportConfigEO.getConfigName();
String cnContent = logCnContent.toString();
String enContent = logEnContent.toString();
if(!configNameCn.isEmpty() && !configNameEn.isEmpty()
&& cnContent.contains(configNameCn) && enContent.contains(configNameEn)){
int cnStar = cnContent.length() - configNameCn.length();
int enStar = enContent.length()-configNameEn.length();
String logCnContentLast = logCnContent.substring(cnStar, logCnContent.length());
String logEnContentLast = logEnContent.substring(enStar, logEnContent.length());
//logCnContent的最后是configName时
if(logCnContentLast.equals(configNameCn) && logEnContentLast.equals(configNameEn)) {
logCnContent.delete(cnStar, cnContent.length() + 1);
logEnContent.delete(enStar,enContent.length()+1);
}
}
}
ParamsReportDetailLogEO insertLogEO = new ParamsReportDetailLogEO();
/*if (logCnContent.toString().endsWith("")) {
String ramarks = "";
@@ -1886,8 +1912,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if(map.get("remarks") != null){
ramarks = map.get("remarks").toString();
}
int i = logCnContent.lastIndexOf("");
insertLogEO.setLogCnContent(logCnContent.toString().substring(0, logCnContent.lastIndexOf("")));
insertLogEO.setLogEnContent(logEnContent.toString().substring(0, logEnContent.lastIndexOf(",")));
// insertLogEO.setLogCnContent(cnContent.substring(0, logCnContent.lastIndexOf("")));
// insertLogEO.setLogEnContent(enContent.substring(0, logEnContent.lastIndexOf(",")));
insertLogEO.setParamsReportId(paramsManifestId);
insertLogEO.setParamsReportDetailId(paramsCollectManifestId);
insertLogEO.setRemarks(ramarks);
@@ -1906,6 +1936,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
}
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()))
@@ -132,14 +132,14 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
*/
public String fullTextComparison(String leftStandard, String rightStandard, String remark) throws Exception {
SarFileCompareInfo sfcInfo = addStandCompareHis(leftStandard, rightStandard, remark);
//文档对比信息目录
List<SarFileSplitMenuEO> leftMenuEOList = sarFileSplitMenuEOService.queryByInfoId(leftStandard);
Map<String, SarFileCompareMenu> leftMenuMap = wrapperMenuMap(leftMenuEOList, sfcInfo.getId(), CompareConst.POS_LEFT);
sarFileCompareMenuService.saveBatch(leftMenuMap.values());
List<SarFileSplitMenuEO> rightMenuEOList = sarFileSplitMenuEOService.queryByInfoId(rightStandard);
Map<String, SarFileCompareMenu> rightMenuMap = wrapperMenuMap(rightMenuEOList, sfcInfo.getId(), CompareConst.POS_RIGHT);
sarFileCompareMenuService.saveBatch(rightMenuMap.values());
//文档对比信息条款
List<SarFileSplitItemsEO> leftItemEOList = sarFileSplitItemsEOService.selectByInfoId(leftStandard);
List<SarFileCompareItem> leftItemList = wrapperItemList(leftItemEOList, sfcInfo.getId(), leftMenuMap, CompareConst.POS_LEFT);
List<SarFileSplitItemsEO> rightItemEOList = sarFileSplitItemsEOService.selectByInfoId(rightStandard);