显示监管端上传的体系文件
parent
7a7a948915
commit
683a6be69e
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.controller.filemanager;
|
package com.zcloud.controller.filemanager;
|
||||||
|
|
||||||
|
import cn.hutool.core.io.IoUtil;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
|
|
||||||
import java.io.Console;
|
import java.io.Console;
|
||||||
|
@ -10,6 +11,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -87,7 +89,8 @@ public class MfolderController extends BaseController {
|
||||||
@RequestParam(value="NAME",required=false) String NAME,
|
@RequestParam(value="NAME",required=false) String NAME,
|
||||||
@RequestParam(value="PARENT_ID",required=false) String PARENT_ID,
|
@RequestParam(value="PARENT_ID",required=false) String PARENT_ID,
|
||||||
@RequestParam(value="REMARKS",required=false) String REMARKS,
|
@RequestParam(value="REMARKS",required=false) String REMARKS,
|
||||||
@RequestParam(value="SHARE",required=false) String SHARE
|
@RequestParam(value="SHARE",required=false) String SHARE,
|
||||||
|
@RequestParam(value = "DOCUMENTNUMBER",required = false) String DOCUMENTNUMBER
|
||||||
) throws Exception{
|
) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -117,6 +120,7 @@ public class MfolderController extends BaseController {
|
||||||
pd.put("SHARE", SHARE); //是否共享
|
pd.put("SHARE", SHARE); //是否共享
|
||||||
pd.put("MFOLDER_ID", this.get32UUID()); //主键
|
pd.put("MFOLDER_ID", this.get32UUID()); //主键
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||||
|
pd.put("DOCUMENTNUMBER",DOCUMENTNUMBER); //文号
|
||||||
mfolderService.save(pd); //存入数据库表
|
mfolderService.save(pd); //存入数据库表
|
||||||
}else{
|
}else{
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
|
@ -139,7 +143,8 @@ public class MfolderController extends BaseController {
|
||||||
@RequestParam(value = "NAME", required = false) String NAME,
|
@RequestParam(value = "NAME", required = false) String NAME,
|
||||||
@RequestParam(value = "PARENT_ID", required = false) String PARENT_ID,
|
@RequestParam(value = "PARENT_ID", required = false) String PARENT_ID,
|
||||||
@RequestParam(value = "REMARKS", required = false) String REMARKS,
|
@RequestParam(value = "REMARKS", required = false) String REMARKS,
|
||||||
@RequestParam(value = "SHARE", required = false) String SHARE) throws Exception {
|
@RequestParam(value = "SHARE", required = false) String SHARE,
|
||||||
|
@RequestParam(value = "DOCUMENTNUMBER",required = false) String DOCUMENTNUMBER) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
|
@ -181,6 +186,7 @@ public class MfolderController extends BaseController {
|
||||||
pd.put("SHARE", SHARE); // 是否共享
|
pd.put("SHARE", SHARE); // 是否共享
|
||||||
pd.put("MFOLDER_ID", this.get32UUID()); // 主键
|
pd.put("MFOLDER_ID", this.get32UUID()); // 主键
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||||
|
pd.put("DOCUMENTNUMBER",DOCUMENTNUMBER); //文号
|
||||||
mfolderService.save(pd); // 存入数据库表
|
mfolderService.save(pd); // 存入数据库表
|
||||||
} else {
|
} else {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
|
@ -296,7 +302,9 @@ public class MfolderController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
if (!Const.ONE.equals(pd.getString("CORPINFO_ID"))){
|
||||||
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||||
|
}
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
String MFOLDER_ID = null;
|
String MFOLDER_ID = null;
|
||||||
|
@ -390,6 +398,33 @@ public class MfolderController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示列表ztree
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="/getSupervisionTree")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getSupervisionTree()throws Exception{
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
this.initialize();
|
||||||
|
pd = this.getPageData();
|
||||||
|
String SHARE = pd.getString("SHARE");
|
||||||
|
if(!(Tools.notEmpty(SHARE) && "yes".equals(SHARE))) {
|
||||||
|
pd.put("USERNAME", "admin".equals(Jurisdiction.getUsername())?"":Jurisdiction.getUsername()); //除admin用户外,只能查看自己的数据
|
||||||
|
}
|
||||||
|
pd.put("parentId", "0");
|
||||||
|
pd.put("SHARE", SHARE);
|
||||||
|
pd.put("CORPINFO_ID", "1"); //企业
|
||||||
|
JSONArray arr = JSONArray.fromObject(mfolderService.listTree(pd,SHARE));
|
||||||
|
String json = arr.toString();
|
||||||
|
json = json.replaceAll("MFOLDER_ID", "id").replaceAll("PARENT_ID", "pId").replaceAll("NAME", "name").replaceAll("subMfolder", "nodes").replaceAll("hasMfolder", "checked").replaceAll("treeurl", "url");
|
||||||
|
map.put("zTreeNodes", json);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**预览txt,java,php,等文本文件
|
/**预览txt,java,php,等文本文件
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -63,4 +63,5 @@ public class Const {
|
||||||
|
|
||||||
public static final String USER_CITY_CODE = "SESSION_USER_CITY_CODE";
|
public static final String USER_CITY_CODE = "SESSION_USER_CITY_CODE";
|
||||||
public static final String USER_CITY_NAME = "SESSION_USER_CITY_NAME";
|
public static final String USER_CITY_NAME = "SESSION_USER_CITY_NAME";
|
||||||
|
public static final String ONE = "1";
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,65 +6,68 @@
|
||||||
<result column="NAME" property="NAME"/>
|
<result column="NAME" property="NAME"/>
|
||||||
<result column="PARENT_ID" property="PARENT_ID"/>
|
<result column="PARENT_ID" property="PARENT_ID"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--表名 -->
|
<!--表名 -->
|
||||||
<sql id="tableName">
|
<sql id="tableName">
|
||||||
OA_MFOLDER
|
OA_MFOLDER
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!--数据字典表名 -->
|
<!--数据字典表名 -->
|
||||||
<sql id="dicTableName">
|
<sql id="dicTableName">
|
||||||
SYS_DICTIONARIES
|
SYS_DICTIONARIES
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段 -->
|
<!-- 字段 -->
|
||||||
<sql id="Field">
|
<sql id="Field">
|
||||||
f.FILEPATH,
|
f.FILEPATH,
|
||||||
f.CTIME,
|
f.CTIME,
|
||||||
f.UNAME,
|
f.UNAME,
|
||||||
f.MASTER,
|
f.MASTER,
|
||||||
f.FILESIZE,
|
f.FILESIZE,
|
||||||
f.SHARE,
|
f.SHARE,
|
||||||
f.REMARKS,
|
f.REMARKS,
|
||||||
f.MFOLDER_ID,
|
f.MFOLDER_ID,
|
||||||
f.PARENT_ID,
|
f.PARENT_ID,
|
||||||
f.NAME,
|
f.NAME,
|
||||||
f.CORPINFO_ID
|
f.CORPINFO_ID,
|
||||||
|
f.DOCUMENTNUMBER
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段用于新增 -->
|
<!-- 字段用于新增 -->
|
||||||
<sql id="Field2">
|
<sql id="Field2">
|
||||||
FILEPATH,
|
FILEPATH,
|
||||||
CTIME,
|
CTIME,
|
||||||
UNAME,
|
UNAME,
|
||||||
MASTER,
|
MASTER,
|
||||||
FILESIZE,
|
FILESIZE,
|
||||||
SHARE,
|
SHARE,
|
||||||
REMARKS,
|
REMARKS,
|
||||||
MFOLDER_ID,
|
MFOLDER_ID,
|
||||||
PARENT_ID,
|
PARENT_ID,
|
||||||
NAME,
|
NAME,
|
||||||
CORPINFO_ID
|
CORPINFO_ID,
|
||||||
|
DOCUMENTNUMBER
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
<sql id="FieldValue">
|
<sql id="FieldValue">
|
||||||
#{FILEPATH},
|
#{FILEPATH},
|
||||||
#{CTIME},
|
#{CTIME},
|
||||||
#{UNAME},
|
#{UNAME},
|
||||||
#{MASTER},
|
#{MASTER},
|
||||||
#{FILESIZE},
|
#{FILESIZE},
|
||||||
#{SHARE},
|
#{SHARE},
|
||||||
#{REMARKS},
|
#{REMARKS},
|
||||||
#{MFOLDER_ID},
|
#{MFOLDER_ID},
|
||||||
#{PARENT_ID},
|
#{PARENT_ID},
|
||||||
#{NAME},
|
#{NAME},
|
||||||
#{CORPINFO_ID}
|
#{CORPINFO_ID},
|
||||||
|
#{DOCUMENTNUMBER}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
<insert id="save" parameterType="pd">
|
<insert id="save" parameterType="pd">
|
||||||
insert into
|
insert into
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
(
|
(
|
||||||
<include refid="Field2"></include>
|
<include refid="Field2"></include>
|
||||||
|
@ -72,43 +75,43 @@
|
||||||
<include refid="FieldValue"></include>
|
<include refid="FieldValue"></include>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<!-- 删除-->
|
<!-- 删除-->
|
||||||
<delete id="delete" parameterType="pd">
|
<delete id="delete" parameterType="pd">
|
||||||
delete from
|
delete from
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
where
|
where
|
||||||
MFOLDER_ID = #{MFOLDER_ID}
|
MFOLDER_ID = #{MFOLDER_ID}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<update id="edit" parameterType="pd">
|
<update id="edit" parameterType="pd">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
set
|
||||||
SHARE = #{SHARE},
|
SHARE = #{SHARE},
|
||||||
REMARKS = #{REMARKS},
|
REMARKS = #{REMARKS},
|
||||||
NAME = #{NAME},
|
NAME = #{NAME},
|
||||||
MFOLDER_ID = MFOLDER_ID
|
MFOLDER_ID = MFOLDER_ID
|
||||||
where
|
where
|
||||||
MFOLDER_ID = #{MFOLDER_ID}
|
MFOLDER_ID = #{MFOLDER_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 通过ID获取数据 -->
|
<!-- 通过ID获取数据 -->
|
||||||
<select id="findById" parameterType="pd" resultType="pd">
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where
|
where
|
||||||
f.MFOLDER_ID = #{MFOLDER_ID}
|
f.MFOLDER_ID = #{MFOLDER_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where 1=1 and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
where 1=1 and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
<if test="pd.MFOLDER_ID!= null and pd.MFOLDER_ID != ''"><!-- 检索 -->
|
<if test="pd.MFOLDER_ID!= null and pd.MFOLDER_ID != ''"><!-- 检索 -->
|
||||||
|
@ -118,8 +121,8 @@
|
||||||
and
|
and
|
||||||
(
|
(
|
||||||
f.REMARKS LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
f.REMARKS LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
or
|
or
|
||||||
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="pd.USERNAME!= null and pd.USERNAME != ''">
|
<!-- <if test="pd.USERNAME!= null and pd.USERNAME != ''">
|
||||||
|
@ -134,15 +137,15 @@
|
||||||
order by FIELD(f.NAME ,'成立组织机构文件','"双控"机制相关文件','风险分布图','风险告知卡','风险分级管控清单(台账)',
|
order by FIELD(f.NAME ,'成立组织机构文件','"双控"机制相关文件','风险分布图','风险告知卡','风险分级管控清单(台账)',
|
||||||
'隐患治理信息台账','应急预案','其他'), f.CTIME desc
|
'隐患治理信息台账','应急预案','其他'), f.CTIME desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 通过ID获取其子级列表 -->
|
<!-- 通过ID获取其子级列表 -->
|
||||||
<select id="listByParentId" parameterType="pd" resultMap="mfolderResultMap">
|
<select id="listByParentId" parameterType="pd" resultMap="mfolderResultMap">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where
|
where
|
||||||
f.PARENT_ID = #{parentId}
|
f.PARENT_ID = #{parentId}
|
||||||
<!-- <if test="USERNAME != null and USERNAME != ''">
|
<!-- <if test="USERNAME != null and USERNAME != ''">
|
||||||
and f.MASTER = #{USERNAME}
|
and f.MASTER = #{USERNAME}
|
||||||
</if> -->
|
</if> -->
|
||||||
|
@ -153,43 +156,43 @@
|
||||||
and f.SHARE = 'yes'
|
and f.SHARE = 'yes'
|
||||||
</if> -->
|
</if> -->
|
||||||
order by FIELD(f.NAME ,'成立组织机构文件','"双控"机制相关文件','风险分布图','风险告知卡','风险分级管控清单(台账)',
|
order by FIELD(f.NAME ,'成立组织机构文件','"双控"机制相关文件','风险分布图','风险告知卡','风险分级管控清单(台账)',
|
||||||
'隐患治理信息台账','应急预案','其他')
|
'隐患治理信息台账','应急预案','其他')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据ID组修改数据 -->
|
<!-- 根据ID组修改数据 -->
|
||||||
<update id="makeAll" parameterType="pd">
|
<update id="makeAll" parameterType="pd">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
set
|
||||||
SHARE = #{SHARE}
|
SHARE = #{SHARE}
|
||||||
where
|
where
|
||||||
MFOLDER_ID in
|
MFOLDER_ID in
|
||||||
<foreach item="item" index="index" collection="IDS" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="IDS" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 列表(全部) -->
|
<!-- 列表(全部) -->
|
||||||
<select id="listAll" parameterType="pd" resultType="pd">
|
<select id="listAll" parameterType="pd" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
where f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- fh 31 3 59 67 90 qq(青苔) -->
|
<!-- fh 31 3 59 67 90 qq(青苔) -->
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="findListByName" parameterType="page" resultType="pd">
|
<select id="findListByName" parameterType="page" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where 1=1
|
where 1=1
|
||||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
and f.NAME = #{NAME }
|
and f.NAME = #{NAME }
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue