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