2018-03-06 10:06:42 +08:00
|
|
|
package com.nis.web.controller.basics;
|
2018-02-22 12:46:50 +08:00
|
|
|
|
2018-03-04 19:20:32 +08:00
|
|
|
import java.util.Arrays;
|
2018-02-22 12:46:50 +08:00
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
|
|
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
import com.nis.domain.Page;
|
2018-03-06 10:06:42 +08:00
|
|
|
import com.nis.domain.basics.ServiceDictInfo;
|
2018-02-22 12:46:50 +08:00
|
|
|
import com.nis.util.StringUtil;
|
|
|
|
|
import com.nis.util.StringUtils;
|
|
|
|
|
import com.nis.web.controller.BaseController;
|
|
|
|
|
|
|
|
|
|
@Controller
|
2018-03-06 10:06:42 +08:00
|
|
|
@RequestMapping(value = "${adminPath}/basics/serviceDictInfo")
|
2018-02-22 12:46:50 +08:00
|
|
|
public class ServiceDictInfoController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ModelAttribute
|
|
|
|
|
public ServiceDictInfo get(@RequestParam(required=false) Integer serviceDictId) {
|
|
|
|
|
if (!StringUtil.isEmpty(serviceDictId)){
|
|
|
|
|
return serviceDictInfoService.getDictById(serviceDictId);
|
|
|
|
|
}else{
|
|
|
|
|
return new ServiceDictInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据serviceDictId查出配置对象
|
|
|
|
|
* @param serviceDictId
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param model
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "loadDataDict")
|
|
|
|
|
public ServiceDictInfo loadDataDict(@RequestParam(required=false) Integer serviceDictId,HttpServletRequest request, HttpServletResponse response, Model model){
|
|
|
|
|
|
|
|
|
|
return serviceDictInfoService.getDictById(serviceDictId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2018-03-01 19:13:57 +08:00
|
|
|
* 查询业务辅助表-业务字典信息列表(无条件分页查询)
|
2018-02-22 12:46:50 +08:00
|
|
|
* @param serviceDictInfo
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param model
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("sys:dict:view")
|
|
|
|
|
@RequestMapping(value = {"list", ""})
|
2018-03-04 19:20:32 +08:00
|
|
|
public String list(String itType, ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model,Integer selectedType) {
|
|
|
|
|
//处理数据
|
|
|
|
|
String[] strArr = itType.split("-");
|
|
|
|
|
Integer[] intArr = new Integer[strArr.length];
|
|
|
|
|
for(int i=0;i<strArr.length;i++){
|
|
|
|
|
intArr[i] = Integer.valueOf(strArr[i]);
|
|
|
|
|
}
|
|
|
|
|
if(serviceDictInfo.getItemType()!=null){
|
|
|
|
|
model.addAttribute("selectedType", serviceDictInfo.getItemType());
|
|
|
|
|
}else{
|
|
|
|
|
model.addAttribute("selectedType", selectedType);
|
2018-03-06 10:06:42 +08:00
|
|
|
serviceDictInfo.setItemType(selectedType);
|
2018-03-04 19:20:32 +08:00
|
|
|
}
|
|
|
|
|
|
2018-03-01 19:13:57 +08:00
|
|
|
//查出顶层分页数据
|
2018-03-04 19:20:32 +08:00
|
|
|
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictList(new Page<ServiceDictInfo>(request, response), serviceDictInfo,intArr);
|
2018-03-01 19:13:57 +08:00
|
|
|
model.addAttribute("page", page);
|
|
|
|
|
//查出所有数据
|
|
|
|
|
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictList();
|
|
|
|
|
//处理数据,保留顶层中的所有下层数据
|
|
|
|
|
List<ServiceDictInfo> list = Lists.newArrayList();
|
|
|
|
|
for(int i=allList.size()-1;i>=0;i--){
|
2018-03-06 10:06:42 +08:00
|
|
|
ServiceDictInfo se = allList.get(i);
|
|
|
|
|
if(se!=null&&se.getParent()!=null&&se.getParent().getServiceDictId()!=null&&se.getParent().getServiceDictId()==0){
|
|
|
|
|
allList.remove(se);
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
|
|
|
|
}
|
2018-03-06 10:06:42 +08:00
|
|
|
allList.addAll(page.getList());
|
2018-03-01 19:13:57 +08:00
|
|
|
ServiceDictInfo.sortList(list,allList,0,true);
|
2018-03-04 19:20:32 +08:00
|
|
|
|
|
|
|
|
model.addAttribute("itType", itType);
|
|
|
|
|
model.addAttribute("intArr", Arrays.asList(intArr));
|
2018-03-01 19:13:57 +08:00
|
|
|
model.addAttribute("list", list);
|
2018-03-06 10:06:42 +08:00
|
|
|
return "/basics/serviceDictList";
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询业务辅助表-业务字典信息列表(含条件查询)
|
|
|
|
|
* @param serviceDictInfo
|
|
|
|
|
* @param request
|
|
|
|
|
* @param response
|
|
|
|
|
* @param model
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("sys:dict:view")
|
|
|
|
|
@RequestMapping(value = {"searchList"})
|
2018-03-04 19:20:32 +08:00
|
|
|
public String searchList(String itType, ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
2018-03-01 19:13:57 +08:00
|
|
|
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
|
|
|
|
|
&&serviceDictInfo.getItemCode()==null
|
|
|
|
|
&&serviceDictInfo.getBeginDate()==null
|
2018-03-04 19:20:32 +08:00
|
|
|
&&serviceDictInfo.getEndDate()==null){
|
|
|
|
|
Integer selectedType = null;
|
|
|
|
|
if(serviceDictInfo.getItemType()!=null){
|
|
|
|
|
selectedType = serviceDictInfo.getItemType();
|
2018-03-06 10:06:42 +08:00
|
|
|
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType+"&selectedType="+selectedType;
|
2018-03-04 19:20:32 +08:00
|
|
|
}
|
2018-03-06 10:06:42 +08:00
|
|
|
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType;
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
String[] strArr = itType.split("-");
|
|
|
|
|
Integer[] intArr = new Integer[strArr.length];
|
|
|
|
|
for(int i=0;i<strArr.length;i++){
|
|
|
|
|
intArr[i] = Integer.valueOf(strArr[i]);
|
|
|
|
|
}
|
|
|
|
|
model.addAttribute("itType", itType);
|
|
|
|
|
model.addAttribute("intArr", Arrays.asList(intArr));
|
|
|
|
|
Page<ServiceDictInfo> page = serviceDictInfoService.findDictSearchList(new Page<ServiceDictInfo>(request, response), serviceDictInfo,intArr);
|
2018-02-22 12:46:50 +08:00
|
|
|
model.addAttribute("page", page);
|
2018-03-04 19:20:32 +08:00
|
|
|
|
2018-02-22 12:46:50 +08:00
|
|
|
|
2018-03-06 10:06:42 +08:00
|
|
|
return "/basics/serviceDictInfoSearchList";
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
|
2018-03-01 19:13:57 +08:00
|
|
|
|
2018-02-22 12:46:50 +08:00
|
|
|
/**
|
|
|
|
|
* 进入添加或修改页面
|
|
|
|
|
* @param serviceDictInfo
|
|
|
|
|
* @param model
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value={"form"})
|
2018-03-04 19:20:32 +08:00
|
|
|
public String form(ServiceDictInfo serviceDictInfo, Model model,String doAction,String itType) {
|
2018-02-22 12:46:50 +08:00
|
|
|
if(doAction!=null&&doAction.equals("0")){
|
2018-03-06 10:06:42 +08:00
|
|
|
return "/basics/serviceDictInfo";
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getServiceDictId() == null||serviceDictInfo.getParent().getServiceDictId() == 0) {
|
2018-03-01 19:13:57 +08:00
|
|
|
ServiceDictInfo parent = new ServiceDictInfo();
|
|
|
|
|
parent.setServiceDictId(0);
|
2018-03-06 10:06:42 +08:00
|
|
|
parent.setItemValue("根节点");
|
2018-03-01 19:13:57 +08:00
|
|
|
serviceDictInfo.setParent(parent);
|
|
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
String[] strArr = itType.split("-");
|
|
|
|
|
Integer[] intArr = new Integer[strArr.length];
|
|
|
|
|
for(int i=0;i<strArr.length;i++){
|
|
|
|
|
intArr[i] = Integer.valueOf(strArr[i]);
|
|
|
|
|
}
|
|
|
|
|
model.addAttribute("intArr", Arrays.asList(intArr));
|
2018-03-01 19:13:57 +08:00
|
|
|
model.addAttribute("serviceDictInfo", serviceDictInfo);
|
2018-03-04 19:20:32 +08:00
|
|
|
model.addAttribute("itType", itType);
|
2018-03-06 10:06:42 +08:00
|
|
|
return "/basics/serviceDictForm";
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 新增或修改
|
|
|
|
|
* @param serviceDictInfo
|
|
|
|
|
* @param model
|
|
|
|
|
* @param redirectAttributes
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("sys:dict:edit")
|
|
|
|
|
@RequestMapping(value = "saveOrUpdate")
|
2018-03-04 19:20:32 +08:00
|
|
|
public String saveOrUpdate(ServiceDictInfo serviceDictInfo,Model model, RedirectAttributes redirectAttributes,String itType) {
|
2018-02-22 12:46:50 +08:00
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
serviceDictInfoService.saveOrUpdate(serviceDictInfo);
|
|
|
|
|
addMessage(redirectAttributes, "保存配置成功");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
addMessage(redirectAttributes, "保存配置失败!");
|
|
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
|
2018-03-06 10:06:42 +08:00
|
|
|
return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType;
|
2018-03-04 19:20:32 +08:00
|
|
|
|
2018-02-22 12:46:50 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2018-03-01 19:13:57 +08:00
|
|
|
* 删除(删除时删除所有下级菜单)
|
2018-02-22 12:46:50 +08:00
|
|
|
* @param serviceDictInfo
|
|
|
|
|
* @param model
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value={"delete"})
|
2018-03-04 19:20:32 +08:00
|
|
|
public String delete(ServiceDictInfo serviceDictInfo, RedirectAttributes redirectAttributes,String itType) {
|
2018-02-22 12:46:50 +08:00
|
|
|
try {
|
|
|
|
|
serviceDictInfoService.deleteDict(serviceDictInfo);
|
|
|
|
|
addMessage(redirectAttributes, "删除配置成功");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
addMessage(redirectAttributes, "删除配置失败!");
|
|
|
|
|
}
|
2018-03-06 10:06:42 +08:00
|
|
|
return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType;
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* isShowHide是否显示隐藏菜单
|
|
|
|
|
* @param extId
|
|
|
|
|
* @param isShowHidden
|
|
|
|
|
* @param response
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("user")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "treeData")
|
2018-03-04 19:20:32 +08:00
|
|
|
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response, String itType) {
|
2018-02-22 12:46:50 +08:00
|
|
|
List<Map<String, Object>> mapList = Lists.newArrayList();
|
2018-03-04 19:20:32 +08:00
|
|
|
Map<String, Object> map2 = Maps.newHashMap();
|
2018-03-06 10:06:42 +08:00
|
|
|
map2.put("id", 0);
|
2018-03-04 19:20:32 +08:00
|
|
|
map2.put("pId", 0);
|
2018-03-06 10:06:42 +08:00
|
|
|
map2.put("name","根节点");
|
2018-03-04 19:20:32 +08:00
|
|
|
//map2.put("placeholder","0");
|
|
|
|
|
mapList.add(map2);
|
|
|
|
|
//找出该类型所有的非叶子配置
|
|
|
|
|
List<ServiceDictInfo> list = serviceDictInfoService.findAllNoLeafDictList(itType);
|
2018-02-22 12:46:50 +08:00
|
|
|
for (int i=0; i<list.size(); i++){
|
|
|
|
|
ServiceDictInfo serviceDictInfo = list.get(i);
|
|
|
|
|
if (StringUtils.isBlank(extId) || (extId !=null && !extId.equals(serviceDictInfo.getServiceDictId().toString()))) {
|
2018-03-01 19:13:57 +08:00
|
|
|
if(serviceDictInfo.getIsValid().equals(0)){
|
2018-02-22 12:46:50 +08:00
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> map = Maps.newHashMap();
|
|
|
|
|
map.put("id", serviceDictInfo.getServiceDictId());
|
|
|
|
|
map.put("pId", serviceDictInfo.getParent().getServiceDictId());
|
|
|
|
|
map.put("name",serviceDictInfo.getItemValue());
|
2018-03-04 19:20:32 +08:00
|
|
|
/*if(serviceDictInfo.getParent().getServiceDictId()!=0){
|
|
|
|
|
ServiceDictInfo parent = serviceDictInfoService.getDictById(serviceDictInfo.getParent().getServiceDictId());
|
|
|
|
|
//map.put("placeholder",parent.getItemType().toString());
|
|
|
|
|
}*/
|
|
|
|
|
|
2018-02-22 12:46:50 +08:00
|
|
|
mapList.add(map);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return mapList;
|
|
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
|
|
|
|
|
|
2018-02-22 12:46:50 +08:00
|
|
|
/**
|
2018-03-04 19:20:32 +08:00
|
|
|
* 校验itemCode是否重复
|
|
|
|
|
* @param itemCode
|
2018-02-22 12:46:50 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2018-03-04 19:20:32 +08:00
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "isItemCodeRepeat")
|
|
|
|
|
public boolean isItemCodeRepeat(String itemCode,String oldItemCode) {
|
|
|
|
|
List<ServiceDictInfo> list = Lists.newArrayList();
|
|
|
|
|
if(oldItemCode!=null&&itemCode.trim().equals(oldItemCode.trim())){
|
|
|
|
|
return true;
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
if(!StringUtil.isEmpty(itemCode)){
|
|
|
|
|
list = serviceDictInfoService.findByItemCode(Integer.valueOf(itemCode));
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
if(list==null||list.size()==0){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2018-03-04 19:20:32 +08:00
|
|
|
* 校验上下级配置数据类型
|
|
|
|
|
* @param parent 父级id
|
|
|
|
|
* param parent 子级类型
|
2018-02-22 12:46:50 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2018-03-04 19:20:32 +08:00
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "ajaxType")
|
|
|
|
|
public boolean ajaxType(Integer parent,Integer child) {
|
|
|
|
|
if(parent==-1||parent==0){
|
|
|
|
|
return true;
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
ServiceDictInfo p = serviceDictInfoService.getDictById(parent);
|
|
|
|
|
if(p.getItemType()==child){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2018-03-04 19:20:32 +08:00
|
|
|
* 校验更改数据类型后校验数据类型是否与下级冲突
|
|
|
|
|
* @param parent 父级id
|
|
|
|
|
* param parent 子级类型
|
2018-03-01 19:13:57 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2018-03-04 19:20:32 +08:00
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "ajaxChildrenType")
|
|
|
|
|
public boolean ajaxChildrenType(Integer parent,Integer newItemType) {
|
|
|
|
|
if(parent==null){
|
|
|
|
|
return true;
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
//比较下级任意一个对象
|
|
|
|
|
List<ServiceDictInfo> list = serviceDictInfoService.getDictByParentId(parent);
|
|
|
|
|
if(list==null||list.size()==0){
|
|
|
|
|
return true;
|
|
|
|
|
}else{
|
|
|
|
|
for(ServiceDictInfo serviceDictInfo:list){
|
|
|
|
|
if(serviceDictInfo.getItemType()==newItemType){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2018-03-04 19:20:32 +08:00
|
|
|
* 根据id取itemType
|
2018-02-22 12:46:50 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2018-03-04 19:20:32 +08:00
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "ajaxItemType")
|
|
|
|
|
public Integer ajaxItemType(Integer parent) {
|
|
|
|
|
if(parent==0||parent==-1){
|
|
|
|
|
return 0;
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
ServiceDictInfo p = serviceDictInfoService.getDictById(parent);
|
2018-02-22 12:46:50 +08:00
|
|
|
|
2018-03-04 19:20:32 +08:00
|
|
|
return p.getItemType();
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
/**
|
2018-03-04 19:20:32 +08:00
|
|
|
* 校验叶子节点有下级不得更改为叶子节点
|
2018-02-22 12:46:50 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
2018-03-04 19:20:32 +08:00
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "ajaxLeafChange")
|
|
|
|
|
public boolean ajaxLeafChange(Integer parent,Integer newIsLeaf) {
|
|
|
|
|
if(parent==null||parent==0){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
List<ServiceDictInfo> list = serviceDictInfoService.getDictByParentId(parent);
|
|
|
|
|
if(list==null||list.size()==0){
|
|
|
|
|
return true;
|
|
|
|
|
}else{
|
|
|
|
|
if(newIsLeaf==0){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
return false;
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|
|
|
|
|
|
2018-03-01 19:13:57 +08:00
|
|
|
/**
|
2018-03-04 19:20:32 +08:00
|
|
|
* 校验叶子节点无父级不得更改为叶子节点
|
2018-03-01 19:13:57 +08:00
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ResponseBody
|
2018-03-04 19:20:32 +08:00
|
|
|
@RequestMapping(value = "ajaxLeafHasTree")
|
|
|
|
|
public boolean ajaxLeafHasTree(Integer serviceDictId,Integer newIsLeaf,Integer parentId) {
|
|
|
|
|
|
|
|
|
|
if(parentId==null||parentId==0||parentId==-1){
|
|
|
|
|
if(newIsLeaf==0){
|
|
|
|
|
return true;
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
|
|
|
|
}
|
2018-03-04 19:20:32 +08:00
|
|
|
if(parentId!=null&&parentId!=0){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
2018-03-01 19:13:57 +08:00
|
|
|
}
|
|
|
|
|
|
2018-02-22 12:46:50 +08:00
|
|
|
}
|