|
|
|
@ -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();
|
|
|
|
|
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
|
|
|
|
|
*/
|
|
|
|
|