删除无用代码.
This commit is contained in:
-589
@@ -1,589 +0,0 @@
|
|||||||
package com.jero.common.es;
|
|
||||||
|
|
||||||
import cn.hutool.http.HttpRequest;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import com.jero.common.util.RestUtil;
|
|
||||||
import com.jero.common.util.oConvertUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关于 ElasticSearch 的一些方法(创建索引、添加数据、查询等)
|
|
||||||
*
|
|
||||||
* @author sunjianlei
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
public class JeroElasticsearchTemplate {
|
|
||||||
/** es服务地址 */
|
|
||||||
private String baseUrl;
|
|
||||||
private static final String FORMAT_JSON = "format=json";
|
|
||||||
/** Elasticsearch 的版本号 */
|
|
||||||
private String version = null;
|
|
||||||
|
|
||||||
// ElasticSearch 最大可返回条目数
|
|
||||||
public static final int ES_MAX_SIZE = 10000;
|
|
||||||
|
|
||||||
@Value("${jero.elasticsearch.username}")
|
|
||||||
private String username;
|
|
||||||
@Value("${jero.elasticsearch.password}")
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
public JeroElasticsearchTemplate(@Value("${jero.elasticsearch.cluster-nodes}") String baseUrl, @Value("${jero.elasticsearch.check-enabled}") boolean checkEnabled) {
|
|
||||||
log.debug("JeroElasticsearchTemplate BaseURL:" + baseUrl);
|
|
||||||
if (StringUtils.isNotEmpty(baseUrl)) {
|
|
||||||
this.baseUrl = baseUrl;
|
|
||||||
// 验证配置的ES地址是否有效
|
|
||||||
if (checkEnabled) {
|
|
||||||
try {
|
|
||||||
this.getElasticsearchVersion();
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
HttpRequest.get(this.getBaseUrl().toString())
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
log.info("ElasticSearch 服务连接成功");
|
|
||||||
log.info("ElasticSearch version: " + this.version);
|
|
||||||
} catch (Exception e) {
|
|
||||||
this.version = "";
|
|
||||||
log.warn("ElasticSearch 服务连接失败,原因:配置未通过。可能是BaseURL未配置或配置有误,也可能是Elasticsearch服务未启动。接下来将会拒绝执行任何方法!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 Elasticsearch 的版本号信息,失败返回null
|
|
||||||
*/
|
|
||||||
private void getElasticsearchVersion() {
|
|
||||||
if (this.version == null) {
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.get(this.getBaseUrl().toString())
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject result = JSONObject.parseObject(response);
|
|
||||||
if (result != null) {
|
|
||||||
JSONObject v = result.getJSONObject("version");
|
|
||||||
this.version = v.getString("number");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBasicAuth(){
|
|
||||||
String authString = username + ":" + password;
|
|
||||||
String encode = Base64.getEncoder().encodeToString(authString.getBytes());
|
|
||||||
String authHeader = "Basic " + encode;
|
|
||||||
return authHeader;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StringBuilder getBaseUrl(String indexName, String typeName) {
|
|
||||||
typeName = typeName.trim().toLowerCase();
|
|
||||||
return this.getBaseUrl(indexName).append("/").append(typeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public StringBuilder getBaseUrl(String indexName) {
|
|
||||||
indexName = indexName.trim().toLowerCase();
|
|
||||||
return this.getBaseUrl().append("/").append(indexName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public StringBuilder getBaseUrl() {
|
|
||||||
return new StringBuilder("http://").append(this.baseUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cat 查询ElasticSearch系统数据,返回json
|
|
||||||
*/
|
|
||||||
public JSONArray _cat(String urlAfter) {
|
|
||||||
String url = this.getBaseUrl().append("/_cat").append(urlAfter).append("?").append(FORMAT_JSON).toString();
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.get(url)
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONArray jsonArray = JSONArray.parseArray(response);
|
|
||||||
return jsonArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JSONObject put(String url){
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.put(url)
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
public JSONObject put(String url, String params){
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.put(url)
|
|
||||||
.body(params)
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
public JSONObject get(String url, JSONObject params){
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.get(url)
|
|
||||||
.body(params.toJSONString())
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
public JSONObject post(String url, JSONObject params){
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.post(url)
|
|
||||||
.body(params.toJSONString())
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
public JSONObject delete(String url){
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.delete(url)
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cat 查询ElasticSearch系统数据,返回json
|
|
||||||
*/
|
|
||||||
public <T> ResponseEntity<T> _cat(String urlAfter, Class<T> responseType) {
|
|
||||||
String url = this.getBaseUrl().append("/_cat").append(urlAfter).append("?").append(FORMAT_JSON).toString();
|
|
||||||
return RestUtil.request(url, HttpMethod.GET, null, null, null, responseType);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询所有索引
|
|
||||||
* <p>
|
|
||||||
* 查询地址:GET http://{baseUrl}/_cat/indices
|
|
||||||
*/
|
|
||||||
public JSONArray getIndices() {
|
|
||||||
return getIndices(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单个索引
|
|
||||||
* <p>
|
|
||||||
* 查询地址:GET http://{baseUrl}/_cat/indices/{indexName}
|
|
||||||
*/
|
|
||||||
public JSONArray getIndices(String indexName) {
|
|
||||||
StringBuilder urlAfter = new StringBuilder("/indices");
|
|
||||||
if (!StringUtils.isEmpty(indexName)) {
|
|
||||||
urlAfter.append("/").append(indexName.trim().toLowerCase());
|
|
||||||
}
|
|
||||||
return _cat(urlAfter.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 索引是否存在
|
|
||||||
*/
|
|
||||||
public boolean indexExists(String indexName) {
|
|
||||||
try {
|
|
||||||
JSONArray array = getIndices(indexName);
|
|
||||||
return array != null;
|
|
||||||
} catch (org.springframework.web.client.HttpClientErrorException ex) {
|
|
||||||
if (HttpStatus.NOT_FOUND == ex.getStatusCode()) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据ID获取索引数据,未查询到返回null
|
|
||||||
* <p>
|
|
||||||
* 查询地址:GET http://{baseUrl}/{indexName}/{typeName}/{dataId}
|
|
||||||
*
|
|
||||||
* @param indexName 索引名称
|
|
||||||
* @param typeName type,一个任意字符串,用于分类
|
|
||||||
* @param dataId 数据id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public JSONObject getDataById(String indexName, String typeName, String dataId) {
|
|
||||||
String url = this.getBaseUrl(indexName, typeName).append("/").append(dataId).toString();
|
|
||||||
log.info("url:" + url);
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.get(this.getBaseUrl().toString())
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject result = JSONObject.parseObject(response);
|
|
||||||
boolean found = result.getBoolean("found");
|
|
||||||
if (found) {
|
|
||||||
return result.getJSONObject("_source");
|
|
||||||
} else {
|
|
||||||
return new JSONObject();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建索引
|
|
||||||
* <p>
|
|
||||||
* 查询地址:PUT http://{baseUrl}/{indexName}
|
|
||||||
*/
|
|
||||||
public boolean createIndex(String indexName) {
|
|
||||||
String url = this.getBaseUrl(indexName).toString();
|
|
||||||
|
|
||||||
try {
|
|
||||||
return this.put(url).getBoolean("acknowledged");
|
|
||||||
} catch (org.springframework.web.client.HttpClientErrorException ex) {
|
|
||||||
if (HttpStatus.BAD_REQUEST == ex.getStatusCode()) {
|
|
||||||
log.warn("索引创建失败:" + indexName + " 已存在,无需再创建");
|
|
||||||
} else {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除索引
|
|
||||||
* <p>
|
|
||||||
* 查询地址:DELETE http://{baseUrl}/{indexName}
|
|
||||||
*/
|
|
||||||
public boolean removeIndex(String indexName) {
|
|
||||||
String url = this.getBaseUrl(indexName).toString();
|
|
||||||
try {
|
|
||||||
return this.delete(url).getBoolean("acknowledged");
|
|
||||||
} catch (org.springframework.web.client.HttpClientErrorException ex) {
|
|
||||||
if (HttpStatus.NOT_FOUND == ex.getStatusCode()) {
|
|
||||||
log.warn("索引删除失败:" + indexName + " 不存在,无需删除");
|
|
||||||
} else {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取索引字段映射(可获取字段类型)
|
|
||||||
* <p>
|
|
||||||
*
|
|
||||||
* @param indexName 索引名称
|
|
||||||
* @param typeName 分类名称
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public JSONObject getIndexMapping(String indexName, String typeName) {
|
|
||||||
String url = this.getBaseUrl(indexName, typeName).append("/_mapping?").append(FORMAT_JSON).toString();
|
|
||||||
// 针对 es 7.x 版本做兼容
|
|
||||||
this.getElasticsearchVersion();
|
|
||||||
if (oConvertUtils.isNotEmpty(this.version) && this.version.startsWith("7")) {
|
|
||||||
url += "&include_type_name=true";
|
|
||||||
}
|
|
||||||
log.info("getIndexMapping-url:" + url);
|
|
||||||
try {
|
|
||||||
String basicAuth = this.getBasicAuth();
|
|
||||||
String response = HttpRequest.get(this.getBaseUrl().toString())
|
|
||||||
.header("Authorization", basicAuth)
|
|
||||||
.execute()
|
|
||||||
.body();
|
|
||||||
JSONObject result = JSONObject.parseObject(response);
|
|
||||||
return result;
|
|
||||||
} catch (org.springframework.web.client.HttpClientErrorException e) {
|
|
||||||
String message = e.getMessage();
|
|
||||||
if (message != null && message.contains("404 Not Found")) {
|
|
||||||
return new JSONObject();
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取索引字段映射,返回Java实体类
|
|
||||||
*
|
|
||||||
* @param indexName
|
|
||||||
* @param typeName
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public <T> Map<String, T> getIndexMappingFormat(String indexName, String typeName, Class<T> clazz) {
|
|
||||||
JSONObject mapping = this.getIndexMapping(indexName, typeName);
|
|
||||||
Map<String, T> map = new HashMap<>();
|
|
||||||
if (mapping == null) {
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
// 获取字段属性
|
|
||||||
JSONObject properties = mapping.getJSONObject(indexName)
|
|
||||||
.getJSONObject("mappings")
|
|
||||||
.getJSONObject(typeName)
|
|
||||||
.getJSONObject("properties");
|
|
||||||
// 封装成 java类型
|
|
||||||
for (String key : properties.keySet()) {
|
|
||||||
T entity = properties.getJSONObject(key).toJavaObject(clazz);
|
|
||||||
map.put(key, entity);
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据,详见:saveOrUpdate
|
|
||||||
*/
|
|
||||||
public boolean save(String indexName, String typeName, String dataId, JSONObject data) {
|
|
||||||
return this.saveOrUpdate(indexName, typeName, dataId, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新数据,详见:saveOrUpdate
|
|
||||||
*/
|
|
||||||
public boolean update(String indexName, String typeName, String dataId, JSONObject data) {
|
|
||||||
return this.saveOrUpdate(indexName, typeName, dataId, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存或修改索引数据
|
|
||||||
* <p>
|
|
||||||
* 查询地址:PUT http://{baseUrl}/{indexName}/{typeName}/{dataId}
|
|
||||||
*
|
|
||||||
* @param indexName 索引名称
|
|
||||||
* @param typeName type,一个任意字符串,用于分类
|
|
||||||
* @param dataId 数据id
|
|
||||||
* @param data 要存储的数据
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean saveOrUpdate(String indexName, String typeName, String dataId, JSONObject data) {
|
|
||||||
String url = this.getBaseUrl(indexName, typeName).append("/").append(dataId).append("?refresh=wait_for").toString();
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 去掉 data 中为空的值
|
|
||||||
Set<String> keys = data.keySet();
|
|
||||||
List<String> emptyKeys = new ArrayList<>(keys.size());
|
|
||||||
for (String key : keys) {
|
|
||||||
String value = data.getString(key);
|
|
||||||
//1、剔除空值
|
|
||||||
if (oConvertUtils.isEmpty(value) || "[]".equals(value)) {
|
|
||||||
emptyKeys.add(key);
|
|
||||||
}
|
|
||||||
//2、剔除上传控件值(会导致ES同步失败,报异常failed to parse field [ge_pic] of type [text] )
|
|
||||||
if (oConvertUtils.isNotEmpty(value) && value.indexOf("[{")!=-1) {
|
|
||||||
emptyKeys.add(key);
|
|
||||||
log.info("-------剔除上传控件字段------------key: "+ key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (String key : emptyKeys) {
|
|
||||||
data.remove(key);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
String result = this.put(url, data.toJSONString()).getString("result");
|
|
||||||
return "created".equals(result) || "updated".equals(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error(e.getMessage() + "\n-- url: " + url + "\n-- data: " + data.toJSONString());
|
|
||||||
//TODO 打印接口返回异常json
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量保存数据
|
|
||||||
*
|
|
||||||
* @param indexName 索引名称
|
|
||||||
* @param typeName type,一个任意字符串,用于分类
|
|
||||||
* @param dataList 要存储的数据数组,每行数据必须包含id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean saveBatch(String indexName, String typeName, JSONArray dataList) {
|
|
||||||
String url = this.getBaseUrl().append("/_bulk").append("?refresh=wait_for").toString();
|
|
||||||
StringBuilder bodySB = new StringBuilder();
|
|
||||||
for (int i = 0; i < dataList.size(); i++) {
|
|
||||||
JSONObject data = dataList.getJSONObject(i);
|
|
||||||
String id = data.getString("id");
|
|
||||||
// 该行的操作
|
|
||||||
JSONObject action = new JSONObject();
|
|
||||||
JSONObject actionInfo = new JSONObject();
|
|
||||||
actionInfo.put("_id", id);
|
|
||||||
actionInfo.put("_index", indexName);
|
|
||||||
actionInfo.put("_type", typeName);
|
|
||||||
action.put("create", actionInfo);
|
|
||||||
bodySB.append(action.toJSONString()).append("\n");
|
|
||||||
// 该行的数据
|
|
||||||
data.remove("id");
|
|
||||||
bodySB.append(data.toJSONString()).append("\n");
|
|
||||||
}
|
|
||||||
log.info("+-+-+-: bodySB.toString(): " + bodySB.toString());
|
|
||||||
this.put(url,bodySB.toString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除索引数据
|
|
||||||
* <p>
|
|
||||||
* 请求地址:DELETE http://{baseUrl}/{indexName}/{typeName}/{dataId}
|
|
||||||
*/
|
|
||||||
public boolean delete(String indexName, String typeName, String dataId) {
|
|
||||||
String url = this.getBaseUrl(indexName, typeName).append("/").append(dataId).toString();
|
|
||||||
try {
|
|
||||||
return "deleted".equals(this.delete(url).getString("result"));
|
|
||||||
} catch (org.springframework.web.client.HttpClientErrorException ex) {
|
|
||||||
if (HttpStatus.NOT_FOUND == ex.getStatusCode()) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* = = = 以下关于查询和查询条件的方法 = = =*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询数据
|
|
||||||
* <p>
|
|
||||||
* 请求地址:POST http://{baseUrl}/{indexName}/{typeName}/_search
|
|
||||||
*/
|
|
||||||
public JSONObject search(String indexName, String typeName, JSONObject queryObject) {
|
|
||||||
String url = this.getBaseUrl(indexName, typeName).append("/_search").toString();
|
|
||||||
|
|
||||||
log.info("url:" + url + " ,search: " + queryObject.toJSONString());
|
|
||||||
JSONObject res = this.get(url, queryObject);
|
|
||||||
log.info("url:" + url + " ,return res: \n" + res.toJSONString());
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param _source (源滤波器)指定返回的字段,传null返回所有字段
|
|
||||||
* @param query
|
|
||||||
* @param from 从第几条数据开始
|
|
||||||
* @param size 返回条目数
|
|
||||||
* @return { "query": query }
|
|
||||||
*/
|
|
||||||
public JSONObject buildQuery(List<String> _source, JSONObject query, int from, int size) {
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
if (_source != null) {
|
|
||||||
json.put("_source", _source);
|
|
||||||
}
|
|
||||||
json.put("query", query);
|
|
||||||
json.put("from", from);
|
|
||||||
json.put("size", size);
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JSONObject buildQuery(List<String> _source, JSONObject query,Map<String, Object> highlight,JSONArray sort, int from, int size) {
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
if (_source != null) {
|
|
||||||
json.put("_source", _source);
|
|
||||||
}
|
|
||||||
json.put("highlight", highlight);
|
|
||||||
json.put("query", query);
|
|
||||||
json.put("sort", sort);
|
|
||||||
json.put("from", from * size);
|
|
||||||
json.put("size", size);
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @return { "bool" : { "must": must, "must_not": mustNot, "should": should } }
|
|
||||||
*/
|
|
||||||
public JSONObject buildBoolQuery(JSONArray must, JSONArray mustNot, JSONArray should) {
|
|
||||||
JSONObject bool = new JSONObject();
|
|
||||||
if (must != null) {
|
|
||||||
bool.put("must", must);
|
|
||||||
}
|
|
||||||
if (mustNot != null) {
|
|
||||||
bool.put("must_not", mustNot);
|
|
||||||
}
|
|
||||||
if (should != null) {
|
|
||||||
bool.put("should", should);
|
|
||||||
}
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
json.put("bool", bool);
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param field 要查询的字段
|
|
||||||
* @param args 查询参数,参考: *哈哈* OR *哒* NOT *呵* OR *啊*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public JSONObject buildQueryString(String field, String... args) {
|
|
||||||
if (field == null) {
|
|
||||||
return new JSONObject();
|
|
||||||
}
|
|
||||||
StringBuilder sb = new StringBuilder(field).append(":(");
|
|
||||||
if (args != null) {
|
|
||||||
for (String arg : args) {
|
|
||||||
sb.append(arg).append(" ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sb.append(")");
|
|
||||||
return this.buildQueryString(sb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return { "query_string": { "query": query } }
|
|
||||||
*/
|
|
||||||
public JSONObject buildQueryString(String query) {
|
|
||||||
JSONObject queryString = new JSONObject();
|
|
||||||
queryString.put("query", query);
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
json.put("query_string", queryString);
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param field 查询字段
|
|
||||||
* @param min 最小值
|
|
||||||
* @param max 最大值
|
|
||||||
* @param containMin 范围内是否包含最小值
|
|
||||||
* @param containMax 范围内是否包含最大值
|
|
||||||
* @return { "range" : { field : { 『 "gt『e』?containMin" : min 』?min!=null , 『 "lt『e』?containMax" : max 』}} }
|
|
||||||
*/
|
|
||||||
public JSONObject buildRangeQuery(String field, Object min, Object max, boolean containMin, boolean containMax) {
|
|
||||||
JSONObject inner = new JSONObject();
|
|
||||||
if (min != null) {
|
|
||||||
if (containMin) {
|
|
||||||
inner.put("gte", min);
|
|
||||||
} else {
|
|
||||||
inner.put("gt", min);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (max != null) {
|
|
||||||
if (containMax) {
|
|
||||||
inner.put("lte", max);
|
|
||||||
} else {
|
|
||||||
inner.put("lt", max);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
JSONObject range = new JSONObject();
|
|
||||||
range.put(field, inner);
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
json.put("range", range);
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按条件删除数据
|
|
||||||
* <p>
|
|
||||||
* 请求地址:POST http://{baseUrl}/{indexName}/{typeName}/_delete_by_query
|
|
||||||
*/
|
|
||||||
public JSONObject delete(String indexName, String typeName, JSONObject queryObject) {
|
|
||||||
String url = this.getBaseUrl(indexName, typeName).append("/_delete_by_query").toString();
|
|
||||||
|
|
||||||
log.info("url:" + url + " ,delete: " + queryObject.toJSONString());
|
|
||||||
JSONObject res = this.post(url, queryObject);
|
|
||||||
log.info("url:" + url + " ,return res: \n" + res.toJSONString());
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
-110
@@ -1,110 +0,0 @@
|
|||||||
package com.jero.modules.cas.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.common.constant.CommonConstant;
|
|
||||||
import com.jero.common.exception.JeroBootException;
|
|
||||||
import com.jero.common.system.util.JwtUtil;
|
|
||||||
import com.jero.common.util.RedisUtil;
|
|
||||||
import com.jero.modules.cas.util.CASServiceUtil;
|
|
||||||
import com.jero.modules.cas.util.XmlUtils;
|
|
||||||
import com.jero.modules.system.entity.SysDepart;
|
|
||||||
import com.jero.modules.system.entity.SysUser;
|
|
||||||
import com.jero.modules.system.service.ISysDepartService;
|
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.http.HttpEntity;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* CAS单点登录客户端登录认证
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @Author zhoujf
|
|
||||||
* @since 2018-12-20
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/sys/cas/client")
|
|
||||||
public class CasClientController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISysUserService sysUserService;
|
|
||||||
@Autowired
|
|
||||||
private ISysDepartService sysDepartService;
|
|
||||||
@Autowired
|
|
||||||
private RedisUtil redisUtil;
|
|
||||||
|
|
||||||
@Value("${cas.prefixUrl}")
|
|
||||||
private String prefixUrl;
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/validateLogin")
|
|
||||||
public Object validateLogin(@RequestParam(name="ticket") String ticket,
|
|
||||||
@RequestParam(name="service") String service,
|
|
||||||
HttpServletRequest request,
|
|
||||||
HttpServletResponse response) {
|
|
||||||
String multiDepart = "multi_depart";
|
|
||||||
Result<JSONObject> result = new Result<>();
|
|
||||||
log.info("Rest api login.");
|
|
||||||
try {
|
|
||||||
String validateUrl = prefixUrl+"/p3/serviceValidate";
|
|
||||||
String res = CASServiceUtil.getSTValidate(validateUrl, ticket, service);
|
|
||||||
log.info("res."+res);
|
|
||||||
final String error = XmlUtils.getTextForElement(res, "authenticationFailure");
|
|
||||||
if(StringUtils.isNotEmpty(error)) {
|
|
||||||
throw new JeroBootException(error);
|
|
||||||
}
|
|
||||||
final String principal = XmlUtils.getTextForElement(res, "user");
|
|
||||||
if (StringUtils.isEmpty(principal)) {
|
|
||||||
throw new JeroBootException("No principal was found in the response from the CAS server.");
|
|
||||||
}
|
|
||||||
log.info("-------token----username---"+principal);
|
|
||||||
//1. 校验用户是否有效
|
|
||||||
SysUser sysUser = sysUserService.getUserByName(principal);
|
|
||||||
result = sysUserService.checkUserIsEffective(sysUser);
|
|
||||||
if(!result.isSuccess()) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
String token = JwtUtil.sign(sysUser.getUsername(), sysUser.getPassword());
|
|
||||||
// 设置超时时间
|
|
||||||
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
|
|
||||||
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME / 1000);
|
|
||||||
|
|
||||||
//获取用户部门信息
|
|
||||||
JSONObject obj = new JSONObject();
|
|
||||||
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
|
|
||||||
obj.put("departs", departs);
|
|
||||||
if (departs == null || departs.isEmpty()) {
|
|
||||||
obj.put(multiDepart, 0);
|
|
||||||
} else if (departs.size() == 1) {
|
|
||||||
sysUserService.updateUserDepart(principal, departs.get(0).getOrgCode());
|
|
||||||
obj.put(multiDepart, 1);
|
|
||||||
} else {
|
|
||||||
obj.put(multiDepart, 2);
|
|
||||||
}
|
|
||||||
obj.put("token", token);
|
|
||||||
obj.put("userInfo", sysUser);
|
|
||||||
result.setResult(obj);
|
|
||||||
result.setMessage("登录成功");
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
result.setSuccess(false);
|
|
||||||
result.setMessage(e.getMessage());
|
|
||||||
}
|
|
||||||
return new HttpEntity<>(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
-24
@@ -1,17 +1,12 @@
|
|||||||
package com.jero.modules.compare.service.impl;
|
package com.jero.modules.compare.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.aliyuncs.utils.IOUtils;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.constant.enums.LanguageEnum;
|
import com.jero.common.constant.enums.LanguageEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.MessageUtils;
|
import com.jero.common.util.MessageUtils;
|
||||||
import com.jero.common.util.MinioUtil;
|
|
||||||
import com.jero.common.util.UUIDUtils;
|
|
||||||
import com.jero.modules.compare.entity.*;
|
import com.jero.modules.compare.entity.*;
|
||||||
import com.jero.modules.compare.enums.AssessConsistencyEnum;
|
|
||||||
import com.jero.modules.compare.enums.CompareTypeEnum;
|
import com.jero.modules.compare.enums.CompareTypeEnum;
|
||||||
import com.jero.modules.compare.enums.ReleaseConditionEnum;
|
import com.jero.modules.compare.enums.ReleaseConditionEnum;
|
||||||
import com.jero.modules.compare.mapper.SarFileCompareInfoMapper;
|
import com.jero.modules.compare.mapper.SarFileCompareInfoMapper;
|
||||||
@@ -20,46 +15,30 @@ import com.jero.modules.compare.service.ISarFileCompareItemService;
|
|||||||
import com.jero.modules.compare.service.ISarFileCompareMenuService;
|
import com.jero.modules.compare.service.ISarFileCompareMenuService;
|
||||||
import com.jero.modules.compare.service.ISarItemsCompareHisEOService;
|
import com.jero.modules.compare.service.ISarItemsCompareHisEOService;
|
||||||
import com.jero.modules.compare.utils.*;
|
import com.jero.modules.compare.utils.*;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
|
||||||
import com.jero.modules.split.common.ReadExcel;
|
import com.jero.modules.split.common.ReadExcel;
|
||||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
|
||||||
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||||
import com.jero.modules.sys.entity.LawsEnterpriseStandardLevel;
|
|
||||||
import com.jero.modules.system.util.MyStringUtils;
|
import com.jero.modules.system.util.MyStringUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.poi.common.usermodel.HyperlinkType;
|
|
||||||
import org.apache.poi.hssf.usermodel.*;
|
import org.apache.poi.hssf.usermodel.*;
|
||||||
import org.apache.poi.hssf.util.HSSFColor;
|
import org.apache.poi.hssf.util.HSSFColor;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
||||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.text.NumberFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@@ -93,9 +72,6 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileCompareMenuService sarFileCompareMenuService;
|
private ISarFileCompareMenuService sarFileCompareMenuService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarItemsCompareHisEOService sarItemsCompareHisEOService;
|
private ISarItemsCompareHisEOService sarItemsCompareHisEOService;
|
||||||
|
|
||||||
|
|||||||
-523
@@ -1,523 +0,0 @@
|
|||||||
package com.jero.modules.document.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
|
||||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
|
||||||
import com.jero.modules.document.entity.OSSFileForDocumentLibrary;
|
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 文档库信息表
|
|
||||||
* @Author: jero-boot
|
|
||||||
* @Date: 2022-01-21
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
@Api(tags="文档库信息表")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/document/bussDocumentLibraryEO")
|
|
||||||
@Slf4j
|
|
||||||
@Deprecated
|
|
||||||
public class BussDocumentLibraryEOController extends JeroController<Object, IBussDocumentLibraryEOService> {
|
|
||||||
@Autowired
|
|
||||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 分页列表查询
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "分页查询")
|
|
||||||
// @ApiOperation(value="分页查询", notes="分页查询")
|
|
||||||
// @PostMapping(value = "/queryPageInfo")
|
|
||||||
// @ResponseBody
|
|
||||||
// @RequiresPermissions("document:queryPageInfo")
|
|
||||||
// public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
|
||||||
// IPage infoPage = bussDocumentLibraryEOService.getInfoPage(parameter);
|
|
||||||
// Result<IPage> ok = Result.OK(infoPage);
|
|
||||||
// JSONObject jsonResult = JSONObject.fromObject(ok);
|
|
||||||
// return jsonResult;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 代替标准分页列表查询
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "代替标准分页列表查询")
|
|
||||||
// @ApiOperation(value="代替标准分页列表查询", notes="代替标准分页列表查询")
|
|
||||||
// @PostMapping(value = "/replacePageInfo")
|
|
||||||
// @ResponseBody
|
|
||||||
// @RequiresPermissions("document:getInfoById")
|
|
||||||
// public Result<IPage> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
|
||||||
// IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
|
||||||
// return Result.OK(infoPage);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * ocr识别调取已入库文件
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "ocr识别调取已入库文件分页")
|
|
||||||
// @ApiOperation(value="ocr识别调取已入库文件", notes="ocr识别调取已入库文件")
|
|
||||||
// @PostMapping(value = "/ocrPageInfo")
|
|
||||||
// @ResponseBody
|
|
||||||
// @RequiresPermissions("document:ocrPageInfo")
|
|
||||||
// public Result<IPage<Map<String,Object>>> ocrPageInfo(@RequestBody Map<String,Object> parameter) {
|
|
||||||
// IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
|
||||||
// return Result.OK(infoPage);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 文档翻译调取已入库文件
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档翻译调取已入库文件")
|
|
||||||
// @ApiOperation(value="文档翻译调取已入库文件", notes="文档翻译调取已入库文件")
|
|
||||||
// @PostMapping(value = "/transPageInfo")
|
|
||||||
// @ResponseBody
|
|
||||||
// @RequiresPermissions("documentTranslation:retrieval")
|
|
||||||
// public Result<IPage<Map<String,Object>>> transPageInfo(@RequestBody Map<String,Object> parameter) {
|
|
||||||
// IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
|
||||||
// return Result.OK(infoPage);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 列表查询
|
|
||||||
// *
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-列表查询")
|
|
||||||
// @ApiOperation(value="文档库信息表-列表查询", notes="文档库信息表-列表查询")
|
|
||||||
// @GetMapping(value = "/list")
|
|
||||||
// public Result<List<BussDocumentLibraryEO>> queryList() {
|
|
||||||
// List<BussDocumentLibraryEO> list = bussDocumentLibraryEOService.queryList();
|
|
||||||
// return Result.OK(list);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 通过id删除
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-通过id删除")
|
|
||||||
// @ApiOperation(value="文档库信息表-通过id删除", notes="文档库信息表-通过id删除")
|
|
||||||
// @GetMapping(value = "/delete")
|
|
||||||
// @RequiresPermissions("document:deleteBatch")
|
|
||||||
// public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
||||||
// bussDocumentLibraryEOService.deleteById(id);
|
|
||||||
// return Result.OK("删除成功!");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 批量删除
|
|
||||||
// *
|
|
||||||
// * @param ids
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-批量删除")
|
|
||||||
// @ApiOperation(value="文档库信息表-批量删除", notes="文档库信息表-批量删除")
|
|
||||||
// @GetMapping(value = "/deleteBatch")
|
|
||||||
// @RequiresPermissions("document:deleteBatch")
|
|
||||||
// public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids, String cut) {
|
|
||||||
// this.bussDocumentLibraryEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
|
||||||
// return Result.OK("批量删除成功!");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 通过id查询
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-通过id查询")
|
|
||||||
// @ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
|
||||||
// @GetMapping(value = "/queryById")
|
|
||||||
// @RequiresPermissions("document:queryById")
|
|
||||||
// public Result<BussDocumentLibraryEO> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
// BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
|
||||||
// if(bussDocumentLibraryEO==null) {
|
|
||||||
// return Result.error("未找到对应数据");
|
|
||||||
// }
|
|
||||||
// return Result.OK(bussDocumentLibraryEO);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询条件 标识传 1-->用于查询文档库字段属性
|
|
||||||
* @param flag
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "文档库信息表-查询条件")
|
|
||||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
|
||||||
@GetMapping(value = "/queryCondition")
|
|
||||||
@RequiresPermissions("document:queryPageInfo")
|
|
||||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
|
||||||
@RequestParam(name="cut",required=true) String cut) {
|
|
||||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryCondition(flag,cut,null);
|
|
||||||
return Result.OK(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 列表表头
|
|
||||||
// * @param flag 标识传 1-->用于查询文档库字段属性
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-列表表头")
|
|
||||||
// @ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
|
||||||
// @GetMapping(value = "/getHeader")
|
|
||||||
// @RequiresPermissions("document:queryPageInfo")
|
|
||||||
// public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
|
||||||
// @RequestParam(name="cut",required=true) String cut) {
|
|
||||||
// List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag,cut,null);
|
|
||||||
// return Result.OK(list);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 新增表单
|
|
||||||
// * @param flag 标识传 1-->用于查询文档库字段属性
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-新增表单")
|
|
||||||
// @ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
|
||||||
// @GetMapping(value = "/getAddForm")
|
|
||||||
// @RequiresPermissions("document:queryPageInfo")
|
|
||||||
// public Result<List<Map<String,Object>>> getAddForm(@RequestParam(name="flag",required=true) String flag,
|
|
||||||
// @RequestParam(name="cut",required=true) String cut,
|
|
||||||
// @RequestParam(name="type",required=true) String type) {
|
|
||||||
// List<Map<String, Object>> list = bussDocumentLibraryEOService.getAddForm(flag,cut,type);
|
|
||||||
// return Result.OK(list);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ocr识别调取已入库文件-中英文切换
|
|
||||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
// @AutoLog(value = "文档库信息表-ocr表头和查询条件")
|
|
||||||
// @ApiOperation(value="文档库信息表-ocr表头和查询条件", notes="文档库信息表-ocr表头和查询条件")
|
|
||||||
// @GetMapping(value = "/getHeaderOrConditionForOcr")
|
|
||||||
// @RequiresPermissions("document:ocrPageInfo")
|
|
||||||
// public Result<List<Map<String,Object>>> getHeaderOrConditionForOcr(@RequestParam(name="flag",required=true) String flag,
|
|
||||||
// @RequestParam(name="cut",required=true) String cut) {
|
|
||||||
// List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForOcr(flag,cut);
|
|
||||||
// return Result.OK(list);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * @param flag 标识传 1-->用于查询文档库字段属性
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
|
||||||
// @ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
|
||||||
// @GetMapping(value = "/getHeaderOrConditionForSplitFile")
|
|
||||||
// @RequiresPermissions("split:sarFileSplitInfo:splitFile")
|
|
||||||
// public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitFile(@RequestParam(name="flag",required=true) String flag,
|
|
||||||
// @RequestParam(name="cut",required=true) String cut) {
|
|
||||||
// List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
|
||||||
// return Result.OK(list);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
/**
|
|
||||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
|
||||||
@ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
|
||||||
@GetMapping(value = "/getHeaderOrConditionForSplitResult")
|
|
||||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitResult(@RequestParam(name="flag",required=true) String flag,
|
|
||||||
@RequestParam(name="cut",required=true) String cut) {
|
|
||||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
|
||||||
return Result.OK(list);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 编辑数据查询
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
//// @AutoLog(value = "编辑数据查询")
|
|
||||||
//// @ApiOperation(value="编辑数据查询", notes="编辑数据查询")
|
|
||||||
//// @GetMapping(value = "/getDocumentInfoById")
|
|
||||||
//// @RequiresPermissions("document:updateInfo")
|
|
||||||
//// public Result<List<Map<String,Object>>> getDocumentInfoById(@RequestParam(name="id",required=true) String id,
|
|
||||||
//// @RequestParam(name="cut",required=true) String cut) {
|
|
||||||
//// List<Map<String, Object>> list = bussDocumentLibraryEOService.getDocumentInfoById(id,cut);
|
|
||||||
//// return Result.OK(list);
|
|
||||||
//// }
|
|
||||||
// /**
|
|
||||||
// * 详情数据查询
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
//// @AutoLog(value = "详情数据查询")
|
|
||||||
//// @ApiOperation(value="详情数据查询", notes="详情数据查询")
|
|
||||||
//// @GetMapping(value = "/getInfoById")
|
|
||||||
//// @RequiresPermissions("document:queryPageInfo")
|
|
||||||
//// public Result<List<Map<String,Object>>> getInfoById(@RequestParam(name="id",required=true) String id,
|
|
||||||
//// @RequestParam(name="cut",required=true) String cut) {
|
|
||||||
//// List<Map<String, Object>> list = bussDocumentLibraryEOService.getInfoById(id,cut);
|
|
||||||
//// return Result.OK(list);
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
//// @ApiOperation(value="详情目录查询", notes="详情目录查询")
|
|
||||||
//// @GetMapping(value = "/getMenuList")
|
|
||||||
//// public Result<List<Map<String,Object>>> getMenuList(@RequestParam(name="id",required=true) String id,
|
|
||||||
//// @RequestParam(name="cut",required=true) String cut) {
|
|
||||||
//// List<Map<String, Object>> list = bussDocumentLibraryEOService.getMenuList(id,cut);
|
|
||||||
//// return Result.OK(list);
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
//// /**
|
|
||||||
//// * 新增数据
|
|
||||||
//// * @param map
|
|
||||||
//// * @return
|
|
||||||
//// */
|
|
||||||
//// @AutoLog(value = "新增数据")
|
|
||||||
//// @ApiOperation(value="新增数据", notes="新增数据")
|
|
||||||
//// @PostMapping(value = "/addInfo")
|
|
||||||
//// @RequiresPermissions("document:getInfoById")
|
|
||||||
//// public Result<String> getInfoById(@RequestBody Map<String,Object> map) {
|
|
||||||
//// try {
|
|
||||||
//// bussDocumentLibraryEOService.addInfo(map);
|
|
||||||
//// } catch (Exception e) {
|
|
||||||
//// return Result.error(e.getMessage());
|
|
||||||
//// }
|
|
||||||
//// return Result.OK("新增成功");
|
|
||||||
//// }
|
|
||||||
//// /**
|
|
||||||
//// * 编辑数据
|
|
||||||
//// * @param map
|
|
||||||
//// * @return
|
|
||||||
//// */
|
|
||||||
//// @AutoLog(value = "编辑数据")
|
|
||||||
//// @ApiOperation(value="编辑数据", notes="编辑数据")
|
|
||||||
//// @PostMapping(value = "/updateInfo")
|
|
||||||
//// @RequiresPermissions("document:updateInfo")
|
|
||||||
//// public Result<String> updateInfo(@RequestBody Map<String,Object> map) {
|
|
||||||
//// try {
|
|
||||||
//// bussDocumentLibraryEOService.updateInfo(map);
|
|
||||||
//// } catch (Exception e) {
|
|
||||||
//// return Result.error(e.getMessage());
|
|
||||||
//// }
|
|
||||||
//// return Result.OK("编辑成功");
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//// /**
|
|
||||||
//// * 添加收藏
|
|
||||||
//// * @param id
|
|
||||||
//// * @return
|
|
||||||
//// */
|
|
||||||
//// @AutoLog(value = "添加收藏")
|
|
||||||
//// @ApiOperation(value="添加收藏", notes="添加收藏")
|
|
||||||
//// @GetMapping(value = "/addCollect")
|
|
||||||
//// @RequiresPermissions("document:addCollect")
|
|
||||||
//// public Result<String> addCollect(String id) {
|
|
||||||
//// try {
|
|
||||||
//// bussDocumentLibraryEOService.addCollect(id);
|
|
||||||
//// } catch (Exception e) {
|
|
||||||
//// return Result.error("收藏失败");
|
|
||||||
//// }
|
|
||||||
//// return Result.OK("收藏成功");
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
//// /**
|
|
||||||
//// * 取消收藏
|
|
||||||
//// * @param id
|
|
||||||
//// * @return
|
|
||||||
//// */
|
|
||||||
//// @AutoLog(value = "取消收藏")
|
|
||||||
//// @ApiOperation(value="取消收藏", notes="取消收藏")
|
|
||||||
//// @GetMapping(value = "/cancelCollect")
|
|
||||||
//// @RequiresPermissions("document:addCollect")
|
|
||||||
//// public Result<String> cancelCollect(String id) {
|
|
||||||
//// try {
|
|
||||||
//// bussDocumentLibraryEOService.cancelCollect(id);
|
|
||||||
//// } catch (Exception e) {
|
|
||||||
//// return Result.error("取消收藏失败");
|
|
||||||
//// }
|
|
||||||
//// return Result.OK("取消收藏成功");
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
//// /**
|
|
||||||
//// * 添加订阅
|
|
||||||
//// * @param id
|
|
||||||
//// * @return
|
|
||||||
//// */
|
|
||||||
//// @AutoLog(value = "添加订阅")
|
|
||||||
//// @ApiOperation(value="添加订阅", notes="添加订阅")
|
|
||||||
//// @GetMapping(value = "/addSubscribe")
|
|
||||||
//// @RequiresPermissions("document:addSubscribe")
|
|
||||||
//// public Result<String> addSubscribe(String id) {
|
|
||||||
//// try {
|
|
||||||
//// bussDocumentLibraryEOService.addSubscribe(id);
|
|
||||||
//// } catch (Exception e) {
|
|
||||||
//// return Result.error("订阅失败");
|
|
||||||
//// }
|
|
||||||
//// return Result.OK("订阅成功");
|
|
||||||
//// }
|
|
||||||
////
|
|
||||||
//// /**
|
|
||||||
//// * 取消订阅
|
|
||||||
//// * @param id
|
|
||||||
//// * @return
|
|
||||||
//// */
|
|
||||||
//// @AutoLog(value = "取消订阅")
|
|
||||||
//// @ApiOperation(value="取消订阅", notes="取消订阅")
|
|
||||||
//// @GetMapping(value = "/cancelSubscribe")
|
|
||||||
//// @RequiresPermissions("document:addSubscribe")
|
|
||||||
//// public Result<String> cancelSubscribe(String id) {
|
|
||||||
//// try {
|
|
||||||
//// bussDocumentLibraryEOService.cancelSubscribe(id);
|
|
||||||
//// } catch (Exception e) {
|
|
||||||
//// return Result.error("取消订阅失败");
|
|
||||||
//// }
|
|
||||||
//// return Result.OK("取消订阅成功");
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @ApiOperation(value = "导出excel")
|
|
||||||
// @GetMapping(value = "/exportExcel")
|
|
||||||
// @RequiresPermissions("document:exportExcel")
|
|
||||||
// public void exportExcel(@RequestParam Map<String,Object> map,
|
|
||||||
// HttpServletResponse response,
|
|
||||||
// HttpServletRequest request){
|
|
||||||
// bussDocumentLibraryEOService.exportExcel(map,response,request);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @ApiOperation(value = "带文件导出")
|
|
||||||
// @GetMapping(value = "/exportZip")
|
|
||||||
// @RequiresPermissions("document:exportZip")
|
|
||||||
// public void exportZip(@RequestParam Map<String,Object> map,
|
|
||||||
// HttpServletResponse response,
|
|
||||||
// HttpServletRequest request) throws Exception {
|
|
||||||
// bussDocumentLibraryEOService.exportZip(map,response,request);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @ApiOperation(value = "模板下载")
|
|
||||||
// @GetMapping(value = "/exportTemplate")
|
|
||||||
// @RequiresPermissions("document:exportTemplate")
|
|
||||||
// public void exportTemplate(@RequestParam Map<String,Object> map, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
|
||||||
// bussDocumentLibraryEOService.exportTemplate(map,response,request);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @ApiOperation(value = "导入.zip")
|
|
||||||
// @PostMapping(value = "/importZip")
|
|
||||||
// @RequiresPermissions("document:importZip")
|
|
||||||
// public Result<String> importZip(@RequestParam(value = "file", required = false) MultipartFile file,
|
|
||||||
// @RequestParam(value = "cut",required = false) String cut) {
|
|
||||||
// try {
|
|
||||||
// bussDocumentLibraryEOService.importZip(file,cut);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.error(null,e);
|
|
||||||
// return Result.error(e.getMessage());
|
|
||||||
// }
|
|
||||||
// return Result.OK("导入成功");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @ApiOperation(value = "推送")
|
|
||||||
// @GetMapping(value = "/pullMessage")
|
|
||||||
// @RequiresPermissions("document:pullMessage")
|
|
||||||
// public Result<String> pullMessage(String departIds, String userIds, String documentIds) {
|
|
||||||
//
|
|
||||||
// bussDocumentLibraryEOService.pullMessage(departIds,userIds,documentIds);
|
|
||||||
//
|
|
||||||
// return Result.OK("推送成功");
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 验证文档是否被其他的文档绑定
|
|
||||||
// *
|
|
||||||
// * @param ids
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @AutoLog(value = "验证文档是否被其他的文档绑定")
|
|
||||||
// @ApiOperation(value="验证文档是否被其他的文档绑定", notes="验证文档是否被其他的文档绑定")
|
|
||||||
// @GetMapping(value = "/verifyBind")
|
|
||||||
// public Result<String> verifyBind(@RequestParam(name="ids",required=true) String ids) {
|
|
||||||
// String msg = bussDocumentLibraryEOService.verifyBind(Arrays.asList(ids.split(",")));
|
|
||||||
// return Result.OK(msg);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @AutoLog(value = "虚拟中心添加调用文档库数据--分页")
|
|
||||||
// @ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
|
||||||
// @PostMapping(value = "/queryPageInfoDummy")
|
|
||||||
// public Result<IPage<BussDocumentLibraryEO>> queryPageInfoDummy(@RequestBody BussDocumentLibraryEO bussDocumentLibraryEO,
|
|
||||||
// HttpServletRequest req) {
|
|
||||||
// QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
|
|
||||||
// Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(bussDocumentLibraryEO.getPageNo(), bussDocumentLibraryEO.getPageSize());
|
|
||||||
// IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.queryPageInfoDummy(page, queryWrapper,bussDocumentLibraryEO);
|
|
||||||
// return Result.OK(pageList);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// @ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
|
||||||
// @PostMapping(value = "/queryPageDummy")
|
|
||||||
// @ResponseBody
|
|
||||||
// public JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
|
||||||
// IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
|
||||||
// Result<IPage> ok = Result.OK(infoPage);
|
|
||||||
// JSONObject jsonResult = JSONObject.fromObject(ok);
|
|
||||||
// return jsonResult;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 查看已上传的文件
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
|
||||||
// @GetMapping(value = "/getFileInfos")
|
|
||||||
// @RequiresPermissions("document:queryPageInfo")
|
|
||||||
// public Result<List<OSSFileForDocumentLibrary>> getFileInfos(String id) {
|
|
||||||
// List<OSSFileForDocumentLibrary> fileInfos = bussDocumentLibraryEOService.getFileInfos(id);
|
|
||||||
// return Result.OK(fileInfos);
|
|
||||||
// }
|
|
||||||
// /**
|
|
||||||
// * 根据id查询编号和标题
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
|
||||||
// @GetMapping(value = "/getTitle")
|
|
||||||
// public Result<String> getTitle(String id, String cut) {
|
|
||||||
// String title = bussDocumentLibraryEOService.getTitle(id, cut);
|
|
||||||
// return Result.OK(title);
|
|
||||||
// }
|
|
||||||
// @ApiOperation(value="编辑ES数据(添加module_type_flag)", notes="编辑ES数据(添加module_type_flag)")
|
|
||||||
// @GetMapping(value = "/updateES")
|
|
||||||
// public Result<Integer> getTitle() {
|
|
||||||
// int count = bussDocumentLibraryEOService.updateES();
|
|
||||||
// return Result.OK(count);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
-237
@@ -1,237 +0,0 @@
|
|||||||
package com.jero.modules.document.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
|
||||||
import com.jero.modules.document.entity.OSSFileForDocumentLibrary;
|
|
||||||
import com.jero.modules.document.vo.QueryConditionVO;
|
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: 文档库信息表
|
|
||||||
* @Author: jero-boot
|
|
||||||
* @Date: 2022-01-21
|
|
||||||
* @Version: V1.0
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public interface IBussDocumentLibraryEOService extends IService<Object> {
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 通过id删除
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// void deleteById(String id);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 批量删除
|
|
||||||
// *
|
|
||||||
// * @param ids
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// void deleteByIds(List<String> ids,String cut);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 通过id查询
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// BussDocumentLibraryEO queryById(String id);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 列表查询
|
|
||||||
// *
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<BussDocumentLibraryEO> queryList();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Map<String, Object>> queryCondition(String flag, String cut,String searchFlag);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 查询条件(法规清单或虚拟清单高级搜索需要的数据)
|
|
||||||
// *
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<Map<String, Object>> queryConditionInventory(String flag, String cut);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 列表表头
|
|
||||||
// *
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<Map<String, Object>> getHeader(String flag, String cut,String searchFlag);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 新增表单
|
|
||||||
// *
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<Map<String, Object>> getAddForm(String flag, String cut, String type);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 编辑数据查询
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<Map<String, Object>> getDocumentInfoById(String id, String cut);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 详情数据查询
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<Map<String, Object>> getInfoById(String id, String cut);
|
|
||||||
//
|
|
||||||
// List<Map<String, Object>> getMenuList(String id, String cut);
|
|
||||||
// /**
|
|
||||||
// * 新增数据
|
|
||||||
// *
|
|
||||||
// * @param map
|
|
||||||
// */
|
|
||||||
// void addInfo(Map<String, Object> map);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 编辑数据
|
|
||||||
// *
|
|
||||||
// * @param map
|
|
||||||
// */
|
|
||||||
// void updateInfo(Map<String, Object> map);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 分页
|
|
||||||
// *
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// IPage getInfoPage(Map<String, Object> parameter);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 代替标准分页
|
|
||||||
// *
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// IPage replacePageInfo(Map<String, Object> parameter);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * ocr识别调取已入库文件分页
|
|
||||||
// *
|
|
||||||
// * @param parameter
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// IPage<Map<String, Object>> ocrPageInfo(Map<String,Object> parameter);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 添加收藏
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// */
|
|
||||||
// void addCollect(String id);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 取消收藏
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// */
|
|
||||||
// void cancelCollect(String id);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 添加订阅
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// */
|
|
||||||
// void addSubscribe(String id);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 取消订阅
|
|
||||||
// *
|
|
||||||
// * @param id
|
|
||||||
// */
|
|
||||||
// void cancelSubscribe(String id);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 导出excel
|
|
||||||
// *
|
|
||||||
// * @param map
|
|
||||||
// * @param response
|
|
||||||
// * @param request
|
|
||||||
// */
|
|
||||||
// void exportExcel(Map<String, Object> map,
|
|
||||||
// HttpServletResponse response,
|
|
||||||
// HttpServletRequest request);
|
|
||||||
//
|
|
||||||
// void exportZip(Map<String, Object> map,
|
|
||||||
// HttpServletResponse response,
|
|
||||||
// HttpServletRequest request);
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 模板下载
|
|
||||||
// *
|
|
||||||
// * @param response
|
|
||||||
// * @param request
|
|
||||||
// */
|
|
||||||
// void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * ocr识别调取已入库文件-中英文切换
|
|
||||||
// *
|
|
||||||
// * @param flag
|
|
||||||
// * @param cut
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// List<Map<String, Object>> getHeaderOrConditionForOcr(String flag, String cut);
|
|
||||||
|
|
||||||
List<Map<String, Object>> getHeaderOrConditionForSplit(String flag, String cut);
|
|
||||||
|
|
||||||
// String pullMessage(String departIds, String ids, String documentIds);
|
|
||||||
//
|
|
||||||
// void importZip(MultipartFile file,String cut);
|
|
||||||
//
|
|
||||||
// String verifyBind(List<String> ids);
|
|
||||||
//
|
|
||||||
// List<Map<String,Object>> queryListByIds(String ids);
|
|
||||||
|
|
||||||
List<Map<String, Object>> getListBySerialNumber(String serialNumbers);
|
|
||||||
|
|
||||||
List<String> getListBySerialNumberFuzzy(String serialNumber);
|
|
||||||
|
|
||||||
// List<OSSFileForDocumentLibrary> getFileInfos(String id);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// IPage<BussDocumentLibraryEO> queryPageInfoDummy(Page<BussDocumentLibraryEO> page, QueryWrapper<BussDocumentLibraryEO> queryWrapper,BussDocumentLibraryEO bussDocumentLibraryEO);
|
|
||||||
//
|
|
||||||
// IPage getPageDummy(Map<String, Object> parameter);
|
|
||||||
//
|
|
||||||
// void isModifyForOcrAndSplit(Map<String, Object> parameter);
|
|
||||||
//
|
|
||||||
// String getTitle(String id,String cut);
|
|
||||||
//
|
|
||||||
// String sqlJoint(List<QueryConditionVO> queryConditionVOList);
|
|
||||||
//
|
|
||||||
// int updateES();
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 根据serialNumber获取BussDumentLibrar对象
|
|
||||||
// * @param serialNumber
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// BussDocumentLibraryEO getBySerialNumber(String serialNumber);
|
|
||||||
}
|
|
||||||
-5915
File diff suppressed because it is too large
Load Diff
-63
@@ -1,63 +0,0 @@
|
|||||||
//package com.jero.modules.document.service.impl;
|
|
||||||
//
|
|
||||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
|
||||||
//import com.jero.modules.document.enums.LawsStateEnum;
|
|
||||||
//import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
//import org.apache.commons.lang3.StringUtils;
|
|
||||||
//import org.quartz.Job;
|
|
||||||
//import org.quartz.JobExecutionContext;
|
|
||||||
//import org.quartz.JobExecutionException;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//
|
|
||||||
//import java.text.SimpleDateFormat;
|
|
||||||
//import java.util.Date;
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * @description TODO 更新法规实施状态,需要更新国标/海外标准,目前仅处理了文档库是不对的
|
|
||||||
// * @date 2022/9/25 10:03
|
|
||||||
// * @auth zhn
|
|
||||||
// */
|
|
||||||
//public class TimedTaskLaws implements Job {
|
|
||||||
// @Autowired
|
|
||||||
// private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
|
||||||
// * @param jobExecutionContext
|
|
||||||
// * @throws JobExecutionException
|
|
||||||
// */
|
|
||||||
// @Override
|
|
||||||
// public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
||||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
// String currentTime = sdf.format(new Date());
|
|
||||||
// //获取所有的法规
|
|
||||||
// List<BussDocumentLibraryEO> bussDocumentLibraryEOList = bussDocumentLibraryEOService.list();
|
|
||||||
// if(bussDocumentLibraryEOList.size() != 0){
|
|
||||||
// for (BussDocumentLibraryEO bussDocumentLibraryEO : bussDocumentLibraryEOList) {
|
|
||||||
// String xin1Che1Xing2Shi2Shi1Ri4Qi1Str = "";
|
|
||||||
// String implementTimestr = "";
|
|
||||||
//
|
|
||||||
// String state = bussDocumentLibraryEO.getState();//状态
|
|
||||||
// //新车型实施日期
|
|
||||||
// Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1();
|
|
||||||
// //在产车实施日期
|
|
||||||
// Date implementTime = bussDocumentLibraryEO.getImplementTime();
|
|
||||||
// if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
|
||||||
// xin1Che1Xing2Shi2Shi1Ri4Qi1Str = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
|
||||||
// }
|
|
||||||
// if(ObjectUtils.isNotEmpty(implementTime)){
|
|
||||||
// implementTimestr = sdf.format(implementTime);
|
|
||||||
// }
|
|
||||||
// //法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
|
||||||
// if(StringUtils.isNotBlank(state) && LawsStateEnum.THE_UPCOMING.getValue().equals(state)
|
|
||||||
// && (currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str) || currentTime.equals(implementTimestr))){
|
|
||||||
// BussDocumentLibraryEO bussDocumentLibraryEOTemp = new BussDocumentLibraryEO();
|
|
||||||
// bussDocumentLibraryEOTemp.setId(bussDocumentLibraryEO.getId());
|
|
||||||
// bussDocumentLibraryEOTemp.setState(LawsStateEnum.ACTIVE.getValue());
|
|
||||||
// bussDocumentLibraryEOService.updateById(bussDocumentLibraryEOTemp);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
+21
-2
@@ -10,10 +10,10 @@ import org.apache.poi.openxml4j.util.ZipSecureFile;
|
|||||||
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description
|
* @description
|
||||||
* @date 2022/3/21 17:04
|
* @date 2022/3/21 17:04
|
||||||
@@ -95,4 +95,23 @@ public class ReadWordUtil {
|
|||||||
// throw new JeroBootException("文件内容读取失败");
|
// throw new JeroBootException("文件内容读取失败");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
public static void copyFile(InputStream in, String newFile) throws IOException {
|
||||||
|
File file2 = new File(newFile);
|
||||||
|
if (!file2.exists()) {
|
||||||
|
file2.createNewFile();
|
||||||
|
}
|
||||||
|
try (FileOutputStream ou = new FileOutputStream(newFile)) {
|
||||||
|
byte[] bs = new byte[1024];
|
||||||
|
int count = 0;
|
||||||
|
while ((count = in.read(bs, 0, bs.length)) != -1) {
|
||||||
|
ou.write(bs, 0, count);
|
||||||
|
}
|
||||||
|
ou.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new IOException("复制文件失败!");
|
||||||
|
} finally {
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-6
@@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.enums.IsMustEnum;
|
|
||||||
import com.jero.common.constant.enums.LanguageEnum;
|
import com.jero.common.constant.enums.LanguageEnum;
|
||||||
import com.jero.common.constant.enums.ModuleEnum;
|
import com.jero.common.constant.enums.ModuleEnum;
|
||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
@@ -21,7 +20,6 @@ import com.jero.common.util.*;
|
|||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
|
||||||
import com.jero.modules.documenttool.entity.LawsDocumentSplit;
|
import com.jero.modules.documenttool.entity.LawsDocumentSplit;
|
||||||
import com.jero.modules.documenttool.service.IDocumentSplitService;
|
import com.jero.modules.documenttool.service.IDocumentSplitService;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
@@ -57,7 +55,6 @@ import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
|||||||
import com.jero.modules.system.util.MyStringUtils;
|
import com.jero.modules.system.util.MyStringUtils;
|
||||||
import com.jero.modules.system.util.UserUtils;
|
import com.jero.modules.system.util.UserUtils;
|
||||||
import com.jero.modules.tag.entity.LawsTag;
|
import com.jero.modules.tag.entity.LawsTag;
|
||||||
import com.jero.modules.tag.enums.TableNameEnum;
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
@@ -129,8 +126,6 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitInfoService sarFileSplitInfoService;
|
private ISarFileSplitInfoService sarFileSplitInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBussDocumentLibraryEOService documentLibraryEOService;
|
|
||||||
@Autowired
|
|
||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
||||||
@@ -829,7 +824,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
if(value.contains("%")){
|
if(value.contains("%")){
|
||||||
value = value.replace("%", "/%");
|
value = value.replace("%", "/%");
|
||||||
}
|
}
|
||||||
List<String> idList = documentLibraryEOService.getListBySerialNumberFuzzy(value);
|
// List<String> idList = documentLibraryEOService.getListBySerialNumberFuzzy(value);
|
||||||
|
List<String> idList = new ArrayList<>();
|
||||||
if (CollectionUtil.isNotEmpty(idList)) {
|
if (CollectionUtil.isNotEmpty(idList)) {
|
||||||
StringBuilder valueSb = new StringBuilder();
|
StringBuilder valueSb = new StringBuilder();
|
||||||
StringBuilder condition = new StringBuilder();
|
StringBuilder condition = new StringBuilder();
|
||||||
|
|||||||
-15
@@ -1,26 +1,18 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
package com.jero.modules.split.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.constant.CommonConstant;
|
import com.jero.common.constant.CommonConstant;
|
||||||
import com.jero.common.constant.enums.LanguageEnum;
|
import com.jero.common.constant.enums.LanguageEnum;
|
||||||
import com.jero.common.constant.enums.ModuleEnum;
|
|
||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.DictModel;
|
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.LineHumpUtil;
|
import com.jero.common.util.LineHumpUtil;
|
||||||
import com.jero.common.util.MessageUtils;
|
import com.jero.common.util.MessageUtils;
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||||
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||||
@@ -30,20 +22,15 @@ import com.jero.modules.split.mapper.SarFileSplitInfoMapper;
|
|||||||
import com.jero.modules.split.mapper.SarFileSplitMenuEOMapper;
|
import com.jero.modules.split.mapper.SarFileSplitMenuEOMapper;
|
||||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||||
import com.jero.modules.split.vo.SplitFilePageInfoParam;
|
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
|
||||||
import com.jero.modules.system.entity.SysUser;
|
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
import com.jero.modules.system.service.ISysDictItemService;
|
||||||
import com.jero.modules.system.service.ISysDictService;
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -73,8 +60,6 @@ public class SarFileSplitInfoServiceImpl extends ServiceImpl<SarFileSplitInfoMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
|
||||||
@Autowired
|
|
||||||
private ISysDictService sysDictService;
|
private ISysDictService sysDictService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
|
|||||||
+1
-107
@@ -203,13 +203,6 @@ jero:
|
|||||||
secretKey: ??
|
secretKey: ??
|
||||||
bucketName: jeroos
|
bucketName: jeroos
|
||||||
staticDomain: jerodev
|
staticDomain: jerodev
|
||||||
# ElasticSearch 6设置
|
|
||||||
elasticsearch:
|
|
||||||
username: grp
|
|
||||||
password: Grp2023.08
|
|
||||||
cluster-name: jero-ES
|
|
||||||
cluster-nodes: 10.10.10.45:7900
|
|
||||||
check-enabled: false
|
|
||||||
# 表单设计器配置
|
# 表单设计器配置
|
||||||
desform:
|
desform:
|
||||||
# 主题颜色(仅支持 16进制颜色代码)
|
# 主题颜色(仅支持 16进制颜色代码)
|
||||||
@@ -278,9 +271,7 @@ jero:
|
|||||||
aes:
|
aes:
|
||||||
encrypted_key: 1234567890adbcde
|
encrypted_key: 1234567890adbcde
|
||||||
encrypted_iv: 1234567890hjlkew
|
encrypted_iv: 1234567890hjlkew
|
||||||
#cas单点登录
|
|
||||||
cas:
|
|
||||||
prefixUrl: http://cas.example.org:8443/cas
|
|
||||||
#Mybatis输出sql日志
|
#Mybatis输出sql日志
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
@@ -295,31 +286,6 @@ knife4j:
|
|||||||
enable: false
|
enable: false
|
||||||
username: jero
|
username: jero
|
||||||
password: jero.com
|
password: jero.com
|
||||||
#第三方登录
|
|
||||||
justauth:
|
|
||||||
enabled: true
|
|
||||||
type:
|
|
||||||
GITHUB:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/github/callback
|
|
||||||
WECHAT_ENTERPRISE:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_enterprise/callback
|
|
||||||
agent-id: 1000002
|
|
||||||
DINGTALK:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/dingtalk/callback
|
|
||||||
WECHAT_OPEN:
|
|
||||||
client-id: ??
|
|
||||||
client-secret: ??
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_open/callback
|
|
||||||
cache:
|
|
||||||
type: default
|
|
||||||
prefix: 'demo::'
|
|
||||||
timeout: 1h
|
|
||||||
|
|
||||||
file:
|
file:
|
||||||
# 在线编辑文件下载映射地址
|
# 在线编辑文件下载映射地址
|
||||||
@@ -331,81 +297,9 @@ file:
|
|||||||
# 在线编辑本地存储地址
|
# 在线编辑本地存储地址
|
||||||
path: D:/opt/onlyOffice/file/
|
path: D:/opt/onlyOffice/file/
|
||||||
|
|
||||||
iam:
|
|
||||||
bimRemoteUser: srmsIam
|
|
||||||
bimRemotePwd: srmsIam2023
|
|
||||||
# bimRemoteUser: bbcadmin
|
|
||||||
# bimRemotePwd: P@ssw0rd
|
|
||||||
bpmcAppkey: test
|
|
||||||
# 创建用户默认角色
|
|
||||||
defaultRoleIds: 817f7f818bb3506e018bb3506ef70000
|
|
||||||
|
|
||||||
# Hiwork集成
|
|
||||||
hiwork:
|
|
||||||
ip: http://task-test.sinotruk.com/
|
|
||||||
# 异构系统标识
|
|
||||||
sysCode: SRMS
|
|
||||||
# 统一待办集成
|
|
||||||
todoUrl: taskapi/task.basedata/integrationCall/workflowIntegration
|
|
||||||
# 统一消息集成
|
|
||||||
messageUrl: taskapi/task.basedata/notice/noticeCalls/send
|
|
||||||
# 是否发送消息
|
|
||||||
isSend: false
|
|
||||||
|
|
||||||
# 汽车标准数字化平台ASMS
|
|
||||||
asms:
|
|
||||||
host: http://standard.catarc.org.cn/
|
|
||||||
# 测试账号用户名
|
|
||||||
username: ceshi
|
|
||||||
# 测试账号密码
|
|
||||||
password: Catarc@333
|
|
||||||
# token过期时间(单位:小时)
|
|
||||||
expire: 48
|
|
||||||
|
|
||||||
# 单点登录配置(所有配置信息需要协调注册,现在都为假)
|
|
||||||
oauth:
|
|
||||||
# 客户端应用注册ID--客户申请的:SRMS
|
|
||||||
clientId: SRMS
|
|
||||||
# 客户端应用注册密钥 客户申请的:58a1001438de462193bec307826463c2
|
|
||||||
clientSecret: 58a1001438de462193bec307826463c2
|
|
||||||
# 授权码验证
|
|
||||||
grantType: authorization_code
|
|
||||||
# 通过授权码获取accessToken请求地址
|
|
||||||
accessTokenUrl: https://iam-uat-new.sinotruk.com/idp/oauth2/getToken
|
|
||||||
# 通过accessToken获取账号信息请求地址
|
|
||||||
userInfoUrl: https://iam-uat-new.sinotruk.com/idp/oauth2/getUserInfo
|
|
||||||
# 防止跨站请求伪造(CSRF)标识(暂时不用)
|
|
||||||
state: zhongQi
|
|
||||||
|
|
||||||
# 起草部门部门名称
|
|
||||||
draftDepartName: 起草部门
|
|
||||||
|
|
||||||
# 管理员权限roleCode,多填用英文逗号拼接
|
# 管理员权限roleCode,多填用英文逗号拼接
|
||||||
adminRoleCode: admin
|
adminRoleCode: admin
|
||||||
|
|
||||||
# 文件下载加解密
|
|
||||||
download:
|
|
||||||
enable: false
|
|
||||||
# 文件下载、预览拦截路径,多个以逗号分隔
|
|
||||||
download_url: /sys/common/download/
|
|
||||||
view_url: /sys/common/view/
|
|
||||||
# 管理员角色
|
|
||||||
admin_role_code: admin,BZGLY
|
|
||||||
# 加密参数
|
|
||||||
encrypt:
|
|
||||||
url: http://10.2.159.90/intekey/encrypteFile
|
|
||||||
app_code: SRMS
|
|
||||||
secret_key: SRMS1234..
|
|
||||||
# 解密参数
|
|
||||||
decrypt:
|
|
||||||
url: http://10.2.159.90/intekey/file
|
|
||||||
app_code: SRMS
|
|
||||||
secret_key: SRMS1234..
|
|
||||||
# 研发域
|
|
||||||
scope_dev: 51
|
|
||||||
# 办公域
|
|
||||||
scope_work: 52
|
|
||||||
|
|
||||||
# 特殊公式处理服务URL
|
# 特殊公式处理服务URL
|
||||||
mathToImg:
|
mathToImg:
|
||||||
url: http://127.0.0.1:9998/mathToImg
|
url: http://127.0.0.1:9998/mathToImg
|
||||||
|
|||||||
+1
-132
@@ -37,32 +37,6 @@ spring:
|
|||||||
starttls:
|
starttls:
|
||||||
enable: true
|
enable: true
|
||||||
required: true
|
required: true
|
||||||
## quartz定时任务,采用数据库方式
|
|
||||||
quartz:
|
|
||||||
job-store-type: jdbc
|
|
||||||
initialize-schema: embedded
|
|
||||||
#定时任务启动开关,true-开 false-关
|
|
||||||
auto-startup: true
|
|
||||||
#启动时更新己存在的Job
|
|
||||||
overwrite-existing-jobs: true
|
|
||||||
properties:
|
|
||||||
org:
|
|
||||||
quartz:
|
|
||||||
scheduler:
|
|
||||||
instanceName: MyScheduler
|
|
||||||
instanceId: AUTO
|
|
||||||
jobStore:
|
|
||||||
class: org.quartz.impl.jdbcjobstore.JobStoreTX
|
|
||||||
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
|
||||||
tablePrefix: QRTZ_
|
|
||||||
isClustered: true
|
|
||||||
misfireThreshold: 60000
|
|
||||||
clusterCheckinInterval: 10000
|
|
||||||
threadPool:
|
|
||||||
class: org.quartz.simpl.SimpleThreadPool
|
|
||||||
threadCount: 10
|
|
||||||
threadPriority: 5
|
|
||||||
threadsInheritContextClassLoaderOfInitializingThread: true
|
|
||||||
#json 时间戳统一转换
|
#json 时间戳统一转换
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
@@ -227,13 +201,6 @@ jero:
|
|||||||
secretKey: ??
|
secretKey: ??
|
||||||
bucketName: jeroos
|
bucketName: jeroos
|
||||||
staticDomain: jerodev
|
staticDomain: jerodev
|
||||||
# ElasticSearch 6设置
|
|
||||||
elasticsearch:
|
|
||||||
username: grp
|
|
||||||
password: Grp!2023.
|
|
||||||
cluster-name: jero-ES
|
|
||||||
cluster-nodes: 10.186.20.129:9200
|
|
||||||
check-enabled: false
|
|
||||||
# 表单设计器配置
|
# 表单设计器配置
|
||||||
desform:
|
desform:
|
||||||
# 主题颜色(仅支持 16进制颜色代码)
|
# 主题颜色(仅支持 16进制颜色代码)
|
||||||
@@ -303,9 +270,7 @@ jero:
|
|||||||
aes:
|
aes:
|
||||||
encrypted_key: 1234567890adbcde
|
encrypted_key: 1234567890adbcde
|
||||||
encrypted_iv: 1234567890hjlkew
|
encrypted_iv: 1234567890hjlkew
|
||||||
#cas单点登录
|
|
||||||
cas:
|
|
||||||
prefixUrl: http://cas.example.org:8443/cas
|
|
||||||
#Mybatis输出sql日志
|
#Mybatis输出sql日志
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
@@ -322,31 +287,6 @@ knife4j:
|
|||||||
enable: false
|
enable: false
|
||||||
username: jero
|
username: jero
|
||||||
password: jero.com
|
password: jero.com
|
||||||
#第三方登录
|
|
||||||
justauth:
|
|
||||||
enabled: true
|
|
||||||
type:
|
|
||||||
GITHUB:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/github/callback
|
|
||||||
WECHAT_ENTERPRISE:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_enterprise/callback
|
|
||||||
agent-id: 1000002
|
|
||||||
DINGTALK:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/dingtalk/callback
|
|
||||||
WECHAT_OPEN:
|
|
||||||
client-id: ??
|
|
||||||
client-secret: ??
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_open/callback
|
|
||||||
cache:
|
|
||||||
type: default
|
|
||||||
prefix: 'demo::'
|
|
||||||
timeout: 1h
|
|
||||||
|
|
||||||
file:
|
file:
|
||||||
# 在线编辑文件下载映射地址
|
# 在线编辑文件下载映射地址
|
||||||
@@ -357,81 +297,10 @@ file:
|
|||||||
sourceFilePath: D://opt//onlyOffice//DOCX.docx
|
sourceFilePath: D://opt//onlyOffice//DOCX.docx
|
||||||
# 在线编辑本地存储地址
|
# 在线编辑本地存储地址
|
||||||
path: D:/opt/onlyOffice/file/
|
path: D:/opt/onlyOffice/file/
|
||||||
iam:
|
|
||||||
bimRemoteUser: srmsIam
|
|
||||||
bimRemotePwd: srmsIam2023
|
|
||||||
# bimRemoteUser: bbcadmin
|
|
||||||
# bimRemotePwd: P@ssw0rd
|
|
||||||
bpmcAppkey: test
|
|
||||||
# 创建用户默认角色
|
|
||||||
defaultRoleIds: 817f7f818bb3506e018bb3506ef70000
|
|
||||||
|
|
||||||
# Hiwork集成
|
|
||||||
hiwork:
|
|
||||||
ip: http://task.sinotruk.com/
|
|
||||||
# 异构系统标识
|
|
||||||
sysCode: SRMS
|
|
||||||
# 统一待办集成
|
|
||||||
todoUrl: taskapi/task.basedata/integrationCall/workflowIntegration
|
|
||||||
# 统一消息集成
|
|
||||||
messageUrl: taskapi/task.basedata/notice/noticeCalls/send
|
|
||||||
# 是否发送消息
|
|
||||||
isSend: true
|
|
||||||
|
|
||||||
# 汽车标准数字化平台ASMS
|
|
||||||
asms:
|
|
||||||
host: http://standard.catarc.org.cn/
|
|
||||||
# 测试账号用户名
|
|
||||||
username: ceshi
|
|
||||||
# 测试账号密码
|
|
||||||
password: Catarc@333
|
|
||||||
# token过期时间(单位:小时)
|
|
||||||
expire: 48
|
|
||||||
|
|
||||||
# 单点登录配置(所有配置信息需要协调注册,现在都为假)
|
|
||||||
oauth:
|
|
||||||
# 客户端应用注册ID--客户申请的:SRMS
|
|
||||||
clientId: SRMS
|
|
||||||
# 客户端应用注册密钥 客户申请的:58a1001438de462193bec307826463c2
|
|
||||||
clientSecret: 92eb1a3743df4ba2898bf24c73372e22
|
|
||||||
# 授权码验证
|
|
||||||
grantType: authorization_code
|
|
||||||
# 通过授权码获取accessToken请求地址
|
|
||||||
accessTokenUrl: https://iam.sinotruk.com:7012/idp/oauth2/getToken
|
|
||||||
# 通过accessToken获取账号信息请求地址
|
|
||||||
userInfoUrl: https://iam.sinotruk.com:7012/idp/oauth2/getUserInfo
|
|
||||||
# 防止跨站请求伪造(CSRF)标识(暂时不用)
|
|
||||||
state: zhongQi
|
|
||||||
|
|
||||||
# 起草部门部门名称
|
|
||||||
draftDepartName: 流程与标准化
|
|
||||||
|
|
||||||
# 管理员权限roleCode,多填用英文逗号拼接
|
# 管理员权限roleCode,多填用英文逗号拼接
|
||||||
adminRoleCode: admin
|
adminRoleCode: admin
|
||||||
|
|
||||||
# 文件下载加解密
|
|
||||||
download:
|
|
||||||
enable: false
|
|
||||||
# 文件下载、预览拦截路径,多个以逗号分隔
|
|
||||||
download_url: /sys/common/download/
|
|
||||||
view_url: /sys/common/view/
|
|
||||||
# 管理员角色
|
|
||||||
admin_role_code: admin,BZGLY
|
|
||||||
# 加密参数
|
|
||||||
encrypt:
|
|
||||||
url: http://10.2.158.196/intekey/encrypteFile
|
|
||||||
app_code: SRMS
|
|
||||||
secret_key: SRMS1234..
|
|
||||||
# 解密参数
|
|
||||||
decrypt:
|
|
||||||
url: http://10.2.158.196/intekey/file
|
|
||||||
app_code: SRMS
|
|
||||||
secret_key: SRMS1234..
|
|
||||||
# 研发域
|
|
||||||
scope_dev: 51
|
|
||||||
# 办公域
|
|
||||||
scope_work: 52
|
|
||||||
|
|
||||||
# 特殊公式处理服务URL
|
# 特殊公式处理服务URL
|
||||||
mathToImg:
|
mathToImg:
|
||||||
url: http://127.0.0.1:9998/mathToImg
|
url: http://127.0.0.1:9998/mathToImg
|
||||||
|
|||||||
+1
-133
@@ -38,32 +38,6 @@ spring:
|
|||||||
starttls:
|
starttls:
|
||||||
enable: true
|
enable: true
|
||||||
required: true
|
required: true
|
||||||
## quartz定时任务,采用数据库方式
|
|
||||||
# quartz:
|
|
||||||
# job-store-type: jdbc
|
|
||||||
# initialize-schema: embedded
|
|
||||||
# #定时任务启动开关,true-开 false-关
|
|
||||||
# auto-startup: true
|
|
||||||
# #启动时更新己存在的Job
|
|
||||||
# overwrite-existing-jobs: true
|
|
||||||
# properties:
|
|
||||||
# org:
|
|
||||||
# quartz:
|
|
||||||
# scheduler:
|
|
||||||
# instanceName: MyScheduler
|
|
||||||
# instanceId: AUTO
|
|
||||||
# jobStore:
|
|
||||||
# class: org.quartz.impl.jdbcjobstore.JobStoreTX
|
|
||||||
# driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
|
||||||
# tablePrefix: QRTZ_
|
|
||||||
# isClustered: true
|
|
||||||
# misfireThreshold: 60000
|
|
||||||
# clusterCheckinInterval: 10000
|
|
||||||
# threadPool:
|
|
||||||
# class: org.quartz.simpl.SimpleThreadPool
|
|
||||||
# threadCount: 10
|
|
||||||
# threadPriority: 5
|
|
||||||
# threadsInheritContextClassLoaderOfInitializingThread: true
|
|
||||||
#json 时间戳统一转换
|
#json 时间戳统一转换
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
@@ -229,13 +203,6 @@ jero:
|
|||||||
secretKey: ??
|
secretKey: ??
|
||||||
bucketName: jeroos
|
bucketName: jeroos
|
||||||
staticDomain: jerodev
|
staticDomain: jerodev
|
||||||
# ElasticSearch 6设置
|
|
||||||
elasticsearch:
|
|
||||||
username: grp
|
|
||||||
password: Grp2023.08
|
|
||||||
cluster-name: jero-ES
|
|
||||||
cluster-nodes: 10.10.10.45:7900
|
|
||||||
check-enabled: false
|
|
||||||
# 表单设计器配置
|
# 表单设计器配置
|
||||||
desform:
|
desform:
|
||||||
# 主题颜色(仅支持 16进制颜色代码)
|
# 主题颜色(仅支持 16进制颜色代码)
|
||||||
@@ -304,9 +271,7 @@ jero:
|
|||||||
aes:
|
aes:
|
||||||
encrypted_key: 1234567890adbcde
|
encrypted_key: 1234567890adbcde
|
||||||
encrypted_iv: 1234567890hjlkew
|
encrypted_iv: 1234567890hjlkew
|
||||||
#cas单点登录
|
|
||||||
cas:
|
|
||||||
prefixUrl: http://cas.example.org:8443/cas
|
|
||||||
#Mybatis输出sql日志
|
#Mybatis输出sql日志
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
@@ -321,31 +286,6 @@ knife4j:
|
|||||||
enable: false
|
enable: false
|
||||||
username: jero
|
username: jero
|
||||||
password: jero.com
|
password: jero.com
|
||||||
#第三方登录
|
|
||||||
justauth:
|
|
||||||
enabled: true
|
|
||||||
type:
|
|
||||||
GITHUB:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/github/callback
|
|
||||||
WECHAT_ENTERPRISE:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_enterprise/callback
|
|
||||||
agent-id: 1000002
|
|
||||||
DINGTALK:
|
|
||||||
client-id: true
|
|
||||||
client-secret: true
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/dingtalk/callback
|
|
||||||
WECHAT_OPEN:
|
|
||||||
client-id: ??
|
|
||||||
client-secret: ??
|
|
||||||
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_open/callback
|
|
||||||
cache:
|
|
||||||
type: default
|
|
||||||
prefix: 'demo::'
|
|
||||||
timeout: 1h
|
|
||||||
|
|
||||||
file:
|
file:
|
||||||
# 在线编辑文件下载映射地址
|
# 在线编辑文件下载映射地址
|
||||||
@@ -357,81 +297,9 @@ file:
|
|||||||
# 在线编辑本地存储地址
|
# 在线编辑本地存储地址
|
||||||
path: D:/opt/onlyOffice/file/
|
path: D:/opt/onlyOffice/file/
|
||||||
|
|
||||||
iam:
|
|
||||||
bimRemoteUser: srmsIam
|
|
||||||
bimRemotePwd: srmsIam2023
|
|
||||||
# bimRemoteUser: bbcadmin
|
|
||||||
# bimRemotePwd: P@ssw0rd
|
|
||||||
bpmcAppkey: test
|
|
||||||
# 创建用户默认角色
|
|
||||||
defaultRoleIds: 817f7f818bb3506e018bb3506ef70000
|
|
||||||
|
|
||||||
# Hiwork集成
|
|
||||||
hiwork:
|
|
||||||
ip: http://task-test.sinotruk.com/
|
|
||||||
# 异构系统标识
|
|
||||||
sysCode: SRMS
|
|
||||||
# 统一待办集成
|
|
||||||
todoUrl: taskapi/task.basedata/integrationCall/workflowIntegration
|
|
||||||
# 统一消息集成
|
|
||||||
messageUrl: taskapi/task.basedata/notice/noticeCalls/send
|
|
||||||
# 是否发送消息
|
|
||||||
isSend: false
|
|
||||||
|
|
||||||
# 汽车标准数字化平台ASMS
|
|
||||||
asms:
|
|
||||||
host: http://standard.catarc.org.cn/
|
|
||||||
# 测试账号用户名
|
|
||||||
username: ceshi
|
|
||||||
# 测试账号密码
|
|
||||||
password: Catarc@333
|
|
||||||
# token过期时间(单位:小时)
|
|
||||||
expire: 48
|
|
||||||
|
|
||||||
# 单点登录配置(所有配置信息需要协调注册,现在都为假)
|
|
||||||
oauth:
|
|
||||||
# 客户端应用注册ID--客户申请的:SRMS
|
|
||||||
clientId: SRMS
|
|
||||||
# 客户端应用注册密钥 客户申请的:58a1001438de462193bec307826463c2
|
|
||||||
clientSecret: 58a1001438de462193bec307826463c2
|
|
||||||
# 授权码验证
|
|
||||||
grantType: authorization_code
|
|
||||||
# 通过授权码获取accessToken请求地址
|
|
||||||
accessTokenUrl: https://iam-uat-new.sinotruk.com/idp/oauth2/getToken
|
|
||||||
# 通过accessToken获取账号信息请求地址
|
|
||||||
userInfoUrl: https://iam-uat-new.sinotruk.com/idp/oauth2/getUserInfo
|
|
||||||
# 防止跨站请求伪造(CSRF)标识(暂时不用)
|
|
||||||
state: zhongQi
|
|
||||||
|
|
||||||
# 起草部门部门名称
|
|
||||||
draftDepartName: 起草部门
|
|
||||||
|
|
||||||
# 管理员权限roleCode,多填用英文逗号拼接
|
# 管理员权限roleCode,多填用英文逗号拼接
|
||||||
adminRoleCode: admin
|
adminRoleCode: admin
|
||||||
|
|
||||||
# 文件下载加解密
|
|
||||||
download:
|
|
||||||
enable: false
|
|
||||||
# 文件下载、预览拦截路径,多个以逗号分隔
|
|
||||||
download_url: /sys/common/download/
|
|
||||||
view_url: /sys/common/view/
|
|
||||||
# 管理员角色
|
|
||||||
admin_role_code: admin,BZGLY
|
|
||||||
# 加密参数
|
|
||||||
encrypt:
|
|
||||||
url: http://10.2.159.90/intekey/encrypteFile
|
|
||||||
app_code: SRMS
|
|
||||||
secret_key: SRMS1234..
|
|
||||||
# 解密参数
|
|
||||||
decrypt:
|
|
||||||
url: http://10.2.159.90/intekey/file
|
|
||||||
app_code: SRMS
|
|
||||||
secret_key: SRMS1234..
|
|
||||||
# 研发域
|
|
||||||
scope_dev: 51
|
|
||||||
# 办公域
|
|
||||||
scope_work: 52
|
|
||||||
|
|
||||||
# 特殊公式处理服务URL
|
# 特殊公式处理服务URL
|
||||||
mathToImg:
|
mathToImg:
|
||||||
url: http://127.0.0.1:9998/mathToImg
|
url: http://127.0.0.1:9998/mathToImg
|
||||||
|
|||||||
Reference in New Issue
Block a user