合并分支 'dev_20230216' 到 'master'
Dev 20230216 查看合并请求 laws-foton-slrs/foton-slrs-system-rest!82
This commit is contained in:
@@ -4,6 +4,7 @@ import com.adc.da.common.*;
|
||||
import com.adc.da.common.Category;
|
||||
import com.adc.da.common.Page;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
|
||||
import com.adc.da.workFlow.entity.BusProcessEvaluationHis;
|
||||
import com.adc.da.workFlow.entity.BusProcessModelHis;
|
||||
@@ -14,8 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -487,7 +486,7 @@ public interface workFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/datas/bus-process-new/selectAskId",method = RequestMethod.GET)
|
||||
String selectAskId(@RequestParam("taskId") String taskId);
|
||||
@RequestMapping(value = "/bat-wkflow/busProcessModel/selectOnlineFile",method = RequestMethod.POST)
|
||||
List<BusProcessModelHis> selectOnlineFile(@RequestParam("taskId") String taskId);
|
||||
OnlineFileLog selectOnlineFile(@RequestParam("onlineFileId") String onlineFileId);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/datas/bus-process-new/selectWenDan",method = RequestMethod.GET)
|
||||
Map<String, Object> selectWenDan(@RequestParam("taskId")String taskId);
|
||||
|
||||
+3
-6
@@ -6,6 +6,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.common.*;
|
||||
import com.adc.da.common.Page;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.IUserEOService;
|
||||
@@ -15,12 +16,8 @@ import com.adc.da.workFlow.entity.ProcessRollBackEO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -436,8 +433,8 @@ public class workFlowFeignClientImpl {
|
||||
return workFlowFeignClient.selectAskId(taskId);
|
||||
}
|
||||
|
||||
public List<BusProcessModelHis> selectOnlineFile(@RequestParam("taskId") String taskId) {
|
||||
return workFlowFeignClient.selectOnlineFile(taskId);
|
||||
public OnlineFileLog selectOnlineFile(@RequestParam("onlineFileId") String onlineFileId) {
|
||||
return workFlowFeignClient.selectOnlineFile(onlineFileId);
|
||||
}
|
||||
|
||||
public Map<String, Object> selectWenDan(@RequestParam("taskId") String taskId) {
|
||||
|
||||
+108
-3
@@ -6,9 +6,10 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.adc.da.FeignClientImpl.workFlowFeignClientImpl;
|
||||
import com.adc.da.Timer.ProcessTimer;
|
||||
import com.adc.da.att.dao.AttFileEODao;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.impl.AttFileEOServiceImpl;
|
||||
import com.adc.da.base.page.Pager;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.*;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
@@ -17,6 +18,8 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.common.Page;
|
||||
import com.adc.da.login.util.JwtUtils;
|
||||
import com.adc.da.slrs.OnlineFileLog.dao.OnlineFileLogDao;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.StandardQA.service.Impl.SarAgenldAcceptButtonServiceImpl;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
@@ -122,6 +125,15 @@ public class WorkFlowController extends BaseController {
|
||||
@Autowired
|
||||
private ISarBussionessStandStateService bussionessStandStateService;
|
||||
|
||||
@Autowired
|
||||
private OnlineFileLogDao onlineFileLogDao;
|
||||
|
||||
@Autowired
|
||||
private AttFileEODao attFileEODao;
|
||||
|
||||
@Value("${elasticsearch.img}")
|
||||
private String pathHttp;
|
||||
|
||||
// @Autowired
|
||||
// private ExportExcelMapper exportExcelMapper;
|
||||
|
||||
@@ -1029,8 +1041,101 @@ public class WorkFlowController extends BaseController {
|
||||
|
||||
@ApiOperation(value = "查找在线编辑文件")
|
||||
@GetMapping("/selectOnlineFile")
|
||||
public List<BusProcessModelHis> selectOnlineFile(@RequestParam("taskId") String taskId) {
|
||||
return workFlowFeignClient.selectOnlineFile(taskId);
|
||||
public ResponseMessage selectOnlineFile(@RequestParam("onlineFileId") String onlineFileId) {
|
||||
String path = standEditFilePath+"/hisFile/";
|
||||
File file = null;
|
||||
FileOutputStream fileOutputStream = null;
|
||||
BufferedOutputStream bufferedOutputStream = null;
|
||||
//下载位置
|
||||
OnlineFileLog onlineFileLog = workFlowFeignClient.selectOnlineFile(onlineFileId);
|
||||
long time = new Date().getTime();
|
||||
if(onlineFileLog == null){
|
||||
return Result.error();
|
||||
}
|
||||
try {
|
||||
file = new File(path+onlineFileLog.getOLdFileName());
|
||||
boolean directory = file.isDirectory();
|
||||
//目录是否存在
|
||||
if(!directory){
|
||||
file.mkdirs();
|
||||
}
|
||||
//file = new File(path+"/",onlineFileLog.getOLdFileName()+time+"."+onlineFileLog.getFileSuffix());
|
||||
file = new File(path+"/"+onlineFileLog.getOLdFileName(),time+"."+onlineFileLog.getFileSuffix());
|
||||
fileOutputStream = new FileOutputStream(file);
|
||||
bufferedOutputStream = new BufferedOutputStream(fileOutputStream);
|
||||
fileOutputStream.write(onlineFileLog.getBytes());
|
||||
fileOutputStream.close();
|
||||
//把文件下载到本地 然后获得文件的名称 通过文件名称 调用 filesave接口 获取id 进行日志存入
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
try {
|
||||
if(bufferedOutputStream!=null){
|
||||
bufferedOutputStream.close();
|
||||
}
|
||||
if(fileOutputStream!=null){
|
||||
fileOutputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//把文件放置到本地
|
||||
AttFileVo attFileVo = attFileEOService.saveFileInfo(file);
|
||||
//储存文件 一个文件夹 储存十个
|
||||
if(attFileVo!=null) {
|
||||
// 更新文件名称 用于显示
|
||||
AttFileEO attFileEO = new AttFileEO();
|
||||
attFileEO.setId(attFileVo.getId());
|
||||
attFileEO.setOldFileName(onlineFileLog.getOLdFileName()+"."+onlineFileLog.getFileSuffix());
|
||||
attFileEODao.updateFileInfoById(attFileEO);
|
||||
onlineFileLog.setAttFileId(attFileVo.getId());
|
||||
onlineFileLog.setUpdateTime(new Date());
|
||||
onlineFileLog.setCreateTime(new Date());
|
||||
onlineFileLog.setFileName(String.valueOf(time));
|
||||
onlineFileLog.setValidFlag("0");
|
||||
onlineFileLogDao.insert(onlineFileLog);
|
||||
//存储完成以后 去查询是否是最近的是个文件 如果是 则 如果不是则
|
||||
File deleteFile = new File(path + onlineFileLog.getOLdFileName());
|
||||
File[] files = deleteFile.listFiles();
|
||||
// 如果大于十个 删除最早的版本
|
||||
int count = 0;
|
||||
for (File fileData: files){
|
||||
if(fileData.isFile()){
|
||||
count = count+1;
|
||||
}
|
||||
}
|
||||
if(count>10){
|
||||
QueryWrapper<OnlineFileLog> onlineFileLogQueryWrapperHis = new QueryWrapper<>();
|
||||
onlineFileLogQueryWrapperHis.eq("HIS_ID",onlineFileId);
|
||||
onlineFileLogQueryWrapperHis.eq("VALID_FLAG","0");
|
||||
onlineFileLogQueryWrapperHis.orderByAsc("CREATE_TIME");
|
||||
List<OnlineFileLog> onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogQueryWrapperHis);
|
||||
//建立删除
|
||||
File deleteFileInfo = new File(path + onlineFileLog.getOLdFileName()+"/",onlineFileLogs.get(0).getFileName()+"."+onlineFileLogs.get(0).getFileSuffix());
|
||||
if(deleteFileInfo.delete()){
|
||||
QueryWrapper<OnlineFileLog> onlineFileLogQueryWrapper = new QueryWrapper<>();
|
||||
onlineFileLogQueryWrapper.eq("FILE_NAME",onlineFileLogs.get(0).getFileName());
|
||||
OnlineFileLog onlineFileLogIsNot = onlineFileLogDao.selectOne(onlineFileLogQueryWrapper);
|
||||
if(onlineFileLogIsNot!=null){
|
||||
//删除此处有关的数据
|
||||
AttFileEO fileInfo = attFileEOService.getFileInfo(onlineFileLogIsNot.getAttFileId());
|
||||
if(fileInfo!=null){
|
||||
File fileAtt = new File(standEditFilePath+fileInfo.getFilePath()+fileInfo.getFileName());
|
||||
if(fileAtt.delete()){
|
||||
attFileEOService.deleteById(onlineFileLogIsNot.getAttFileId());
|
||||
onlineFileLogDao.deleteById(onlineFileLogs.get(0).getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("删除成功"+onlineFileLogs.get(0).getId());
|
||||
}else {
|
||||
logger.info("删除失败"+onlineFileLogs.get(0).getId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return Result.success(attFileVo.getId());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询问题和回答")
|
||||
|
||||
@@ -290,18 +290,22 @@ upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt,pdg,rar,zip
|
||||
|
||||
# =============================================================================
|
||||
|
||||
#elasticsearch.clustername=elasticsearch
|
||||
#
|
||||
#elasticsearch.ip=127.0.0.1
|
||||
#
|
||||
#elasticsearch.port=9306
|
||||
#
|
||||
#elasticsearch.poolSize=5
|
||||
#
|
||||
#elas.flag=true
|
||||
elasticsearch.clustername=elasticsearch
|
||||
|
||||
elasticsearch.ip=127.0.0.1
|
||||
|
||||
elasticsearch.port=9306
|
||||
|
||||
elasticsearch.ip=10.100.5.122
|
||||
elasticsearch.port=9300
|
||||
elasticsearch.poolSize=5
|
||||
|
||||
elas.flag=true
|
||||
|
||||
|
||||
|
||||
# 拆分的图片调用 (修改ip时此处也应该被修改)
|
||||
|
||||
elasticsearch.img=http://localhost:9090
|
||||
|
||||
+14
-2
@@ -227,6 +227,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String sortField1 = "";
|
||||
String sortField2 = "";
|
||||
String sortField3 = "";
|
||||
String sortField4 = "";
|
||||
String sortField5 = "";
|
||||
if("laws".equals(searchInfoEO.getSelectIndex())){
|
||||
sortField1 = "lawsNumber";
|
||||
sortField2 = "lawsYear";
|
||||
@@ -235,6 +237,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
sortField1 = "standNumber";
|
||||
sortField2 = "standYear";
|
||||
sortField3 = "standSort.keyword";
|
||||
// sortField4 = "NYLXCLASS.keyword";
|
||||
// sortField5 = "CLLX.keyword";
|
||||
}
|
||||
searchRequestBuilder = client.prepareSearch(searchInfoEO.getSelectIndex())
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
@@ -244,6 +248,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
.addSort(sortField1, SortOrder.ASC)
|
||||
.addSort(sortField2, SortOrder.DESC)
|
||||
.addSort(sortField3, SortOrder.ASC)
|
||||
// .addSort(sortField4, SortOrder.ASC)
|
||||
// .addSort(sortField5, SortOrder.ASC)
|
||||
.addSort("issue_time_data", SortOrder.DESC)
|
||||
.setSize(searchInfoEO.getPageSize());
|
||||
|
||||
@@ -385,6 +391,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String sortField1 = "";
|
||||
String sortField2 = "";
|
||||
String sortField3 = "";
|
||||
String sortField4 = "";
|
||||
String sortField5 = "";
|
||||
if("laws".equals(searchInfoEO.getSelectIndex())){
|
||||
sortField1 = "lawsNumber";
|
||||
sortField2 = "lawsYear";
|
||||
@@ -393,6 +401,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
sortField1 = "standNumber";
|
||||
sortField2 = "standYear";
|
||||
sortField3 = "standSort.keyword";
|
||||
// sortField4 = "NYLXCLASS.keyword";
|
||||
// sortField5 = "CLLX.keyword";
|
||||
}
|
||||
searchRequestBuilder = client.prepareSearch(searchInfoEO.getSelectIndex())
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
@@ -402,6 +412,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
.addSort(sortField1, SortOrder.ASC)
|
||||
.addSort(sortField2, SortOrder.DESC)
|
||||
.addSort(sortField3, SortOrder.ASC)
|
||||
// .addSort(sortField4, SortOrder.ASC)
|
||||
// .addSort(sortField5, SortOrder.ASC)
|
||||
.addSort("issue_time_data", SortOrder.DESC)
|
||||
.setSize(searchInfoEO.getPageSize());
|
||||
|
||||
@@ -1650,8 +1662,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
.should(QueryBuilders.wildcardQuery("nameTitle.keyword","*" + searchInfoEO.getSelectValue() + "*").boost(1002f))
|
||||
.should(QueryBuilders.wildcardQuery("title.keyword", "*" + searchInfoEO.getSelectValue() + "*").boost(1000f))
|
||||
.should(QueryBuilders.wildcardQuery("titleBig.keyword", "*" + searchInfoEO.getSelectValue().toUpperCase() + "*").boost(1000f))
|
||||
.should(QueryBuilders.wildcardQuery("NYLXCLASS.keyword",searchInfoEO.getSelectValue().toUpperCase()).boost(1005f))
|
||||
.should(QueryBuilders.wildcardQuery("CLLX.keyword",searchInfoEO.getSelectValue().toUpperCase()).boost(1005f));
|
||||
.should(QueryBuilders.wildcardQuery("NYLXName.keyword",searchInfoEO.getSelectValue().toUpperCase()).boost(1005f))
|
||||
.should(QueryBuilders.wildcardQuery("CLLXName.keyword",searchInfoEO.getSelectValue().toUpperCase()).boost(1005f));
|
||||
// queryBuilder1 = QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||
// "sortTitle","numberTitle","yearOrder","nameTitle","title"
|
||||
// ).field("sortTitle",1005f).field("numberTitle",1004f).field("yearOrder",1003f).field("nameTitle",1002f).field("title",1000f);
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.OnlineFileLog.controller;
|
||||
|
||||
import com.adc.da.slrs.OnlineFileLog.service.OnlineFileLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/lawss/OnlineFileLog")
|
||||
@Api(description = "|OnlineFileLog|")
|
||||
public class OnlineFileLogController {
|
||||
|
||||
@Autowired
|
||||
private OnlineFileLogService onlineFileLogService;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.adc.da.slrs.OnlineFileLog.dao;
|
||||
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface OnlineFileLogDao extends BaseMapper<OnlineFileLog> {
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.adc.da.slrs.OnlineFileLog.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("online_file_log")
|
||||
@ApiModel(value="OnlineFileLog对象", description="")
|
||||
@Data
|
||||
public class OnlineFileLog extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "ID", type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@TableField("HIS_ID")
|
||||
@ApiModelProperty(value = "在线编辑工作流的id")
|
||||
private String hisId;
|
||||
|
||||
@TableField("ATT_FILE_ID")
|
||||
@ApiModelProperty(value = "新文件存储的id")
|
||||
private String attFileId;
|
||||
|
||||
@TableField("FILE_NAME")
|
||||
@ApiModelProperty(value = "新名称")
|
||||
private String fileName;
|
||||
|
||||
@TableField("OLD_FILE_NAME")
|
||||
@ApiModelProperty(value = "老名称")
|
||||
private String oLdFileName;
|
||||
|
||||
@TableField("FILE_SUFFIX")
|
||||
@ApiModelProperty(value = "后缀")
|
||||
private String fileSuffix;
|
||||
|
||||
@TableField("FILE_PATH")
|
||||
@ApiModelProperty(value = "路径")
|
||||
private String filePath;
|
||||
|
||||
@TableField("COUNT")
|
||||
@ApiModelProperty(value = "计数")
|
||||
private Integer count;
|
||||
|
||||
@TableField("CREATE_TIME")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@TableField("UPDATE_TIME")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
//跨服io流转换
|
||||
@TableField(exist = false)
|
||||
private byte[] bytes;
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.adc.da.slrs.OnlineFileLog.service;
|
||||
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
public interface OnlineFileLogService extends IService<OnlineFileLog> {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.slrs.OnlineFileLog.service.impl;
|
||||
|
||||
import com.adc.da.slrs.OnlineFileLog.dao.OnlineFileLogDao;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.OnlineFileLog.service.OnlineFileLogService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class OnlineFileLogServiceImpl extends ServiceImpl<OnlineFileLogDao, OnlineFileLog> implements OnlineFileLogService {
|
||||
|
||||
}
|
||||
+41
@@ -20,6 +20,8 @@ import com.adc.da.search.entity.StandLawsEO;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.NewsFeed.entity.NewsFeed;
|
||||
import com.adc.da.slrs.NewsFeed.service.INewsFeedService;
|
||||
import com.adc.da.slrs.OnlineFileLog.dao.OnlineFileLogDao;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanLogDao;
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
@@ -282,6 +284,9 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
@Autowired
|
||||
private SarBussionessStandStateDao sarBussionessStandStateDao;
|
||||
|
||||
@Autowired
|
||||
private OnlineFileLogDao onlineFileLogDao;
|
||||
|
||||
@Override
|
||||
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus,String standSort,String taskId){
|
||||
SarBussionessStand bussionessStand = new SarBussionessStand();
|
||||
@@ -1443,6 +1448,42 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
String onFileId = "";
|
||||
String fileId = "";
|
||||
String[] split = value.split(",");
|
||||
for (String id : split) {
|
||||
if (id.contains("ATT_FILE")) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(fileId)) {
|
||||
fileId = fileId + "," + id;
|
||||
} else {
|
||||
fileId = id;
|
||||
}
|
||||
} else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(onFileId)) {
|
||||
onFileId = onFileId + "," + id;
|
||||
} else {
|
||||
onFileId = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
String officeFileIds = "";
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(onFileId)){
|
||||
String[] splitOn = onFileId.split(",");
|
||||
for (String idOn: splitOn){
|
||||
QueryWrapper<OnlineFileLog> onlineFileLogQueryWrapper = new QueryWrapper<>();
|
||||
onlineFileLogQueryWrapper.eq("HIS_ID",idOn);
|
||||
onlineFileLogQueryWrapper.orderByDesc("CREATE_TIME");
|
||||
List<OnlineFileLog> onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogQueryWrapper);
|
||||
if(!onlineFileLogs.isEmpty()){
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(officeFileIds)){
|
||||
officeFileIds = officeFileIds+","+onlineFileLogs.get(0).getAttFileId();
|
||||
}else {
|
||||
officeFileIds = onlineFileLogs.get(0).getAttFileId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
value = fileId+","+officeFileIds;
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfosOrderByDateDesc(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
|
||||
+24
-24
@@ -34,20 +34,20 @@ import java.util.*;
|
||||
public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
@Resource
|
||||
private EarlyWarningEOServiceImpl earlyWarningEOService;
|
||||
/**
|
||||
*
|
||||
* @param newStandPage
|
||||
* @param newStandPageSize
|
||||
* @param oldStandPage
|
||||
* @param oldStandPageSize
|
||||
* @param newItemsPage
|
||||
* @param newItemsPageSize
|
||||
* @param oldItemsPage
|
||||
* @param oldItemsPageSize
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
/**
|
||||
*
|
||||
* @param newStandPage
|
||||
* @param newStandPageSize
|
||||
* @param oldStandPage
|
||||
* @param oldStandPageSize
|
||||
* @param newItemsPage
|
||||
* @param newItemsPageSize
|
||||
* @param oldItemsPage
|
||||
* @param oldItemsPageSize
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
@GetMapping("/${restPath}/StandWarning")
|
||||
@ApiOperation("标准预警查询")
|
||||
public ResponseMessage newPageInfo(@RequestParam(defaultValue = "1", value = "newStandPage")int newStandPage, @RequestParam(defaultValue = "10", value = "newStandPageSize") int newStandPageSize,
|
||||
@@ -91,12 +91,12 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
return Result.success("200",listMap);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
@GetMapping("/ChangePermissions")
|
||||
@ApiOperation("取消预警")
|
||||
public ResponseMessage ChangePermissions(String id) {
|
||||
@@ -104,15 +104,15 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
return Result.success("200",power);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param newPolicyPage
|
||||
* @param newPolicyPageSize
|
||||
* @param oldPolicyPage
|
||||
* @param oldPolicyPageSize
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-15
|
||||
**/
|
||||
@GetMapping("/PolicyWarning")
|
||||
@ApiOperation("政策预警查询")
|
||||
public ResponseMessage newPolicyPageInfo(@RequestParam(defaultValue = "1", value = "newPolicyPage")int newPolicyPage, @RequestParam(defaultValue = "10", value = "newPolicyPageSize") int newPolicyPageSize,
|
||||
|
||||
-10
@@ -292,11 +292,6 @@ public class SarStandardComplianceAssessResultController {
|
||||
iPage.setTotal(datasCount);
|
||||
iPage.setRecords(standards);
|
||||
while (iPage.getRecords().remove(null)) ;
|
||||
if(StringUtils.isNotBlank(eo.getOrder())){
|
||||
if(eo.getOrder().equals("desc")){
|
||||
iPage.getRecords().sort((m1,m2)-> m2.getSpecificItem().compareTo(m1.getSpecificItem()));
|
||||
}
|
||||
}
|
||||
return Result.success(iPage);
|
||||
} else {
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
@@ -312,11 +307,6 @@ public class SarStandardComplianceAssessResultController {
|
||||
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
|
||||
while (page.getRecords().remove(null)) ;
|
||||
if(StringUtils.isNotBlank(eo.getOrder())){
|
||||
if(eo.getOrder().equals("desc")){
|
||||
iPage.getRecords().sort((m1,m2)-> m2.getSpecificItem().compareTo(m1.getSpecificItem()));
|
||||
}
|
||||
}
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
+41
@@ -6,6 +6,8 @@ import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.slrs.NewsFeed.entity.NewsFeed;
|
||||
import com.adc.da.slrs.NewsFeed.service.INewsFeedService;
|
||||
import com.adc.da.slrs.OnlineFileLog.dao.OnlineFileLogDao;
|
||||
import com.adc.da.slrs.OnlineFileLog.entity.OnlineFileLog;
|
||||
import com.adc.da.slrs.regulations.dao.StandDataDao;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulations.entity.StandData;
|
||||
@@ -263,6 +265,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private EncryptFileUtils encryptFileUtils;
|
||||
|
||||
@Autowired
|
||||
private OnlineFileLogDao onlineFileLogDao;
|
||||
|
||||
|
||||
// /**
|
||||
// * 反向操作标准
|
||||
@@ -937,6 +942,42 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
String onFileId = "";
|
||||
String fileId = "";
|
||||
String[] split = value.split(",");
|
||||
for (String id : split) {
|
||||
if (id.contains("ATT_FILE")) {
|
||||
if (StringUtils.isNotBlank(fileId)) {
|
||||
fileId = fileId + "," + id;
|
||||
} else {
|
||||
fileId = id;
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(onFileId)) {
|
||||
onFileId = onFileId + "," + id;
|
||||
} else {
|
||||
onFileId = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
String officeFileIds = "";
|
||||
if(StringUtils.isNotBlank(onFileId)){
|
||||
String[] splitOn = onFileId.split(",");
|
||||
for (String idOn: splitOn){
|
||||
QueryWrapper<OnlineFileLog> onlineFileLogQueryWrapper = new QueryWrapper<>();
|
||||
onlineFileLogQueryWrapper.eq("HIS_ID",idOn);
|
||||
onlineFileLogQueryWrapper.orderByDesc("CREATE_TIME");
|
||||
List<OnlineFileLog> onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogQueryWrapper);
|
||||
if(!onlineFileLogs.isEmpty()){
|
||||
if(StringUtils.isNotBlank(officeFileIds)){
|
||||
officeFileIds = officeFileIds+","+onlineFileLogs.get(0).getAttFileId();
|
||||
}else {
|
||||
officeFileIds = onlineFileLogs.get(0).getAttFileId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
value = fileId+","+officeFileIds;
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfosOrderByDateDesc(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
|
||||
+3
-1
@@ -79,8 +79,10 @@
|
||||
<if test="prcNum!=null and prcNum!=''">
|
||||
AND sins.prc_num like concat(concat('%',#{prcNum}),'%')
|
||||
</if>
|
||||
ORDER BY sins.specific_item
|
||||
|
||||
<if test="order !=null and order!=''">
|
||||
ORDER BY sins.specific_item ${order}
|
||||
</if>
|
||||
) c ORDER BY CONVERT(SUBSTRING(c.specific_item,1,(SELECT LOCATE('.',CONCAT(c.specific_item,'.')))),SIGNED)
|
||||
LIMIT ${(current-1)*size},${size}
|
||||
</select>
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
-- 福田数据库 表字段 记录 字典 等信息记录
|
||||
|
||||
--2023-05-18 主服务 创建表 在线编辑日志表
|
||||
CREATE TABLE `online_file_log` (
|
||||
`ID` varchar(36) NOT NULL COMMENT 'ID',
|
||||
`HIS_ID` varchar(50) DEFAULT NULL COMMENT '在线编辑工作流的id',
|
||||
`ATT_FILE_ID` varchar(50) DEFAULT NULL COMMENT '新文件存储的id',
|
||||
`FILE_NAME` varchar(255) DEFAULT NULL COMMENT '新名称',
|
||||
`OLD_FILE_NAME` varchar(255) DEFAULT NULL COMMENT '老名称',
|
||||
`FILE_SUFFIX` varchar(255) DEFAULT NULL COMMENT '文件后缀',
|
||||
`FILE_PATH` varchar(255) DEFAULT NULL COMMENT '路径',
|
||||
`COUNT` bigint(5) DEFAULT NULL COMMENT '计数',
|
||||
`CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`UPDATE_TIME` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`VALID_FLAG` varchar(255) DEFAULT NULL COMMENT '是否有效',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 2023-04-14 16:27 生产环境未同步
|
||||
-- 更改 sar_stand_item_val 表PROOERTY_VAL 类型 varchar 为 text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user