Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
@@ -46,16 +46,17 @@ public class WaterMarkUtil {
|
||||
// 获得PDF最顶层
|
||||
under = stamper.getOverContent(i);
|
||||
under.saveState();
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
// 设置透明度为0.2
|
||||
gs.setFillOpacity(0.25f);
|
||||
under.setGState(gs);
|
||||
|
||||
under.restoreState();
|
||||
under.beginText();
|
||||
under.setFontAndSize(base, 30);
|
||||
under.setTextMatrix(30, 30);
|
||||
under.setColorFill(BaseColor.LIGHT_GRAY);
|
||||
// 设置透明度为0.2
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
gs.setFillOpacity(0.2f);
|
||||
under.setGState(gs);
|
||||
for (int y = 0; y < 50; y++) {
|
||||
for (int x = 0; x < 50; x++) {
|
||||
// 水印文字成45度角倾斜 x位置 y位置 角度
|
||||
|
||||
@@ -91,6 +91,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/exportProcessDetailInfo");
|
||||
|
||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/getImg");
|
||||
|
||||
|
||||
// //测试接口使用
|
||||
// addInterceptor.excludePathPatterns("/api/**");
|
||||
|
||||
+15
-3
@@ -5,6 +5,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
||||
import com.adc.da.slrs.fileMaterialCenter.service.IFileMaterialService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -15,8 +16,11 @@ import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.lang.reflect.Array;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -29,7 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "资料中心")
|
||||
@RequestMapping("/fileMaterialCenter/file-material")
|
||||
@RequestMapping("/${restPath}/fileMaterialCenter/file-material")
|
||||
public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
|
||||
@Autowired
|
||||
@@ -37,7 +41,15 @@ public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增文件资料组")
|
||||
public ResponseMessage addFileMaterial(FileMaterial material){
|
||||
public ResponseMessage addFileMaterial(@RequestBody FileMaterial material){
|
||||
|
||||
|
||||
// Date date = new Date();
|
||||
// String strDateFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||||
material.setId(UUIDUtils.randomUUID20());
|
||||
material.setDataUploadTime(new Date());
|
||||
material.setDelFlag("0");
|
||||
boolean save = iFileMaterialService.save(material);
|
||||
|
||||
return Result.success(save);
|
||||
@@ -47,7 +59,7 @@ public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除文件资料组")
|
||||
public ResponseMessage deleteMaterial(String id){
|
||||
List<String> idList = Arrays.asList(id.split(id));
|
||||
List<String> idList = Arrays.asList(id.split(","));
|
||||
boolean b = iFileMaterialService.removeByIds(idList);
|
||||
|
||||
return Result.success(b);
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.Tag;
|
||||
@@ -58,4 +59,8 @@ public class FileMaterial extends BaseEntity {
|
||||
@ApiModelProperty(value = "置顶")
|
||||
@TableField("is_top")
|
||||
private Integer isTop;
|
||||
|
||||
@ApiModelProperty(value = "删除标志")
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
private String delFlag;
|
||||
}
|
||||
|
||||
+4
-5
@@ -36,7 +36,7 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
||||
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (queryPage.getDataType()!=null){
|
||||
queryWrapper.eq("data_type",queryPage.getDataTitle());
|
||||
queryWrapper.eq("data_type",queryPage.getDataType());
|
||||
}
|
||||
|
||||
if (queryPage.getDataTitle()!=null){
|
||||
@@ -48,9 +48,8 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
||||
|
||||
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||||
queryWrapper.between("data_upload_time",
|
||||
sdf.format(queryPage.getStartDataUploadTime()),
|
||||
sdf.format(queryPage.getEndDataUploadTime()));
|
||||
queryWrapper.between("data_upload_time", queryPage.getStartDataUploadTime(),
|
||||
queryPage.getEndDataUploadTime());
|
||||
}
|
||||
|
||||
return this.page(new Page<>(queryPage.getPage(),queryPage.getPageSize()),queryWrapper);
|
||||
@@ -60,7 +59,7 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
||||
public List<String> getFileMaterialType() {
|
||||
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.select("data_type");
|
||||
queryWrapper.select("DISTINCT data_type");
|
||||
return this.listObjs(queryWrapper, item -> item.toString());
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -21,15 +21,15 @@ public class StandRegionalTimeDto {
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
private String putTime;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date zccssrq;
|
||||
private String zccssrq;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date xcxssrq;
|
||||
private String xcxssrq;
|
||||
}
|
||||
|
||||
+6
-6
@@ -301,14 +301,14 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
}
|
||||
|
||||
private void dateTime(LinkedHashMap<String, List<String>> mapList, StandRegionalTimeDto s) {
|
||||
String putTime = new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||
String xcx = new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq());
|
||||
String zcc = new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq());
|
||||
// String putTime = new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||
// String xcx = new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq());
|
||||
// String zcc = new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq());
|
||||
// putTime.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getPutTime());
|
||||
// xcx.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getXcxssrq()));
|
||||
// zcc.add(new SimpleDateFormat("yyyy-MM-dd").format(s.getZccssrq()));
|
||||
mapList.put("实施日期("+s.getCountry()+")", Collections.singletonList(putTime));
|
||||
mapList.put("新车型实施日期("+s.getCountry()+")", Collections.singletonList(xcx));
|
||||
mapList.put("在产车实施日期("+s.getCountry()+")", Collections.singletonList(zcc));
|
||||
mapList.put("实施日期("+s.getCountry()+")",Arrays.asList(s.getPutTime().split(",")));
|
||||
mapList.put("新车型实施日期("+s.getCountry()+")", Arrays.asList(s.getXcxssrq().split(",")));
|
||||
mapList.put("在产车实施日期("+s.getCountry()+")", Arrays.asList(s.getZccssrq().split(",")));
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -140,7 +140,7 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询文本信息")
|
||||
@ApiOperation(value = "查询转换后文本信息")
|
||||
@GetMapping("/queryFileInfo")
|
||||
public ResponseMessage<List<SarStandFileEO>> queryFileInfo(String standId){
|
||||
|
||||
@@ -156,4 +156,13 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
|
||||
return Result.success(sarStandFileEOS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "查询转原始文件信息")
|
||||
@GetMapping("/querySourceFileInfo")
|
||||
public ResponseMessage<List<SarStandFileEO>> querySourceFileInfo(String standId){
|
||||
|
||||
List<SarStandFileEO> sarStandFileEOS = sarStandFileEOService.selectFileByStandId(standId);
|
||||
return Result.success(sarStandFileEOS);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -23,8 +23,21 @@ public interface SarStandFileEOService {
|
||||
|
||||
List<SarStandFileEO> selectFileByAttId(String attId) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询转换后文件的文本信息
|
||||
* @param standId
|
||||
* @return
|
||||
*/
|
||||
List<SarStandFileEO> selectFileByStandId(String standId);
|
||||
|
||||
List<SarStandFileEO> selectFileByStandIdOCR(String standId,String type) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询转原始文件的信息
|
||||
* @param standId
|
||||
* @return
|
||||
*/
|
||||
List<SarStandFileEO> querySourceFileInfo(String standId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -399,7 +399,7 @@ public class SarFileSplitItemsEOServiceImpl implements SarFileSplitItemsEOServic
|
||||
String imgContent = itemsValEO.getItemContent();
|
||||
String imgUUIndex = "img" + String.valueOf(imgIndex);
|
||||
if (StringUtils.isNotEmpty(imgContent)){
|
||||
int pathIndex = imgContent.indexOf("src='uploadPath");
|
||||
int pathIndex = imgContent.indexOf("src='file");
|
||||
if (pathIndex > -1 && imgContent.length()>(pathIndex+16)) {
|
||||
String imgPath = imgContent.substring(pathIndex+16,imgContent.length()-2);
|
||||
String imgName = imgUUIndex + "-" +imgPath.substring(imgPath.lastIndexOf("/")+1,imgPath.length());
|
||||
@@ -525,7 +525,7 @@ public class SarFileSplitItemsEOServiceImpl implements SarFileSplitItemsEOServic
|
||||
AttFileVo attFileVo = attFileEOService.saveFileInfo(nowfilelist.get(0));
|
||||
if(attFileVo!=null){
|
||||
isText = false;
|
||||
String path = "uploadPath" + attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
String path = "file" + attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
String imgCon = "<img class=\'wordImg\' src=\'" + path + "\'>";
|
||||
valEO.setType("IMG");
|
||||
valEO.setItemContent(imgCon);
|
||||
@@ -559,7 +559,7 @@ public class SarFileSplitItemsEOServiceImpl implements SarFileSplitItemsEOServic
|
||||
AttFileVo attFileVo = attFileEOService.saveFileInfo(nowfilelist.get(0));
|
||||
if(attFileVo!=null){
|
||||
isText = false;
|
||||
String path = "uploadPath" + attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
String path = "file" + attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
String imgCon = "<img class=\'wordImg\' src=\'" + path + "\'>";
|
||||
valEO.setType("IMG");
|
||||
valEO.setItemContent(imgCon);
|
||||
@@ -595,7 +595,7 @@ public class SarFileSplitItemsEOServiceImpl implements SarFileSplitItemsEOServic
|
||||
AttFileVo attFileVo = attFileEOService.saveFileInfo(nowfilelist.get(0));
|
||||
if(attFileVo!=null){
|
||||
isText = false;
|
||||
String path = "uploadPath" + attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
String path = "file" + attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
String imgCon = "<img class=\'wordImg\' src=\'" + path + "\'>";
|
||||
valEO.setType("IMG");
|
||||
valEO.setItemContent(imgCon);
|
||||
|
||||
+14
@@ -78,6 +78,9 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
|
||||
|
||||
queryWrapper.eq("STAND_ID",standId).eq("USE_MODEL","WEB_FILE");
|
||||
List<SarStandFileEO> sarStandFileEOS = sarStandFileEODao.selectList(queryWrapper);
|
||||
/**
|
||||
* 询转换后文件信息 因为文件转换成pdf后会出现文件名位路径的情况,遍历查询文件的原始文件信息从中取出正确的文件名
|
||||
*/
|
||||
//开耀这地方我把selectOne改成了批量因为 查单个数据里面出了问题你看看给改一下
|
||||
sarStandFileEOS.forEach(item->{
|
||||
QueryWrapper<SarStandFileEO> wrapper = new QueryWrapper<>();
|
||||
@@ -142,4 +145,15 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
|
||||
return sarStandFileEOS;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<SarStandFileEO> querySourceFileInfo(String standId){
|
||||
QueryWrapper<SarStandFileEO> queryWrapper= new QueryWrapper<>();
|
||||
|
||||
queryWrapper.eq("STAND_ID",standId).eq("USE_MODEL","SOURCE_FILE");
|
||||
return sarStandFileEODao.selectList(queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ public class AttFileEOController {
|
||||
if (!newFile.exists()) {
|
||||
Files.copy(oldFile.toPath(), newFile.toPath());
|
||||
}
|
||||
filePathResult = "uploadPath/phoneLoadFiles/" + timeStr + "/" + fileOldName;
|
||||
filePathResult = "file/phoneLoadFiles/" + timeStr + "/" + fileOldName;
|
||||
return Result.success(filePathResult);
|
||||
} else {
|
||||
return Result.error("获取文件信息失败");
|
||||
|
||||
@@ -69,9 +69,9 @@ public class UeditorController {
|
||||
AttFileVo attFileVo= attFileEOService.saveFileInfo(uploadFile);
|
||||
String picUrlPath ="";
|
||||
if(StringUtils.isNotEmpty(referer)){
|
||||
picUrlPath=referer+"uploadPath"+ attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
picUrlPath=referer+"file"+ attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
}else{
|
||||
picUrlPath="uploadPath"+attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
picUrlPath="file"+attFileVo.getFilePath()+attFileVo.getFileName();
|
||||
}
|
||||
log.info("Ueditor 上传图片返回路径:"+picUrlPath);
|
||||
image.setState("SUCCESS");
|
||||
|
||||
Reference in New Issue
Block a user