文档库
查询条件,列表表头,新增表单,详情,编辑表单及数据
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.jero.common.constant.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/1/21 15:02
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public enum TableEnum {
|
||||||
|
BUSS_DOCUMENT_LIBRARY("buss_document_library");
|
||||||
|
|
||||||
|
String table;
|
||||||
|
|
||||||
|
private TableEnum(String table) {
|
||||||
|
this.table = table;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTable() {
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable(String table) {
|
||||||
|
this.table = table;
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package com.jero.common.constant.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/1/21 15:22
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public enum YesOrNo {
|
||||||
|
NO("否","0"),
|
||||||
|
YES("是","1");
|
||||||
|
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
private YesOrNo(String name,String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
package com.jero.common.constant.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/1/21 16:42
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public enum moduleEnum {
|
||||||
|
DOCUMENT_LIBRARY("文档管理","1");
|
||||||
|
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
private moduleEnum(String name,String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
@@ -18,6 +18,7 @@ public class OnlCgformField implements Serializable {
|
|||||||
private String id;
|
private String id;
|
||||||
private String cgformHeadId;
|
private String cgformHeadId;
|
||||||
private String dbFieldName;
|
private String dbFieldName;
|
||||||
|
private String dbFieldEnName;//db_field_en_name
|
||||||
private String dbFieldTxt;
|
private String dbFieldTxt;
|
||||||
private String dbFieldNameOld;
|
private String dbFieldNameOld;
|
||||||
private Integer dbIsKey;
|
private Integer dbIsKey;
|
||||||
@@ -45,6 +46,7 @@ public class OnlCgformField implements Serializable {
|
|||||||
private String mainField;
|
private String mainField;
|
||||||
private Integer orderNum;
|
private Integer orderNum;
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
private String showArea;
|
||||||
@JsonFormat(
|
@JsonFormat(
|
||||||
timezone = "GMT+8",
|
timezone = "GMT+8",
|
||||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
@@ -73,6 +75,22 @@ public class OnlCgformField implements Serializable {
|
|||||||
private String queryMustInput;
|
private String queryMustInput;
|
||||||
private String sortFlag;
|
private String sortFlag;
|
||||||
|
|
||||||
|
public String getShowArea() {
|
||||||
|
return showArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowArea(String showArea) {
|
||||||
|
this.showArea = showArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDbFieldEnName() {
|
||||||
|
return dbFieldEnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDbFieldEnName(String dbFieldEnName) {
|
||||||
|
this.dbFieldEnName = dbFieldEnName;
|
||||||
|
}
|
||||||
|
|
||||||
public OnlCgformField() {
|
public OnlCgformField() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -42,4 +42,6 @@ public interface OnlCgformFieldMapper extends BaseMapper<OnlCgformField> {
|
|||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@Deprecated
|
@Deprecated
|
||||||
List<TreeModel> queryDataListByLinkDown(@Param("query") LinkDown var1);
|
List<TreeModel> queryDataListByLinkDown(@Param("query") LinkDown var1);
|
||||||
|
|
||||||
|
List<OnlCgformField> getFieldList(@Param("tableName") String tableName);
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-17
@@ -11,32 +11,32 @@
|
|||||||
<select id="queryCountBySql" parameterType="java.lang.String" resultType="java.lang.Integer">
|
<select id="queryCountBySql" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 执行保存语句 -->
|
<!-- 执行保存语句 -->
|
||||||
<insert id="saveFormData" parameterType="java.lang.String">
|
<insert id="saveFormData" parameterType="java.lang.String">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<!-- 执行编辑语句 -->
|
<!-- 执行编辑语句 -->
|
||||||
<update id="editFormData" parameterType="java.lang.String">
|
<update id="editFormData" parameterType="java.lang.String">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 执行select form语句 -->
|
<!-- 执行select form语句 -->
|
||||||
<select id="queryFormData" parameterType="java.lang.String" resultType="java.util.HashMap">
|
<select id="queryFormData" parameterType="java.lang.String" resultType="java.util.HashMap">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 执行select 查询集合 -->
|
<!-- 执行select 查询集合 -->
|
||||||
<select id="queryListData" parameterType="java.lang.String" resultType="java.util.HashMap">
|
<select id="queryListData" parameterType="java.lang.String" resultType="java.util.HashMap">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 执行delete 删除数据 -->
|
<!-- 执行delete 删除数据 -->
|
||||||
<delete id="deleteAutoList" parameterType="java.lang.String">
|
<delete id="deleteAutoList" parameterType="java.lang.String">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 执行select 分页查询集合 -->
|
<!-- 执行select 分页查询集合 -->
|
||||||
<select id="selectPageBySql" parameterType="java.lang.String" resultType="java.util.HashMap">
|
<select id="selectPageBySql" parameterType="java.lang.String" resultType="java.util.HashMap">
|
||||||
${sqlStr}
|
${sqlStr}
|
||||||
@@ -46,19 +46,19 @@
|
|||||||
<update id="executeUpdatetSQL" parameterType="java.util.Map">
|
<update id="executeUpdatetSQL" parameterType="java.util.Map">
|
||||||
${execute_sql_string}
|
${execute_sql_string}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 执行insert语句 据说可以防注入 -->
|
<!-- 执行insert语句 据说可以防注入 -->
|
||||||
<insert id="executeInsertSQL" parameterType="java.util.Map">
|
<insert id="executeInsertSQL" parameterType="java.util.Map">
|
||||||
${execute_sql_string}
|
${execute_sql_string}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<!-- 查询不被权限控制隐藏的列 -->
|
<!-- 查询不被权限控制隐藏的列 -->
|
||||||
<select id="selectOnlineHideColumns" resultType="java.lang.String">
|
<select id="selectOnlineHideColumns" resultType="java.lang.String">
|
||||||
select t.perms from sys_permission t where menu_type = 2 and t.perms like #{online_tbname}
|
select t.perms from sys_permission t where menu_type = 2 and t.perms like #{online_tbname}
|
||||||
and (t.perms_type = '0'
|
and (t.perms_type = '0'
|
||||||
or (t.perms_type = '1'
|
or (t.perms_type = '1'
|
||||||
and NOT EXISTS(
|
and NOT EXISTS(
|
||||||
select * from sys_user a
|
select * from sys_user a
|
||||||
join sys_user_role b on a.id = b.user_id
|
join sys_user_role b on a.id = b.user_id
|
||||||
join sys_role c on c.id = b.role_id
|
join sys_role c on c.id = b.role_id
|
||||||
join sys_role_permission d on d.role_id = c. id
|
join sys_role_permission d on d.role_id = c. id
|
||||||
@@ -67,13 +67,13 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询disabled的列 -->
|
<!-- 查询disabled的列 -->
|
||||||
<select id="selectOnlineDisabledColumns" resultType="java.lang.String">
|
<select id="selectOnlineDisabledColumns" resultType="java.lang.String">
|
||||||
select t.perms from sys_permission t where menu_type = 2 and t.perms like #{online_tbname}
|
select t.perms from sys_permission t where menu_type = 2 and t.perms like #{online_tbname}
|
||||||
and t.perms_type = '2'
|
and t.perms_type = '2'
|
||||||
and NOT EXISTS(
|
and NOT EXISTS(
|
||||||
select * from sys_user a
|
select * from sys_user a
|
||||||
join sys_user_role b on a.id = b.user_id
|
join sys_user_role b on a.id = b.user_id
|
||||||
join sys_role c on c.id = b.role_id
|
join sys_role c on c.id = b.role_id
|
||||||
join sys_role_permission d on d.role_id = c. id
|
join sys_role_permission d on d.role_id = c. id
|
||||||
@@ -120,4 +120,11 @@
|
|||||||
</choose>
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
<select id="getFieldList" resultType="com.jero.generater.modules.online.cgform.entity.OnlCgformField">
|
||||||
|
select * from onl_cgform_field ocf
|
||||||
|
left join onl_cgform_head och on ocf.cgform_head_id = och.id
|
||||||
|
where table_name =#{tableName}
|
||||||
|
order by order_num asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|||||||
+14
@@ -14,6 +14,8 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.jero.common.constant.enums.TableEnum;
|
||||||
|
import com.jero.common.constant.enums.moduleEnum;
|
||||||
import com.jero.common.system.util.JeroDataAutorUtils;
|
import com.jero.common.system.util.JeroDataAutorUtils;
|
||||||
import com.jero.generater.modules.online.auth.mapper.OnlAuthDataMapper;
|
import com.jero.generater.modules.online.auth.mapper.OnlAuthDataMapper;
|
||||||
import com.jero.generater.modules.online.auth.service.IOnlAuthPageService;
|
import com.jero.generater.modules.online.auth.service.IOnlAuthPageService;
|
||||||
@@ -810,4 +812,16 @@ public class OnlCgformFieldServiceImpl extends ServiceImpl<OnlCgformFieldMapper,
|
|||||||
|
|
||||||
return var4;
|
return var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据table_name查询字段
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<OnlCgformField> getFieldList(String flag){
|
||||||
|
List<OnlCgformField> fieldList = new ArrayList<>();
|
||||||
|
if(moduleEnum.DOCUMENT_LIBRARY.getValue().equals(flag)){
|
||||||
|
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable());
|
||||||
|
}
|
||||||
|
return fieldList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -110,6 +110,7 @@ public class OnlCgformHeadServiceImpl extends ServiceImpl<OnlCgformHeadMapper, O
|
|||||||
|
|
||||||
for(int var6 = 0; var6 < var4.size(); ++var6) {
|
for(int var6 = 0; var6 < var4.size(); ++var6) {
|
||||||
OnlCgformField var7 = (OnlCgformField)var4.get(var6);
|
OnlCgformField var7 = (OnlCgformField)var4.get(var6);
|
||||||
|
var7.setDbFieldEnName("aaaa");
|
||||||
var7.setId((String)null);
|
var7.setId((String)null);
|
||||||
var7.setCgformHeadId(var2);
|
var7.setCgformHeadId(var2);
|
||||||
if (var7.getOrderNum() == null) {
|
if (var7.getOrderNum() == null) {
|
||||||
|
|||||||
+226
@@ -0,0 +1,226 @@
|
|||||||
|
package com.jero.modules.document.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 文档库信息表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-01-21
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="文档库信息表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/document/bussDocumentLibraryEO")
|
||||||
|
@Slf4j
|
||||||
|
public class BussDocumentLibraryEOController extends JeroController<BussDocumentLibraryEO, IBussDocumentLibraryEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-分页列表查询")
|
||||||
|
@ApiOperation(value="文档库信息表-分页列表查询", notes="文档库信息表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
|
||||||
|
Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(pageNo, pageSize);
|
||||||
|
IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-列表查询")
|
||||||
|
@ApiOperation(value="文档库信息表-列表查询", notes="文档库信息表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<BussDocumentLibraryEO>> queryList() {
|
||||||
|
List<BussDocumentLibraryEO> list = bussDocumentLibraryEOService.queryList();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-添加")
|
||||||
|
@ApiOperation(value="文档库信息表-添加", notes="文档库信息表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||||
|
bussDocumentLibraryEOService.add(bussDocumentLibraryEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-编辑")
|
||||||
|
@ApiOperation(value="文档库信息表-编辑", notes="文档库信息表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||||
|
bussDocumentLibraryEOService.editById(bussDocumentLibraryEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-通过id删除")
|
||||||
|
@ApiOperation(value="文档库信息表-通过id删除", notes="文档库信息表-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
bussDocumentLibraryEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-批量删除")
|
||||||
|
@ApiOperation(value="文档库信息表-批量删除", notes="文档库信息表-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.bussDocumentLibraryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-通过id查询")
|
||||||
|
@ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
||||||
|
if(bussDocumentLibraryEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(bussDocumentLibraryEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||||
|
return super.exportXls(request, bussDocumentLibraryEO, BussDocumentLibraryEO.class, "文档库信息表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, BussDocumentLibraryEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询条件
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-查询条件")
|
||||||
|
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||||
|
@GetMapping(value = "/queryCondition")
|
||||||
|
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag) {
|
||||||
|
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryCondition(flag);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 列表表头
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-列表表头")
|
||||||
|
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||||
|
@GetMapping(value = "/getHeader")
|
||||||
|
public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag) {
|
||||||
|
List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新增表单
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档库信息表-新增表单")
|
||||||
|
@ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
||||||
|
@GetMapping(value = "/getAddForm")
|
||||||
|
public Result<List<Map<String,Object>>> getAddForm(@RequestParam(name="flag",required=true) String flag) {
|
||||||
|
List<Map<String, Object>> list = bussDocumentLibraryEOService.getAddForm(flag);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情,编辑数据查询
|
||||||
|
* @param id
|
||||||
|
* @param flag 标识-->用于区分字段查询(根据表名)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "详情,编辑数据查询")
|
||||||
|
@ApiOperation(value="详情,编辑数据查询", notes="详情,编辑数据查询")
|
||||||
|
@GetMapping(value = "/getDocumentInfoById")
|
||||||
|
public Result<List<Map<String,Object>>> getDocumentInfoById(@RequestParam(name="id",required=true) String id,
|
||||||
|
@RequestParam(name="flag",required=true) String flag) {
|
||||||
|
List<Map<String, Object>> list = bussDocumentLibraryEOService.getDocumentInfoById(id,flag);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+193
@@ -0,0 +1,193 @@
|
|||||||
|
package com.jero.modules.document.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 文档库信息表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-01-21
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("buss_document_library")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="buss_document_library对象", description="文档库信息表")
|
||||||
|
public class BussDocumentLibraryEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@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 createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@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 = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**适用地区*/
|
||||||
|
@Excel(name = "适用地区", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用地区")
|
||||||
|
private java.lang.String region;
|
||||||
|
|
||||||
|
/**类别*/
|
||||||
|
@Excel(name = "类别", width = 15)
|
||||||
|
@ApiModelProperty(value = "类别")
|
||||||
|
private java.lang.String type;
|
||||||
|
|
||||||
|
/**标准体系*/
|
||||||
|
@Excel(name = "标准体系", width = 15)
|
||||||
|
@ApiModelProperty(value = "标准体系")
|
||||||
|
private java.lang.String standardSystem;
|
||||||
|
|
||||||
|
/**状态*/
|
||||||
|
@Excel(name = "状态", width = 15)
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private java.lang.String state;
|
||||||
|
|
||||||
|
/**适用车型*/
|
||||||
|
@Excel(name = "适用车型", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用车型")
|
||||||
|
private java.lang.String carType;
|
||||||
|
|
||||||
|
/**能源种类*/
|
||||||
|
@Excel(name = "能源种类", width = 15)
|
||||||
|
@ApiModelProperty(value = "能源种类")
|
||||||
|
private java.lang.String energyType;
|
||||||
|
|
||||||
|
/**适用范围*/
|
||||||
|
@Excel(name = "适用范围", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用范围")
|
||||||
|
private java.lang.String applyScope;
|
||||||
|
|
||||||
|
/**功能领域*/
|
||||||
|
@Excel(name = "功能领域", width = 15)
|
||||||
|
@ApiModelProperty(value = "功能领域")
|
||||||
|
private java.lang.String functionTerritory;
|
||||||
|
|
||||||
|
/**技术领域*/
|
||||||
|
@Excel(name = "技术领域", width = 15)
|
||||||
|
@ApiModelProperty(value = "技术领域")
|
||||||
|
private java.lang.String technologyTerritory;
|
||||||
|
|
||||||
|
/**编号*/
|
||||||
|
@Excel(name = "编号", width = 15)
|
||||||
|
@ApiModelProperty(value = "编号")
|
||||||
|
private java.lang.String serialNumber;
|
||||||
|
|
||||||
|
/**标题*/
|
||||||
|
@Excel(name = "标题", width = 15)
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private java.lang.String title;
|
||||||
|
|
||||||
|
/**发布日期*/
|
||||||
|
@Excel(name = "发布日期", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "发布日期")
|
||||||
|
private java.util.Date issueTime;
|
||||||
|
|
||||||
|
/**标准实施日期*/
|
||||||
|
@Excel(name = "标准实施日期", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "标准实施日期")
|
||||||
|
private java.util.Date implementTime;
|
||||||
|
|
||||||
|
/**代替标准*/
|
||||||
|
@Excel(name = "代替标准", width = 15)
|
||||||
|
@ApiModelProperty(value = "代替标准")
|
||||||
|
private java.lang.String replaceStandard;
|
||||||
|
|
||||||
|
/**被代替标准*/
|
||||||
|
@Excel(name = "被代替标准", width = 15)
|
||||||
|
@ApiModelProperty(value = "被代替标准")
|
||||||
|
private java.lang.String replacedStandard;
|
||||||
|
|
||||||
|
/**描述*/
|
||||||
|
@Excel(name = "描述", width = 15)
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private java.lang.String description;
|
||||||
|
|
||||||
|
/**对应标准*/
|
||||||
|
@Excel(name = "对应标准", width = 15)
|
||||||
|
@ApiModelProperty(value = "对应标准")
|
||||||
|
private java.lang.String correspondingStandard;
|
||||||
|
|
||||||
|
/**测试程序*/
|
||||||
|
@Excel(name = "测试程序", width = 15)
|
||||||
|
@ApiModelProperty(value = "测试程序")
|
||||||
|
private java.lang.String testProgram;
|
||||||
|
|
||||||
|
/**发布稿(必读)*/
|
||||||
|
@Excel(name = "发布稿(必读)", width = 15)
|
||||||
|
@ApiModelProperty(value = "发布稿(必读)")
|
||||||
|
private java.lang.String releaseDraft;
|
||||||
|
|
||||||
|
/**增补件(必读)*/
|
||||||
|
@Excel(name = "增补件(必读)", width = 15)
|
||||||
|
@ApiModelProperty(value = "增补件(必读)")
|
||||||
|
private java.lang.String supplement;
|
||||||
|
|
||||||
|
/**报批稿*/
|
||||||
|
@Excel(name = "报批稿", width = 15)
|
||||||
|
@ApiModelProperty(value = "报批稿")
|
||||||
|
private java.lang.String approvalDraft;
|
||||||
|
|
||||||
|
/**征求意见稿*/
|
||||||
|
@Excel(name = "征求意见稿", width = 15)
|
||||||
|
@ApiModelProperty(value = "征求意见稿")
|
||||||
|
private java.lang.String exposureDraft;
|
||||||
|
|
||||||
|
/**相关资料*/
|
||||||
|
@Excel(name = "相关资料", width = 15)
|
||||||
|
@ApiModelProperty(value = "相关资料")
|
||||||
|
private java.lang.String datum;
|
||||||
|
|
||||||
|
/**预警标识*/
|
||||||
|
@Excel(name = "预警标识", width = 15)
|
||||||
|
@ApiModelProperty(value = "预警标识")
|
||||||
|
private java.lang.String warnFlag;
|
||||||
|
|
||||||
|
/**订阅标志*/
|
||||||
|
@Excel(name = "订阅标志", width = 15)
|
||||||
|
@ApiModelProperty(value = "订阅标志")
|
||||||
|
private java.lang.String readFlag;
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.document.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 文档库信息表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-01-21
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface BussDocumentLibraryEOMapper extends BaseMapper<BussDocumentLibraryEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.document.mapper.BussDocumentLibraryEOMapper">
|
||||||
|
<resultMap id="BussDocumentLibraryEOResultMap" type="com.jero.modules.document.entity.BussDocumentLibraryEO">
|
||||||
|
<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="region" property="region" />
|
||||||
|
<result column="type" property="type" />
|
||||||
|
<result column="standard_system" property="standardSystem" />
|
||||||
|
<result column="state" property="state" />
|
||||||
|
<result column="car_type" property="carType" />
|
||||||
|
<result column="energy_type" property="energyType" />
|
||||||
|
<result column="apply_scope" property="applyScope" />
|
||||||
|
<result column="function_territory" property="functionTerritory" />
|
||||||
|
<result column="technology_territory" property="technologyTerritory" />
|
||||||
|
<result column="serial_number" property="serialNumber" />
|
||||||
|
<result column="title" property="title" />
|
||||||
|
<result column="issue_time" property="issueTime" />
|
||||||
|
<result column="implement_time" property="implementTime" />
|
||||||
|
<result column="replace_standard" property="replaceStandard" />
|
||||||
|
<result column="replaced_standard" property="replacedStandard" />
|
||||||
|
<result column="description" property="description" />
|
||||||
|
<result column="corresponding_standard" property="correspondingStandard" />
|
||||||
|
<result column="test_program" property="testProgram" />
|
||||||
|
<result column="release_draft" property="releaseDraft" />
|
||||||
|
<result column="supplement" property="supplement" />
|
||||||
|
<result column="approval_draft" property="approvalDraft" />
|
||||||
|
<result column="exposure_draft" property="exposureDraft" />
|
||||||
|
<result column="datum" property="datum" />
|
||||||
|
<result column="warn_flag" property="warnFlag" />
|
||||||
|
<result column="read_flag" property="readFlag" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
package com.jero.modules.document.service;
|
||||||
|
|
||||||
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 文档库信息表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-01-21
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibraryEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(BussDocumentLibraryEO bussDocumentLibraryEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(BussDocumentLibraryEO bussDocumentLibraryEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BussDocumentLibraryEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BussDocumentLibraryEO> queryList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String,Object>> queryCondition(String flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表表头
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String,Object>> getHeader(String flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增表单
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String,Object>> getAddForm(String flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情,编辑数据查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String,Object>> getDocumentInfoById(String id,String flag);
|
||||||
|
}
|
||||||
+232
@@ -0,0 +1,232 @@
|
|||||||
|
package com.jero.modules.document.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.common.constant.enums.YesOrNo;
|
||||||
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
|
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||||
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
|
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||||
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
|
import com.jero.modules.tag.service.impl.OnlCgformAreaServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 文档库信息表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-01-21
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLibraryEOMapper, BussDocumentLibraryEO> implements IBussDocumentLibraryEOService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||||
|
@Autowired
|
||||||
|
private OnlCgformAreaServiceImpl onlCgformAreaServiceImpl;
|
||||||
|
@Autowired
|
||||||
|
private BussDocumentLibraryEOMapper bussDocumentLibraryEOMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
bussDocumentLibraryEO.setCreateTime(now);
|
||||||
|
bussDocumentLibraryEO.setUpdateTime(now);
|
||||||
|
save(bussDocumentLibraryEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param bussDocumentLibraryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(BussDocumentLibraryEO bussDocumentLibraryEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
bussDocumentLibraryEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(bussDocumentLibraryEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BussDocumentLibraryEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BussDocumentLibraryEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> queryCondition(String flag) {
|
||||||
|
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||||
|
if(fieldList.size() != 0){
|
||||||
|
//过滤出搜索条件()
|
||||||
|
fieldList = fieldList.stream().filter(e-> YesOrNo.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",onlCgformField.getDbFieldName());//字段
|
||||||
|
map.put("db_field_txt",onlCgformField.getDbFieldTxt());//字段中文名
|
||||||
|
map.put("db_field_en_name",onlCgformField.getDbFieldEnName());//字段英文名
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表表头
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getHeader(String flag) {
|
||||||
|
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||||
|
if(fieldList.size() != 0){
|
||||||
|
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||||
|
fieldList = fieldList.stream().filter(e-> YesOrNo.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<>();
|
||||||
|
map.put("db_field_name",onlCgformField.getDbFieldName());//字段
|
||||||
|
map.put("db_field_txt",onlCgformField.getDbFieldTxt());//字段中文名
|
||||||
|
map.put("db_field_en_name",onlCgformField.getDbFieldEnName());//字段英文名
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增表单
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String,Object>> getAddForm(String flag) {
|
||||||
|
//区域管理
|
||||||
|
List<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList();
|
||||||
|
//字段属性
|
||||||
|
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||||
|
|
||||||
|
if(fieldList.size() != 0){
|
||||||
|
//过滤出表单字段(is_show_form-->表单是否显示0否 1是)
|
||||||
|
fieldList = fieldList.stream().filter(e-> YesOrNo.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
List<Map<String,Object>> result = new ArrayList<>();
|
||||||
|
for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||||
|
fieldList = fieldList.stream().filter(e->onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList());
|
||||||
|
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",onlCgformField.getDbFieldName());//字段
|
||||||
|
map.put("db_field_txt",onlCgformField.getDbFieldTxt());//字段中文名
|
||||||
|
map.put("db_field_en_name",onlCgformField.getDbFieldEnName());//字段英文名
|
||||||
|
map.put("area",onlCgformAreaTemp.getShowArea());//区域
|
||||||
|
result.add(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情,编辑数据查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String,Object>> getDocumentInfoById(String id,String flag) {
|
||||||
|
LambdaQueryWrapper<BussDocumentLibraryEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(BussDocumentLibraryEO::getId,id);
|
||||||
|
//通过id查询数据
|
||||||
|
List<Map<String, Object>> dateList = bussDocumentLibraryEOMapper.selectMaps(queryWrapper);
|
||||||
|
//区域管理
|
||||||
|
List<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList();
|
||||||
|
//字段属性
|
||||||
|
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||||
|
|
||||||
|
if(fieldList.size() != 0){
|
||||||
|
//过滤出表单字段(is_show_form-->表单是否显示0否 1是)
|
||||||
|
fieldList = fieldList.stream().filter(e-> YesOrNo.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
List<Map<String,Object>> result = new ArrayList<>();
|
||||||
|
for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||||
|
fieldList = fieldList.stream().filter(e->onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList());
|
||||||
|
for (OnlCgformField onlCgformField : fieldList) {
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
if(dateList.size() != 0){
|
||||||
|
dateList.get(0).entrySet().forEach(entry->{
|
||||||
|
if(onlCgformField.getDbFieldName().equals(entry.getKey())){
|
||||||
|
map.put("value",entry.getValue());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
map.put("field_show_type",onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||||
|
map.put("dict_field",onlCgformField.getDictField());
|
||||||
|
map.put("db_field_name",onlCgformField.getDbFieldName());//字段
|
||||||
|
map.put("db_field_txt",onlCgformField.getDbFieldTxt());//字段中文名
|
||||||
|
map.put("db_field_en_name",onlCgformField.getDbFieldEnName());//字段英文名
|
||||||
|
map.put("area",onlCgformAreaTemp.getShowArea());//区域
|
||||||
|
result.add(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
+240
@@ -0,0 +1,240 @@
|
|||||||
|
<template>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- 查询区域 -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- 查询区域-END -->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportXls('文档库信息表')">导出</a-button>
|
||||||
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
|
</a-upload>
|
||||||
|
<!-- 高级查询区域 -->
|
||||||
|
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<a-menu slot="overlay">
|
||||||
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table区域-begin -->
|
||||||
|
<div>
|
||||||
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||||
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
||||||
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
:scroll="{x:true}"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
|
class="j-table-force-nowrap"
|
||||||
|
@change="handleTableChange">
|
||||||
|
|
||||||
|
<template slot="htmlSlot" slot-scope="text">
|
||||||
|
<div v-html="text"></div>
|
||||||
|
</template>
|
||||||
|
<template slot="imgSlot" slot-scope="text">
|
||||||
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||||
|
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||||
|
</template>
|
||||||
|
<template slot="fileSlot" slot-scope="text">
|
||||||
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||||
|
<a-button
|
||||||
|
v-else
|
||||||
|
:ghost="true"
|
||||||
|
type="primary"
|
||||||
|
icon="download"
|
||||||
|
size="small"
|
||||||
|
@click="downloadFile(text)">
|
||||||
|
下载
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a-dropdown>
|
||||||
|
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
||||||
|
<a-menu slot="overlay">
|
||||||
|
<a-menu-item>
|
||||||
|
<a @click="handleDetail(record)">详情</a>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item>
|
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||||
|
<a>删除</a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</a-dropdown>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<buss-document-library-e-o-modal ref="modalForm" @ok="modalFormOk"></buss-document-library-e-o-modal>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less'
|
||||||
|
import { mixinDevice } from '@/utils/mixin'
|
||||||
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import BussDocumentLibraryEOModal from './modules/BussDocumentLibraryEOModal'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'BussDocumentLibraryEOList',
|
||||||
|
mixins:[JeroListMixin, mixinDevice],
|
||||||
|
components: {
|
||||||
|
BussDocumentLibraryEOModal
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
description: '文档库信息表管理页面',
|
||||||
|
// 表头
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '#',
|
||||||
|
dataIndex: '',
|
||||||
|
key:'rowIndex',
|
||||||
|
width:60,
|
||||||
|
align:"center",
|
||||||
|
customRender:function (t,r,index) {
|
||||||
|
return parseInt(index)+1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'适用地区',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'region_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'状态',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'state_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'功能领域',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'functionTerritory_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'技术领域',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'technologyTerritory_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'编号',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'serialNumber'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'标题',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'title'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'发布日期',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'issueTime',
|
||||||
|
customRender:function (text) {
|
||||||
|
return !text?"":(text.length>10?text.substr(0,10):text)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'标准实施日期',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'implementTime',
|
||||||
|
customRender:function (text) {
|
||||||
|
return !text?"":(text.length>10?text.substr(0,10):text)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'报批稿',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'approvalDraft',
|
||||||
|
scopedSlots: {customRender: 'fileSlot'}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align:"center",
|
||||||
|
fixed:"right",
|
||||||
|
width:147,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: {
|
||||||
|
list: "/document/bussDocumentLibraryEO/page",
|
||||||
|
delete: "/document/bussDocumentLibraryEO/delete",
|
||||||
|
deleteBatch: "/document/bussDocumentLibraryEO/deleteBatch",
|
||||||
|
exportXlsUrl: "/document/bussDocumentLibraryEO/exportXls",
|
||||||
|
importExcelUrl: "document/bussDocumentLibraryEO/importExcel",
|
||||||
|
|
||||||
|
},
|
||||||
|
dictOptions:{},
|
||||||
|
superFieldList:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getSuperFieldList();
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
importExcelUrl: function(){
|
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initDictConfig(){
|
||||||
|
},
|
||||||
|
getSuperFieldList(){
|
||||||
|
let fieldList=[];
|
||||||
|
fieldList.push({type:'list_multi',value:'region',text:'适用地区',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'type',text:'类别',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'standardSystem',text:'标准体系',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'state',text:'状态',dictCode:''})
|
||||||
|
fieldList.push({type:'list_multi',value:'carType',text:'适用车型',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'list_multi',value:'energyType',text:'能源种类',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'list_multi',value:'applyScope',text:'适用范围',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'list_multi',value:'functionTerritory',text:'功能领域',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'list_multi',value:'technologyTerritory',text:'技术领域',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'serialNumber',text:'编号',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'title',text:'标题',dictCode:''})
|
||||||
|
fieldList.push({type:'date',value:'issueTime',text:'发布日期'})
|
||||||
|
fieldList.push({type:'date',value:'implementTime',text:'标准实施日期'})
|
||||||
|
fieldList.push({type:'list_multi',value:'replaceStandard',text:'代替标准',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'list_multi',value:'replacedStandard',text:'被代替标准',dictTable:'', dictText:'', dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'correspondingStandard',text:'对应标准',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'testProgram',text:'测试程序',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'releaseDraft',text:'发布稿(必读)',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'supplement',text:'增补件(必读)',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'approvalDraft',text:'报批稿',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'exposureDraft',text:'征求意见稿',dictCode:''})
|
||||||
|
fieldList.push({type:'string',value:'datum',text:'相关资料',dictCode:''})
|
||||||
|
this.superFieldList = fieldList
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
</style>
|
||||||
+264
@@ -0,0 +1,264 @@
|
|||||||
|
<template>
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<j-form-container :disabled="formDisabled">
|
||||||
|
<a-form :form="form" slot="detail">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="适用地区" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['region']" :trigger-change="true" dictCode="" placeholder="请选择适用地区" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag type="list" v-decorator="['type']" :trigger-change="true" dictCode="" placeholder="请选择类别" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="标准体系" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag type="list" v-decorator="['standardSystem']" :trigger-change="true" dictCode="" placeholder="请选择标准体系" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag type="list" v-decorator="['state']" :trigger-change="true" dictCode="" placeholder="请选择状态" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="适用车型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['carType']" :trigger-change="true" dictCode="" placeholder="请选择适用车型" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="能源种类" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['energyType']" :trigger-change="true" dictCode="" placeholder="请选择能源种类" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="适用范围" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['applyScope']" :trigger-change="true" dictCode="" placeholder="请选择适用范围" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="功能领域" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['functionTerritory']" :trigger-change="true" dictCode="" placeholder="请选择功能领域" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="技术领域" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['technologyTerritory']" :trigger-change="true" dictCode="" placeholder="请选择技术领域" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input v-decorator="['serialNumber']" placeholder="请输入编号" :maxLength="120" ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="标题" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input v-decorator="['title']" placeholder="请输入标题" :maxLength="120" ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="发布日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date date-format="YYYY-MM-DD" show-type="day" placeholder="请选择发布日期" v-decorator="['issueTime']" :trigger-change="true" style="width: 100%" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="标准实施日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date date-format="YYYY-MM-DD" show-type="day" placeholder="请选择标准实施日期" v-decorator="['implementTime']" :trigger-change="true" style="width: 100%" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="代替标准" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['replaceStandard']" :trigger-change="true" dictCode="" placeholder="请选择代替标准" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="被代替标准" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-multi-select-tag type="list_multi" v-decorator="['replacedStandard']" :trigger-change="true" dictCode="" placeholder="请选择被代替标准" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input v-decorator="['description']" placeholder="请输入描述" :maxLength="120" ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="对应标准" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input v-decorator="['correspondingStandard']" placeholder="请输入对应标准" :maxLength="120" ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="测试程序" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload v-decorator="['testProgram']" :trigger-change="true" ></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="发布稿(必读)" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload v-decorator="['releaseDraft']" :trigger-change="true" ></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="增补件(必读)" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload v-decorator="['supplement']" :trigger-change="true" ></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="报批稿" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload v-decorator="['approvalDraft']" :trigger-change="true" ></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="征求意见稿" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload v-decorator="['exposureDraft']" :trigger-change="true" ></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="相关资料" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload v-decorator="['datum']" :trigger-change="true" ></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
|
||||||
|
<a-button @click="submitForm">提 交</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</j-form-container>
|
||||||
|
</a-spin>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { httpAction, getAction } from '@/api/manage'
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import { validateDuplicateValue } from '@/utils/util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'BussDocumentLibraryEOForm',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
//流程表单data
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: ()=>{},
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
//表单模式:true流程表单 false普通表单
|
||||||
|
formBpm: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
//表单禁用
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 },
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 },
|
||||||
|
},
|
||||||
|
confirmLoading: false,
|
||||||
|
validatorRules: {
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: "/document/bussDocumentLibraryEO/add",
|
||||||
|
edit: "/document/bussDocumentLibraryEO/edit",
|
||||||
|
queryById: "/document/bussDocumentLibraryEO/queryById"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
formDisabled(){
|
||||||
|
if(this.formBpm===true){
|
||||||
|
if(this.formData.disabled===false){
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return this.disabled
|
||||||
|
},
|
||||||
|
showFlowSubmitButton(){
|
||||||
|
if(this.formBpm===true){
|
||||||
|
if(this.formData.disabled===false){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
//如果是流程中表单,则需要加载流程表单data
|
||||||
|
this.showFlowData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.edit({});
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.form.resetFields();
|
||||||
|
this.model = Object.assign({}, record);
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model,'region','type','standardSystem','state','carType','energyType','applyScope','functionTerritory','technologyTerritory','serialNumber','title','issueTime','implementTime','replaceStandard','replacedStandard','description','correspondingStandard','testProgram','releaseDraft','supplement','approvalDraft','exposureDraft','datum'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//渲染流程表单数据
|
||||||
|
showFlowData(){
|
||||||
|
if(this.formBpm === true){
|
||||||
|
let params = {id:this.formData.dataId};
|
||||||
|
getAction(this.url.queryById,params).then((res)=>{
|
||||||
|
if(res.success){
|
||||||
|
this.edit (res.result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submitForm () {
|
||||||
|
const that = this;
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
that.confirmLoading = true;
|
||||||
|
let httpurl = '';
|
||||||
|
let method = '';
|
||||||
|
if(!this.model.id){
|
||||||
|
httpurl+=this.url.add;
|
||||||
|
method = 'post';
|
||||||
|
}else{
|
||||||
|
httpurl+=this.url.edit;
|
||||||
|
method = 'put';
|
||||||
|
}
|
||||||
|
let formData = Object.assign(this.model, values);
|
||||||
|
console.log("表单提交数据",formData)
|
||||||
|
httpAction(httpurl,formData,method).then((res)=>{
|
||||||
|
if(res.success){
|
||||||
|
that.$message.success(res.message);
|
||||||
|
that.$emit('ok');
|
||||||
|
}else{
|
||||||
|
that.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.confirmLoading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
popupCallback(row){
|
||||||
|
this.form.setFieldsValue(pick(row,'region','type','standardSystem','state','carType','energyType','applyScope','functionTerritory','technologyTerritory','serialNumber','title','issueTime','implementTime','replaceStandard','replacedStandard','description','correspondingStandard','testProgram','releaseDraft','supplement','approvalDraft','exposureDraft','datum'))
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<buss-document-library-e-o-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></buss-document-library-e-o-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import BussDocumentLibraryEOForm from './BussDocumentLibraryEOForm'
|
||||||
|
export default {
|
||||||
|
name: 'BussDocumentLibraryEOModal',
|
||||||
|
components: {
|
||||||
|
BussDocumentLibraryEOForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
+83
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
:visible="visible">
|
||||||
|
<buss-document-library-e-o-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></buss-document-library-e-o-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import BussDocumentLibraryEOForm from './BussDocumentLibraryEOForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'BussDocumentLibraryEOModal',
|
||||||
|
components: {
|
||||||
|
BussDocumentLibraryEOForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+4
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.tag.service.impl;
|
package com.jero.modules.tag.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
import com.jero.modules.tag.mapper.OnlCgformAreaMapper;
|
import com.jero.modules.tag.mapper.OnlCgformAreaMapper;
|
||||||
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
||||||
@@ -84,6 +85,8 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OnlCgformArea> queryList() {
|
public List<OnlCgformArea> queryList() {
|
||||||
return list();
|
LambdaQueryWrapper<OnlCgformArea> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.orderByAsc(OnlCgformArea::getSort);
|
||||||
|
return list(lambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user