Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
@@ -229,6 +229,11 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateDictEn(String code, String key, String cut) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username) {
|
||||
return null;
|
||||
|
||||
+8
@@ -64,6 +64,14 @@ public interface CommonAPI {
|
||||
*/
|
||||
String translateDict(String code, String key);
|
||||
|
||||
/**
|
||||
* 数据字典英文
|
||||
* @param code
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
String translateDictEn(String code, String key,String cut);
|
||||
|
||||
/**
|
||||
* 8查询数据权限
|
||||
* @return
|
||||
|
||||
+17
-7
@@ -3,6 +3,7 @@ package com.jero.common.api.vo;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -31,18 +32,24 @@ public class Result<T> implements Serializable {
|
||||
@ApiModelProperty(value = "返回处理消息")
|
||||
private String message = "操作成功!";
|
||||
|
||||
/**
|
||||
* 返回处理消息
|
||||
*/
|
||||
@ApiModelProperty(value = "中英文切换标识")
|
||||
private String cut = CutEnum.CN.getValue();
|
||||
|
||||
/**
|
||||
* 返回代码
|
||||
*/
|
||||
@ApiModelProperty(value = "返回代码")
|
||||
private Integer code = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 返回数据对象 data
|
||||
*/
|
||||
@ApiModelProperty(value = "返回数据对象")
|
||||
private T result;
|
||||
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
@@ -50,9 +57,9 @@ public class Result<T> implements Serializable {
|
||||
private long timestamp = System.currentTimeMillis();
|
||||
|
||||
public Result() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Result<T> success(String message) {
|
||||
this.message = message;
|
||||
this.code = CommonConstant.SC_OK_200;
|
||||
@@ -108,14 +115,17 @@ public class Result<T> implements Serializable {
|
||||
r.setSuccess(true);
|
||||
r.setCode(CommonConstant.SC_OK_200);
|
||||
r.setMessage(msg);
|
||||
if(CutEnum.CN.getValue().equals(msg) || CutEnum.EN.getValue().equals(msg)){
|
||||
r.setCut(msg);
|
||||
}
|
||||
r.setResult(data);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
public static Result<Object> error(String msg) {
|
||||
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
|
||||
}
|
||||
|
||||
|
||||
public static Result<Object> error(int code, String msg) {
|
||||
Result<Object> r = new Result<Object>();
|
||||
r.setCode(code);
|
||||
@@ -140,4 +150,4 @@ public class Result<T> implements Serializable {
|
||||
@JsonIgnore
|
||||
private String onlTable;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+29
-11
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@@ -82,24 +83,34 @@ public class DictAspect {
|
||||
private void parseDictText(Object result) {
|
||||
if (result instanceof Result) {
|
||||
if (((Result) result).getResult() instanceof IPage) {
|
||||
String cut = ((Result) result).getCut();
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (Object record : ((IPage) ((Result) result).getResult()).getRecords()) {
|
||||
JSONObject item = getJsonObject(record);
|
||||
JSONObject item = getJsonObject(record,cut);
|
||||
items.add(item);
|
||||
}
|
||||
((IPage) ((Result) result).getResult()).setRecords(items);
|
||||
}else if(((Result) result).getResult() instanceof List){
|
||||
// List<JSONObject> items = new ArrayList<>();
|
||||
// for (Object record : (List)((Result) result).getResult()) {
|
||||
// JSONObject item = getJsonObject(record);
|
||||
// items.add(item);
|
||||
// }
|
||||
// ((Result) result).setResult(items);
|
||||
String cut = ((Result) result).getCut();
|
||||
//返回结果中只处理实体对象的不处理其他类型
|
||||
if(((List) ((Result) result).getResult()).size() != 0){
|
||||
String name = ((ArrayList) ((Result) result).getResult()).get(0).getClass().getName();
|
||||
if(!"java.util.LinkedHashMap".equals(name) && !"java.util.HashMap".equals(name) && !"java.lang.String".equals(name)){
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (Object record : (List)((Result) result).getResult()) {
|
||||
JSONObject item = getJsonObject(record,cut);
|
||||
items.add(item);
|
||||
}
|
||||
((Result) result).setResult(items);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private JSONObject getJsonObject(Object record) {
|
||||
private JSONObject getJsonObject(Object record,String cut) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String json = "{}";
|
||||
try {
|
||||
@@ -120,7 +131,7 @@ public class DictAspect {
|
||||
String key = String.valueOf(item.get(field.getName()));
|
||||
|
||||
//翻译字典值对应的txt
|
||||
String textValue = translateDictValue(code, text, table, key);
|
||||
String textValue = translateDictValue(code, text, table, key,cut);
|
||||
|
||||
log.debug(" 字典Val : " + textValue);
|
||||
log.debug(" __翻译字典字段__ " + field.getName() + CommonConstant.DICT_TEXT_SUFFIX + ": " + textValue);
|
||||
@@ -143,7 +154,7 @@ public class DictAspect {
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
private String translateDictValue(String code, String text, String table, String key) {
|
||||
private String translateDictValue(String code, String text, String table, String key,String cut) {
|
||||
if(oConvertUtils.isEmpty(key)) {
|
||||
return null;
|
||||
}
|
||||
@@ -159,13 +170,20 @@ public class DictAspect {
|
||||
log.debug("--DictAspect------dicTable="+ table+" ,dicText= "+text+" ,dicCode="+code);
|
||||
tmpValue= commonAPI.translateDictFromTable(table,text,code,k.trim());
|
||||
}else {
|
||||
tmpValue = commonAPI.translateDict(code, k.trim());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
tmpValue = commonAPI.translateDict(code, k.trim());
|
||||
}else if(CutEnum.EN.getValue().equals(cut)){
|
||||
tmpValue = commonAPI.translateDictEn(code, k.trim(),cut);
|
||||
}
|
||||
|
||||
}
|
||||
if (tmpValue != null) {
|
||||
if (!"".equals(textValue.toString())) {
|
||||
textValue.append(",");
|
||||
}
|
||||
textValue.append(tmpValue);
|
||||
}else{
|
||||
tmpValue = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-5
@@ -430,7 +430,7 @@ public class SysDictController {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
if (StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可修改");
|
||||
}else{
|
||||
sysDict.setUpdateTime(new Date());
|
||||
@@ -460,7 +460,7 @@ public class SysDictController {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
SysDict sysDict = sysDictService.queryById(id);
|
||||
if (StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可删除");
|
||||
} else {
|
||||
boolean ok = sysDictService.removeById(id);
|
||||
@@ -489,7 +489,7 @@ public class SysDictController {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
try{
|
||||
SysDict sysDict = sysDictService.queryById(id);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,id);
|
||||
@@ -519,7 +519,7 @@ public class SysDictController {
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
for (String list : idList) {
|
||||
SysDict midDict = sysDictService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(midDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly())) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(String.valueOf(midDict.getIsReadOnly()))) {
|
||||
return result.error500("包含固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.removeByIds(idList);
|
||||
@@ -547,7 +547,7 @@ public class SysDictController {
|
||||
result.error500("参数不识别!");
|
||||
}else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(String.valueOf(joinSystem.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(joinSystem.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(joinSystem.getIsReadOnly()))) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,joinSystem.getId());
|
||||
|
||||
+3
@@ -1467,6 +1467,9 @@ public class SysUserController {
|
||||
@ApiOperation(value="文档库推送部门和人员的模糊搜索", notes="文档库推送部门和人员的模糊搜索")
|
||||
@GetMapping(value = "/getUserAndDepart")
|
||||
public List<SysUserDepartVO> getUserAndDepart(String name){
|
||||
if("%".equals(name)){
|
||||
name = "/%";
|
||||
}
|
||||
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.like(SysUser::getRealname,name);
|
||||
List<SysUser> sysUserList = sysUserService.list(lambdaQueryWrapper);
|
||||
|
||||
+6
-4
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
* @since 2018-12-28
|
||||
*/
|
||||
public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
|
||||
|
||||
/**
|
||||
* 重复检查SQL
|
||||
* @return
|
||||
@@ -32,7 +32,7 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
public Long duplicateCheckCountSql(DuplicateCheckVo duplicateCheckVo);
|
||||
|
||||
public Long duplicateCheckCountSqlNoDataId(DuplicateCheckVo duplicateCheckVo);
|
||||
|
||||
|
||||
public List<DictModel> queryDictItemsByCode(@Param("code") String code);
|
||||
|
||||
@Deprecated
|
||||
@@ -47,6 +47,8 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
|
||||
public String queryDictTextByKey(@Param("code") String code,@Param("key") String key);
|
||||
|
||||
public String queryDictTextByKeyEn(@Param("code") String code,@Param("key") String key);
|
||||
|
||||
public String queryDictKeyByText(@Param("code") String code,@Param("text") String key);
|
||||
|
||||
@Deprecated
|
||||
@@ -60,13 +62,13 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllDepartBackDictModel();
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有用户 作为字典信息 username -->value,realname -->text
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllUserBackDictModel();
|
||||
|
||||
|
||||
/**
|
||||
* 通过关键字查询出字典表
|
||||
* @param table
|
||||
|
||||
+6
@@ -15,6 +15,12 @@
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||
and s.item_value = #{key}
|
||||
</select>
|
||||
<!-- 通过字典code获取字典数据(英文) -->
|
||||
<select id="queryDictTextByKeyEn" parameterType="String" resultType="String">
|
||||
select s.en_name from sys_dict_item s
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||
and s.item_value = #{key}
|
||||
</select>
|
||||
|
||||
<!-- 通过字典code获取字典数据 -->
|
||||
<select id="queryDictKeyByText" parameterType="String" resultType="String">
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
public List<DictModel> queryTableDictItemsByCodeAndFilter(String table, String text, String code, String filterSql);
|
||||
|
||||
public String queryDictTextByKey(String code, String key);
|
||||
public String queryDictTextByKeyEn(String code, String key,String cut);
|
||||
|
||||
@Deprecated
|
||||
String queryTableDictTextByKey(String table, String text, String code, String key);
|
||||
|
||||
+7
-2
@@ -51,7 +51,7 @@ import java.util.*;
|
||||
/**
|
||||
* @Description: 底层共通业务API,提供其他独立模块调用
|
||||
* @Author: scott
|
||||
* @Date:2019-4-20
|
||||
* @Date:2019-4-20
|
||||
* @Version:V1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@@ -118,6 +118,11 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
return sysDictService.queryDictTextByKey(code, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateDictEn(String code, String key, String cut) {
|
||||
return sysDictService.queryDictTextByKeyEn(code, key,cut);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username) {
|
||||
List<SysPermission> currentSyspermission = null;
|
||||
@@ -1015,4 +1020,4 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
public List<SysDepartTreeModel> listSonDepartsByDepId(String departId) {
|
||||
return sysDepartService.listSonDepartsByDepId(departId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -123,6 +123,12 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
log.debug("无缓存dictText的时候调用这里!");
|
||||
return sysDictMapper.queryDictTextByKey(code, key);
|
||||
}
|
||||
@Override
|
||||
@Cacheable(value = CacheConstant.SYS_DICT_CACHE,key = "#code+':'+#key+#cut")
|
||||
public String queryDictTextByKeyEn(String code, String key,String cut) {
|
||||
log.debug("无缓存dictText的时候调用这里!");
|
||||
return sysDictMapper.queryDictTextByKeyEn(code, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过查询指定table的 text code 获取字典
|
||||
|
||||
+7
-7
@@ -49,7 +49,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@PostMapping(value = "/queryPageInfo")
|
||||
@ResponseBody
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getInfoPage(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
@@ -66,7 +66,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@ApiOperation(value="代替标准分页列表查询", notes="代替标准分页列表查询")
|
||||
@PostMapping(value = "/replacePageInfo")
|
||||
@ResponseBody
|
||||
// @RequiresPermissions("document:replacePageInfo")
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<?> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
||||
// Result<IPage> ok = Result.OK(infoPage);
|
||||
@@ -161,7 +161,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
// @RequiresPermissions("document: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);
|
||||
@@ -176,7 +176,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
@GetMapping(value = "/getHeader")
|
||||
// @RequiresPermissions("document: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);
|
||||
@@ -191,7 +191,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "文档库信息表-新增表单")
|
||||
@ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
||||
@GetMapping(value = "/getAddForm")
|
||||
// @RequiresPermissions("document: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) {
|
||||
@@ -237,7 +237,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "编辑数据查询")
|
||||
@ApiOperation(value="编辑数据查询", notes="编辑数据查询")
|
||||
@GetMapping(value = "/getDocumentInfoById")
|
||||
// @RequiresPermissions("document: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);
|
||||
@@ -251,7 +251,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "详情数据查询")
|
||||
@ApiOperation(value="详情数据查询", notes="详情数据查询")
|
||||
@GetMapping(value = "/getInfoById")
|
||||
// @RequiresPermissions("document: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);
|
||||
|
||||
-2
@@ -588,8 +588,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getDocumentInfoById(String id, String cut) {
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BussDocumentLibraryEO::getId, id);
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
List<OnlCgformField> treeOnlCgformFieldList = fieldList.stream().filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class DummyInventoryBaseEOController extends JeroController<DummyInventor
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
|
||||
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfo(page,queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
@@ -8,6 +8,7 @@ import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -43,6 +44,7 @@ public class DocumentSearchController {
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="searchFlag",required=true) String searchFlag) {
|
||||
@@ -66,6 +68,7 @@ public class DocumentSearchController {
|
||||
|
||||
@ApiOperation(value="列表查询", notes="列表查询")
|
||||
@PostMapping(value = "/getInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getInfoList(map);
|
||||
return Result.OK(infoList);
|
||||
@@ -73,6 +76,7 @@ public class DocumentSearchController {
|
||||
|
||||
@ApiOperation(value="全部查询", notes="全部查询")
|
||||
@PostMapping(value = "/getFullTextInfoList")
|
||||
@RequiresPermissions("/search:search")
|
||||
public Result<?> getFullTextInfoList(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = iDocumentSearchService.getFullTextInfoList(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
@@ -80,6 +84,7 @@ public class DocumentSearchController {
|
||||
|
||||
@ApiOperation(value="文档库查询段落", notes="文档库查询段落")
|
||||
@PostMapping(value = "/getParagraphInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getParagraphInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage pageInfo = iDocumentSearchService.getParagraphInfoList(map);
|
||||
return Result.OK(pageInfo);
|
||||
|
||||
+4
-4
@@ -95,7 +95,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
@@ -121,7 +121,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
@@ -187,7 +187,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
OnlCgformArea onlCgformArea = onlCgformAreaService.queryById(id);
|
||||
if(onlCgformArea==null) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("未找到对应数据");
|
||||
}else{
|
||||
return Result.error("No corresponding data was found.");
|
||||
@@ -232,7 +232,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
OnlCgformArea onlCgformArea = (OnlCgformArea) onlCgformAreaService.selectShowAreaById(id);
|
||||
if(onlCgformArea==null) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("未找到对应数据");
|
||||
}else{
|
||||
return Result.error("No corresponding data was found.");
|
||||
|
||||
+9
-9
@@ -127,7 +127,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
}
|
||||
}else{
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
throw new JeroBootException("属性已存在,请检查");
|
||||
}else{
|
||||
throw new JeroBootException("Attribute already exists, please check!");
|
||||
@@ -159,7 +159,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
checkData();
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
return Result.error("固定字段,不可修改");
|
||||
}else{
|
||||
return Result.error("Fixed field, which cannot be modified.");
|
||||
@@ -191,7 +191,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
}
|
||||
}else {//有未删数据,报错
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
return Result.error("属性已存在,请检查");
|
||||
}else{
|
||||
return Result.error("Attribute already exists, please check!");
|
||||
@@ -252,7 +252,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
if(StringUtils.isNotBlank(String.valueOf(onlCgformTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
result.error500("固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("Fixed field, cannot be deleted.");
|
||||
@@ -307,18 +307,18 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
for(String list:idList){
|
||||
OnlCgformTag midTag=onlCgformTagService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(midTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(midTag.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(midTag.getIsReadOnly())) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
}
|
||||
}else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(midTag.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
@@ -327,7 +327,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
onlCgformTagService.updateDictDelFlag(CommonConstant.DEL_FLAG_1, midTag.getId());
|
||||
//onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");//逻辑删除-->改变状态,数据库不删
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.success("批量删除成功!");
|
||||
}else{
|
||||
result.success("Batch deletion succeeded!");
|
||||
|
||||
Reference in New Issue
Block a user