订阅+收藏修改
This commit is contained in:
+5
-1
@@ -7,7 +7,11 @@ package com.jero.common.constant.enums;
|
||||
*/
|
||||
public enum ModuleEnum {
|
||||
DOCUMENT_LIBRARY("文档管理","1"),
|
||||
OCR_RECORD("OCR识别转换记录表","2");
|
||||
OCR_RECORD("OCR识别转换记录表","2"),
|
||||
ONL_CGFORM_TAG("标签项管理","3"),
|
||||
ONL_CGFORM_AREA("展示区域管理","4"),
|
||||
ONL_CGFORM_COLLECTION("我的收藏","5"),
|
||||
ONL_CGFORM_SUBSCRIBE("我的订阅","6");
|
||||
|
||||
|
||||
String name;
|
||||
|
||||
+5
-1
@@ -7,7 +7,11 @@ package com.jero.common.constant.enums;
|
||||
*/
|
||||
public enum TableEnum {
|
||||
BUSS_DOCUMENT_LIBRARY("buss_document_library"),
|
||||
OCR_RECORD("ocr_record");
|
||||
OCR_RECORD("ocr_record"),
|
||||
TAG("onl_cgform_tag"),
|
||||
TAG_AREA("onl_cgform_area"),
|
||||
ONL_CGFORM_COLLECTION("onl_cgform_collection"),
|
||||
ONL_CGFORM_SUBSCRIBE("onl_cgform_subscribe");
|
||||
|
||||
String table;
|
||||
|
||||
|
||||
+12
-3
@@ -818,13 +818,22 @@ public class OnlCgformFieldServiceImpl extends ServiceImpl<OnlCgformFieldMapper,
|
||||
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable());
|
||||
}else if(ModuleEnum.OCR_RECORD.getValue().equals(flag)){
|
||||
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.OCR_RECORD.getTable());
|
||||
}else if(ModuleEnum.ONL_CGFORM_TAG.getValue().equals(flag)){
|
||||
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.TAG.getTable());
|
||||
}else if(ModuleEnum.ONL_CGFORM_AREA.getValue().equals(flag)){
|
||||
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.TAG_AREA.getTable());
|
||||
}else if(ModuleEnum.ONL_CGFORM_COLLECTION.getValue().equals(flag)){
|
||||
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.ONL_CGFORM_COLLECTION.getTable());
|
||||
}else if(ModuleEnum.ONL_CGFORM_SUBSCRIBE.getValue().equals(flag)){
|
||||
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.ONL_CGFORM_SUBSCRIBE.getTable());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return fieldList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
|
||||
+36
-19
@@ -339,12 +339,24 @@ public class SysDictController {
|
||||
public Result<SysDict> add(@RequestBody SysDict sysDict) {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
try {
|
||||
sysDict.setCreateTime(new Date());
|
||||
sysDict.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
sysDictService.save(sysDict);
|
||||
result.success("保存成功!");
|
||||
//添加成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
/*if (StringUtils.isNotBlank(sysDict.getDictCode())) {
|
||||
if(sysDict.getIsTagDict()==1){
|
||||
sysDict.setDictEnName(sysDict.getDictCode().replace("_", " "));
|
||||
sysDict.setDictCode(sysDict.getDictEnName().replace(" ", "_"));
|
||||
}
|
||||
}*/
|
||||
if(StringUtils.isEmpty(sysDict.getDictCode())){
|
||||
//result.error500("字典Code不能为空");
|
||||
sysDict.setDictCode(sysDict.getDictName());
|
||||
}else {
|
||||
sysDict.setCreateTime(new Date());
|
||||
sysDict.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
|
||||
sysDictService.save(sysDict);
|
||||
result.success("保存成功!");
|
||||
//添加成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
@@ -365,19 +377,24 @@ public class SysDictController {
|
||||
SysDict sysdict = sysDictService.getById(sysDict.getId());
|
||||
if (sysdict == null) {
|
||||
result.error500("未找到对应实体");
|
||||
}
|
||||
else {
|
||||
if (sysDict.getIsReadOnly() == 1) {
|
||||
result.error500("固定字段,不能修改");
|
||||
}
|
||||
else{
|
||||
sysDict.setUpdateTime(new Date());
|
||||
boolean ok = sysDictService.updateById(sysDict);
|
||||
if (ok) {
|
||||
result.success("编辑成功!");
|
||||
//编辑成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
}
|
||||
}else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
/*if (sysDict.getIsReadOnly() == 1) {
|
||||
result.error500("固定字段,不可删除");
|
||||
}else{*/
|
||||
/*if(sysDict.getIsTagDict() == 1) {
|
||||
sysDict.setDictEnName(sysDict.getDictCode().replace("_", " "));
|
||||
}
|
||||
else {*/
|
||||
sysDict.setUpdateTime(new Date());
|
||||
boolean ok = sysDictService.updateById(sysDict);
|
||||
if (ok) {
|
||||
result.success("编辑成功!");
|
||||
//编辑成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
}
|
||||
//}
|
||||
// }
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
+32
-20
@@ -20,9 +20,10 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
@@ -36,7 +37,7 @@ public class OnlCgformCollectionController extends JeroController<OnlCgformColle
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
BussDocumentLibraryEOController BussDocumentLibraryEOService;
|
||||
BussDocumentLibraryEOController bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -60,7 +61,35 @@ public class OnlCgformCollectionController extends JeroController<OnlCgformColle
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签管理-表头中英文切换")
|
||||
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformCollectionService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "OCR识别转换记录表-查询条件中英文切换")
|
||||
@ApiOperation(value="OCR识别转换记录表-查询条件中英文切换", notes="OCR识别转换记录表-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformCollectionService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
@@ -131,21 +160,4 @@ public class OnlCgformCollectionController extends JeroController<OnlCgformColle
|
||||
}
|
||||
return Result.OK(onlCgformCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的收藏-通过文档库id查询
|
||||
*
|
||||
* @param documentId
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-通过文档库id查询")
|
||||
@ApiOperation(value="我的收藏-通过文档库id查询", notes="我的收藏-通过文档库id查询")
|
||||
@GetMapping(value = "/queryDocumentById")
|
||||
public Result<?> queryDocumentById(@RequestParam(name="id",required=true) String documentId) {
|
||||
OnlCgformCollection onlCgformCollection = onlCgformCollectionService.queryById(documentId);
|
||||
if(onlCgformCollection==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformCollection);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-6
@@ -8,13 +8,13 @@ import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ import java.util.Date;
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="onl_cgform_collection对象", description="我的收藏")
|
||||
public class OnlCgformCollection implements Serializable {
|
||||
public class OnlCgformCollection extends BussDocumentLibraryEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@@ -46,11 +46,15 @@ public class OnlCgformCollection implements Serializable {
|
||||
@ApiModelProperty(value = "收藏日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/** 更新人*/
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新时间*/
|
||||
private Date updateTime;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@@ -59,5 +63,6 @@ public class OnlCgformCollection implements Serializable {
|
||||
/**文档库id*/
|
||||
@Excel(name = "文档库id", width = 15, dictTable = "buss_document_library", dicText = "id", dicCode = "id")
|
||||
@Dict(dictTable = "buss_document_library", dicText = "id", dicCode = "id")
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private String documentId;
|
||||
}
|
||||
|
||||
+7
@@ -2,6 +2,10 @@ package com.jero.modules.collection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
@@ -11,4 +15,7 @@ import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
*/
|
||||
public interface OnlCgformCollectionMapper extends BaseMapper<OnlCgformCollection> {
|
||||
|
||||
@Select("select * from buss_document_library as document LEFT JOIN onl_cgform_collection\n" +
|
||||
"as collection on document.id= collection.document_id;")
|
||||
List<OnlCgformCollection> queryListByDocumentId(@Param("document_id") String document_id);
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="state" property="state" />
|
||||
<result column="serial_number" property="serialNumber" />
|
||||
<result column="title" property="title" />
|
||||
<result column="document_id" property="documentId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+18
-9
@@ -2,9 +2,9 @@ package com.jero.modules.collection.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
@@ -46,18 +46,27 @@ public interface IOnlCgformCollectionService extends IService<OnlCgformCollectio
|
||||
*/
|
||||
OnlCgformCollection queryById(String id);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param documentId
|
||||
* @return
|
||||
*/
|
||||
//OnlCgformCollection queryByDocumentId(String documentId);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
|
||||
}
|
||||
|
||||
+92
-34
@@ -1,15 +1,19 @@
|
||||
package com.jero.modules.collection.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.mapper.OnlCgformCollectionMapper;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
@@ -19,6 +23,10 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollectionMapper, OnlCgformCollection> implements IOnlCgformCollectionService {
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
OnlCgformCollectionMapper onlCgformCollectionMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -27,11 +35,11 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollect
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OnlCgformCollection onlCgformCollection) {
|
||||
Date now = new Date();
|
||||
public void add(OnlCgformCollection onlCgformCollection) {
|
||||
Date now = new Date();
|
||||
onlCgformCollection.setCreateTime(now);
|
||||
save(onlCgformCollection);
|
||||
}
|
||||
save(onlCgformCollection);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -41,9 +49,9 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollect
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
@@ -52,9 +60,9 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollect
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -63,30 +71,80 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollect
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OnlCgformCollection queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
public OnlCgformCollection queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过documentId查询
|
||||
*
|
||||
* @param documentId
|
||||
* @return
|
||||
*/
|
||||
/* @Override
|
||||
public OnlCgformCollection queryByDocumentId(String documentId) {
|
||||
return getById(documentId);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
LambdaQueryWrapper<OnlCgformCollection> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(OnlCgformCollection::getCreateBy,onlCgformCollection.getCreateBy());
|
||||
return list();
|
||||
}
|
||||
}
|
||||
public List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
List<OnlCgformCollection> list = onlCgformCollectionMapper.queryListByDocumentId(onlCgformCollection.getDocumentId());
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
//跳转详情的标识
|
||||
map.put("click", "true");
|
||||
}
|
||||
//单独处理发布日期和标准实施日期
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+31
-3
@@ -21,9 +21,10 @@ 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-02-23
|
||||
@@ -59,6 +60,33 @@ public class OnlCgformSubscribeController extends JeroController<OnlCgformSubscr
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签管理-表头中英文切换")
|
||||
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformSubscribeService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "OCR识别转换记录表-查询条件中英文切换")
|
||||
@ApiOperation(value="OCR识别转换记录表-查询条件中英文切换", notes="OCR识别转换记录表-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformSubscribeService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
@@ -67,8 +95,8 @@ public class OnlCgformSubscribeController extends JeroController<OnlCgformSubscr
|
||||
@AutoLog(value = "我的订阅-列表查询")
|
||||
@ApiOperation(value="我的订阅-列表查询", notes="我的订阅-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformSubscribe>> queryList() {
|
||||
List<OnlCgformSubscribe> list = onlCgformSubscribeService.queryList();
|
||||
public Result<List<OnlCgformSubscribe>> queryList(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
List<OnlCgformSubscribe> list = onlCgformSubscribeService.queryList(onlCgformSubscribe);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+8
-5
@@ -1,10 +1,11 @@
|
||||
package com.jero.modules.subscribe.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 我的订阅
|
||||
@@ -13,5 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface OnlCgformSubscribeMapper extends BaseMapper<OnlCgformSubscribe> {
|
||||
|
||||
@Select("select * from buss_document_library as document LEFT JOIN onl_cgform_subscribe\n" +
|
||||
"as subscribe on document.id= subscribe.document_id;")
|
||||
List<OnlCgformSubscribe> queryListByDocumentId(@Param("document_id") String document_id);
|
||||
}
|
||||
|
||||
-4
@@ -9,9 +9,5 @@
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="document_id" property="documentId" />
|
||||
<result column="state" property="state" />
|
||||
<result column="serialnumber" property="serialnumber" />
|
||||
<result column="title" property="title" />
|
||||
<result column="technology_territory" property="technologyTerritory" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+18
-1
@@ -3,6 +3,7 @@ package com.jero.modules.subscribe.service;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 我的订阅
|
||||
@@ -57,5 +58,21 @@ public interface IOnlCgformSubscribeService extends IService<OnlCgformSubscribe>
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformSubscribe> queryList();
|
||||
List<OnlCgformSubscribe> queryList(OnlCgformSubscribe onlCgformSubscribe);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
}
|
||||
|
||||
+102
-28
@@ -1,12 +1,19 @@
|
||||
package com.jero.modules.subscribe.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.mapper.OnlCgformSubscribeMapper;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 我的订阅
|
||||
@@ -16,6 +23,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
*/
|
||||
@Service
|
||||
public class OnlCgformSubscribeServiceImpl extends ServiceImpl<OnlCgformSubscribeMapper, OnlCgformSubscribe> implements IOnlCgformSubscribeService {
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
private OnlCgformSubscribeMapper onlCgformSubscribeMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -24,12 +35,12 @@ public class OnlCgformSubscribeServiceImpl extends ServiceImpl<OnlCgformSubscrib
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
Date now = new Date();
|
||||
onlCgformSubscribe.setCreateTime(now);
|
||||
onlCgformSubscribe.setUpdateTime(now);
|
||||
save(onlCgformSubscribe);
|
||||
}
|
||||
public void add(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
Date now = new Date();
|
||||
onlCgformSubscribe.setCreateTime(now);
|
||||
onlCgformSubscribe.setUpdateTime(now);
|
||||
save(onlCgformSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
@@ -38,11 +49,11 @@ public class OnlCgformSubscribeServiceImpl extends ServiceImpl<OnlCgformSubscrib
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
Date now = new Date();
|
||||
onlCgformSubscribe.setUpdateTime(now);
|
||||
saveOrUpdate(onlCgformSubscribe);
|
||||
}
|
||||
public void editById(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
Date now = new Date();
|
||||
onlCgformSubscribe.setUpdateTime(now);
|
||||
saveOrUpdate(onlCgformSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
@@ -51,9 +62,9 @@ public class OnlCgformSubscribeServiceImpl extends ServiceImpl<OnlCgformSubscrib
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
@@ -62,9 +73,9 @@ public class OnlCgformSubscribeServiceImpl extends ServiceImpl<OnlCgformSubscrib
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -73,17 +84,80 @@ public class OnlCgformSubscribeServiceImpl extends ServiceImpl<OnlCgformSubscrib
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OnlCgformSubscribe queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
public OnlCgformSubscribe queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OnlCgformSubscribe> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
public List<OnlCgformSubscribe> queryList(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
List<OnlCgformSubscribe> list = onlCgformSubscribeMapper.queryListByDocumentId(onlCgformSubscribe.getDocumentId());
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
//跳转详情的标识
|
||||
map.put("click", "true");
|
||||
}
|
||||
//单独处理发布日期和标准实施日期
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+30
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
@@ -60,6 +61,34 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签管理-表头中英文切换")
|
||||
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformAreaService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "OCR识别转换记录表-查询条件中英文切换")
|
||||
@ApiOperation(value="OCR识别转换记录表-查询条件中英文切换", notes="OCR识别转换记录表-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformAreaService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
@@ -72,6 +101,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
List<OnlCgformArea> list = onlCgformAreaService.queryList(onlCgformArea);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
+29
@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
@@ -66,6 +67,34 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签管理-表头中英文切换")
|
||||
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformTagService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "OCR识别转换记录表-查询条件中英文切换")
|
||||
@ApiOperation(value="OCR识别转换记录表-查询条件中英文切换", notes="OCR识别转换记录表-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformTagService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
-5
@@ -79,9 +79,4 @@ public class OnlCgformArea implements Serializable {
|
||||
@Excel(name = "排序号", width = 15)
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private java.lang.Integer sort;
|
||||
|
||||
//TODO 定义@data后不需要再重写get/set方法
|
||||
public void setShowArea(String showArea) {
|
||||
this.showArea = showArea;
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -20,6 +20,7 @@
|
||||
<result column="is_show_list" property="isShowList" />
|
||||
<result column="is_read_only" property="isReadOnly" />
|
||||
<result column="show_area" property="showArea" />
|
||||
<result column="area_id" property="areaId" />
|
||||
<result column="is_query" property="isQuery" />
|
||||
<result column="is_show_laws_list" property="isShowLawsList" />
|
||||
<result column="is_show_search" property="isShowSearch" />
|
||||
|
||||
+19
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
@@ -59,12 +60,14 @@ public interface IOnlCgformAreaService extends IService<OnlCgformArea> {
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformArea> queryList(OnlCgformArea onlCgformArea);
|
||||
|
||||
/**
|
||||
* 查询展示区域
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformArea> queryShowArea(OnlCgformArea onlCgformArea);
|
||||
|
||||
/**
|
||||
* 展示区域查询
|
||||
*
|
||||
@@ -72,4 +75,20 @@ public interface IOnlCgformAreaService extends IService<OnlCgformArea> {
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformArea> selectShowAreaById(String id);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
}
|
||||
|
||||
+17
@@ -6,6 +6,7 @@ import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
@@ -76,4 +77,20 @@ public interface IOnlCgformTagService extends IService<OnlCgformTag> {
|
||||
* @return
|
||||
*/
|
||||
Result<?> queryExitData(OnlCgformTag onlCgformTag) ;
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
}
|
||||
|
||||
+73
-4
@@ -3,14 +3,20 @@ package com.jero.modules.tag.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.mapper.OnlCgformAreaMapper;
|
||||
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 区域管理表
|
||||
@@ -20,7 +26,8 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, OnlCgformArea> implements IOnlCgformAreaService {
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -119,4 +126,66 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
|
||||
QueryWrapper<OnlCgformArea> list=new QueryWrapper<OnlCgformArea>().select(id,"showArea");
|
||||
return list(list);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
//跳转详情的标识
|
||||
map.put("click", "true");
|
||||
}
|
||||
//单独处理发布日期和标准实施日期
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+71
-4
@@ -5,6 +5,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
||||
@@ -13,8 +18,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
@@ -26,7 +31,8 @@ import java.util.List;
|
||||
public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, OnlCgformTag> implements IOnlCgformTagService {
|
||||
@Autowired
|
||||
private OnlCgformTagMapper onlCgformTagMapper;
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -132,4 +138,65 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
//跳转详情的标识
|
||||
map.put("click", "true");
|
||||
}
|
||||
//单独处理发布日期和标准实施日期
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user