显示监管端上传的体系文件

hyx_2024-10-12_xgfPerson
huangyuxuan 2024-09-10 11:47:12 +08:00
parent 7a7a948915
commit 683a6be69e
3 changed files with 105 additions and 66 deletions

View File

@ -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();
if (!Const.ONE.equals(pd.getString("CORPINFO_ID"))){
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_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
*/ */

View File

@ -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";
} }

View File

@ -29,7 +29,8 @@
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>
<!-- 字段用于新增 --> <!-- 字段用于新增 -->
@ -44,7 +45,8 @@
MFOLDER_ID, MFOLDER_ID,
PARENT_ID, PARENT_ID,
NAME, NAME,
CORPINFO_ID CORPINFO_ID,
DOCUMENTNUMBER
</sql> </sql>
<!-- 字段值 --> <!-- 字段值 -->
@ -59,7 +61,8 @@
#{MFOLDER_ID}, #{MFOLDER_ID},
#{PARENT_ID}, #{PARENT_ID},
#{NAME}, #{NAME},
#{CORPINFO_ID} #{CORPINFO_ID},
#{DOCUMENTNUMBER}
</sql> </sql>
<!-- 新增--> <!-- 新增-->