Merge remote-tracking branch 'origin/master'
This commit is contained in:
+1
@@ -12,6 +12,7 @@ public enum FieldTypeEnum {
|
||||
// FILE("文件","file"),
|
||||
// DATE("日期","date");
|
||||
//属性类型 1输入框(字符串),2输入框(数字),3单选下拉框,4多选下拉框,5单日期选择,6多日期选择,7文件,8文本框,9人员选择,10标准选择
|
||||
TREE("树形结构","0"),
|
||||
TEXT_STRING("输入框(字符串)","1"),
|
||||
TEXT_NUMBER("输入框(数字)","2"),
|
||||
PULL_SINGLE("单选下拉框","3"),
|
||||
|
||||
+25
-10
@@ -29,13 +29,12 @@ import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysAnnouncementSend;
|
||||
import com.jero.modules.system.entity.SysCategoryTreeVO;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementSendService;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
import com.jero.modules.tag.service.impl.OnlCgformAreaServiceImpl;
|
||||
@@ -112,6 +111,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private DomainUserRelService domainUserRelService;
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -258,13 +259,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea);
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
//过滤出字段为树形结构的
|
||||
List<OnlCgformField> onlCgformFieldTree = fieldList.stream().filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出表单字段(is_show_form-->表单是否显示0否 1是)
|
||||
if ("add".equals(type)) {
|
||||
//新增时,被代替标准在表单中不显示
|
||||
//新增时,被代替标准在表单中不显示.
|
||||
fieldList = fieldList.stream()
|
||||
.filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm())) && !e.getDbFieldName().equals("replaced_standard"))
|
||||
.filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm())) && !"replaced_standard" .equals(e.getDbFieldName()))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
fieldList = fieldList.stream()
|
||||
@@ -273,6 +276,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||
String areaName = "";
|
||||
@@ -283,8 +288,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
List<OnlCgformField> fieldListTemp = fieldList.stream().filter(e -> onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList());
|
||||
for (OnlCgformField onlCgformField : fieldListTemp) {
|
||||
String dictId = onlCgformField.getDictId();
|
||||
List<SysCategoryTreeVO> sysCategoryTreeVOList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(dictId)){
|
||||
sysCategoryTreeVOList = sysCategoryTree.stream().filter(e -> dictId.equals(e.getDictId())).collect(Collectors.toList());
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName);
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,sysCategoryTreeVOList);
|
||||
map.put("field_must_input", onlCgformField.getFieldMustInput());//区域
|
||||
result.add(map);
|
||||
}
|
||||
@@ -479,14 +489,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
for (OSSFile fileInfo : fileInfos) {
|
||||
Map<String, Object> mapNew = new HashMap<>();
|
||||
mapNew.put("value", fileInfo);
|
||||
mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName);
|
||||
mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,null);
|
||||
resultTemp.add(mapNew);
|
||||
}
|
||||
}
|
||||
} else if (fileInfos.size() == 1) {
|
||||
//单个文件处理
|
||||
map.put("value", fileInfos.get(0));
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName);
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,null);
|
||||
resultTemp.add(map);
|
||||
}
|
||||
}
|
||||
@@ -513,7 +523,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
});
|
||||
}
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName);
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,null);
|
||||
}
|
||||
if (map.size() != 0) {
|
||||
resultTemp.add(map);
|
||||
@@ -531,7 +541,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
return result;
|
||||
}
|
||||
|
||||
private void mapPut(String cut, Map<String, Object> map, String field_show_type, String fieldShowType2, String dict_field, String dictField, String db_field_name, String dbFieldName2, String db_field_txt, String dbFieldTxt, String db_field_en_name, String dbFieldEnName, String area, String showArea) {
|
||||
private void mapPut(String cut, Map<String, Object> map, String field_show_type,
|
||||
String fieldShowType2, String dict_field, String dictField,
|
||||
String db_field_name, String dbFieldName2, String db_field_txt,
|
||||
String dbFieldTxt, String db_field_en_name, String dbFieldEnName,
|
||||
String area, String showArea,List<SysCategoryTreeVO> sysCategoryTreeVOS) {
|
||||
map.put(field_show_type, fieldShowType2);//类型(判断是下拉还是输入框,等等)
|
||||
map.put(dict_field, dictField);
|
||||
map.put(db_field_name, dbFieldName2);//字段
|
||||
@@ -545,6 +559,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
map.put(db_field_txt, dbFieldTxt);//字段中文名
|
||||
}
|
||||
map.put(area, showArea);//区域
|
||||
map.put("tree", sysCategoryTreeVOS);//区域
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-1
@@ -64,7 +64,8 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
QueryWrapper<OnlCgformTag> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformTag, req.getParameterMap());
|
||||
Page<OnlCgformTag> page = new Page<OnlCgformTag>(pageNo, pageSize);
|
||||
if(StringUtils.isNotBlank("create_time")) {
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("create_time").eq("is_show_list",1)
|
||||
.eq("cgform_head_id","48308196e7b04761b533dc31bc899707");//筛选文档库数据
|
||||
}
|
||||
IPage<OnlCgformTag> pageList = onlCgformTagService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
@@ -125,6 +126,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
} else {
|
||||
onlCgformTag.setCreateTime(new Date());
|
||||
onlCgformTag.setIsDelete(CommonConstant.DEL_FLAG_0);
|
||||
onlCgformTag.setCgformHeadId("48308196e7b04761b533dc31bc899707");//设置文档库-表id
|
||||
onlCgformTagService.add(onlCgformTag);
|
||||
}
|
||||
return Result.OK("添加成功!");
|
||||
|
||||
+10
-5
@@ -62,6 +62,12 @@ public class OnlCgformTag implements Serializable {
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**文档库-表id*/
|
||||
@Excel(name = "文档库-表id", width = 15,dictTable = "onl_cgform_field", dicText = "cgform_head_id", dicCode = "cgform_head_id")
|
||||
@Dict(dictTable = "onl_cgform_field", dicText = "cgform_head_id", dicCode = "cgform_head_id")
|
||||
@ApiModelProperty(value = "文档库-表id")
|
||||
private java.lang.String cgformHeadId;
|
||||
|
||||
/**所属模块(1文档库,0文档拆分)*/
|
||||
@Excel(name = "所属模块(1文档库,0文档拆分", width = 15, dicCode = "module")
|
||||
@Dict(dicCode = "module")
|
||||
@@ -87,12 +93,11 @@ public class OnlCgformTag implements Serializable {
|
||||
@ApiModelProperty(value = "表单控件类型")
|
||||
private java.lang.String fieldShowType;
|
||||
|
||||
/**字典名称*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "字典名称", width = 15, dictTable = "sys_dict", dicText = "dict_name", dicCode = "dict_name")
|
||||
@Dict(dictTable = "sys_dict", dicText = "dict_name", dicCode = "dict_name")
|
||||
/**字典id*/
|
||||
@Excel(name = "字典id", width = 15, dictTable = "onl_cgform_field", dicText = "dict_id", dicCode = "dict_id")
|
||||
@Dict(dictTable = "onl_cgform_field", dicText = "dict_id", dicCode = "dict_id")
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
private java.lang.String dictName;
|
||||
private java.lang.String dictId;
|
||||
|
||||
/**数据库字段长度*/
|
||||
@Excel(name = "数据库字段长度", width = 15,dictTable = "onl_cgform_field", dicText = "db_length", dicCode = "db_length")
|
||||
|
||||
Reference in New Issue
Block a user