doc文檔重新轉換
This commit is contained in:
+40
@@ -10,9 +10,13 @@ import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||
import com.adc.da.slrs.sarBussStandFile.service.ISarBussStandFileService;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarLawsInfo.service.ISarLawsInfoService;
|
||||
import com.adc.da.slrs.sarStandFile.entity.SarStandFile;
|
||||
import com.adc.da.slrs.sarStandFile.service.ISarStandFileService;
|
||||
import com.adc.da.slrs.sarStandMenu.dao.SarStandMenuDao;
|
||||
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.*;
|
||||
@@ -68,6 +72,9 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
@Autowired
|
||||
private ISarBussionessStandService iSarBussionessStandService;
|
||||
|
||||
@Autowired
|
||||
private ISarStandFileService sarStandFileService;
|
||||
|
||||
|
||||
@Value("${file.path}")
|
||||
private String filePath;
|
||||
@@ -854,4 +861,37 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ISarBussStandFileService sarBussStandFileService;
|
||||
|
||||
@ApiOperation(value = "doc文件重新轉換[國内外標準]")
|
||||
@GetMapping("/convertDocAll_GNW")
|
||||
public String convertDocAll_GNW(Integer number) throws Exception {
|
||||
QueryWrapper<SarStandFile> qw = new QueryWrapper();
|
||||
qw.eq("valid_flag","0");
|
||||
qw.and(wrapper -> wrapper.eq("file_suffix","DOC").or().eq("file_suffix","docx"));
|
||||
if(number != null && number > 0){
|
||||
qw.last("limit 5");
|
||||
}
|
||||
List<SarStandFile> list = sarStandFileService.list(qw);
|
||||
logger.error("doc轉換共多少:"+list.size());
|
||||
sarStandardsInfoEOService.convertDocAll(list);
|
||||
return "1";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "doc文件重新轉換[企標]")
|
||||
@GetMapping("/convertDocAll_QB")
|
||||
public String convertDocAll_QB(Integer number) throws Exception {
|
||||
QueryWrapper<SarBussStandFile> qw = new QueryWrapper();
|
||||
qw.eq("valid_flag","0");
|
||||
qw.and(wrapper -> wrapper.eq("file_suffix","DOC").or().eq("file_suffix","docx"));
|
||||
if(number != null && number > 0){
|
||||
qw.last("limit 5");
|
||||
}
|
||||
List<SarBussStandFile> list = sarBussStandFileService.list(qw);
|
||||
logger.error("doc轉換共多少:"+list.size());
|
||||
sarStandardsInfoEOService.convertDocAllQB(list);
|
||||
return "1";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -1,5 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||
import com.adc.da.slrs.sarStandFile.entity.SarStandFile;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.*;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@@ -64,4 +66,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
void replaceBdtbzhforDtbzh();
|
||||
|
||||
void replaceBdtbzhforDtbzhQb();
|
||||
|
||||
void convertDocAll(List<SarStandFile> list);
|
||||
|
||||
void convertDocAllQB(List<SarBussStandFile> list);
|
||||
}
|
||||
|
||||
+35
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
|
||||
import com.adc.da.att.dao.AttFileEODao;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
@@ -9,6 +10,7 @@ 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.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
@@ -269,6 +271,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
|
||||
@Autowired
|
||||
private StandDataDao standDataDao;
|
||||
|
||||
@Autowired
|
||||
private AttFileEODao attFileEODao;
|
||||
// /**
|
||||
// * 反向操作标准
|
||||
// */
|
||||
@@ -502,6 +507,36 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertDocAll(List<SarStandFile> list) {
|
||||
try{
|
||||
for(SarStandFile sarStandFile : list){
|
||||
logger.error("GB++++++++++++++++:" + sarStandFile.getStandId());
|
||||
AttFileEO attFileEO = new AttFileEO();
|
||||
attFileEO.setId(sarStandFile.getAttId());
|
||||
AttFileEO temp = attFileEODao.selectFileInfoById(attFileEO);
|
||||
createStandFileAppend(sarStandFile.getStandId(), sarStandFile.getStandFileClassify(), Arrays.asList(temp), new ArrayList<>());
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertDocAllQB(List<SarBussStandFile> list) {
|
||||
try{
|
||||
for(SarBussStandFile sarStandFile : list){
|
||||
logger.error("QB++++++++++++++++:" + sarStandFile.getStandId());
|
||||
AttFileEO attFileEO = new AttFileEO();
|
||||
attFileEO.setId(sarStandFile.getAttId());
|
||||
AttFileEO temp = attFileEODao.selectFileInfoById(attFileEO);
|
||||
createStandFileAppend(sarStandFile.getStandId(), sarStandFile.getStandFileClassify(), Arrays.asList(temp), new ArrayList<>());
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private String convertStandCodeHandle(String standCode) {
|
||||
if (StringUtils.isNotBlank(standCode)) {
|
||||
standCode = standCode.replaceAll("—", "-");
|
||||
|
||||
Reference in New Issue
Block a user