企业系统管理
parent
97a5df06f6
commit
b05a521997
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.controller.filemanager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import net.sf.json.JSONArray;
|
||||
|
||||
|
@ -70,7 +71,7 @@ public class MfolderController extends BaseController {
|
|||
pd.put("SHARE", "no");
|
||||
mfolderService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -240,12 +241,12 @@ public class MfolderController extends BaseController {
|
|||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("mfolder:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete(@RequestParam String MFOLDER_ID,@RequestParam String FILEPATH) throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.zcloud.controller.onlinexxks;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -38,16 +40,20 @@ public class VideoCoursewareController extends BaseController {
|
|||
private QuestionService questionService;
|
||||
@Autowired
|
||||
private KcmiddlekjService kcmiddlekjService;
|
||||
/**新增
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequestMapping(value = "/add")
|
||||
@RequiresPermissions("courseware:add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="vfile",required=false) MultipartFile vfile,
|
||||
@RequestParam(value="vcfile",required=false) MultipartFile vcfile) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
@DockAnnotation(isAdd = true, hasAnnex = true)
|
||||
public Object add(@RequestParam(value = "vfile", required = false) MultipartFile vfile,
|
||||
@RequestParam(value = "vcfile", required = false) MultipartFile vcfile) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -60,7 +66,7 @@ public class VideoCoursewareController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
pd.put("STATE", "0"); //课件状态 0启用、1禁用
|
||||
if (null != vfile && !vfile.isEmpty()) {
|
||||
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
|
@ -72,21 +78,21 @@ public class VideoCoursewareController extends BaseController {
|
|||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// 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);
|
||||
pd.put("VIDEOFILES", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
// 将MultipartFile file转换成为File
|
||||
File f_file = FileUtil.MultipartFileToFile(vfile);
|
||||
MultimediaObject instance = new MultimediaObject(f_file);
|
||||
MultimediaInfo result = instance.getInfo();
|
||||
System.out.println("视频时长:"+result.getDuration());
|
||||
double videoTime = (double)result.getDuration() / 1000.0;
|
||||
pd.put("VIDEOTIME", videoTime+"");
|
||||
System.out.println("视频时长:" + result.getDuration());
|
||||
double videoTime = (double) result.getDuration() / 1000.0;
|
||||
pd.put("VIDEOTIME", videoTime + "");
|
||||
pd.put("CLASSHOUR", Math.floor(videoTime / 60));
|
||||
f_file.delete();
|
||||
}
|
||||
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)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
|
@ -98,25 +104,28 @@ public class VideoCoursewareController extends BaseController {
|
|||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// 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);
|
||||
pd.put("VIDEOCAPTURE", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
videocoursewareService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequestMapping(value = "/delete")
|
||||
@RequiresPermissions("courseware:del")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
public Object delete() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -125,13 +134,13 @@ public class VideoCoursewareController extends BaseController {
|
|||
Smb.deleteFile(d.getString("VIDEOCAPTURE"));
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
String ArrayDATA_IDS[] = { pd.getString("VIDEOCOURSEWARE_ID") };
|
||||
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")); //课件类型
|
||||
String count = kcmiddlekjService.countByCourseWareId(pd);
|
||||
if(!"0".equals(count)){
|
||||
if (!"0".equals(count)) {
|
||||
map.put("result", "erroe"); //返回结果
|
||||
map.put("msg", "该课件已经在课程中发布!");
|
||||
return map;
|
||||
|
@ -142,24 +151,26 @@ public class VideoCoursewareController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequestMapping(value = "/edit")
|
||||
@RequiresPermissions("courseware:edit")
|
||||
@ResponseBody
|
||||
public Object edit(@RequestParam(value="vfile",required=false) MultipartFile vfile,
|
||||
@RequestParam(value="vcfile",required=false) MultipartFile vcfile) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object edit(@RequestParam(value = "vfile", required = false) MultipartFile vfile,
|
||||
@RequestParam(value = "vcfile", required = false) MultipartFile vcfile) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData d = videocoursewareService.findById(pd);
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if (null != vfile ) {
|
||||
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (null != vfile) {
|
||||
String suffixName = vfile.getOriginalFilename().substring(vfile.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
|
@ -171,21 +182,21 @@ public class VideoCoursewareController extends BaseController {
|
|||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// 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);
|
||||
pd.put("VIDEOFILES", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
// 将MultipartFile file转换成为File
|
||||
File f_file = FileUtil.MultipartFileToFile(vfile);
|
||||
MultimediaObject instance = new MultimediaObject(f_file);
|
||||
MultimediaInfo result = instance.getInfo();
|
||||
System.out.println("视频时长:"+result.getDuration());
|
||||
double videoTime = (double)result.getDuration() / 1000.0;
|
||||
pd.put("VIDEOTIME", videoTime+"");
|
||||
System.out.println("视频时长:" + result.getDuration());
|
||||
double videoTime = (double) result.getDuration() / 1000.0;
|
||||
pd.put("VIDEOTIME", videoTime + "");
|
||||
pd.put("CLASSHOUR", Math.floor(videoTime / 60));
|
||||
f_file.delete();
|
||||
}
|
||||
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)) {
|
||||
errInfo = "fail";
|
||||
map.put("result", errInfo);
|
||||
|
@ -197,7 +208,7 @@ public class VideoCoursewareController extends BaseController {
|
|||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile; //文件上传路径
|
||||
// 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);
|
||||
pd.put("VIDEOCAPTURE", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
|
@ -207,20 +218,22 @@ public class VideoCoursewareController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@RequestMapping(value = "/list")
|
||||
@RequiresPermissions("courseware:list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = videocoursewareService.list(page); //列出VideoCourseware列表
|
||||
|
@ -230,14 +243,16 @@ public class VideoCoursewareController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**去修改页面获取数据
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -247,22 +262,24 @@ public class VideoCoursewareController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/deleteAll")
|
||||
@RequestMapping(value = "/deleteAll")
|
||||
@RequiresPermissions("courseware:del")
|
||||
@ResponseBody
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object deleteAll() throws Exception {
|
||||
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())); //修改时间
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if(Tools.notEmpty(DATA_IDS)){
|
||||
if (Tools.notEmpty(DATA_IDS)) {
|
||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS); //待删除ids
|
||||
List<PageData> pdList = videocoursewareService.findByIds(pd);
|
||||
|
@ -274,24 +291,26 @@ public class VideoCoursewareController extends BaseController {
|
|||
questionService.deleteByCoursewareIds(pd);
|
||||
videocoursewareService.deleteAll(pd);
|
||||
errInfo = "success";
|
||||
}else{
|
||||
} else {
|
||||
errInfo = "fail";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**导出到excel
|
||||
/**
|
||||
* 导出到excel
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excel")
|
||||
@RequestMapping(value = "/excel")
|
||||
@RequiresPermissions("toExcel")
|
||||
public ModelAndView exportExcel() throws Exception{
|
||||
public ModelAndView exportExcel() throws Exception {
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("课件名称"); //1
|
||||
titles.add("主讲人"); //2
|
||||
|
@ -309,7 +328,7 @@ public class VideoCoursewareController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
List<PageData> varOList = videocoursewareService.listAll(pd);
|
||||
List<PageData> varList = new ArrayList<PageData>();
|
||||
for(int i=0;i<varOList.size();i++){
|
||||
for (int i = 0; i < varOList.size(); i++) {
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", varOList.get(i).getString("COURSEWARENAME")); //1
|
||||
vpd.put("var2", varOList.get(i).getString("SPEAKER")); //2
|
||||
|
@ -327,18 +346,20 @@ public class VideoCoursewareController extends BaseController {
|
|||
}
|
||||
dataMap.put("varList", varList);
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
mv = new ModelAndView(erv, dataMap);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**列表
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getSelect")
|
||||
@RequestMapping(value = "/getSelect")
|
||||
@ResponseBody
|
||||
public Object getSelect(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object getSelect(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
@ -348,15 +369,18 @@ public class VideoCoursewareController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**修改
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/editState")
|
||||
@RequestMapping(value = "/editState")
|
||||
@RequiresPermissions("courseware:edit")
|
||||
@ResponseBody
|
||||
public Object editState() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
public Object editState() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.entity.system.DepartmentMenu;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -34,6 +35,53 @@ public class DictionariesController extends BaseController {
|
|||
@Autowired
|
||||
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
|
||||
* @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.PageData;
|
||||
import com.zcloud.entity.system.DepartmentMenu;
|
||||
import com.zcloud.entity.system.Dictionaries;
|
||||
|
||||
/**
|
||||
|
@ -106,4 +107,6 @@ public interface DictionariesMapper {
|
|||
*/
|
||||
List<PageData> getIdsByRecuByParentId(String parentId);
|
||||
List<PageData> getIdsByParentIds(List<String> parentIds);
|
||||
|
||||
List<DepartmentMenu> listMentDictionByPId(String s);
|
||||
}
|
||||
|
|
|
@ -70,9 +70,13 @@ public class FireQualifiedPhotosServiceImpl implements FireQualifiedPhotosServic
|
|||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = UuidUtil.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
|
||||
imgPd.put("IMGFILES_ID",UuidUtil.get32UUID());
|
||||
imgPd.put("FILEPATH", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||
String IMGFILES_ID = UuidUtil.get32UUID();
|
||||
String 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);
|
||||
}
|
||||
fireQualifiedPhotosMapper.save(pd);
|
||||
|
|
|
@ -22,7 +22,7 @@ import javax.annotation.Resource;
|
|||
@Service
|
||||
public class SendMessageServiceImpl implements SendMessageService {
|
||||
|
||||
@Value("${mq.topic.info}")
|
||||
@Value("${mq.topic.docking}")
|
||||
private String info;
|
||||
|
||||
@Resource
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Map;
|
|||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.DepartmentMenu;
|
||||
import com.zcloud.entity.system.Dictionaries;
|
||||
|
||||
/**
|
||||
|
@ -150,4 +151,6 @@ public interface DictionariesService {
|
|||
* @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.stream.Collectors;
|
||||
|
||||
import com.zcloud.entity.system.DepartmentMenu;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -256,4 +257,9 @@ public class DictionariesServiceImpl implements DictionariesService {
|
|||
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.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.password=root
|
||||
|
||||
|
||||
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.password=root
|
||||
|
||||
|
|
|
@ -266,4 +266,18 @@
|
|||
#{PARENT_ID}
|
||||
</foreach>
|
||||
</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>
|
||||
|
|
Loading…
Reference in New Issue