文件名称包含 中 cn/CN 译 的海外文件 放置译文
This commit is contained in:
+4
@@ -238,4 +238,8 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("BDTBZH")
|
||||
private String bdtbzh;
|
||||
|
||||
@ApiModelProperty(value = "发布告译文")
|
||||
@TableField("FBGYWBD")
|
||||
private String fbgywbd;
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -998,5 +998,9 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|附件中英文未完全分离,按照“中”“译”“cn/CN”饱含着三个的都是译文——海外")
|
||||
@GetMapping("/fileNameTranslation")
|
||||
public ResponseMessage fileNameTranslation (){
|
||||
return sarStandardsInfoEOService.fileNameTranslation();
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -76,4 +76,6 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
List<SarStandardsInfo> listQuery(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
List<SarStandardsInfo> listQuery2(SarStandardsInfoEOPage page);
|
||||
|
||||
ResponseMessage fileNameTranslation();
|
||||
}
|
||||
|
||||
+65
@@ -11,6 +11,7 @@ import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulations.entity.StandData;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.OldSystem;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
@@ -3792,5 +3793,69 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
return dao.listQuery2(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseMessage fileNameTranslation() {
|
||||
//附件中英文未完全分离,按照“中”“译”“cn/CN”饱含着三个的都是译文——海外
|
||||
List<SarStandAttrInfo> objects = new ArrayList<>();
|
||||
QueryWrapper<SarStandardsInfo> objectQueryWrapper = new QueryWrapper<>();
|
||||
objectQueryWrapper.eq("STAND_TYPE","FOREIGN");
|
||||
List<SarStandardsInfo> sarStandardsInfos = baseMapper.selectList(objectQueryWrapper);
|
||||
if(!sarStandardsInfos.isEmpty()){
|
||||
for (SarStandardsInfo data: sarStandardsInfos){
|
||||
QueryWrapper<SarStandAttrInfo> sarStandAttrInfoQueryWrapper = new QueryWrapper<>();
|
||||
sarStandAttrInfoQueryWrapper.eq("STAND_ID",data.getId());
|
||||
List<SarStandAttrInfo> sarStandAttrInfos = sarStandAttrInfoEODao.selectList(sarStandAttrInfoQueryWrapper);
|
||||
if(!sarStandAttrInfos.isEmpty()){
|
||||
if (sarStandAttrInfos.get(0) != null && StringUtils.isNotBlank(sarStandAttrInfos.get(0).getFbgbjbd())) {
|
||||
String[] fileIds = sarStandAttrInfos.get(0).getFbgbjbd().split(",");
|
||||
if(fileIds != null){
|
||||
//循环查询文件名称
|
||||
String yuan = "";
|
||||
String yi = "";
|
||||
String fbgywbd = sarStandAttrInfos.get(0).getFbgywbd();
|
||||
for (String fileId: fileIds){
|
||||
AttFileEO byId = attFileEOService.getFileInfo(fileId);
|
||||
if(byId!=null){
|
||||
if(byId.getOldFileName().contains("中") || byId.getOldFileName().contains("译") || byId.getOldFileName().contains("cn/CN")){
|
||||
//翻译文件
|
||||
if(StringUtils.isNotBlank(yi)){
|
||||
yi = yi+","+byId.getId();
|
||||
}else {
|
||||
yi = byId.getId();
|
||||
}
|
||||
}else {
|
||||
//原始文件
|
||||
if(StringUtils.isNotBlank(yuan)){
|
||||
yuan = yuan+","+byId.getId();
|
||||
}else {
|
||||
yuan = byId.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//如果译文是否存在
|
||||
if(StringUtils.isNotBlank(fbgywbd)){
|
||||
fbgywbd = fbgywbd +","+yi;
|
||||
}else {
|
||||
fbgywbd = yi;
|
||||
}
|
||||
sarStandAttrInfos.get(0).setFbgbjbd(yuan);
|
||||
sarStandAttrInfos.get(0).setFbgywbd(fbgywbd);
|
||||
objects.add(sarStandAttrInfos.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!objects.isEmpty()){
|
||||
//国内
|
||||
for(SarStandAttrInfo data : objects) {
|
||||
sarStandAttrInfoEODao.updateById(data);
|
||||
logger.info("海外修改成功==============="+data.toString());
|
||||
}
|
||||
}
|
||||
return Result.success(objects);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user