Merge branch 'dev_20230216' of E:\futianxiangmu\foton-slrs-system-rest with conflicts.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# 数据库配置
|
# 数据库配置
|
||||||
#=============================================
|
#=============================================
|
||||||
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
|
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.url = jdbc:mysql://121.36.69.172:3307/foton_slrs_20230531?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false&serverTimezone=Asia/Shanghai
|
spring.datasource.url = jdbc:mysql://121.36.69.172:3307/foton_slrs_20230522?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
spring.datasource.username = root
|
spring.datasource.username = root
|
||||||
spring.datasource.password = hzwlsoft.com
|
spring.datasource.password = hzwlsoft.com
|
||||||
|
|
||||||
|
|||||||
@@ -310,6 +310,9 @@ elas.flag=true
|
|||||||
|
|
||||||
elasticsearch.img=http://localhost:9090
|
elasticsearch.img=http://localhost:9090
|
||||||
|
|
||||||
|
# 福田数据库备份脚本地址
|
||||||
|
script.backup.foton.mySql.path.sh=11
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# \u6587\u6863\u8F6C\u6362TCP\u901A\u8BAF\u5730\u5740
|
# \u6587\u6863\u8F6C\u6362TCP\u901A\u8BAF\u5730\u5740
|
||||||
|
|||||||
+7
@@ -67,4 +67,11 @@ public class SarBussStandFileController extends BaseController<SarBussStandFile>
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "|SarBussStandFileEO|批量修改加密文件不能打开问题")
|
||||||
|
@GetMapping("/batchUpdateSarBussFile")
|
||||||
|
/*@RequiresPermissions("lawss:sarLawsFile:list")*/
|
||||||
|
public ResponseMessage<SarBussStandFile> batchUpdateSarBussFile() throws Exception {
|
||||||
|
return sarBussStandFileEOService.batchUpdateSarBussFile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -1,5 +1,6 @@
|
|||||||
package com.adc.da.slrs.sarBussStandFile.service;
|
package com.adc.da.slrs.sarBussStandFile.service;
|
||||||
|
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
@@ -17,4 +18,5 @@ public interface ISarBussStandFileService extends IService<SarBussStandFile> {
|
|||||||
|
|
||||||
List<SarBussStandFile> selectFileByAttId(String attId) throws Exception;
|
List<SarBussStandFile> selectFileByAttId(String attId) throws Exception;
|
||||||
|
|
||||||
|
ResponseMessage<SarBussStandFile> batchUpdateSarBussFile();
|
||||||
}
|
}
|
||||||
|
|||||||
+71
@@ -1,12 +1,24 @@
|
|||||||
package com.adc.da.slrs.sarBussStandFile.service.impl;
|
package com.adc.da.slrs.sarBussStandFile.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
|
import com.adc.da.att.vo.AttFileVo;
|
||||||
|
import com.adc.da.common.UseModuleEnum;
|
||||||
|
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.entity.SarBussStandFile;
|
||||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||||
import com.adc.da.slrs.sarBussStandFile.service.ISarBussStandFileService;
|
import com.adc.da.slrs.sarBussStandFile.service.ISarBussStandFileService;
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.service.impl.SarBussionessStandServiceImpl;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,11 +32,70 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class SarBussStandFileServiceImpl extends ServiceImpl<SarBussStandFileDao, SarBussStandFile> implements ISarBussStandFileService {
|
public class SarBussStandFileServiceImpl extends ServiceImpl<SarBussStandFileDao, SarBussStandFile> implements ISarBussStandFileService {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(SarBussionessStandServiceImpl.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarBussStandFileDao sarStandFileEODao;
|
private SarBussStandFileDao sarStandFileEODao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAttFileEOService attFileEOService;
|
||||||
|
|
||||||
|
@Value("${file.path}")
|
||||||
|
private String filePath;//文件存储路径
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SarBussStandFile> selectFileByAttId(String attId) throws Exception{
|
public List<SarBussStandFile> selectFileByAttId(String attId) throws Exception{
|
||||||
return sarStandFileEODao.selectFileByAttId(attId);
|
return sarStandFileEODao.selectFileByAttId(attId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseMessage<SarBussStandFile> batchUpdateSarBussFile() {
|
||||||
|
List<SarBussStandFile> objects = new ArrayList<>();
|
||||||
|
|
||||||
|
QueryWrapper<SarBussStandFile> objectQueryWrapper = new QueryWrapper<>();
|
||||||
|
objectQueryWrapper.eq("USE_MODEL","SOURCE_FILE");
|
||||||
|
// objectQueryWrapper.eq("FILE_SUFFIX","docx");
|
||||||
|
objectQueryWrapper.ne("FILE_SUFFIX","pdf");
|
||||||
|
objectQueryWrapper.ne("FILE_SUFFIX","PDF");
|
||||||
|
List<SarBussStandFile> sarBussStandFiles = sarStandFileEODao.selectList(objectQueryWrapper);
|
||||||
|
if(!sarBussStandFiles.isEmpty()){
|
||||||
|
for (SarBussStandFile data: sarBussStandFiles){
|
||||||
|
|
||||||
|
QueryWrapper<SarBussStandFile> objectQueryWrapperSarBussStandFile = new QueryWrapper<>();
|
||||||
|
objectQueryWrapperSarBussStandFile.eq("USE_MODEL","SOURCE_FILE");
|
||||||
|
objectQueryWrapperSarBussStandFile.eq("ORI_ATT_ID",data.getOriAttId());
|
||||||
|
// objectQueryWrapper.eq("FILE_SUFFIX","docx");
|
||||||
|
objectQueryWrapperSarBussStandFile.ne("FILE_SUFFIX","pdf");
|
||||||
|
objectQueryWrapperSarBussStandFile.ne("FILE_SUFFIX","PDF");
|
||||||
|
List<SarBussStandFile> sarBussStandFilesList = sarStandFileEODao.selectList(objectQueryWrapper);
|
||||||
|
if(!sarBussStandFilesList.isEmpty() && sarBussStandFilesList.size()==1){
|
||||||
|
AttFileVo attFileVo = attFileEOService.wordConversionFilePdf(data.getOriAttId());
|
||||||
|
if(attFileVo!=null){
|
||||||
|
SarBussStandFile sarBussStandFile = new SarBussStandFile();
|
||||||
|
//sarBussStandFile.setId();
|
||||||
|
String uuId = com.adc.da.util.utils.UUID.randomUUID(20);
|
||||||
|
sarBussStandFile.setId(uuId);
|
||||||
|
sarBussStandFile.setStandId(data.getStandId());
|
||||||
|
sarBussStandFile.setStandFileClassify(data.getStandFileClassify());
|
||||||
|
sarBussStandFile.setAttId(attFileVo.getId());
|
||||||
|
sarBussStandFile.setFileName(filePath+attFileVo.getFilePath()+attFileVo.getFileName());
|
||||||
|
sarBussStandFile.setFileSuffix(attFileVo.getFileSuffix());
|
||||||
|
sarBussStandFile.setUseModel(UseModuleEnum.WEB_FILE.getValue());
|
||||||
|
sarBussStandFile.setPassword(data.getPassword());
|
||||||
|
sarBussStandFile.setValidFlag(0);
|
||||||
|
sarBussStandFile.setCreationTime(new Date());
|
||||||
|
sarBussStandFile.setModifyTime(new Date());
|
||||||
|
sarBussStandFile.setOriAttId(data.getOriAttId());
|
||||||
|
objects.add(sarBussStandFile);
|
||||||
|
sarStandFileEODao.insert(sarBussStandFile);
|
||||||
|
logger.info("======================================正在转换=================================");
|
||||||
|
}else {
|
||||||
|
logger.info("======================================word.doc转换失败=================================");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("======================================转换完成================================="+objects.toString());
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1355,7 +1355,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
if(fbgbuss!=null) {
|
if(fbgbuss!=null) {
|
||||||
String fbgbussStr = fbgbuss.toString();
|
String fbgbussStr = fbgbuss.toString();
|
||||||
if(StringUtils.isNotBlank(fbgbussStr)){
|
if(StringUtils.isNotBlank(fbgbussStr)){
|
||||||
sarStandFilePdf(fbgbussStr);
|
//sarStandFilePdf(fbgbussStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sarBussionessStandEO;
|
return sarBussionessStandEO;
|
||||||
|
|||||||
Reference in New Issue
Block a user