企业系统管理
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;
|
||||||
|
@ -38,13 +40,17 @@ public class VideoCoursewareController extends BaseController {
|
||||||
private QuestionService questionService;
|
private QuestionService questionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private KcmiddlekjService kcmiddlekjService;
|
private KcmiddlekjService kcmiddlekjService;
|
||||||
/**新增
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/add")
|
@RequestMapping(value = "/add")
|
||||||
@RequiresPermissions("courseware:add")
|
@RequiresPermissions("courseware:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true, hasAnnex = true)
|
||||||
public Object add(@RequestParam(value = "vfile", required = false) MultipartFile vfile,
|
public Object add(@RequestParam(value = "vfile", required = false) MultipartFile vfile,
|
||||||
@RequestParam(value = "vcfile", required = false) MultipartFile vcfile) throws Exception {
|
@RequestParam(value = "vcfile", required = false) MultipartFile vcfile) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
@ -104,11 +110,14 @@ public class VideoCoursewareController extends BaseController {
|
||||||
}
|
}
|
||||||
videocoursewareService.save(pd);
|
videocoursewareService.save(pd);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -142,7 +151,9 @@ public class VideoCoursewareController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -207,7 +218,9 @@ public class VideoCoursewareController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -230,7 +243,9 @@ public class VideoCoursewareController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -247,7 +262,9 @@ public class VideoCoursewareController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -281,7 +298,9 @@ public class VideoCoursewareController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**
|
||||||
|
* 导出到excel
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -331,7 +350,9 @@ public class VideoCoursewareController extends BaseController {
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -348,7 +369,10 @@ public class VideoCoursewareController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
/**修改
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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