变更表结构字段
This commit is contained in:
-3
@@ -44,10 +44,7 @@ public interface SarBussStandAttrInfoDao extends BaseMapper<SarBussStandAttrInfo
|
||||
|
||||
Map<String, Object> selectStandFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
|
||||
|
||||
|
||||
void updateFSQR(@Param("id") String id,@Param("time") String time);
|
||||
|
||||
void updateByIdInfo(@Param("id")String id,@Param("fbgbuss") String fbgbuss,@Param("translation") String translation);
|
||||
|
||||
String selectInfoStandId(@Param("standId") String standId);
|
||||
}
|
||||
|
||||
+368
-378
@@ -2976,15 +2976,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
//海外
|
||||
for(OldSystem data : oldArr) {
|
||||
SarStandAttrInfo sarStandAttrInfo = new SarStandAttrInfo();
|
||||
String id = sarStandAttrInfoEODao.selectInfoStandId(data.getStandId());
|
||||
if(StringUtils.isNotBlank(id)) {
|
||||
sarStandAttrInfo.setId(id);
|
||||
sarStandAttrInfo.setFbgbjbd(data.getOriginal());
|
||||
sarStandAttrInfo.setTranslation(data.getTranslation());
|
||||
sarStandAttrInfoEODao.updateByIdInfo(id,data.getOriginal(),data.getTranslation());
|
||||
logger.info("海外修改成功=====================================================================================");
|
||||
}
|
||||
sarStandAttrInfoEODao.updateByIdInfo(id,sarStandAttrInfo.getFbgbjbd(),sarStandAttrInfo.getTranslation());
|
||||
logger.info("海外修改成功=====================================================================================");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3341,386 +3337,380 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
oldArr.add(old);
|
||||
}
|
||||
}
|
||||
//海外
|
||||
//国内
|
||||
for(OldSystem data : oldArr) {
|
||||
SarStandAttrInfo sarStandAttrInfo = new SarStandAttrInfo();
|
||||
String id = sarStandAttrInfoEODao.selectInfoStandId(data.getStandId());
|
||||
if(StringUtils.isNotBlank(id)) {
|
||||
sarStandAttrInfo.setId(id);
|
||||
sarStandAttrInfo.setFbgbjbd(data.getOriginal());
|
||||
sarStandAttrInfo.setTranslation(data.getTranslation());
|
||||
sarStandAttrInfoEODao.updateByIdInfo(id,data.getOriginal(),data.getTranslation());
|
||||
logger.info("国内修改成功=====================================================================================");
|
||||
}
|
||||
sarStandAttrInfoEODao.updateByIdInfo(id,sarStandAttrInfo.getFbgbjbd(),sarStandAttrInfo.getTranslation());
|
||||
logger.info("国内修改成功====================================================================================");
|
||||
}
|
||||
|
||||
}
|
||||
if(type.equals("企业")) {
|
||||
List<OldSystem> SarBussionessStandList = sarBussionessStandEODao.selectListInfo();
|
||||
for (OldSystem sarBussionessStand : SarBussionessStandList) {
|
||||
String yi = "";
|
||||
String yuan = "";
|
||||
OldSystem old = new OldSystem();
|
||||
if (StringUtils.isNotBlank(sarBussionessStand.getBuildId())) {
|
||||
if(sarBussionessStand.getBuildId().contains(",")){
|
||||
String[] buildIdArr = sarBussionessStand.getBuildId().split(",");
|
||||
List<String> buildIdList = Arrays.asList(buildIdArr);
|
||||
if(!buildIdList.isEmpty()){
|
||||
for (String bid: buildIdList){
|
||||
List<OldSystem> OldSystem1 = sarStandardsInfoDao.selectOldSystemInfoByBuidId(bid);
|
||||
if(OldSystem1.isEmpty()){
|
||||
OldSystem oldSystem =OldSystem1.get(0);
|
||||
if (oldSystem.getLoreDocId().equals(bid)) {
|
||||
//通过,号分割文件,通过id去查询文件 获取文件名称
|
||||
if (StringUtils.isNotBlank(sarBussionessStand.getFileId())) {
|
||||
if(sarBussionessStand.getFileId().contains(",")) {
|
||||
String[] fileIdArr = sarBussionessStand.getFileId().split(",");
|
||||
List<String> asList = Arrays.asList(fileIdArr);
|
||||
if (asList.size() > 0) {
|
||||
// 判断 新系统中的文件是否有名称是一样的 如果有 则跳过 进行记录 没有则 往下走
|
||||
Set<AttFileEO> attFileEOS = newFileNameRepetition(asList);
|
||||
if (attFileEOS.isEmpty()) {
|
||||
for (String fileId : asList) {
|
||||
//循环调用每一个 文件 获取文件名称
|
||||
String id = fileId;
|
||||
AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
if(byId!=null){
|
||||
String theSame = isTheSame(byId.getOldFileName(),bid);
|
||||
if (theSame.equals("1")) {
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if(sortSign != null) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi+"," + fileId;
|
||||
} else {
|
||||
yi = fileId;
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan+"," + fileId;
|
||||
} else {
|
||||
yuan = fileId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
int numberCount = 0;
|
||||
//只允许2个文件名称相同
|
||||
for (AttFileEO data : attFileEOS) {
|
||||
numberCount = 0;
|
||||
for (AttFileEO file : attFileEOS) {
|
||||
if (data.getOldFileName().equals(file.getOldFileName())) {
|
||||
numberCount = numberCount+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(numberCount==2){
|
||||
//1:文件名称重复的情况下 判断文件的大小 大的为中文 小的为英文,一样大则存入
|
||||
List<AttFileEO> attFileEOS1 = newFileNameRepetitionInfo(asList);
|
||||
// 不相等的数据 notRepeatedFile 重复的文件 attFileEOS
|
||||
List<AttFileEO> notRepeatedFile = duplicateFiles(attFileEOS1, attFileEOS);
|
||||
if(!notRepeatedFile.isEmpty()){
|
||||
//不重复数据在老库中是否存在 selectOldSystemFileBuildId
|
||||
for (AttFileEO file: notRepeatedFile){
|
||||
String theSame = isTheSame(file.getOldFileName(), bid);
|
||||
//1 有相同 -1 无相同
|
||||
if(theSame.equals("1")){
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if(sortSign != null) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi+"," + file.getId();
|
||||
} else {
|
||||
yi = file.getId();
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan+"," + file.getId();
|
||||
} else {
|
||||
yuan = file.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//相同文件处理
|
||||
List<AttFileEO> arrayList = new ArrayList<>();
|
||||
for (AttFileEO data : attFileEOS) {
|
||||
arrayList.add(data);
|
||||
}
|
||||
String theSame = isTheSame(arrayList.get(0).getOldFileName(), bid);
|
||||
if (theSame.equals("1")) {
|
||||
File file1 = new File("E:/data/slrs/file/" + arrayList.get(0).getFilePath() + arrayList.get(0).getFileName());
|
||||
File file2 = new File("E:/data/slrs/file/" + arrayList.get(1).getFilePath() + arrayList.get(1).getFileName());
|
||||
//判断两个文件大小 //相等 则不做处理
|
||||
long length1 = file1.length();
|
||||
long length2 = file2.length();
|
||||
if (length1 > length2) {
|
||||
//1 中文 2英文
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi + "," + arrayList.get(1).getId();
|
||||
} else {
|
||||
yi = arrayList.get(1).getId();
|
||||
}
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan + "," + arrayList.get(0).getId();
|
||||
} else {
|
||||
yuan = arrayList.get(0).getId();
|
||||
}
|
||||
}
|
||||
if (length1 < length2) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi + "," + arrayList.get(0).getId();
|
||||
} else {
|
||||
yi = arrayList.get(0).getId();
|
||||
}
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan + "," + arrayList.get(1).getId();
|
||||
} else {
|
||||
yuan = arrayList.get(1).getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
fileEOArrayList.add(sarBussionessStand.getStandId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else {
|
||||
String id = sarBussionessStand.getFileId();
|
||||
AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
if(byId!=null){
|
||||
String theSame = isTheSame(byId.getOldFileName(), bid);
|
||||
if (theSame.equals("1")) {
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if(sortSign != null) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi+"," + sarBussionessStand.getFileId();
|
||||
} else {
|
||||
yi = sarBussionessStand.getFileId();
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan+"," + sarBussionessStand.getFileId();
|
||||
} else {
|
||||
yuan = sarBussionessStand.getFileId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
List<OldSystem> OldSystem1 = sarStandardsInfoDao.selectOldSystemInfoByBuidId(sarBussionessStand.getBuildId());
|
||||
if(!OldSystem1.isEmpty()){
|
||||
OldSystem oldSystem =OldSystem1.get(0);
|
||||
if (oldSystem.getLoreDocId().equals(sarBussionessStand.getBuildId())) {
|
||||
//通过,号分割文件,通过id去查询文件 获取文件名称
|
||||
if (StringUtils.isNotBlank(sarBussionessStand.getFileId())) {
|
||||
if(sarBussionessStand.getFileId().contains(",")) {
|
||||
String[] fileIdArr = sarBussionessStand.getFileId().split(",");
|
||||
List<String> asList = Arrays.asList(fileIdArr);
|
||||
if (asList.size() > 0) {
|
||||
// 判断 新系统中的文件是否有名称是一样的 如果有 则跳过 进行记录 没有则 往下走
|
||||
Set<AttFileEO> attFileEOS = newFileNameRepetition(asList);
|
||||
if (attFileEOS.isEmpty()) {
|
||||
for (String fileId : asList) {
|
||||
//循环调用每一个 文件 获取文件名称
|
||||
String id = fileId;
|
||||
AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
if(byId!=null){
|
||||
String theSame = isTheSame(byId.getOldFileName(), sarBussionessStand.getBuildId());
|
||||
if (theSame.equals("1")) {
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if(sortSign != null) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi+"," + fileId;
|
||||
} else {
|
||||
yi = fileId;
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan+"," + fileId;
|
||||
} else {
|
||||
yuan = fileId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
int numberCount = 0;
|
||||
//只允许2个文件名称相同
|
||||
for (AttFileEO data : attFileEOS) {
|
||||
numberCount = 0;
|
||||
for (AttFileEO file : attFileEOS) {
|
||||
if (data.getOldFileName().equals(file.getOldFileName())) {
|
||||
numberCount = numberCount+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(numberCount==2){
|
||||
//1:文件名称重复的情况下 判断文件的大小 大的为中文 小的为英文,一样大则存入
|
||||
List<AttFileEO> attFileEOS1 = newFileNameRepetitionInfo(asList);
|
||||
// 不相等的数据 notRepeatedFile 重复的文件 attFileEOS
|
||||
List<AttFileEO> notRepeatedFile = duplicateFiles(attFileEOS1, attFileEOS);
|
||||
if(!notRepeatedFile.isEmpty()){
|
||||
//不重复数据在老库中是否存在 selectOldSystemFileBuildId
|
||||
for (AttFileEO file: notRepeatedFile){
|
||||
String theSame = isTheSame(file.getOldFileName(), sarBussionessStand.getBuildId());
|
||||
//1 有相同 -1 无相同
|
||||
if(theSame.equals("1")){
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if(sortSign != null) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi+"," + file.getId();
|
||||
} else {
|
||||
yi = file.getId();
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan+"," + file.getId();
|
||||
} else {
|
||||
yuan = file.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
//相同文件处理
|
||||
List<AttFileEO> arrayList = new ArrayList<>();
|
||||
for (AttFileEO data : attFileEOS) {
|
||||
arrayList.add(data);
|
||||
}
|
||||
String theSame = isTheSame(arrayList.get(0).getOldFileName(), sarBussionessStand.getBuildId());
|
||||
if (theSame.equals("1")) {
|
||||
File file1 = new File( "E:/data/slrs/file/" + arrayList.get(0).getFilePath() + arrayList.get(0).getFileName());
|
||||
File file2 = new File( "E:/data/slrs/file/" + arrayList.get(1).getFilePath() + arrayList.get(1).getFileName());
|
||||
//判断两个文件大小 //相等 则不做处理
|
||||
long length1 = file1.length();
|
||||
long length2 = file2.length();
|
||||
if (length1 > length2) {
|
||||
//1 中文 2英文
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi + "," + arrayList.get(1).getId();
|
||||
} else {
|
||||
yi = arrayList.get(1).getId();
|
||||
}
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan + "," + arrayList.get(0).getId();
|
||||
} else {
|
||||
yuan = arrayList.get(0).getId();
|
||||
}
|
||||
}
|
||||
if (length1 < length2) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi + "," + arrayList.get(0).getId();
|
||||
} else {
|
||||
yi = arrayList.get(0).getId();
|
||||
}
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan + "," + arrayList.get(1).getId();
|
||||
} else {
|
||||
yuan = arrayList.get(1).getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
fileEOArrayList.add(sarBussionessStand.getStandId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else {
|
||||
//循环调用每一个 文件 获取文件名称
|
||||
String id = sarBussionessStand.getFileId();
|
||||
AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
if(byId!=null){
|
||||
String theSame = isTheSame(byId.getOldFileName(), sarBussionessStand.getBuildId());
|
||||
if (theSame.equals("1")) {
|
||||
//证明找到文件名称一致的了
|
||||
OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
//原文译文 进行判断
|
||||
if(sortSign != null) {
|
||||
if (sortSign.getSortSign().contains("译")) {
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
yi = yi+"," + sarBussionessStand.getFileId();
|
||||
} else {
|
||||
yi = sarBussionessStand.getFileId();
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
yuan = yuan+"," + sarBussionessStand.getFileId();
|
||||
} else {
|
||||
yuan = sarBussionessStand.getFileId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
old.setTranslation(yi);
|
||||
}
|
||||
if (StringUtils.isNotBlank(yuan)) {
|
||||
old.setOriginal(yuan);
|
||||
}
|
||||
if (StringUtils.isNotBlank(yi)) {
|
||||
old.setStandId(sarBussionessStand.getStandId());
|
||||
oldArr.add(old);
|
||||
}
|
||||
}
|
||||
// 企业
|
||||
for(OldSystem data : oldArr) {
|
||||
SarBussStandAttrInfo sarBussStandAttrInfo = new SarBussStandAttrInfo();
|
||||
String id = sarBussStandAttrInfoEODao.selectInfoStandId(data.getStandId());
|
||||
if(StringUtils.isNotBlank(id)) {
|
||||
sarBussStandAttrInfo.setId(id);
|
||||
sarBussStandAttrInfo.setFbgbuss(data.getOriginal());
|
||||
sarBussStandAttrInfo.setTranslation(data.getTranslation());
|
||||
}
|
||||
sarBussStandAttrInfoEODao.updateByIdInfo(id,sarBussStandAttrInfo.getFbgbuss(),sarBussStandAttrInfo.getTranslation());
|
||||
logger.info("企业修改成功====================================================================================");
|
||||
}
|
||||
// List<OldSystem> SarBussionessStandList = sarBussionessStandEODao.selectListInfo();
|
||||
// for (OldSystem sarBussionessStand : SarBussionessStandList) {
|
||||
// String yi = "";
|
||||
// String yuan = "";
|
||||
// OldSystem old = new OldSystem();
|
||||
// if (StringUtils.isNotBlank(sarBussionessStand.getBuildId())) {
|
||||
// if(sarBussionessStand.getBuildId().contains(",")){
|
||||
// String[] buildIdArr = sarBussionessStand.getBuildId().split(",");
|
||||
// List<String> buildIdList = Arrays.asList(buildIdArr);
|
||||
// if(!buildIdList.isEmpty()){
|
||||
// for (String bid: buildIdList){
|
||||
// List<OldSystem> OldSystem1 = sarStandardsInfoDao.selectOldSystemInfoByBuidId(bid);
|
||||
// if(OldSystem1.isEmpty()){
|
||||
// OldSystem oldSystem =OldSystem1.get(0);
|
||||
// if (oldSystem.getLoreDocId().equals(bid)) {
|
||||
// //通过,号分割文件,通过id去查询文件 获取文件名称
|
||||
// if (StringUtils.isNotBlank(sarBussionessStand.getFileId())) {
|
||||
// if(sarBussionessStand.getFileId().contains(",")) {
|
||||
// String[] fileIdArr = sarBussionessStand.getFileId().split(",");
|
||||
// List<String> asList = Arrays.asList(fileIdArr);
|
||||
// if (asList.size() > 0) {
|
||||
// // 判断 新系统中的文件是否有名称是一样的 如果有 则跳过 进行记录 没有则 往下走
|
||||
// Set<AttFileEO> attFileEOS = newFileNameRepetition(asList);
|
||||
// if (attFileEOS.isEmpty()) {
|
||||
// for (String fileId : asList) {
|
||||
// //循环调用每一个 文件 获取文件名称
|
||||
// String id = fileId;
|
||||
// AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
// if(byId!=null){
|
||||
// String theSame = isTheSame(byId.getOldFileName(),bid);
|
||||
// if (theSame.equals("1")) {
|
||||
// //证明找到文件名称一致的了
|
||||
// OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
// //原文译文 进行判断
|
||||
// if(sortSign != null) {
|
||||
// if (sortSign.getSortSign().contains("译")) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi+"," + fileId;
|
||||
// } else {
|
||||
// yi = fileId;
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan+"," + fileId;
|
||||
// } else {
|
||||
// yuan = fileId;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
// int numberCount = 0;
|
||||
// //只允许2个文件名称相同
|
||||
// for (AttFileEO data : attFileEOS) {
|
||||
// numberCount = 0;
|
||||
// for (AttFileEO file : attFileEOS) {
|
||||
// if (data.getOldFileName().equals(file.getOldFileName())) {
|
||||
// numberCount = numberCount+1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(numberCount==2){
|
||||
// //1:文件名称重复的情况下 判断文件的大小 大的为中文 小的为英文,一样大则存入
|
||||
// List<AttFileEO> attFileEOS1 = newFileNameRepetitionInfo(asList);
|
||||
// // 不相等的数据 notRepeatedFile 重复的文件 attFileEOS
|
||||
// List<AttFileEO> notRepeatedFile = duplicateFiles(attFileEOS1, attFileEOS);
|
||||
// if(!notRepeatedFile.isEmpty()){
|
||||
// //不重复数据在老库中是否存在 selectOldSystemFileBuildId
|
||||
// for (AttFileEO file: notRepeatedFile){
|
||||
// String theSame = isTheSame(file.getOldFileName(), bid);
|
||||
// //1 有相同 -1 无相同
|
||||
// if(theSame.equals("1")){
|
||||
// //证明找到文件名称一致的了
|
||||
// OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
// //原文译文 进行判断
|
||||
// if(sortSign != null) {
|
||||
// if (sortSign.getSortSign().contains("译")) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi+"," + file.getId();
|
||||
// } else {
|
||||
// yi = file.getId();
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan+"," + file.getId();
|
||||
// } else {
|
||||
// yuan = file.getId();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
// //相同文件处理
|
||||
// List<AttFileEO> arrayList = new ArrayList<>();
|
||||
// for (AttFileEO data : attFileEOS) {
|
||||
// arrayList.add(data);
|
||||
// }
|
||||
// String theSame = isTheSame(arrayList.get(0).getOldFileName(), bid);
|
||||
// if (theSame.equals("1")) {
|
||||
// File file1 = new File("E:/data/slrs/file/" + arrayList.get(0).getFilePath() + arrayList.get(0).getFileName());
|
||||
// File file2 = new File("E:/data/slrs/file/" + arrayList.get(1).getFilePath() + arrayList.get(1).getFileName());
|
||||
// //判断两个文件大小 //相等 则不做处理
|
||||
// long length1 = file1.length();
|
||||
// long length2 = file2.length();
|
||||
// if (length1 > length2) {
|
||||
// //1 中文 2英文
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi + "," + arrayList.get(1).getId();
|
||||
// } else {
|
||||
// yi = arrayList.get(1).getId();
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan + "," + arrayList.get(0).getId();
|
||||
// } else {
|
||||
// yuan = arrayList.get(0).getId();
|
||||
// }
|
||||
// }
|
||||
// if (length1 < length2) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi + "," + arrayList.get(0).getId();
|
||||
// } else {
|
||||
// yi = arrayList.get(0).getId();
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan + "," + arrayList.get(1).getId();
|
||||
// } else {
|
||||
// yuan = arrayList.get(1).getId();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// fileEOArrayList.add(sarBussionessStand.getStandId());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// String id = sarBussionessStand.getFileId();
|
||||
// AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
// if(byId!=null){
|
||||
// String theSame = isTheSame(byId.getOldFileName(), bid);
|
||||
// if (theSame.equals("1")) {
|
||||
// //证明找到文件名称一致的了
|
||||
// OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
// //原文译文 进行判断
|
||||
// if(sortSign != null) {
|
||||
// if (sortSign.getSortSign().contains("译")) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi+"," + sarBussionessStand.getFileId();
|
||||
// } else {
|
||||
// yi = sarBussionessStand.getFileId();
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan+"," + sarBussionessStand.getFileId();
|
||||
// } else {
|
||||
// yuan = sarBussionessStand.getFileId();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// List<OldSystem> OldSystem1 = sarStandardsInfoDao.selectOldSystemInfoByBuidId(sarBussionessStand.getBuildId());
|
||||
// if(!OldSystem1.isEmpty()){
|
||||
// OldSystem oldSystem =OldSystem1.get(0);
|
||||
// if (oldSystem.getLoreDocId().equals(sarBussionessStand.getBuildId())) {
|
||||
// //通过,号分割文件,通过id去查询文件 获取文件名称
|
||||
// if (StringUtils.isNotBlank(sarBussionessStand.getFileId())) {
|
||||
// if(sarBussionessStand.getFileId().contains(",")) {
|
||||
// String[] fileIdArr = sarBussionessStand.getFileId().split(",");
|
||||
// List<String> asList = Arrays.asList(fileIdArr);
|
||||
// if (asList.size() > 0) {
|
||||
// // 判断 新系统中的文件是否有名称是一样的 如果有 则跳过 进行记录 没有则 往下走
|
||||
// Set<AttFileEO> attFileEOS = newFileNameRepetition(asList);
|
||||
// if (attFileEOS.isEmpty()) {
|
||||
// for (String fileId : asList) {
|
||||
// //循环调用每一个 文件 获取文件名称
|
||||
// String id = fileId;
|
||||
// AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
// if(byId!=null){
|
||||
// String theSame = isTheSame(byId.getOldFileName(), sarBussionessStand.getBuildId());
|
||||
// if (theSame.equals("1")) {
|
||||
// //证明找到文件名称一致的了
|
||||
// OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
// //原文译文 进行判断
|
||||
// if(sortSign != null) {
|
||||
// if (sortSign.getSortSign().contains("译")) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi+"," + fileId;
|
||||
// } else {
|
||||
// yi = fileId;
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan+"," + fileId;
|
||||
// } else {
|
||||
// yuan = fileId;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
// int numberCount = 0;
|
||||
// //只允许2个文件名称相同
|
||||
// for (AttFileEO data : attFileEOS) {
|
||||
// numberCount = 0;
|
||||
// for (AttFileEO file : attFileEOS) {
|
||||
// if (data.getOldFileName().equals(file.getOldFileName())) {
|
||||
// numberCount = numberCount+1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(numberCount==2){
|
||||
// //1:文件名称重复的情况下 判断文件的大小 大的为中文 小的为英文,一样大则存入
|
||||
// List<AttFileEO> attFileEOS1 = newFileNameRepetitionInfo(asList);
|
||||
// // 不相等的数据 notRepeatedFile 重复的文件 attFileEOS
|
||||
// List<AttFileEO> notRepeatedFile = duplicateFiles(attFileEOS1, attFileEOS);
|
||||
// if(!notRepeatedFile.isEmpty()){
|
||||
// //不重复数据在老库中是否存在 selectOldSystemFileBuildId
|
||||
// for (AttFileEO file: notRepeatedFile){
|
||||
// String theSame = isTheSame(file.getOldFileName(), sarBussionessStand.getBuildId());
|
||||
// //1 有相同 -1 无相同
|
||||
// if(theSame.equals("1")){
|
||||
// //证明找到文件名称一致的了
|
||||
// OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
// //原文译文 进行判断
|
||||
// if(sortSign != null) {
|
||||
// if (sortSign.getSortSign().contains("译")) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi+"," + file.getId();
|
||||
// } else {
|
||||
// yi = file.getId();
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan+"," + file.getId();
|
||||
// } else {
|
||||
// yuan = file.getId();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }else {
|
||||
// //相同文件处理
|
||||
// List<AttFileEO> arrayList = new ArrayList<>();
|
||||
// for (AttFileEO data : attFileEOS) {
|
||||
// arrayList.add(data);
|
||||
// }
|
||||
// String theSame = isTheSame(arrayList.get(0).getOldFileName(), sarBussionessStand.getBuildId());
|
||||
// if (theSame.equals("1")) {
|
||||
// File file1 = new File( "E:/data/slrs/file/" + arrayList.get(0).getFilePath() + arrayList.get(0).getFileName());
|
||||
// File file2 = new File( "E:/data/slrs/file/" + arrayList.get(1).getFilePath() + arrayList.get(1).getFileName());
|
||||
// //判断两个文件大小 //相等 则不做处理
|
||||
// long length1 = file1.length();
|
||||
// long length2 = file2.length();
|
||||
// if (length1 > length2) {
|
||||
// //1 中文 2英文
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi + "," + arrayList.get(1).getId();
|
||||
// } else {
|
||||
// yi = arrayList.get(1).getId();
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan + "," + arrayList.get(0).getId();
|
||||
// } else {
|
||||
// yuan = arrayList.get(0).getId();
|
||||
// }
|
||||
// }
|
||||
// if (length1 < length2) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi + "," + arrayList.get(0).getId();
|
||||
// } else {
|
||||
// yi = arrayList.get(0).getId();
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan + "," + arrayList.get(1).getId();
|
||||
// } else {
|
||||
// yuan = arrayList.get(1).getId();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// fileEOArrayList.add(sarBussionessStand.getStandId());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// //循环调用每一个 文件 获取文件名称
|
||||
// String id = sarBussionessStand.getFileId();
|
||||
// AttFileEO byId = attFileEOService.getFileInfo(id);
|
||||
// if(byId!=null){
|
||||
// String theSame = isTheSame(byId.getOldFileName(), sarBussionessStand.getBuildId());
|
||||
// if (theSame.equals("1")) {
|
||||
// //证明找到文件名称一致的了
|
||||
// OldSystem sortSign = sarStandardsInfoDao.loreDepotSort(oldSystem.getSortId());
|
||||
// //原文译文 进行判断
|
||||
// if(sortSign != null) {
|
||||
// if (sortSign.getSortSign().contains("译")) {
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// yi = yi+"," + sarBussionessStand.getFileId();
|
||||
// } else {
|
||||
// yi = sarBussionessStand.getFileId();
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// yuan = yuan+"," + sarBussionessStand.getFileId();
|
||||
// } else {
|
||||
// yuan = sarBussionessStand.getFileId();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// old.setTranslation(yi);
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yuan)) {
|
||||
// old.setOriginal(yuan);
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(yi)) {
|
||||
// old.setStandId(sarBussionessStand.getStandId());
|
||||
// oldArr.add(old);
|
||||
// }
|
||||
// }
|
||||
// // 企业
|
||||
// for(OldSystem data : oldArr) {
|
||||
// String id = sarBussStandAttrInfoEODao.selectInfoStandId(data.getStandId());
|
||||
// if(StringUtils.isNotBlank(id)) {
|
||||
// //sarBussStandAttrInfoEODao.updateByIdInfo(id,sarBussStandAttrInfo.getFbgbuss(),sarBussStandAttrInfo.getTranslation());
|
||||
// logger.info("企业修改成功====================================================================================");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
logger.info("企业没有译文件");
|
||||
}
|
||||
return Result.success(fileEOArrayList);
|
||||
}
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public interface SarStandAttrInfoDao extends BaseMapper<SarStandAttrInfo> {
|
||||
|
||||
List<SelectionResult> selectFieldValByContainsVal(@Param("field") String field, @Param("value") String value, @Param("standIds") List<String> standIds);
|
||||
|
||||
void updateByIdInfo(@Param("id")String id,@Param("fbgbjbd") String fbgbuss,@Param("translation") String translation);
|
||||
void updateByIdInfo(@Param("id")String id,@Param("fbgbjbd") String fbgbuss,@Param("fbgywbd") String fbgywbd);
|
||||
|
||||
String selectInfoStandId(@Param("standId")String standId);
|
||||
}
|
||||
|
||||
-5
@@ -238,9 +238,4 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("BDTBZH")
|
||||
private String bdtbzh;
|
||||
|
||||
@ApiModelProperty(value = "译文件")
|
||||
@TableField("TRANSLATION")
|
||||
private String translation;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@
|
||||
</select>
|
||||
|
||||
<update id="updateByIdInfo" >
|
||||
update SAR_STAND_ATTR_INFO ss set ss.FBGBJBD = #{fbgbjbd}, ss.TRANSLATION = #{translation}
|
||||
update SAR_STAND_ATTR_INFO ss set ss.FBGBJBD = #{fbgbjbd}, ss.FBGYWBD = #{fbgywbd}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
-4
@@ -167,10 +167,6 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByIdInfo">
|
||||
update SAR_BUSS_STAND_ATTR_INFO sb set sb.FBGBUSS = #{fbgbuss}, sb.TRANSLATION = #{translation}
|
||||
where ID = #{id}
|
||||
</update>
|
||||
<!-- 查询字段及对应数据-->
|
||||
<select id="selectInfoStandId" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
SELECT id
|
||||
|
||||
Reference in New Issue
Block a user