企业系统管理
parent
97a5df06f6
commit
b05a521997
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.controller.filemanager;
|
package com.zcloud.controller.filemanager;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.zcloud.aspect.DockAnnotation;
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
|
|
||||||
|
@ -70,7 +71,7 @@ public class MfolderController extends BaseController {
|
||||||
pd.put("SHARE", "no");
|
pd.put("SHARE", "no");
|
||||||
mfolderService.save(pd);
|
mfolderService.save(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("pd", pd);
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,12 +241,12 @@ public class MfolderController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param out
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value="/delete")
|
||||||
@RequiresPermissions("mfolder:del")
|
@RequiresPermissions("mfolder: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,String> map = new HashMap<String,String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.zcloud.controller.onlinexxks;
|
package com.zcloud.controller.onlinexxks;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
@ -32,338 +34,360 @@ import java.util.*;
|
||||||
@RequestMapping("/videocourseware")
|
@RequestMapping("/videocourseware")
|
||||||
public class VideoCoursewareController extends BaseController {
|
public class VideoCoursewareController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private VideoCoursewareService videocoursewareService;
|
private VideoCoursewareService videocoursewareService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private QuestionService questionService;
|
private QuestionService questionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private KcmiddlekjService kcmiddlekjService;
|
private KcmiddlekjService kcmiddlekjService;
|
||||||
/**新增
|
|
||||||
* @param
|
/**
|
||||||
* @throws Exception
|
* 新增
|
||||||
*/
|
*
|
||||||
@RequestMapping(value="/add")
|
* @param
|
||||||
@RequiresPermissions("courseware:add")
|
* @throws Exception
|
||||||
@ResponseBody
|
*/
|
||||||
public Object add(@RequestParam(value="vfile",required=false) MultipartFile vfile,
|
@RequestMapping(value = "/add")
|
||||||
@RequestParam(value="vcfile",required=false) MultipartFile vcfile) throws Exception{
|
@RequiresPermissions("courseware:add")
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
@ResponseBody
|
||||||
String errInfo = "success";
|
@DockAnnotation(isAdd = true, hasAnnex = true)
|
||||||
PageData pd = new PageData();
|
public Object add(@RequestParam(value = "vfile", required = false) MultipartFile vfile,
|
||||||
pd = this.getPageData();
|
@RequestParam(value = "vcfile", required = false) MultipartFile vcfile) throws Exception {
|
||||||
pd.put("VIDEOCOURSEWARE_ID", this.get32UUID()); //主键
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
String errInfo = "success";
|
||||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
PageData pd = new PageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd = this.getPageData();
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd.put("VIDEOCOURSEWARE_ID", this.get32UUID()); //主键
|
||||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||||
pd.put("STATE", "0"); //课件状态 0启用、1禁用
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
if (null != vfile && !vfile.isEmpty()) {
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
errInfo = "fail";
|
pd.put("STATE", "0"); //课件状态 0启用、1禁用
|
||||||
map.put("result", errInfo);
|
if (null != vfile && !vfile.isEmpty()) {
|
||||||
map.put("msg", "文件格式不正确!");
|
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
return map;
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
}
|
errInfo = "fail";
|
||||||
String ffile = DateUtil.getDays();
|
map.put("result", errInfo);
|
||||||
//本地
|
map.put("msg", "文件格式不正确!");
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
String ffile = DateUtil.getDays();
|
||||||
|
//本地
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
//服务器
|
//服务器
|
||||||
String fileName = this.get32UUID()+vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(vfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(vfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("VIDEOFILES", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("VIDEOFILES", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
// 将MultipartFile file转换成为File
|
// 将MultipartFile file转换成为File
|
||||||
File f_file = FileUtil.MultipartFileToFile(vfile);
|
File f_file = FileUtil.MultipartFileToFile(vfile);
|
||||||
MultimediaObject instance = new MultimediaObject(f_file);
|
MultimediaObject instance = new MultimediaObject(f_file);
|
||||||
MultimediaInfo result = instance.getInfo();
|
MultimediaInfo result = instance.getInfo();
|
||||||
System.out.println("视频时长:"+result.getDuration());
|
System.out.println("视频时长:" + result.getDuration());
|
||||||
double videoTime = (double)result.getDuration() / 1000.0;
|
double videoTime = (double) result.getDuration() / 1000.0;
|
||||||
pd.put("VIDEOTIME", videoTime+"");
|
pd.put("VIDEOTIME", videoTime + "");
|
||||||
pd.put("CLASSHOUR", Math.floor(videoTime / 60));
|
pd.put("CLASSHOUR", Math.floor(videoTime / 60));
|
||||||
f_file.delete();
|
f_file.delete();
|
||||||
}
|
}
|
||||||
if (null != vcfile && !vcfile.isEmpty()) {
|
if (null != vcfile && !vcfile.isEmpty()) {
|
||||||
String suffixName = vcfile.getOriginalFilename().substring(vcfile.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = vcfile.getOriginalFilename().substring(vcfile.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)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("msg", "文件格式不正确!");
|
map.put("msg", "文件格式不正确!");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
//本地
|
//本地
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
//服务器
|
//服务器
|
||||||
String fileName = this.get32UUID()+vcfile.getOriginalFilename().substring(vcfile.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + vcfile.getOriginalFilename().substring(vcfile.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(vcfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(vcfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("VIDEOCAPTURE", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("VIDEOCAPTURE", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
videocoursewareService.save(pd);
|
videocoursewareService.save(pd);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
return map;
|
map.put("result", errInfo);
|
||||||
}
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**删除
|
/**
|
||||||
* @param
|
* 删除
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param
|
||||||
@RequestMapping(value="/delete")
|
* @throws Exception
|
||||||
@RequiresPermissions("courseware:del")
|
*/
|
||||||
@ResponseBody
|
@RequestMapping(value = "/delete")
|
||||||
public Object delete() throws Exception{
|
@RequiresPermissions("courseware:del")
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
@ResponseBody
|
||||||
String errInfo = "success";
|
public Object delete() throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
pd = this.getPageData();
|
String errInfo = "success";
|
||||||
PageData d = videocoursewareService.findById(pd);
|
PageData pd = new PageData();
|
||||||
Smb.deleteFile(d.getString("VIDEOFILES"));
|
pd = this.getPageData();
|
||||||
Smb.deleteFile(d.getString("VIDEOCAPTURE"));
|
PageData d = videocoursewareService.findById(pd);
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
Smb.deleteFile(d.getString("VIDEOFILES"));
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
Smb.deleteFile(d.getString("VIDEOCAPTURE"));
|
||||||
String ArrayDATA_IDS[] = { pd.getString("VIDEOCOURSEWARE_ID") };
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
pd.put("COURSEWARETYPE", "1"); //课件类型
|
String ArrayDATA_IDS[] = {pd.getString("VIDEOCOURSEWARE_ID")};
|
||||||
|
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
||||||
|
pd.put("COURSEWARETYPE", "1"); //课件类型
|
||||||
|
|
||||||
pd.put("CURRICULUM_ID", pd.getString("VIDEOCOURSEWARE_ID")); //课件类型
|
pd.put("CURRICULUM_ID", pd.getString("VIDEOCOURSEWARE_ID")); //课件类型
|
||||||
String count = kcmiddlekjService.countByCourseWareId(pd);
|
String count = kcmiddlekjService.countByCourseWareId(pd);
|
||||||
if(!"0".equals(count)){
|
if (!"0".equals(count)) {
|
||||||
map.put("result", "erroe"); //返回结果
|
map.put("result", "erroe"); //返回结果
|
||||||
map.put("msg", "该课件已经在课程中发布!");
|
map.put("msg", "该课件已经在课程中发布!");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
questionService.deleteByCoursewareIds(pd);
|
questionService.deleteByCoursewareIds(pd);
|
||||||
videocoursewareService.delete(pd);
|
videocoursewareService.delete(pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
* @param
|
* 修改
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param
|
||||||
@RequestMapping(value="/edit")
|
* @throws Exception
|
||||||
@RequiresPermissions("courseware:edit")
|
*/
|
||||||
@ResponseBody
|
@RequestMapping(value = "/edit")
|
||||||
public Object edit(@RequestParam(value="vfile",required=false) MultipartFile vfile,
|
@RequiresPermissions("courseware:edit")
|
||||||
@RequestParam(value="vcfile",required=false) MultipartFile vcfile) throws Exception{
|
@ResponseBody
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
public Object edit(@RequestParam(value = "vfile", required = false) MultipartFile vfile,
|
||||||
String errInfo = "success";
|
@RequestParam(value = "vcfile", required = false) MultipartFile vcfile) throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
pd = this.getPageData();
|
String errInfo = "success";
|
||||||
PageData d = videocoursewareService.findById(pd);
|
PageData pd = new PageData();
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd = this.getPageData();
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
PageData d = videocoursewareService.findById(pd);
|
||||||
if (null != vfile ) {
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (null != vfile) {
|
||||||
errInfo = "fail";
|
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
map.put("result", errInfo);
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
map.put("msg", "文件格式不正确!");
|
errInfo = "fail";
|
||||||
return map;
|
map.put("result", errInfo);
|
||||||
}
|
map.put("msg", "文件格式不正确!");
|
||||||
String ffile = DateUtil.getDays();
|
return map;
|
||||||
//本地
|
}
|
||||||
|
String ffile = DateUtil.getDays();
|
||||||
|
//本地
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
//服务器
|
//服务器
|
||||||
String fileName = this.get32UUID()+vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(vfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(vfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("VIDEOFILES", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("VIDEOFILES", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
// 将MultipartFile file转换成为File
|
// 将MultipartFile file转换成为File
|
||||||
File f_file = FileUtil.MultipartFileToFile(vfile);
|
File f_file = FileUtil.MultipartFileToFile(vfile);
|
||||||
MultimediaObject instance = new MultimediaObject(f_file);
|
MultimediaObject instance = new MultimediaObject(f_file);
|
||||||
MultimediaInfo result = instance.getInfo();
|
MultimediaInfo result = instance.getInfo();
|
||||||
System.out.println("视频时长:"+result.getDuration());
|
System.out.println("视频时长:" + result.getDuration());
|
||||||
double videoTime = (double)result.getDuration() / 1000.0;
|
double videoTime = (double) result.getDuration() / 1000.0;
|
||||||
pd.put("VIDEOTIME", videoTime+"");
|
pd.put("VIDEOTIME", videoTime + "");
|
||||||
pd.put("CLASSHOUR", Math.floor(videoTime / 60));
|
pd.put("CLASSHOUR", Math.floor(videoTime / 60));
|
||||||
f_file.delete();
|
f_file.delete();
|
||||||
}
|
}
|
||||||
if (null != vcfile) {
|
if (null != vcfile) {
|
||||||
String suffixName = vcfile.getOriginalFilename().substring(vcfile.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = vcfile.getOriginalFilename().substring(vcfile.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)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("msg", "文件格式不正确!");
|
map.put("msg", "文件格式不正确!");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
//本地
|
//本地
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
//服务器
|
//服务器
|
||||||
String fileName = this.get32UUID()+vcfile.getOriginalFilename().substring(vcfile.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + vcfile.getOriginalFilename().substring(vcfile.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(vcfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
Smb.sshSftp(vcfile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||||
pd.put("VIDEOCAPTURE", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("VIDEOCAPTURE", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
videocoursewareService.edit(pd);
|
videocoursewareService.edit(pd);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
* @param page
|
* 列表
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param page
|
||||||
@RequestMapping(value="/list")
|
* @throws Exception
|
||||||
@RequiresPermissions("courseware:list")
|
*/
|
||||||
@ResponseBody
|
@RequestMapping(value = "/list")
|
||||||
public Object list(Page page) throws Exception{
|
@RequiresPermissions("courseware:list")
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
@ResponseBody
|
||||||
String errInfo = "success";
|
public Object list(Page page) throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
pd = this.getPageData();
|
String errInfo = "success";
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
PageData pd = new PageData();
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
page.setPd(pd);
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
List<PageData> varList = videocoursewareService.list(page); //列出VideoCourseware列表
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
map.put("varList", varList);
|
page.setPd(pd);
|
||||||
map.put("page", page);
|
List<PageData> varList = videocoursewareService.list(page); //列出VideoCourseware列表
|
||||||
map.put("result", errInfo);
|
map.put("varList", varList);
|
||||||
return map;
|
map.put("page", page);
|
||||||
}
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
* @param
|
* 去修改页面获取数据
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param
|
||||||
@RequestMapping(value="/goEdit")
|
* @throws Exception
|
||||||
@ResponseBody
|
*/
|
||||||
public Object goEdit() throws Exception{
|
@RequestMapping(value = "/goEdit")
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
@ResponseBody
|
||||||
String errInfo = "success";
|
public Object goEdit() throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
pd = this.getPageData();
|
String errInfo = "success";
|
||||||
pd = videocoursewareService.findById(pd); //根据ID读取
|
PageData pd = new PageData();
|
||||||
map.put("pd", pd);
|
pd = this.getPageData();
|
||||||
map.put("result", errInfo);
|
pd = videocoursewareService.findById(pd); //根据ID读取
|
||||||
return map;
|
map.put("pd", pd);
|
||||||
}
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
* @param
|
* 批量删除
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param
|
||||||
@RequestMapping(value="/deleteAll")
|
* @throws Exception
|
||||||
@RequiresPermissions("courseware:del")
|
*/
|
||||||
@ResponseBody
|
@RequestMapping(value = "/deleteAll")
|
||||||
public Object deleteAll() throws Exception{
|
@RequiresPermissions("courseware:del")
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
@ResponseBody
|
||||||
String errInfo = "success";
|
public Object deleteAll() throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
pd = this.getPageData();
|
String errInfo = "success";
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
PageData pd = new PageData();
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
if (Tools.notEmpty(DATA_IDS)) {
|
||||||
List<PageData> pdList = videocoursewareService.findByIds(pd);
|
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||||
for (PageData d : pdList) {
|
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
||||||
Smb.deleteFile(d.getString("VIDEOFILES"));
|
List<PageData> pdList = videocoursewareService.findByIds(pd);
|
||||||
Smb.deleteFile(d.getString("VIDEOCAPTURE"));
|
for (PageData d : pdList) {
|
||||||
}
|
Smb.deleteFile(d.getString("VIDEOFILES"));
|
||||||
pd.put("COURSEWARETYPE", "1"); //课件类型
|
Smb.deleteFile(d.getString("VIDEOCAPTURE"));
|
||||||
questionService.deleteByCoursewareIds(pd);
|
}
|
||||||
videocoursewareService.deleteAll(pd);
|
pd.put("COURSEWARETYPE", "1"); //课件类型
|
||||||
errInfo = "success";
|
questionService.deleteByCoursewareIds(pd);
|
||||||
}else{
|
videocoursewareService.deleteAll(pd);
|
||||||
errInfo = "fail";
|
errInfo = "success";
|
||||||
}
|
} else {
|
||||||
map.put("result", errInfo); //返回结果
|
errInfo = "fail";
|
||||||
return map;
|
}
|
||||||
}
|
map.put("result", errInfo); //返回结果
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**
|
||||||
* @param
|
* 导出到excel
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param
|
||||||
@RequestMapping(value="/excel")
|
* @throws Exception
|
||||||
@RequiresPermissions("toExcel")
|
*/
|
||||||
public ModelAndView exportExcel() throws Exception{
|
@RequestMapping(value = "/excel")
|
||||||
ModelAndView mv = new ModelAndView();
|
@RequiresPermissions("toExcel")
|
||||||
PageData pd = new PageData();
|
public ModelAndView exportExcel() throws Exception {
|
||||||
pd = this.getPageData();
|
ModelAndView mv = new ModelAndView();
|
||||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
PageData pd = new PageData();
|
||||||
List<String> titles = new ArrayList<String>();
|
pd = this.getPageData();
|
||||||
titles.add("课件名称"); //1
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||||
titles.add("主讲人"); //2
|
List<String> titles = new ArrayList<String>();
|
||||||
titles.add("课件介绍"); //3
|
titles.add("课件名称"); //1
|
||||||
titles.add("课件文件路径"); //4
|
titles.add("主讲人"); //2
|
||||||
titles.add("课件截图"); //5
|
titles.add("课件介绍"); //3
|
||||||
titles.add("使用人员"); //6
|
titles.add("课件文件路径"); //4
|
||||||
titles.add("添加人"); //7
|
titles.add("课件截图"); //5
|
||||||
titles.add("添加时间"); //8
|
titles.add("使用人员"); //6
|
||||||
titles.add("修改人"); //9
|
titles.add("添加人"); //7
|
||||||
titles.add("修改时间"); //10
|
titles.add("添加时间"); //8
|
||||||
titles.add("是否删除(0:有效 1:删除)"); //11
|
titles.add("修改人"); //9
|
||||||
titles.add("企业ID"); //12
|
titles.add("修改时间"); //10
|
||||||
dataMap.put("titles", titles);
|
titles.add("是否删除(0:有效 1:删除)"); //11
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
titles.add("企业ID"); //12
|
||||||
List<PageData> varOList = videocoursewareService.listAll(pd);
|
dataMap.put("titles", titles);
|
||||||
List<PageData> varList = new ArrayList<PageData>();
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
for(int i=0;i<varOList.size();i++){
|
List<PageData> varOList = videocoursewareService.listAll(pd);
|
||||||
PageData vpd = new PageData();
|
List<PageData> varList = new ArrayList<PageData>();
|
||||||
vpd.put("var1", varOList.get(i).getString("COURSEWARENAME")); //1
|
for (int i = 0; i < varOList.size(); i++) {
|
||||||
vpd.put("var2", varOList.get(i).getString("SPEAKER")); //2
|
PageData vpd = new PageData();
|
||||||
vpd.put("var3", varOList.get(i).getString("COURSEWAREINTRODUCE")); //3
|
vpd.put("var1", varOList.get(i).getString("COURSEWARENAME")); //1
|
||||||
vpd.put("var4", varOList.get(i).getString("VIDEOFILES")); //4
|
vpd.put("var2", varOList.get(i).getString("SPEAKER")); //2
|
||||||
vpd.put("var5", varOList.get(i).getString("VIDEOCAPTURE")); //5
|
vpd.put("var3", varOList.get(i).getString("COURSEWAREINTRODUCE")); //3
|
||||||
vpd.put("var6", varOList.get(i).getString("VIDEOUSERS")); //6
|
vpd.put("var4", varOList.get(i).getString("VIDEOFILES")); //4
|
||||||
vpd.put("var7", varOList.get(i).getString("CREATOR")); //7
|
vpd.put("var5", varOList.get(i).getString("VIDEOCAPTURE")); //5
|
||||||
vpd.put("var8", varOList.get(i).getString("CREATTIME")); //8
|
vpd.put("var6", varOList.get(i).getString("VIDEOUSERS")); //6
|
||||||
vpd.put("var9", varOList.get(i).getString("OPERATOR")); //9
|
vpd.put("var7", varOList.get(i).getString("CREATOR")); //7
|
||||||
vpd.put("var10", varOList.get(i).getString("OPERATTIME")); //10
|
vpd.put("var8", varOList.get(i).getString("CREATTIME")); //8
|
||||||
vpd.put("var11", varOList.get(i).get("ISDELETE").toString()); //11
|
vpd.put("var9", varOList.get(i).getString("OPERATOR")); //9
|
||||||
vpd.put("var12", varOList.get(i).getString("CORPINFO_ID")); //12
|
vpd.put("var10", varOList.get(i).getString("OPERATTIME")); //10
|
||||||
varList.add(vpd);
|
vpd.put("var11", varOList.get(i).get("ISDELETE").toString()); //11
|
||||||
}
|
vpd.put("var12", varOList.get(i).getString("CORPINFO_ID")); //12
|
||||||
dataMap.put("varList", varList);
|
varList.add(vpd);
|
||||||
ObjectExcelView erv = new ObjectExcelView();
|
}
|
||||||
mv = new ModelAndView(erv,dataMap);
|
dataMap.put("varList", varList);
|
||||||
return mv;
|
ObjectExcelView erv = new ObjectExcelView();
|
||||||
}
|
mv = new ModelAndView(erv, dataMap);
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
* @param page
|
* 列表
|
||||||
* @throws Exception
|
*
|
||||||
*/
|
* @param page
|
||||||
@RequestMapping(value="/getSelect")
|
* @throws Exception
|
||||||
@ResponseBody
|
*/
|
||||||
public Object getSelect(Page page) throws Exception{
|
@RequestMapping(value = "/getSelect")
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
@ResponseBody
|
||||||
String errInfo = "success";
|
public Object getSelect(Page page) throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
pd = this.getPageData();
|
String errInfo = "success";
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
PageData pd = new PageData();
|
||||||
List<PageData> varList = videocoursewareService.getSelect(pd); //列出VideoCourseware列表
|
pd = this.getPageData();
|
||||||
map.put("list", varList);
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
map.put("result", errInfo);
|
List<PageData> varList = videocoursewareService.getSelect(pd); //列出VideoCourseware列表
|
||||||
return map;
|
map.put("list", varList);
|
||||||
}
|
map.put("result", errInfo);
|
||||||
/**修改
|
return map;
|
||||||
* @param
|
}
|
||||||
* @throws Exception
|
|
||||||
*/
|
/**
|
||||||
@RequestMapping(value="/editState")
|
* 修改
|
||||||
@RequiresPermissions("courseware:edit")
|
*
|
||||||
@ResponseBody
|
* @param
|
||||||
public Object editState() throws Exception{
|
* @throws Exception
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
*/
|
||||||
String errInfo = "success";
|
@RequestMapping(value = "/editState")
|
||||||
PageData pd = new PageData();
|
@RequiresPermissions("courseware:edit")
|
||||||
pd = this.getPageData();
|
@ResponseBody
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
public Object editState() throws Exception {
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
videocoursewareService.editByState(pd);
|
String errInfo = "success";
|
||||||
map.put("result", errInfo);
|
PageData pd = new PageData();
|
||||||
return map;
|
pd = this.getPageData();
|
||||||
}
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
|
videocoursewareService.editByState(pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.zcloud.entity.system.DepartmentMenu;
|
||||||
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;
|
||||||
|
@ -34,6 +35,53 @@ public class DictionariesController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DictionariesService dictionariesService;
|
private DictionariesService dictionariesService;
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/listAllDictMent")
|
||||||
|
@RequiresPermissions("dictionaries:list")
|
||||||
|
@ResponseBody
|
||||||
|
public Object listAllDictMent() throws Exception {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
String errInfo = "success";
|
||||||
|
List<DepartmentMenu> menusBase = dictionariesService.listMentDictionByPId("0");
|
||||||
|
List<DepartmentMenu> menuLNotBase = dictionariesService.listMentDictionByPId("");
|
||||||
|
for (DepartmentMenu menu : menusBase) {
|
||||||
|
menu.setLabel(menu.getName());
|
||||||
|
List<DepartmentMenu> menus = iterateMenus(menuLNotBase, menu.getId());
|
||||||
|
menu.setMenuChildren(menus);
|
||||||
|
menu.setChildren(menus);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONArray arr = JSONArray.fromObject(menusBase);
|
||||||
|
String json = arr.toString();
|
||||||
|
map.put("zTreeNodes", json);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
public List<DepartmentMenu> iterateMenus(List<DepartmentMenu> menuVoList, String pid) {
|
||||||
|
List<DepartmentMenu> result = new ArrayList<DepartmentMenu>();
|
||||||
|
for (DepartmentMenu menu : menuVoList) {
|
||||||
|
if("0".equals(menu.getpId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
menu.setLabel(menu.getName());
|
||||||
|
// 获取菜单的id
|
||||||
|
String menuid = menu.getId();
|
||||||
|
// 获取菜单的父id
|
||||||
|
String parentid = menu.getpId();
|
||||||
|
if(Tools.isEmpty(pid)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (parentid.equals(pid)) {
|
||||||
|
// 递归查询当前子菜单的子菜单
|
||||||
|
List<DepartmentMenu> iterateMenu = iterateMenus(menuVoList,menuid);
|
||||||
|
menu.setMenuChildren(iterateMenu);
|
||||||
|
menu.setChildren(iterateMenu);
|
||||||
|
result.add(menu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示列表ztree
|
* 显示列表ztree
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
package com.zcloud.entity.system;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:TODO
|
||||||
|
* 作者:wangxuan
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
*/
|
||||||
|
public class DepartmentMenu {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String name;
|
||||||
|
private String pId;
|
||||||
|
private List<DepartmentMenu> menuChildren;
|
||||||
|
|
||||||
|
|
||||||
|
private String label;
|
||||||
|
private List<DepartmentMenu> children;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpId() {
|
||||||
|
return pId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setpId(String pId) {
|
||||||
|
this.pId = pId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DepartmentMenu> getMenuChildren() {
|
||||||
|
return menuChildren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuChildren(List<DepartmentMenu> menuChildren) {
|
||||||
|
this.menuChildren = menuChildren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DepartmentMenu> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<DepartmentMenu> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.entity.system.DepartmentMenu;
|
||||||
import com.zcloud.entity.system.Dictionaries;
|
import com.zcloud.entity.system.Dictionaries;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,4 +107,6 @@ public interface DictionariesMapper {
|
||||||
*/
|
*/
|
||||||
List<PageData> getIdsByRecuByParentId(String parentId);
|
List<PageData> getIdsByRecuByParentId(String parentId);
|
||||||
List<PageData> getIdsByParentIds(List<String> parentIds);
|
List<PageData> getIdsByParentIds(List<String> parentIds);
|
||||||
|
|
||||||
|
List<DepartmentMenu> listMentDictionByPId(String s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,9 +70,13 @@ public class FireQualifiedPhotosServiceImpl implements FireQualifiedPhotosServic
|
||||||
MultipartFile file = files[i];
|
MultipartFile file = files[i];
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = UuidUtil.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = UuidUtil.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
String IMGFILES_ID = UuidUtil.get32UUID();
|
||||||
imgPd.put("IMGFILES_ID",UuidUtil.get32UUID());
|
String FILEPATH = Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName;
|
||||||
imgPd.put("FILEPATH", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
// 当使用了bus_imgfiles mq的方式存图片
|
||||||
|
// 不使用 bus_imgfiles的话存pd里边用接口消费
|
||||||
|
Smb.sshSftp(file, fileName,Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile,IMGFILES_ID,QUALIFIED_PHOTOS_ID,"115");
|
||||||
|
imgPd.put("IMGFILES_ID",IMGFILES_ID);
|
||||||
|
imgPd.put("FILEPATH", FILEPATH);
|
||||||
imgFilesService.save(imgPd);
|
imgFilesService.save(imgPd);
|
||||||
}
|
}
|
||||||
fireQualifiedPhotosMapper.save(pd);
|
fireQualifiedPhotosMapper.save(pd);
|
||||||
|
|
|
@ -22,7 +22,7 @@ import javax.annotation.Resource;
|
||||||
@Service
|
@Service
|
||||||
public class SendMessageServiceImpl implements SendMessageService {
|
public class SendMessageServiceImpl implements SendMessageService {
|
||||||
|
|
||||||
@Value("${mq.topic.info}")
|
@Value("${mq.topic.docking}")
|
||||||
private String info;
|
private String info;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.entity.system.DepartmentMenu;
|
||||||
import com.zcloud.entity.system.Dictionaries;
|
import com.zcloud.entity.system.Dictionaries;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,4 +151,6 @@ public interface DictionariesService {
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public List<PageData> getIdsByParentIds(List<String> parentIds) throws Exception;
|
public List<PageData> getIdsByParentIds(List<String> parentIds) throws Exception;
|
||||||
|
|
||||||
|
List<DepartmentMenu> listMentDictionByPId(String s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.zcloud.entity.system.DepartmentMenu;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -256,4 +257,9 @@ public class DictionariesServiceImpl implements DictionariesService {
|
||||||
return dictionariesMapper.getIdsByParentIds(parentIds);
|
return dictionariesMapper.getIdsByParentIds(parentIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DepartmentMenu> listMentDictionByPId(String s) {
|
||||||
|
return dictionariesMapper.listMentDictionByPId(s);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
|
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
datasource.no1.url=jdbc:mysql://192.168.0.17:3306/qa-czks-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
datasource.no1.url=jdbc:mysql://192.168.0.247:3306/qa-czks-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||||
datasource.no1.username=root
|
datasource.no1.username=root
|
||||||
datasource.no1.password=root
|
datasource.no1.password=root
|
||||||
|
|
||||||
|
|
||||||
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
|
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
datasource.no2.url=jdbc:mysql://192.168.0.17:3306/qa-czks-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
datasource.no2.url=jdbc:mysql://192.168.0.247:3306/qa-czks-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||||
datasource.no2.username=root
|
datasource.no2.username=root
|
||||||
datasource.no2.password=root
|
datasource.no2.password=root
|
||||||
|
|
||||||
|
|
|
@ -266,4 +266,18 @@
|
||||||
#{PARENT_ID}
|
#{PARENT_ID}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="listMentDictionByPId" resultType="com.zcloud.entity.system.DepartmentMenu">
|
||||||
|
select
|
||||||
|
DICTIONARIES_ID ,PARENT_ID,NAME
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
where ISDELETE = 0
|
||||||
|
<if test="_parameter != null and _parameter != ''">
|
||||||
|
and PARENT_ID = #{_parameter}
|
||||||
|
</if>
|
||||||
|
<if test="_parameter == null and _parameter == ''">
|
||||||
|
and PARENT_ID != '0'
|
||||||
|
</if>
|
||||||
|
order by ORDER_BY
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue