英译 问题 + 老系统附件重复问题
This commit is contained in:
+6
@@ -432,5 +432,11 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
return sarBussionessStandEOService.emptyFileAnewStorage();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussionessStand|老系统附件重复问题")
|
||||
@GetMapping("/repetitionFile")
|
||||
public ResponseMessage repetitionFile (){
|
||||
return sarBussionessStandEOService.repetitionFile();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -60,5 +60,6 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
||||
|
||||
ResponseMessage<SarBussionessStand> importSarBussionessStandFile(MultipartFile file);
|
||||
|
||||
ResponseMessage repetitionFile();
|
||||
}
|
||||
|
||||
|
||||
+49
-16
@@ -2937,16 +2937,13 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
// 获取 kmpro_addon34 表的 lore_doc_id
|
||||
List<OldSystem> oldSystemInfoList = sarStandardsInfoDao.selectOldSystemInfo();
|
||||
|
||||
//获取所有的文件表信息
|
||||
List<OldSystem> loreAttacheList = sarStandardsInfoDao.selectOldSystemFile();
|
||||
|
||||
//数据组合
|
||||
List<OldSystem> oldArr = new ArrayList();
|
||||
List<OldSystem> oldArr1 = new ArrayList();
|
||||
|
||||
//海外国内的文件数据处理 处理逻辑对比 文件的名称 一致的情况下 则看老数据库 是否有对应的分类 原文 译文
|
||||
for (OldSystem oldSystem : oldSystemInfoList) {
|
||||
for (OldSystem SarStandardsInfo: SarStandardsInfoList){
|
||||
for (OldSystem SarStandardsInfo: SarStandardsInfoList){
|
||||
for (OldSystem oldSystem : oldSystemInfoList) {
|
||||
if(StringUtils.isNotBlank(SarStandardsInfo.getBuildId())){
|
||||
if(oldSystem.getLoreDocId().equals(SarStandardsInfo.getBuildId())) {
|
||||
//通过,号分割文件,通过id去查询文件 获取文件名称
|
||||
@@ -2961,12 +2958,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
//循环调用每一个 文件 获取文件名称
|
||||
String id = fileId;
|
||||
AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
String theSame = isTheSame(byId.getOldFileName(), loreAttacheList);
|
||||
String theSame = isTheSame(byId.getOldFileName(),SarStandardsInfo.getBuildId());
|
||||
if(theSame.equals("1")){
|
||||
//证明找到文件名称一致的了
|
||||
//获取到 lode 表 id
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if (oldSystem.getSortSign().contains("译")) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = "," + fileId;
|
||||
} else {
|
||||
@@ -3000,8 +2997,8 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
|
||||
//企业的文件数据处理
|
||||
for (OldSystem oldSystem : oldSystemInfoList) {
|
||||
for (OldSystem sarBussionessStand : SarBussionessStandList){
|
||||
for (OldSystem sarBussionessStand : SarBussionessStandList){
|
||||
for (OldSystem oldSystem : oldSystemInfoList) {
|
||||
if(StringUtils.isNotBlank(sarBussionessStand.getBuildId())){
|
||||
if(oldSystem.getLoreDocId().equals(sarBussionessStand.getBuildId())) {
|
||||
//通过,号分割文件,通过id去查询文件 获取文件名称
|
||||
@@ -3016,11 +3013,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
//循环调用每一个 文件 获取文件名称
|
||||
String id = fileId;
|
||||
AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
String theSame = isTheSame(byId.getOldFileName(), loreAttacheList);
|
||||
String theSame = isTheSame(byId.getOldFileName(),sarBussionessStand.getBuildId());
|
||||
if(theSame.equals("1")){
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if (oldSystem.getSortSign().contains("译")) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = "," + fileId;
|
||||
} else {
|
||||
@@ -3044,7 +3042,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
if(StringUtils.isNotBlank(yi) || StringUtils.isNotBlank(yuan)){
|
||||
old.setStandId(sarBussionessStand.getStandId());
|
||||
oldArr.add(old);
|
||||
oldArr1.add(old);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3062,7 +3060,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarBussStandAttrInfo.setFbgbuss(data.getOriginal());
|
||||
sarBussStandAttrInfo.setTranslation(data.getTranslation());
|
||||
}
|
||||
//sarBussStandAttrInfoEODao.updateById(sarBussStandAttrInfo);
|
||||
sarBussStandAttrInfoEODao.updateById(sarBussStandAttrInfo);
|
||||
logger.info("企业修改成功");
|
||||
}
|
||||
//海外 国内
|
||||
@@ -3074,13 +3072,14 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarStandAttrInfo.setFbgbjbd(data.getOriginal());
|
||||
sarStandAttrInfo.setTranslation(data.getTranslation());
|
||||
}
|
||||
//sarStandAttrInfoEODao.updateById(sarStandAttrInfo);
|
||||
sarStandAttrInfoEODao.updateById(sarStandAttrInfo);
|
||||
logger.info("海外国内修改成功");
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
public String isTheSame (String oldFileName,List<OldSystem> loreAttacheList){
|
||||
public String isTheSame (String oldFileName,String buildId){
|
||||
List<OldSystem> loreAttacheList= sarStandardsInfoDao.selectOldSystemFileBuildId(buildId);
|
||||
if(loreAttacheList.size()>0){
|
||||
for (OldSystem src : loreAttacheList) {
|
||||
if(StringUtils.isNotBlank(src.getFileSrc())){
|
||||
@@ -3098,4 +3097,38 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
return "-1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage repetitionFile() {
|
||||
//获取 所有附件信息 然后判断名称是否重复
|
||||
Set set = new HashSet();
|
||||
List<OldSystem> loreAttacheList = sarStandardsInfoDao.selectOldSystemFile();
|
||||
for (OldSystem src : loreAttacheList) {
|
||||
if(StringUtils.isNotBlank(src.getFileSrc())){
|
||||
// 通过 / 去分割 / 的最后一位
|
||||
String[] split = src.getFileSrc().split("/");
|
||||
List<String> asList = Arrays.asList(split);
|
||||
//集合的最后一个就是名称
|
||||
int size = asList.size();
|
||||
String s = asList.get(size-1);
|
||||
for (OldSystem data: loreAttacheList){
|
||||
//相等证明是数据本身
|
||||
if(!src.getFileId().equals(data.getFileId())) {
|
||||
if (StringUtils.isNotBlank(data.getFileSrc())) {
|
||||
// 通过 / 去分割 / 的最后一位
|
||||
String[] split1 = data.getFileSrc().split("/");
|
||||
List<String> asList1 = Arrays.asList(split1);
|
||||
//集合的最后一个就是名称
|
||||
int size1 = asList1.size();
|
||||
String s1 = asList1.get(size1 - 1);
|
||||
if (s.equals(s1)) {
|
||||
set.add(src.getFileId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.success(null,"数量="+set.size()+"====",set);
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -107,4 +107,8 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
List<OldSystem> OldSystemFile(@Param("loreDocId") String loreDocId);
|
||||
|
||||
List<OldSystem> selectOldSystemFile();
|
||||
|
||||
List<OldSystem> selectOldSystemFileBuildId(@Param("buildId") String buildId);
|
||||
|
||||
OldSystem loreDepotSort(@Param("sortId") String sortId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user