学习园地、教育培训功能数据同步功能
parent
e86570bb8d
commit
b057d96317
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -60,6 +62,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("personobtainevidence:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -72,6 +75,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -84,8 +88,11 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("IMGPATH", Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
personobtainevidenceService.save(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -97,8 +104,9 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("personobtainevidence:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -106,6 +114,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
personobtainevidenceService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockData", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -116,6 +125,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("personobtainevidence:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -123,6 +133,7 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -135,8 +146,11 @@ public class PersonObtainEvidenceController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("IMGPATH", Const.FILEPATHIMG + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
personobtainevidenceService.edit(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -48,6 +50,7 @@ public class StudySectionController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("studysection:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -60,6 +63,7 @@ public class StudySectionController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -74,8 +78,13 @@ public class StudySectionController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
studysectionService.save(pd);
|
||||
map.put("dockData", pd);
|
||||
if (fileList.size() > 0) {
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -87,14 +96,16 @@ public class StudySectionController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("studysection:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
studysectionService.delete(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
@ -106,6 +117,7 @@ public class StudySectionController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("studysection:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -114,6 +126,7 @@ public class StudySectionController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -126,8 +139,13 @@ public class StudySectionController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
studysectionService.edit(pd);
|
||||
map.put("dockData", pd);
|
||||
if (fileList.size() > 0) {
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -48,6 +50,7 @@ public class TrainingInfoController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("traininginfo:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -60,6 +63,7 @@ public class TrainingInfoController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
List<String> fileLst = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -72,9 +76,12 @@ public class TrainingInfoController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileLst.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
traininginfoService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", fileLst);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -85,8 +92,9 @@ public class TrainingInfoController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("traininginfo:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -94,6 +102,7 @@ public class TrainingInfoController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
traininginfoService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockData", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -104,6 +113,7 @@ public class TrainingInfoController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("traininginfo:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -111,6 +121,7 @@ public class TrainingInfoController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<String> fileLst = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -123,9 +134,12 @@ public class TrainingInfoController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileLst.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
traininginfoService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileLst));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
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.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -50,6 +53,7 @@ public class TrainingPlanController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("trainingplan:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -62,6 +66,7 @@ public class TrainingPlanController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -74,8 +79,11 @@ public class TrainingPlanController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
trainingplanService.save(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -87,8 +95,9 @@ public class TrainingPlanController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("trainingplan:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -96,6 +105,7 @@ public class TrainingPlanController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
trainingplanService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockDate", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -106,6 +116,7 @@ public class TrainingPlanController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("trainingplan:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object edit(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -114,6 +125,7 @@ public class TrainingPlanController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -128,9 +140,12 @@ public class TrainingPlanController extends BaseController {
|
|||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
trainingplanService.edit(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -48,6 +49,7 @@ public class VideoController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("video:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -60,6 +62,7 @@ public class VideoController extends BaseController {
|
|||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
pd.put("TYPE", "0"); //是否置顶 0否 1是
|
||||
// pd.put("CORPINFO_TYPE", "1"); //上传状态(管理员上传 0企业上传1)
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -76,9 +79,12 @@ public class VideoController extends BaseController {
|
|||
//pd.put("FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
Smb.sshSftp(file, fileName,Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
pd.put("FILEPATH", Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
fileList.add(Const.HTTPFILEURL + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName + "@@" + fileName);
|
||||
}
|
||||
|
||||
videoService.save(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", fileList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -90,13 +96,15 @@ public class VideoController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("video:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
videoService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockData", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -107,6 +115,7 @@ public class VideoController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("video:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -114,6 +123,7 @@ public class VideoController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
videoService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -150,6 +160,7 @@ public class VideoController extends BaseController {
|
|||
@RequestMapping(value="/goEdit")
|
||||
@RequiresPermissions("video:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -157,6 +168,7 @@ public class VideoController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
pd = videoService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -168,6 +180,7 @@ public class VideoController extends BaseController {
|
|||
@RequestMapping(value="/editZhiding")
|
||||
@RequiresPermissions("video:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object editZhiding() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -185,6 +198,7 @@ public class VideoController extends BaseController {
|
|||
pd.put("TYPE", "1");
|
||||
videoService.editZhiding(pd);//置顶信息
|
||||
map.put("pd", pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package com.zcloud.controller.filemanager;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -50,6 +49,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("mfolderStipulate:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -63,6 +63,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||
pd.put("FILESIZE", "");
|
||||
mfolderService.save(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -74,6 +75,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
@RequestMapping(value="/upload")
|
||||
@RequiresPermissions("mfolderStipulate:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object add(
|
||||
@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
||||
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 = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
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("PARENT_ID", PARENT_ID); //目录ID
|
||||
pd.put("CTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
|
@ -106,6 +110,8 @@ public class MfolderStipulateController extends BaseController {
|
|||
|
||||
pd.put("MFOLDER_ID", this.get32UUID()); //主键
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
mfolderService.save(pd); //存入数据库表
|
||||
}else{
|
||||
errInfo = "fail";
|
||||
|
@ -121,6 +127,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
@RequestMapping(value="/editUpload")
|
||||
@RequiresPermissions("mfolderStipulate:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object editUpload(
|
||||
@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
|
@ -128,6 +135,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String ffile = DateUtil.getDays(), fileName = "";
|
||||
List<String> fileList = new ArrayList<>();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
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)) {
|
||||
|
@ -141,6 +149,8 @@ public class MfolderStipulateController extends BaseController {
|
|||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
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("PARENT_ID", PARENT_ID); //目录ID
|
||||
pd.put("UNAME", Jurisdiction.getName()); //上传者,当前用户的姓名
|
||||
|
@ -153,6 +163,10 @@ public class MfolderStipulateController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||
}
|
||||
mfolderService.edit(pd); //存入数据库表
|
||||
map.put("dockData", pd);
|
||||
if (fileList.size() > 0) {
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
@ -182,6 +196,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value="/uploadAll")
|
||||
@ResponseBody
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object uploadAll(
|
||||
@RequestParam(value="file",required=false) MultipartFile file,
|
||||
@RequestParam(value="FH_ID",required=false) String MFOLDER_ID
|
||||
|
@ -203,6 +218,8 @@ public class MfolderStipulateController extends BaseController {
|
|||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
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[] fileFullNames = realName.split("\\.");//上传文件全名
|
||||
String extension =fileFullNames[fileFullNames.length-1];//上传文件文件后缀
|
||||
|
@ -218,6 +235,8 @@ public class MfolderStipulateController extends BaseController {
|
|||
pd.put("MFOLDER_ID", this.get32UUID()); //主键
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||
mfolderService.save(pd); //存入数据库表
|
||||
map.put("dockData", pd);
|
||||
map.put("sendPicturesList", JSON.toJSONString(fileList));
|
||||
}else{
|
||||
errInfo = "fail";
|
||||
}
|
||||
|
@ -231,8 +250,9 @@ public class MfolderStipulateController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("mfolderStipulate:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
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";
|
||||
PageData pd = new PageData();
|
||||
pd.put("parentId", MFOLDER_ID);
|
||||
|
@ -244,6 +264,7 @@ public class MfolderStipulateController extends BaseController {
|
|||
}
|
||||
pd.put("MFOLDER_ID", MFOLDER_ID);
|
||||
mfolderService.delete(pd);
|
||||
map.put("dockData", pd);
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
|
@ -256,12 +277,14 @@ public class MfolderStipulateController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("mfolderStipulate:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
mfolderService.edit(pd);
|
||||
map.put("dockData", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue