学习园地、教育培训功能数据同步功能
parent
e86570bb8d
commit
b057d96317
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -34,7 +36,7 @@ import com.zcloud.service.system.DepartmentService;
|
||||||
import com.zcloud.service.system.PostService;
|
import com.zcloud.service.system.PostService;
|
||||||
import com.zcloud.service.system.UsersService;
|
import com.zcloud.service.system.UsersService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:人员取证情况
|
* 说明:人员取证情况
|
||||||
* 作者:luoxiaobao
|
* 作者:luoxiaobao
|
||||||
* 时间:2020-12-29
|
* 时间:2020-12-29
|
||||||
|
@ -52,7 +54,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
private DepartmentService departmentService;
|
private DepartmentService departmentService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PostService postService;
|
private PostService postService;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -60,6 +62,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("personobtainevidence:add")
|
@RequiresPermissions("personobtainevidence:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -72,6 +75,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -84,12 +88,15 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("IMGPATH", Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("IMGPATH", Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
personobtainevidenceService.save(pd);
|
personobtainevidenceService.save(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param out
|
* @param out
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -97,8 +104,9 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("personobtainevidence:del")
|
@RequiresPermissions("personobtainevidence:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception{
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -106,9 +114,10 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
personobtainevidenceService.delete(pd);
|
personobtainevidenceService.delete(pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
|
map.put("dockData", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -116,6 +125,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value="/edit")
|
||||||
@RequiresPermissions("personobtainevidence:edit")
|
@RequiresPermissions("personobtainevidence:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -123,6 +133,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -135,12 +146,15 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("IMGPATH", Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("IMGPATH", Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
personobtainevidenceService.edit(pd);
|
personobtainevidenceService.edit(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -163,7 +177,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**去修改页面获取数据
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -184,7 +198,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
// PageData dept = new PageData();
|
// PageData dept = new PageData();
|
||||||
// dept.put("DEPARTMENT_ID",ZDEPARTMENT_ID);
|
// dept.put("DEPARTMENT_ID",ZDEPARTMENT_ID);
|
||||||
// dept=departmentService.findById(dept);
|
// dept=departmentService.findById(dept);
|
||||||
|
|
||||||
|
|
||||||
//获取部门下拉树
|
//获取部门下拉树
|
||||||
List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
||||||
|
@ -192,7 +206,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
dept.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
dept.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
dept=this.departmentService.findByCorpId(dept);
|
dept=this.departmentService.findByCorpId(dept);
|
||||||
String ZDEPARTMENT_ID = dept.getString("DEPARTMENT_ID");
|
String ZDEPARTMENT_ID = dept.getString("DEPARTMENT_ID");
|
||||||
|
|
||||||
PageData node = new PageData();
|
PageData node = new PageData();
|
||||||
node.put("id", dept.get("DEPARTMENT_ID"));
|
node.put("id", dept.get("DEPARTMENT_ID"));
|
||||||
node.put("parentId", dept.get("PARENT_ID"));
|
node.put("parentId", dept.get("PARENT_ID"));
|
||||||
|
@ -211,13 +225,13 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
PageData post = new PageData();
|
PageData post = new PageData();
|
||||||
post.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
post.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||||
post.put("STATUS", 0);
|
post.put("STATUS", 0);
|
||||||
List<PageData> postList = postService.listAll(post);
|
List<PageData> postList = postService.listAll(post);
|
||||||
map.put("postList", postList);
|
map.put("postList", postList);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**获取部门下拉树
|
/**获取部门下拉树
|
||||||
* @param
|
* @param
|
||||||
|
@ -242,7 +256,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
// PageData dept = new PageData();
|
// PageData dept = new PageData();
|
||||||
// dept.put("DEPARTMENT_ID",ZDEPARTMENT_ID);
|
// dept.put("DEPARTMENT_ID",ZDEPARTMENT_ID);
|
||||||
// dept=this.departmentService.findById(dept);
|
// dept=this.departmentService.findById(dept);
|
||||||
|
|
||||||
PageData node = new PageData();
|
PageData node = new PageData();
|
||||||
node.put("id", dept.get("DEPARTMENT_ID"));
|
node.put("id", dept.get("DEPARTMENT_ID"));
|
||||||
node.put("parentId", dept.get("PARENT_ID"));
|
node.put("parentId", dept.get("PARENT_ID"));
|
||||||
|
@ -251,7 +265,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
zdepartmentPdList.add(node);
|
zdepartmentPdList.add(node);
|
||||||
JSONArray arr = JSONArray.fromObject(departmentService.listAllDepartmentToSelect(ZDEPARTMENT_ID,zdepartmentPdList));
|
JSONArray arr = JSONArray.fromObject(departmentService.listAllDepartmentToSelect(ZDEPARTMENT_ID,zdepartmentPdList));
|
||||||
map.put("zTreeNodes", (null == arr ?"":"{\"treeNodes\":" + arr.toString() + "}"));
|
map.put("zTreeNodes", (null == arr ?"":"{\"treeNodes\":" + arr.toString() + "}"));
|
||||||
|
|
||||||
PageData loginDept = new PageData();
|
PageData loginDept = new PageData();
|
||||||
loginDept.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
|
loginDept.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
|
||||||
loginDept = departmentService.findById(loginDept);
|
loginDept = departmentService.findById(loginDept);
|
||||||
|
@ -259,7 +273,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
// PageData post = new PageData();
|
// PageData post = new PageData();
|
||||||
// post.put("DEPARTMENT_ID", ZDEPARTMENT_ID);
|
// post.put("DEPARTMENT_ID", ZDEPARTMENT_ID);
|
||||||
// post.put("STATUS", 0);
|
// post.put("STATUS", 0);
|
||||||
// List<PageData> postList = this.postService.listAll(post);
|
// List<PageData> postList = this.postService.listAll(post);
|
||||||
// map.put("postList", postList);
|
// map.put("postList", postList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
||||||
|
@ -267,9 +281,9 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
map.put("USER_ID", Jurisdiction.getUSER_ID());
|
map.put("USER_ID", Jurisdiction.getUSER_ID());
|
||||||
map.put("DEPT_NAME", loginDept.get("NAME"));
|
map.put("DEPT_NAME", loginDept.get("NAME"));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**批量删除
|
/**批量删除
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -280,7 +294,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if(Tools.notEmpty(DATA_IDS)){
|
||||||
|
@ -293,7 +307,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**导出到excel
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -352,5 +366,5 @@ public class PersonObtainEvidenceController extends BaseController {
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv,dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -28,7 +30,7 @@ import com.zcloud.util.Tools;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.bus.StudySectionService;
|
import com.zcloud.service.bus.StudySectionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:学习园地
|
* 说明:学习园地
|
||||||
* 作者:luoxiaobao
|
* 作者:luoxiaobao
|
||||||
* 时间:2021-01-07
|
* 时间:2021-01-07
|
||||||
|
@ -37,10 +39,10 @@ import com.zcloud.service.bus.StudySectionService;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/studysection")
|
@RequestMapping("/studysection")
|
||||||
public class StudySectionController extends BaseController {
|
public class StudySectionController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudySectionService studysectionService;
|
private StudySectionService studysectionService;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -48,6 +50,7 @@ public class StudySectionController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("studysection:add")
|
@RequiresPermissions("studysection:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -60,6 +63,7 @@ public class StudySectionController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -72,14 +76,19 @@ public class StudySectionController extends BaseController {
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
studysectionService.save(pd);
|
studysectionService.save(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
if (fileList.size() > 0) {
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
|
}
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param out
|
* @param out
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -87,18 +96,20 @@ public class StudySectionController extends BaseController {
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("studysection:del")
|
@RequiresPermissions("studysection:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception{
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
studysectionService.delete(pd);
|
studysectionService.delete(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -106,6 +117,7 @@ public class StudySectionController extends BaseController {
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value="/edit")
|
||||||
@RequiresPermissions("studysection:edit")
|
@RequiresPermissions("studysection:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -114,6 +126,7 @@ public class StudySectionController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -124,15 +137,20 @@ public class StudySectionController extends BaseController {
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
studysectionService.edit(pd);
|
studysectionService.edit(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
if (fileList.size() > 0) {
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
|
}
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -156,7 +174,7 @@ public class StudySectionController extends BaseController {
|
||||||
String suffix = var.get("FILEPATH").toString().substring(var.get("FILEPATH").toString().lastIndexOf(".") + 1);
|
String suffix = var.get("FILEPATH").toString().substring(var.get("FILEPATH").toString().lastIndexOf(".") + 1);
|
||||||
var.put("extension_name", suffix);
|
var.put("extension_name", suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -164,7 +182,7 @@ public class StudySectionController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**去修改页面获取数据
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -181,8 +199,8 @@ public class StudySectionController extends BaseController {
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**批量删除
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -193,7 +211,7 @@ public class StudySectionController extends BaseController {
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if(Tools.notEmpty(DATA_IDS)){
|
||||||
|
@ -206,7 +224,7 @@ public class StudySectionController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**导出到excel
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -257,5 +275,5 @@ public class StudySectionController extends BaseController {
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv,dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -28,7 +30,7 @@ import com.zcloud.util.Tools;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.bus.TrainingInfoService;
|
import com.zcloud.service.bus.TrainingInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:培训情况
|
* 说明:培训情况
|
||||||
* 作者:luoxiaobao
|
* 作者:luoxiaobao
|
||||||
* 时间:2020-12-29
|
* 时间:2020-12-29
|
||||||
|
@ -37,10 +39,10 @@ import com.zcloud.service.bus.TrainingInfoService;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/traininginfo")
|
@RequestMapping("/traininginfo")
|
||||||
public class TrainingInfoController extends BaseController {
|
public class TrainingInfoController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrainingInfoService traininginfoService;
|
private TrainingInfoService traininginfoService;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -48,6 +50,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("traininginfo:add")
|
@RequiresPermissions("traininginfo:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -60,6 +63,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||||
|
List<String> fileLst = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -70,14 +74,17 @@ public class TrainingInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileLst.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
traininginfoService.save(pd);
|
traininginfoService.save(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", fileLst);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param out
|
* @param out
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -85,8 +92,9 @@ public class TrainingInfoController extends BaseController {
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("traininginfo:del")
|
@RequiresPermissions("traininginfo:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception{
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -94,9 +102,10 @@ public class TrainingInfoController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
traininginfoService.delete(pd);
|
traininginfoService.delete(pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
|
map.put("dockData", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -104,6 +113,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value="/edit")
|
||||||
@RequiresPermissions("traininginfo:edit")
|
@RequiresPermissions("traininginfo:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -111,6 +121,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
|
List<String> fileLst = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -121,14 +132,17 @@ public class TrainingInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileLst.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
traininginfoService.edit(pd);
|
traininginfoService.edit(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileLst));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -154,7 +168,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
String suffix = var.get("FILEPATH").toString().substring(var.get("FILEPATH").toString().lastIndexOf(".") + 1);
|
String suffix = var.get("FILEPATH").toString().substring(var.get("FILEPATH").toString().lastIndexOf(".") + 1);
|
||||||
var.put("extension_name", suffix);
|
var.put("extension_name", suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -162,7 +176,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**去修改页面获取数据
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -179,8 +193,8 @@ public class TrainingInfoController extends BaseController {
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**批量删除
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -191,7 +205,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if(Tools.notEmpty(DATA_IDS)){
|
||||||
|
@ -204,7 +218,7 @@ public class TrainingInfoController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**导出到excel
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -255,5 +269,5 @@ public class TrainingInfoController extends BaseController {
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv,dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,9 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -30,7 +33,7 @@ import com.zcloud.util.Tools;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.bus.TrainingPlanService;
|
import com.zcloud.service.bus.TrainingPlanService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:培训计划
|
* 说明:培训计划
|
||||||
* 作者:luoxiaobao
|
* 作者:luoxiaobao
|
||||||
* 时间:2020-12-28
|
* 时间:2020-12-28
|
||||||
|
@ -39,10 +42,10 @@ import com.zcloud.service.bus.TrainingPlanService;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/trainingplan")
|
@RequestMapping("/trainingplan")
|
||||||
public class TrainingPlanController extends BaseController {
|
public class TrainingPlanController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrainingPlanService trainingplanService;
|
private TrainingPlanService trainingplanService;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -50,6 +53,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("trainingplan:add")
|
@RequiresPermissions("trainingplan:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -62,6 +66,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -72,14 +77,17 @@ public class TrainingPlanController extends BaseController {
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
trainingplanService.save(pd);
|
trainingplanService.save(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param out
|
* @param out
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -87,8 +95,9 @@ public class TrainingPlanController extends BaseController {
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("trainingplan:del")
|
@RequiresPermissions("trainingplan:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception{
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -96,9 +105,10 @@ public class TrainingPlanController extends BaseController {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
trainingplanService.delete(pd);
|
trainingplanService.delete(pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
|
map.put("dockDate", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -106,6 +116,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value="/edit")
|
||||||
@RequiresPermissions("trainingplan:edit")
|
@RequiresPermissions("trainingplan:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -114,6 +125,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -126,14 +138,17 @@ public class TrainingPlanController extends BaseController {
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
trainingplanService.edit(pd);
|
trainingplanService.edit(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -157,7 +172,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
String suffix = var.get("FILEPATH").toString().substring(var.get("FILEPATH").toString().lastIndexOf(".") + 1);
|
String suffix = var.get("FILEPATH").toString().substring(var.get("FILEPATH").toString().lastIndexOf(".") + 1);
|
||||||
var.put("extension_name", suffix);
|
var.put("extension_name", suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -165,7 +180,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**去修改页面获取数据
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -182,8 +197,8 @@ public class TrainingPlanController extends BaseController {
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**批量删除
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -194,7 +209,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if(Tools.notEmpty(DATA_IDS)){
|
||||||
|
@ -207,7 +222,7 @@ public class TrainingPlanController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**导出到excel
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -258,9 +273,9 @@ public class TrainingPlanController extends BaseController {
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv,dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -278,5 +293,5 @@ public class TrainingPlanController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -28,7 +29,7 @@ import com.zcloud.util.PathUtil;
|
||||||
import com.zcloud.util.Smb;
|
import com.zcloud.util.Smb;
|
||||||
import com.zcloud.util.Tools;
|
import com.zcloud.util.Tools;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:视频管理
|
* 说明:视频管理
|
||||||
* 作者:luoxiaobao
|
* 作者:luoxiaobao
|
||||||
* 时间:2021-01-15
|
* 时间:2021-01-15
|
||||||
|
@ -37,10 +38,10 @@ import com.zcloud.util.Tools;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/video")
|
@RequestMapping("/video")
|
||||||
public class VideoController extends BaseController {
|
public class VideoController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private VideoService videoService;
|
private VideoService videoService;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -48,6 +49,7 @@ public class VideoController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("video:add")
|
@RequiresPermissions("video:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -60,6 +62,7 @@ public class VideoController extends BaseController {
|
||||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||||
pd.put("TYPE", "0"); //是否置顶 0否 1是
|
pd.put("TYPE", "0"); //是否置顶 0否 1是
|
||||||
// pd.put("CORPINFO_TYPE", "1"); //上传状态(管理员上传 0企业上传1)
|
// pd.put("CORPINFO_TYPE", "1"); //上传状态(管理员上传 0企业上传1)
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -76,13 +79,16 @@ public class VideoController extends BaseController {
|
||||||
//pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
//pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
Smb.sshSftp(file, fileName,Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
fileList.add(Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
videoService.save(pd);
|
videoService.save(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", fileList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param out
|
* @param out
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -90,16 +96,18 @@ public class VideoController extends BaseController {
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("video:del")
|
@RequiresPermissions("video:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception{
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
videoService.delete(pd);
|
videoService.delete(pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
|
map.put("dockData", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -107,6 +115,7 @@ public class VideoController extends BaseController {
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value="/edit")
|
||||||
@RequiresPermissions("video:edit")
|
@RequiresPermissions("video:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object edit() throws Exception{
|
public Object edit() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -114,9 +123,10 @@ public class VideoController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
videoService.edit(pd);
|
videoService.edit(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("dockData", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -142,7 +152,7 @@ public class VideoController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**去修改页面获取数据
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -150,6 +160,7 @@ public class VideoController extends BaseController {
|
||||||
@RequestMapping(value="/goEdit")
|
@RequestMapping(value="/goEdit")
|
||||||
@RequiresPermissions("video:edit")
|
@RequiresPermissions("video:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -157,10 +168,11 @@ public class VideoController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd = videoService.findById(pd); //根据ID读取
|
pd = videoService.findById(pd); //根据ID读取
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表 数据置顶
|
/**列表 数据置顶
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -168,6 +180,7 @@ public class VideoController extends BaseController {
|
||||||
@RequestMapping(value="/editZhiding")
|
@RequestMapping(value="/editZhiding")
|
||||||
@RequiresPermissions("video:edit")
|
@RequiresPermissions("video:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object editZhiding() throws Exception{
|
public Object editZhiding() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -185,9 +198,10 @@ public class VideoController extends BaseController {
|
||||||
pd.put("TYPE", "1");
|
pd.put("TYPE", "1");
|
||||||
videoService.editZhiding(pd);//置顶信息
|
videoService.editZhiding(pd);//置顶信息
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
/**批量删除
|
/**批量删除
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -198,7 +212,7 @@ public class VideoController extends BaseController {
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if(Tools.notEmpty(DATA_IDS)){
|
||||||
|
@ -211,7 +225,7 @@ public class VideoController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**导出到excel
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -275,7 +289,7 @@ public class VideoController extends BaseController {
|
||||||
pd.put("CORPINFO_TYPE", "2");
|
pd.put("CORPINFO_TYPE", "2");
|
||||||
pd.put("TYPE", "1");
|
pd.put("TYPE", "1");
|
||||||
List<PageData> ptVarList = videoService.listAll(pd); //平台视频
|
List<PageData> ptVarList = videoService.listAll(pd); //平台视频
|
||||||
|
|
||||||
map.put("ptVarList", ptVarList);
|
map.put("ptVarList", ptVarList);
|
||||||
map.put("cpvarList", cpvarList);
|
map.put("cpvarList", cpvarList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package com.zcloud.controller.filemanager;
|
package com.zcloud.controller.filemanager;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -31,18 +30,18 @@ import com.zcloud.util.Tools;
|
||||||
|
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:文件管理
|
* 说明:文件管理
|
||||||
* 作者:zCloud
|
* 作者:zCloud
|
||||||
* 官网:
|
* 官网:
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/mfolderStipulate")
|
@RequestMapping("/mfolderStipulate")
|
||||||
public class MfolderStipulateController extends BaseController {
|
public class MfolderStipulateController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MfolderStipulateService mfolderService;
|
private MfolderStipulateService mfolderService;
|
||||||
|
|
||||||
/**创建目录
|
/**创建目录
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -50,6 +49,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("mfolderStipulate:add")
|
@RequiresPermissions("mfolderStipulate:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object add() throws Exception{
|
public Object add() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -61,12 +61,13 @@ public class MfolderStipulateController extends BaseController {
|
||||||
pd.put("UNAME", Jurisdiction.getName()); //上传者
|
pd.put("UNAME", Jurisdiction.getName()); //上传者
|
||||||
pd.put("MASTER", Jurisdiction.getUsername()); //所属人
|
pd.put("MASTER", Jurisdiction.getUsername()); //所属人
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||||
pd.put("FILESIZE", "");
|
pd.put("FILESIZE", "");
|
||||||
mfolderService.save(pd);
|
mfolderService.save(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**上传文件
|
/**上传文件
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -74,6 +75,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
@RequestMapping(value="/upload")
|
@RequestMapping(value="/upload")
|
||||||
@RequiresPermissions("mfolderStipulate:add")
|
@RequiresPermissions("mfolderStipulate:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object add(
|
public Object add(
|
||||||
@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
@ -93,7 +95,9 @@ public class MfolderStipulateController extends BaseController {
|
||||||
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
//pd.put("NAME", NAME); //文件名
|
//pd.put("NAME", NAME); //文件名
|
||||||
//pd.put("PARENT_ID", PARENT_ID); //目录ID
|
//pd.put("PARENT_ID", PARENT_ID); //目录ID
|
||||||
pd.put("CTIME", DateUtil.date2Str(new Date())); //创建时间
|
pd.put("CTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||||
|
@ -103,9 +107,11 @@ public class MfolderStipulateController extends BaseController {
|
||||||
//pd.put("REMARKS", REMARKS); //备注
|
//pd.put("REMARKS", REMARKS); //备注
|
||||||
//pd.put("SHARE", SHARE); //是否共享
|
//pd.put("SHARE", SHARE); //是否共享
|
||||||
//pd.put("TYPE", TYPE); //数据类型 1.文件夹 2.文件
|
//pd.put("TYPE", TYPE); //数据类型 1.文件夹 2.文件
|
||||||
|
|
||||||
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()); //企业
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
mfolderService.save(pd); //存入数据库表
|
mfolderService.save(pd); //存入数据库表
|
||||||
}else{
|
}else{
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
|
@ -113,7 +119,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**上传文件
|
/**上传文件
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -121,6 +127,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
@RequestMapping(value="/editUpload")
|
@RequestMapping(value="/editUpload")
|
||||||
@RequiresPermissions("mfolderStipulate:add")
|
@RequiresPermissions("mfolderStipulate:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object editUpload(
|
public Object editUpload(
|
||||||
@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
@ -128,6 +135,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String ffile = DateUtil.getDays(), fileName = "";
|
String ffile = DateUtil.getDays(), fileName = "";
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
|
@ -141,6 +149,8 @@ public class MfolderStipulateController extends BaseController {
|
||||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
|
||||||
|
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
//pd.put("NAME", NAME); //文件名
|
//pd.put("NAME", NAME); //文件名
|
||||||
//pd.put("PARENT_ID", PARENT_ID); //目录ID
|
//pd.put("PARENT_ID", PARENT_ID); //目录ID
|
||||||
pd.put("UNAME", Jurisdiction.getName()); //上传者,当前用户的姓名
|
pd.put("UNAME", Jurisdiction.getName()); //上传者,当前用户的姓名
|
||||||
|
@ -149,15 +159,19 @@ public class MfolderStipulateController extends BaseController {
|
||||||
//pd.put("REMARKS", REMARKS); //备注
|
//pd.put("REMARKS", REMARKS); //备注
|
||||||
//pd.put("SHARE", SHARE); //是否共享
|
//pd.put("SHARE", SHARE); //是否共享
|
||||||
//pd.put("TYPE", TYPE); //数据类型 1.文件夹 2.文件
|
//pd.put("TYPE", TYPE); //数据类型 1.文件夹 2.文件
|
||||||
|
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||||
}
|
}
|
||||||
mfolderService.edit(pd); //存入数据库表
|
mfolderService.edit(pd); //存入数据库表
|
||||||
|
map.put("dockData", pd);
|
||||||
|
if (fileList.size() > 0) {
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
|
}
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**去修改页面获取数据
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -174,14 +188,15 @@ public class MfolderStipulateController extends BaseController {
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**上传文件
|
/**上传文件
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/uploadAll")
|
@RequestMapping(value="/uploadAll")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object uploadAll(
|
public Object uploadAll(
|
||||||
@RequestParam(value="file",required=false) MultipartFile file,
|
@RequestParam(value="file",required=false) MultipartFile file,
|
||||||
@RequestParam(value="FH_ID",required=false) String MFOLDER_ID
|
@RequestParam(value="FH_ID",required=false) String MFOLDER_ID
|
||||||
|
@ -201,8 +216,10 @@ public class MfolderStipulateController extends BaseController {
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
||||||
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
|
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); //文件路径
|
||||||
|
List<String> fileList = new ArrayList<>();
|
||||||
|
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||||
String realName = file.getOriginalFilename();
|
String realName = file.getOriginalFilename();
|
||||||
String[] fileFullNames = realName.split("\\.");//上传文件全名
|
String[] fileFullNames = realName.split("\\.");//上传文件全名
|
||||||
String extension =fileFullNames[fileFullNames.length-1];//上传文件文件后缀
|
String extension =fileFullNames[fileFullNames.length-1];//上传文件文件后缀
|
||||||
|
@ -218,6 +235,8 @@ public class MfolderStipulateController extends BaseController {
|
||||||
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()); //企业
|
||||||
mfolderService.save(pd); //存入数据库表
|
mfolderService.save(pd); //存入数据库表
|
||||||
|
map.put("dockData", pd);
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||||
}else{
|
}else{
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
}
|
}
|
||||||
|
@ -231,8 +250,9 @@ public class MfolderStipulateController extends BaseController {
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("mfolderStipulate:del")
|
@RequiresPermissions("mfolderStipulate:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object delete(@RequestParam String MFOLDER_ID,@RequestParam String FILEPATH) throws Exception{
|
public Object delete(@RequestParam String MFOLDER_ID,@RequestParam String FILEPATH) throws Exception{
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("parentId", MFOLDER_ID);
|
pd.put("parentId", MFOLDER_ID);
|
||||||
|
@ -244,11 +264,12 @@ public class MfolderStipulateController extends BaseController {
|
||||||
}
|
}
|
||||||
pd.put("MFOLDER_ID", MFOLDER_ID);
|
pd.put("MFOLDER_ID", MFOLDER_ID);
|
||||||
mfolderService.delete(pd);
|
mfolderService.delete(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
}
|
}
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -256,16 +277,18 @@ public class MfolderStipulateController extends BaseController {
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value="/edit")
|
||||||
@RequiresPermissions("mfolderStipulate:edit")
|
@RequiresPermissions("mfolderStipulate:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object edit() throws Exception{
|
public Object edit() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
mfolderService.edit(pd);
|
mfolderService.edit(pd);
|
||||||
|
map.put("dockData", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -285,7 +308,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
MFOLDER_ID = null == pd.get("MFOLDER_ID")?"":pd.get("MFOLDER_ID").toString();
|
MFOLDER_ID = null == pd.get("MFOLDER_ID")?"":pd.get("MFOLDER_ID").toString();
|
||||||
pd.put("MFOLDER_ID", MFOLDER_ID); //当作上级ID
|
pd.put("MFOLDER_ID", MFOLDER_ID); //当作上级ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(Tools.notEmpty(SHARE) && "yes".equals(SHARE)) {
|
// if(Tools.notEmpty(SHARE) && "yes".equals(SHARE)) {
|
||||||
// pd.put("SHARE", "yes");
|
// pd.put("SHARE", "yes");
|
||||||
// }else {
|
// }else {
|
||||||
|
@ -337,7 +360,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
fileType = "video"; //视频文件类型
|
fileType = "video"; //视频文件类型
|
||||||
}
|
}
|
||||||
varList.get(i).put("extension_name", extension_name); //文件拓展名
|
varList.get(i).put("extension_name", extension_name); //文件拓展名
|
||||||
varList.get(i).put("fileType", fileType); //用于文件图标
|
varList.get(i).put("fileType", fileType); //用于文件图标
|
||||||
}
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
|
@ -370,9 +393,9 @@ public class MfolderStipulateController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**预览txt,java,php,等文本文件
|
/**预览txt,java,php,等文本文件
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/viewTxt")
|
@RequestMapping(value="/viewTxt")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ -388,7 +411,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量操作
|
/**批量操作
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -399,7 +422,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() 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();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if(Tools.notEmpty(DATA_IDS)){
|
||||||
|
@ -413,7 +436,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**下载
|
/**下载
|
||||||
* @param response
|
* @param response
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -431,7 +454,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
throw new NofileStiException("=========要下载的文件已经没有了=========");
|
throw new NofileStiException("=========要下载的文件已经没有了=========");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -440,7 +463,7 @@ public class MfolderStipulateController extends BaseController {
|
||||||
class NofileStiException extends Exception {
|
class NofileStiException extends Exception {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public NofileStiException() {
|
public NofileStiException() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -456,5 +479,5 @@ class NofileStiException extends Exception {
|
||||||
public NofileStiException(Throwable cause) {
|
public NofileStiException(Throwable cause) {
|
||||||
super(cause);
|
super(cause);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue