Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package com.nis.domain.configuration;
|
||||
package com.nis.domain.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@@ -131,6 +131,7 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Integer parentId, boolean cascade){
|
||||
for (int i=0; i<sourcelist.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = sourcelist.get(i);
|
||||
//System.out.println(serviceDictInfo.getServiceDictId()+">>>>>"+serviceDictInfo.getParent().getServiceDictId());
|
||||
if (serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getServiceDictId()!=null
|
||||
&& serviceDictInfo.getParent().getServiceDictId().equals(parentId)){
|
||||
list.add(serviceDictInfo);
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nis.domain.configuration;
|
||||
package com.nis.domain.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@@ -9,11 +9,11 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.SysDataDictionaryName;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.SysDictInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.web.dao.SysDictDao;
|
||||
import com.nis.web.dao.configuration.ServiceDictInfoDao;
|
||||
import com.nis.web.dao.configuration.SysDictInfoDao;
|
||||
import com.nis.web.dao.basics.ServiceDictInfoDao;
|
||||
import com.nis.web.dao.basics.SysDictInfoDao;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -19,14 +19,13 @@ 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;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/configuration/serviceDictInfo")
|
||||
@RequestMapping(value = "${adminPath}/basics/serviceDictInfo")
|
||||
public class ServiceDictInfoController extends BaseController {
|
||||
|
||||
|
||||
@@ -78,6 +77,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
model.addAttribute("selectedType", serviceDictInfo.getItemType());
|
||||
}else{
|
||||
model.addAttribute("selectedType", selectedType);
|
||||
serviceDictInfo.setItemType(selectedType);
|
||||
}
|
||||
|
||||
//查出顶层分页数据
|
||||
@@ -87,32 +87,19 @@ public class ServiceDictInfoController extends BaseController {
|
||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictList();
|
||||
//处理数据,保留顶层中的所有下层数据
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
boolean flag = false;
|
||||
for(int i=allList.size()-1;i>=0;i--){
|
||||
ServiceDictInfo temp = allList.get(i);
|
||||
if(temp.getParent()!=null&&temp.getParent().getServiceDictId()!=null&&temp.getParent().getServiceDictId()==0){
|
||||
for(ServiceDictInfo topTemp:page.getList()){
|
||||
if(temp.getServiceDictId()==topTemp.getServiceDictId()){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
allList.remove(temp);
|
||||
flag=false;
|
||||
}else{
|
||||
flag=false;
|
||||
}
|
||||
ServiceDictInfo se = allList.get(i);
|
||||
if(se!=null&&se.getParent()!=null&&se.getParent().getServiceDictId()!=null&&se.getParent().getServiceDictId()==0){
|
||||
allList.remove(se);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
allList.addAll(page.getList());
|
||||
ServiceDictInfo.sortList(list,allList,0,true);
|
||||
|
||||
model.addAttribute("itType", itType);
|
||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
||||
model.addAttribute("list", list);
|
||||
return "/cfg/serviceDictList";
|
||||
return "/basics/serviceDictList";
|
||||
}
|
||||
|
||||
|
||||
@@ -134,9 +121,9 @@ public class ServiceDictInfoController extends BaseController {
|
||||
Integer selectedType = null;
|
||||
if(serviceDictInfo.getItemType()!=null){
|
||||
selectedType = serviceDictInfo.getItemType();
|
||||
return "redirect:"+ adminPath + "/configuration/serviceDictInfo/list?itType="+itType+"&selectedType="+selectedType;
|
||||
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType+"&selectedType="+selectedType;
|
||||
}
|
||||
return "redirect:"+ adminPath + "/configuration/serviceDictInfo/list?itType="+itType;
|
||||
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType;
|
||||
}
|
||||
String[] strArr = itType.split("-");
|
||||
Integer[] intArr = new Integer[strArr.length];
|
||||
@@ -149,7 +136,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
model.addAttribute("page", page);
|
||||
|
||||
|
||||
return "/cfg/serviceDictInfoSearchList";
|
||||
return "/basics/serviceDictInfoSearchList";
|
||||
}
|
||||
|
||||
|
||||
@@ -162,12 +149,12 @@ public class ServiceDictInfoController extends BaseController {
|
||||
@RequestMapping(value={"form"})
|
||||
public String form(ServiceDictInfo serviceDictInfo, Model model,String doAction,String itType) {
|
||||
if(doAction!=null&&doAction.equals("0")){
|
||||
return "/cfg/serviceDictInfo";
|
||||
return "/basics/serviceDictInfo";
|
||||
}
|
||||
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getServiceDictId() == null||serviceDictInfo.getParent().getServiceDictId() == 0) {
|
||||
ServiceDictInfo parent = new ServiceDictInfo();
|
||||
parent.setServiceDictId(0);
|
||||
parent.setItemValue("无上级");
|
||||
parent.setItemValue("根节点");
|
||||
serviceDictInfo.setParent(parent);
|
||||
}
|
||||
String[] strArr = itType.split("-");
|
||||
@@ -178,7 +165,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
||||
model.addAttribute("serviceDictInfo", serviceDictInfo);
|
||||
model.addAttribute("itType", itType);
|
||||
return "/cfg/serviceDictForm";
|
||||
return "/basics/serviceDictForm";
|
||||
}
|
||||
/**
|
||||
* 新增或修改
|
||||
@@ -199,7 +186,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
addMessage(redirectAttributes, "保存配置失败!");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/list?itType="+itType;
|
||||
return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType;
|
||||
|
||||
|
||||
}
|
||||
@@ -220,7 +207,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "删除配置失败!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/list?itType="+itType;
|
||||
return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType;
|
||||
}
|
||||
|
||||
|
||||
@@ -237,9 +224,9 @@ public class ServiceDictInfoController extends BaseController {
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response, String itType) {
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
Map<String, Object> map2 = Maps.newHashMap();
|
||||
map2.put("id", -1);
|
||||
map2.put("id", 0);
|
||||
map2.put("pId", 0);
|
||||
map2.put("name","无上级");
|
||||
map2.put("name","根节点");
|
||||
//map2.put("placeholder","0");
|
||||
mapList.add(map2);
|
||||
//找出该类型所有的非叶子配置
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -19,14 +19,13 @@ 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;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.SysDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/configuration/sysDictInfo")
|
||||
@RequestMapping(value = "${adminPath}/basics/sysDictInfo")
|
||||
public class SysDictInfoController extends BaseController {
|
||||
|
||||
|
||||
@@ -78,6 +77,7 @@ public class SysDictInfoController extends BaseController {
|
||||
model.addAttribute("selectedType", sysDictInfo.getItemType());
|
||||
}else{
|
||||
model.addAttribute("selectedType", selectedType);
|
||||
sysDictInfo.setItemType(selectedType);
|
||||
}
|
||||
|
||||
//查出顶层分页数据
|
||||
@@ -87,32 +87,19 @@ public class SysDictInfoController extends BaseController {
|
||||
List<SysDictInfo> allList = sysDictInfoService.findAllDictList();
|
||||
//处理数据,保留顶层中的所有下层数据
|
||||
List<SysDictInfo> list = Lists.newArrayList();
|
||||
boolean flag = false;
|
||||
for(int i=allList.size()-1;i>=0;i--){
|
||||
SysDictInfo temp = allList.get(i);
|
||||
if(temp.getParent()!=null&&temp.getParent().getSysDictId()!=null&&temp.getParent().getSysDictId()==0){
|
||||
for(SysDictInfo topTemp:page.getList()){
|
||||
if(temp.getSysDictId()==topTemp.getSysDictId()){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
allList.remove(temp);
|
||||
flag=false;
|
||||
}else{
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
SysDictInfo se = allList.get(i);
|
||||
if(se!=null&&se.getParent()!=null&&se.getParent().getSysDictId()!=null&&se.getParent().getSysDictId()==0){
|
||||
allList.remove(se);
|
||||
}
|
||||
}
|
||||
|
||||
allList.addAll(page.getList());
|
||||
SysDictInfo.sortList(list,allList,0,true);
|
||||
|
||||
model.addAttribute("itType", itType);
|
||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
||||
model.addAttribute("list", list);
|
||||
return "/cfg/sysDictList";
|
||||
return "/basics/sysDictList";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,9 +120,9 @@ public class SysDictInfoController extends BaseController {
|
||||
Integer selectedType = null;
|
||||
if(sysDictInfo.getItemType()!=null){
|
||||
selectedType = sysDictInfo.getItemType();
|
||||
return "redirect:"+ adminPath + "/configuration/sysDictInfo/list?itType="+itType+"&selectedType="+selectedType;
|
||||
return "redirect:"+ adminPath + "/basics/sysDictInfo/list?itType="+itType+"&selectedType="+selectedType;
|
||||
}
|
||||
return "redirect:"+ adminPath + "/configuration/sysDictInfo/list?itType="+itType;
|
||||
return "redirect:"+ adminPath + "/basics/sysDictInfo/list?itType="+itType;
|
||||
}
|
||||
String[] strArr = itType.split("-");
|
||||
Integer[] intArr = new Integer[strArr.length];
|
||||
@@ -148,7 +135,7 @@ public class SysDictInfoController extends BaseController {
|
||||
model.addAttribute("page", page);
|
||||
|
||||
|
||||
return "/cfg/sysDictInfoSearchList";
|
||||
return "/basics/sysDictInfoSearchList";
|
||||
}
|
||||
|
||||
|
||||
@@ -169,12 +156,12 @@ public class SysDictInfoController extends BaseController {
|
||||
@RequestMapping(value={"form"})
|
||||
public String form(SysDictInfo sysDictInfo, Model model, String doAction, String itType) {
|
||||
if(doAction!=null&&doAction.equals("0")){
|
||||
return "/cfg/sysDictInfo";
|
||||
return "/basics/sysDictInfo";
|
||||
}
|
||||
if (sysDictInfo.getParent() == null || sysDictInfo.getParent().getSysDictId() == null||sysDictInfo.getParent().getSysDictId() == 0) {
|
||||
SysDictInfo parent = new SysDictInfo();
|
||||
parent.setSysDictId(0);
|
||||
parent.setItemValue("无上级");
|
||||
parent.setItemValue("根节点");
|
||||
sysDictInfo.setParent(parent);
|
||||
}
|
||||
String[] strArr = itType.split("-");
|
||||
@@ -185,7 +172,7 @@ public class SysDictInfoController extends BaseController {
|
||||
model.addAttribute("intArr", Arrays.asList(intArr));
|
||||
model.addAttribute("sysDictInfo", sysDictInfo);
|
||||
model.addAttribute("itType", itType);
|
||||
return "/cfg/sysDictForm";
|
||||
return "/basics/sysDictForm";
|
||||
}
|
||||
/**
|
||||
* 新增或修改
|
||||
@@ -206,7 +193,7 @@ public class SysDictInfoController extends BaseController {
|
||||
addMessage(redirectAttributes, "保存配置失败!");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/configuration/sysDictInfo/list?itType="+itType;
|
||||
return "redirect:" + adminPath + "/basics/sysDictInfo/list?itType="+itType;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,7 +211,7 @@ public class SysDictInfoController extends BaseController {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "删除配置失败!");
|
||||
}
|
||||
return "redirect:" + adminPath + "/configuration/sysDictInfo/list?itType="+itType;
|
||||
return "redirect:" + adminPath + "/basics/sysDictInfo/list?itType="+itType;
|
||||
}
|
||||
|
||||
|
||||
@@ -241,9 +228,9 @@ public class SysDictInfoController extends BaseController {
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response, String itType) {
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
Map<String, Object> map2 = Maps.newHashMap();
|
||||
map2.put("id", -1);
|
||||
map2.put("id", 0);
|
||||
map2.put("pId", 0);
|
||||
map2.put("name","无上级");
|
||||
map2.put("name","根节点");
|
||||
//map2.put("placeholder","0");
|
||||
mapList.add(map2);
|
||||
//找出该类型所有的非叶子配置
|
||||
@@ -1,146 +1,146 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.TaskInfo;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.service.configuration.RequestInfoService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/request")
|
||||
public class RequestInfoController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private RequestInfoService requestInfoService;
|
||||
|
||||
|
||||
/**
|
||||
*来函列表
|
||||
*/
|
||||
@RequestMapping(value = {"list",""})
|
||||
public String list(RequestInfo requestInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
Page<RequestInfo> page = requestInfoService.findRequestInfo(new Page<RequestInfo>(request, response), requestInfo);
|
||||
model.addAttribute("page", page);
|
||||
return "/cfg/requestList";
|
||||
}
|
||||
/**
|
||||
* 进入用户添加或修改页面
|
||||
*/
|
||||
@RequestMapping(value={"form"})
|
||||
public String form(RequestInfo requestInfo, Model model) {
|
||||
TaskInfo taskInfo = new TaskInfo();
|
||||
taskInfo.setId(requestInfo.getTaskId());
|
||||
showTask(taskInfo,model);
|
||||
if(requestInfo.getId()!=null){
|
||||
requestInfo = requestInfoService.getRequestInfoById(requestInfo.getId());
|
||||
model.addAttribute("requestInfo", requestInfo);
|
||||
}else{
|
||||
model.addAttribute("requestInfo", requestInfo);
|
||||
}
|
||||
return "/cfg/requestForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改
|
||||
*/
|
||||
@RequestMapping(value = "saveOrUpdate")
|
||||
public String saveOrUpdate(RequestInfo requestInfo, HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
if(requestInfo.getId()!=null){
|
||||
// 保存用户信息
|
||||
logger.info(requestInfo.getId()+"修改成功");
|
||||
requestInfoService.saveOrUpdate(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
}else{
|
||||
if (!"true".equals(checkRequestNumber(requestInfo.getRequestNumber()))){
|
||||
logger.info(requestInfo.getRequestNumber()+"重复数据");
|
||||
addMessage(model, "error");
|
||||
return form(requestInfo, model);
|
||||
}
|
||||
// 保存用户信息
|
||||
requestInfoService.saveOrUpdate(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
logger.info(requestInfo.getId()+"保存成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
addMessage(model, "error");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证是否有效
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "checkRequestNumber")
|
||||
public String checkRequestNumber(String requestNumber) {
|
||||
if (requestNumber !=null && requestInfoService.getRequestInfoByRequestNumber(requestNumber) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param requestInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "requestExamine")
|
||||
public String requestExamine(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.requestExamine(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 取消审核
|
||||
* @param requestInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "requestCancelExamine")
|
||||
public String requestCancelExamine(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.requestCancelExamine(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param requestInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
public String delete(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.delete(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专项任务
|
||||
* @param taskInfo
|
||||
* @param model
|
||||
*/
|
||||
public void showTask(TaskInfo taskInfo ,Model model){
|
||||
List<TaskInfo> taskInfos = requestInfoService.showTask(taskInfo);
|
||||
model.addAttribute("taskInfos", taskInfos);
|
||||
}
|
||||
}
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.domain.configuration.TaskInfo;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.service.configuration.RequestInfoService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/request")
|
||||
public class RequestInfoController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private RequestInfoService requestInfoService;
|
||||
|
||||
|
||||
/**
|
||||
*来函列表
|
||||
*/
|
||||
@RequestMapping(value = {"list",""})
|
||||
public String list(RequestInfo requestInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
Page<RequestInfo> page = requestInfoService.findRequestInfo(new Page<RequestInfo>(request, response), requestInfo);
|
||||
model.addAttribute("page", page);
|
||||
return "/cfg/requestList";
|
||||
}
|
||||
/**
|
||||
* 进入用户添加或修改页面
|
||||
*/
|
||||
@RequestMapping(value={"form"})
|
||||
public String form(RequestInfo requestInfo, Model model) {
|
||||
TaskInfo taskInfo = new TaskInfo();
|
||||
taskInfo.setId(requestInfo.getTaskId());
|
||||
showTask(taskInfo,model);
|
||||
if(requestInfo.getId()!=null){
|
||||
requestInfo = requestInfoService.getRequestInfoById(requestInfo.getId());
|
||||
model.addAttribute("requestInfo", requestInfo);
|
||||
}else{
|
||||
model.addAttribute("requestInfo", requestInfo);
|
||||
}
|
||||
return "/cfg/requestForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改
|
||||
*/
|
||||
@RequestMapping(value = "saveOrUpdate")
|
||||
public String saveOrUpdate(RequestInfo requestInfo, HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
if(requestInfo.getId()!=null){
|
||||
// 保存用户信息
|
||||
logger.info(requestInfo.getId()+"修改成功");
|
||||
requestInfoService.saveOrUpdate(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
}else{
|
||||
if (!"true".equals(checkRequestNumber(requestInfo.getRequestNumber()))){
|
||||
logger.info(requestInfo.getRequestNumber()+"重复数据");
|
||||
addMessage(model, "error");
|
||||
return form(requestInfo, model);
|
||||
}
|
||||
// 保存用户信息
|
||||
requestInfoService.saveOrUpdate(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
logger.info(requestInfo.getId()+"保存成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
addMessage(model, "error");
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证是否有效
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "checkRequestNumber")
|
||||
public String checkRequestNumber(String requestNumber) {
|
||||
if (requestNumber !=null && requestInfoService.getRequestInfoByRequestNumber(requestNumber) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param requestInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "requestExamine")
|
||||
public String requestExamine(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.requestExamine(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 取消审核
|
||||
* @param requestInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "requestCancelExamine")
|
||||
public String requestCancelExamine(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.requestCancelExamine(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param requestInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
public String delete(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){
|
||||
requestInfoService.delete(requestInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/cfg/request/list?repage";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专项任务
|
||||
* @param taskInfo
|
||||
* @param model
|
||||
*/
|
||||
public void showTask(TaskInfo taskInfo ,Model model){
|
||||
List<TaskInfo> taskInfos = requestInfoService.showTask(taskInfo);
|
||||
model.addAttribute("taskInfos", taskInfos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
package com.nis.web.dao.basics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -70,12 +70,18 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findByItemCode(Integer itemCode);
|
||||
/**
|
||||
* 查询itemCode最大值
|
||||
* @return
|
||||
*/
|
||||
Integer findMaxItemCode();
|
||||
|
||||
|
||||
|
||||
|
||||
List<ServiceDictInfo> findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid);
|
||||
List<ServiceDictInfo> findAllItemDict(@Param("itemType")int itemType);
|
||||
|
||||
|
||||
|
||||
|
||||
284
src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml
Normal file
284
src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml
Normal file
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.basics.ServiceDictInfoDao" >
|
||||
|
||||
<resultMap id="dictResultMap" type="com.nis.domain.basics.ServiceDictInfo" >
|
||||
<id column="service_dict_id" property="serviceDictId" jdbcType="INTEGER" />
|
||||
<result column="item_type" property="itemType" jdbcType="INTEGER" />
|
||||
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
|
||||
<result column="item_value" property="itemValue" jdbcType="VARCHAR" />
|
||||
<result column="item_desc" property="itemDesc" jdbcType="VARCHAR" />
|
||||
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<!-- 父id -->
|
||||
<association property="parent" javaType="com.nis.domain.basics.ServiceDictInfo">
|
||||
<id column="parent_id" property="serviceDictId" jdbcType="INTEGER" />
|
||||
</association>
|
||||
<!-- 创建人员 -->
|
||||
<association property="serviceDictCreator" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="creator_id"/>
|
||||
<result property="loginId" column="login_id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
<!-- 修改人员 -->
|
||||
<association property="serviceDictEditor" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="editor_id"/>
|
||||
<result property="loginId" column="login_id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="serviceDictInfoColumns">
|
||||
s.service_dict_id AS serviceDictId,
|
||||
s.item_type AS itemType,
|
||||
s.item_code AS itemCode,
|
||||
s.item_value AS itemValue,
|
||||
s.item_desc AS itemDesc,
|
||||
s.parent_id AS "parent.serviceDictId",
|
||||
s.is_leaf AS isLeaf,
|
||||
s.is_valid AS isValid,
|
||||
s.creator_id AS "serviceDictCreator.id",
|
||||
s.create_time AS createTime,
|
||||
s.editor_id AS "serviceDictEditor.id",
|
||||
s.edit_time AS editTime
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<!-- 查询顶层分页列表 (==)-->
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND parent_id = 0
|
||||
|
||||
<if test="itemValue != null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type = #{itemType}
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询顶层分页列表 (!=)-->
|
||||
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND parent_id = 0
|
||||
|
||||
<if test="itemValue != null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type != #{itemType}
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 查出所有 -->
|
||||
<select id="findAllDictList" resultType="serviceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
<include refid="menuJoins"/>
|
||||
WHERE s.is_valid =1
|
||||
</select>
|
||||
|
||||
<!-- 查询所有非叶子配置 -->
|
||||
<select id="findAllNoLeafDictList" resultType="com.nis.domain.basics.ServiceDictInfo" parameterType="java.lang.Integer">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = #{itemType}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 条件查询分页(==) -->
|
||||
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type like '%${itemType}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
|
||||
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 条件查询分页(!=) -->
|
||||
<select id="findDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type != ${itemType}
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
|
||||
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据主键查询字典详细信息 -->
|
||||
|
||||
<select id="getDictById" resultType="com.nis.domain.basics.ServiceDictInfo">
|
||||
select
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
from service_dict_info s where s.service_dict_id = #{serviceDictId}
|
||||
</select>
|
||||
|
||||
<!-- 根据上级id选出所有下级 -->
|
||||
|
||||
<select id="getDictByParentId" resultMap="dictResultMap">
|
||||
select *
|
||||
from service_dict_info s where parent_id = #{parentId}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据itemCode查询字典对象列表 -->
|
||||
|
||||
<select id="findByItemCode" resultType="com.nis.domain.basics.ServiceDictInfo">
|
||||
select
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
from service_dict_info s where s.item_code = #{itemCode}
|
||||
</select>
|
||||
|
||||
<!-- 查出最大的itemCode值 -->
|
||||
<select id="findMaxItemCode" resultType="java.lang.Integer">
|
||||
select max(s.item_code) from service_dict_info s
|
||||
</select>
|
||||
|
||||
<!-- 新增字典信息 -->
|
||||
|
||||
<insert id="insertDict" parameterType="com.nis.domain.basics.ServiceDictInfo" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into service_dict_info (item_type, item_code, item_value, item_desc, parent_id, is_leaf, is_valid, creator_id, create_time, editor_id, edit_time)
|
||||
values ( #{itemType,jdbcType=INTEGER}, #{itemCode,jdbcType=INTEGER},
|
||||
#{itemValue,jdbcType=VARCHAR}, #{itemDesc,jdbcType=VARCHAR},
|
||||
#{parent.serviceDictId,jdbcType=INTEGER}, #{isLeaf,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER},
|
||||
#{serviceDictCreator.id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{serviceDictEditor.id,jdbcType=INTEGER}, #{editTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="update">
|
||||
UPDATE service_dict_info s SET
|
||||
s.service_dict_id = #{serviceDictId},
|
||||
s.item_type = #{itemType},
|
||||
s.item_code = #{itemCode},
|
||||
s.item_value = #{itemValue},
|
||||
s.item_desc = #{itemDesc},
|
||||
s.parent_id = #{parent.serviceDictId},
|
||||
s.is_leaf = #{isLeaf},
|
||||
s.creator_id = #{serviceDictCreator.id},
|
||||
s.editor_id = #{serviceDictEditor.id},
|
||||
s.edit_time = #{editTime}
|
||||
WHERE s.service_dict_id = #{serviceDictId}
|
||||
</update>
|
||||
|
||||
<!-- 删除 -->
|
||||
|
||||
<update id="delete">
|
||||
UPDATE service_dict_info s set s.is_valid = #{isValid} where s.service_dict_id = #{serviceDictId}
|
||||
</update>
|
||||
|
||||
<select id="findItemDict" resultMap="dictResultMap">
|
||||
select
|
||||
<include refid="serviceDictInfoColumns" />
|
||||
from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType} and s.is_valid=#{isValid};
|
||||
</select>
|
||||
<select id="findAllItemDict" resultMap="dictResultMap">
|
||||
select
|
||||
<include refid="serviceDictInfoColumns" />
|
||||
from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType};
|
||||
</select>
|
||||
|
||||
<sql id="menuJoins">
|
||||
LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
package com.nis.web.dao.basics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.configuration.SysDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -69,6 +69,12 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
|
||||
*/
|
||||
List<SysDictInfo> getDictByParentId(Integer parentId);
|
||||
|
||||
/**
|
||||
* 查询最大itemCode值
|
||||
* @return
|
||||
*/
|
||||
Integer findMaxItemCode();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.SysDictInfoDao" >
|
||||
<mapper namespace="com.nis.web.dao.basics.SysDictInfoDao" >
|
||||
|
||||
<resultMap id="dictResultMap" type="com.nis.domain.configuration.SysDictInfo" >
|
||||
<resultMap id="dictResultMap" type="com.nis.domain.basics.SysDictInfo" >
|
||||
<id column="sys_dict_id" property="sysDictId" jdbcType="INTEGER" />
|
||||
<result column="item_type" property="itemType" jdbcType="INTEGER" />
|
||||
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
|
||||
@@ -13,23 +13,18 @@
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<!-- 父id -->
|
||||
<association property="parent" javaType="com.nis.domain.configuration.SysDictInfo">
|
||||
<id column="sys_dict_id" property="sysDictId" jdbcType="INTEGER" />
|
||||
<result column="item_type" property="itemType" jdbcType="INTEGER" />
|
||||
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
|
||||
<result column="item_value" property="itemValue" jdbcType="VARCHAR" />
|
||||
<result column="item_desc" property="itemDesc" jdbcType="VARCHAR" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<association property="parent" javaType="com.nis.domain.basics.SysDictInfo">
|
||||
<id column="parent_id" property="sysDictId" jdbcType="INTEGER" />
|
||||
</association>
|
||||
<!-- 创建人员 -->
|
||||
<association property="sysDictCreator" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="id"/>
|
||||
<id property="id" column="creator_id"/>
|
||||
<result property="loginId" column="login_id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
<!-- 修改人员 -->
|
||||
<association property="sysDictEditor" javaType="com.nis.domain.SysUser">
|
||||
<id property="id" column="id"/>
|
||||
<id property="id" column="editor_id"/>
|
||||
<result property="loginId" column="login_id"/>
|
||||
<result property="name" column="name"/>
|
||||
</association>
|
||||
@@ -54,7 +49,7 @@
|
||||
</sql>
|
||||
|
||||
<!-- 查询顶层分页列表 (==)-->
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.SysDictInfo">
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
||||
SELECT * FROM sys_dict_info WHERE is_valid=1 AND parent_id = 0
|
||||
|
||||
<if test="itemValue != null and itemValue != '' " >
|
||||
@@ -94,7 +89,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 条件查询分页(==) -->
|
||||
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.SysDictInfo">
|
||||
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
||||
SELECT * FROM sys_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
@@ -127,7 +122,7 @@
|
||||
|
||||
<!-- 根据主键查询字典详细信息 -->
|
||||
|
||||
<select id="getDictById" resultType="com.nis.domain.configuration.SysDictInfo">
|
||||
<select id="getDictById" resultType="com.nis.domain.basics.SysDictInfo">
|
||||
select
|
||||
<include refid="sysDictInfoColumns"/>
|
||||
from sys_dict_info s where s.sys_dict_id = #{sysDictId}
|
||||
@@ -135,7 +130,7 @@
|
||||
|
||||
<!-- 新增字典信息 -->
|
||||
|
||||
<insert id="insertDict" parameterType="com.nis.domain.configuration.SysDictInfo" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertDict" parameterType="com.nis.domain.basics.SysDictInfo" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into sys_dict_info (item_type, item_code, item_value, item_desc, parent_id, is_leaf, is_valid, creator_id, create_time, editor_id, edit_time)
|
||||
values ( #{itemType,jdbcType=INTEGER}, #{itemCode,jdbcType=INTEGER},
|
||||
#{itemValue,jdbcType=VARCHAR}, #{itemDesc,jdbcType=VARCHAR},
|
||||
@@ -147,7 +142,7 @@
|
||||
|
||||
|
||||
<!-- 查询所有非叶子配置 -->
|
||||
<select id="findAllNoLeafDictList" resultType="com.nis.domain.configuration.SysDictInfo" parameterType="java.lang.Integer">
|
||||
<select id="findAllNoLeafDictList" resultType="com.nis.domain.basics.SysDictInfo" parameterType="java.lang.Integer">
|
||||
SELECT
|
||||
<include refid="sysDictInfoColumns"/>
|
||||
FROM sys_dict_info s
|
||||
@@ -179,7 +174,7 @@
|
||||
|
||||
<!-- 根据itemCode查询字典对象列表 -->
|
||||
|
||||
<select id="findByItemCode" resultType="com.nis.domain.configuration.SysDictInfo">
|
||||
<select id="findByItemCode" resultType="com.nis.domain.basics.SysDictInfo">
|
||||
select
|
||||
<include refid="sysDictInfoColumns"/>
|
||||
from sys_dict_info s where s.item_code = #{itemCode}
|
||||
@@ -192,5 +187,9 @@
|
||||
from sys_dict_info s where parent_id = #{parentId}
|
||||
</select>
|
||||
|
||||
<!-- 查询最大itemCode值 -->
|
||||
<select id="findMaxItemCode" resultType="java.lang.Integer">
|
||||
select max(s.item_code) from sys_dict_info s
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,265 +1,265 @@
|
||||
/**
|
||||
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
|
||||
*/
|
||||
package com.nis.web.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
|
||||
/**
|
||||
* Service基类
|
||||
* @author ThinkGem
|
||||
* @version 2014-05-16
|
||||
*/
|
||||
public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>> extends BaseService {
|
||||
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected D dao;
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public T get(Long id) {
|
||||
return dao.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public T get(T entity) {
|
||||
return dao.get(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public List<T> findList(T entity) {
|
||||
return dao.findList(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<T> findPage(Page<T> page, T entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findList(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param entity
|
||||
*/
|
||||
public void save(T entity) {
|
||||
if (entity.getIsNewRecord()){
|
||||
dao.insert(entity);
|
||||
}else{
|
||||
dao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param entity
|
||||
*/
|
||||
public void delete(T entity) {
|
||||
dao.delete(entity);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* saveBatch(批量全部保存数据)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param data 数据集合
|
||||
* @param mClass 传入的dao.xml里的mapper
|
||||
* @author wx
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void saveBatch(List<T> data,@SuppressWarnings("rawtypes")Class mClass) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
T t = data.get(index);
|
||||
((CrudDao<T>) batchSqlSession.getMapper(mClass)).insert(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
// }catch (Exception e){
|
||||
// batchSqlSession.rollback();
|
||||
// throw e;
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateBatch(批量更新全部数据)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param data 数据集合
|
||||
* @param mClass 传入的dao.xml里的mapper
|
||||
* @author wx
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateBatch(List<T> data,@SuppressWarnings("rawtypes") Class mClass) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
T t = data.get(index);
|
||||
((CrudDao<T>) batchSqlSession.getMapper(mClass)).update(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
// }catch (Exception e){
|
||||
// batchSqlSession.rollback();
|
||||
// throw e;
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* deleteBatch(批量删除全部数据)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param data 数据集合
|
||||
* @param mClass 传入的dao.xml里的mapper
|
||||
* @author wx
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void deleteBatch(List<T> data,@SuppressWarnings("rawtypes") Class mClass) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
T t = data.get(index);
|
||||
((CrudDao<T>) batchSqlSession.getMapper(mClass)).delete(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
// }catch (Exception e){
|
||||
// batchSqlSession.rollback();
|
||||
// throw e;
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* sendToMaatConvertor(转换配置为Maat格式)
|
||||
* (所有的配置需拥有一样的编译ID,action,serviceId,等属性)
|
||||
* @param cfg
|
||||
* @return
|
||||
*boolean
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public boolean sendToMaatConvertor(AreaIpCfg[] areaCfg,T ... cfg){
|
||||
if(cfg==null){
|
||||
throw new RuntimeException("转换出错,配置为空");
|
||||
}
|
||||
long compileId=0l;
|
||||
ToMaatBean toMaatBean=new ToMaatBean();
|
||||
MaatCfg maatCfg=new MaatCfg();
|
||||
if(cfg[0] instanceof BaseIpCfg){
|
||||
maatCfg.setIpCfg((BaseIpCfg[])cfg);
|
||||
compileId=((BaseIpCfg)cfg[0]).getCompileId();
|
||||
}else if(cfg[0] instanceof BaseStringCfg){
|
||||
maatCfg.setStrCfg((BaseStringCfg[])cfg);
|
||||
compileId=((BaseStringCfg)cfg[0]).getCompileId();
|
||||
}else if(cfg[0] instanceof ComplexkeywordCfg){
|
||||
maatCfg.setComplexStrCfg((ComplexkeywordCfg[])cfg);
|
||||
compileId=((ComplexkeywordCfg)cfg[0]).getCompileId();
|
||||
}
|
||||
if(areaCfg!=null){
|
||||
AreaIpCfg[] cfgArray=new AreaIpCfg[1];
|
||||
|
||||
}
|
||||
List<MaatCfg> serviceCfg=new ArrayList<>();
|
||||
serviceCfg.add(maatCfg);
|
||||
BaseCfg baseCfg=(BaseCfg)cfg[0];
|
||||
if(compileId==0l){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}else{
|
||||
toMaatBean.setCompileId(compileId);
|
||||
}
|
||||
if(baseCfg.getAction()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的action");
|
||||
}else{
|
||||
toMaatBean.setAction(baseCfg.getAction());
|
||||
}
|
||||
if(baseCfg.getIsAreaEffective()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的isAreaEffective");
|
||||
}else{
|
||||
toMaatBean.setIsAreaEffective(baseCfg.getIsAreaEffective());
|
||||
}
|
||||
if(baseCfg.getIsValid()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的isValid");
|
||||
}else{
|
||||
toMaatBean.setIsValid(baseCfg.getIsValid());
|
||||
}
|
||||
if(baseCfg.getRequestId()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的requestId");
|
||||
}else{
|
||||
toMaatBean.setRequestId(baseCfg.getRequestId());
|
||||
}
|
||||
if(baseCfg.getServiceId()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的serviceId");
|
||||
}else{
|
||||
toMaatBean.setServiceId(baseCfg.getServiceId());
|
||||
}
|
||||
toMaatBean.setAreaEffectiveIds(baseCfg.getAreaEffectiveIds()==null?"":baseCfg.getAreaEffectiveIds());
|
||||
toMaatBean.setAttribute(baseCfg.getAttribute()==null?"":baseCfg.getAttribute());
|
||||
toMaatBean.setClassify(baseCfg.getClassify()==null?"":baseCfg.getClassify());
|
||||
toMaatBean.setLable(baseCfg.getLable()==null?"":baseCfg.getLable());
|
||||
Gson gson=new GsonBuilder().disableHtmlEscaping()
|
||||
.setDateFormat("yyyy-MM-dd HH:mm:ss")
|
||||
/*.setPrettyPrinting().serializeNulls()*/
|
||||
.excludeFieldsWithoutExposeAnnotation()
|
||||
.create();
|
||||
String json=gson.toJson(toMaatBean);
|
||||
//发送至maat,待完成
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
|
||||
*/
|
||||
package com.nis.web.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
|
||||
/**
|
||||
* Service基类
|
||||
* @author ThinkGem
|
||||
* @version 2014-05-16
|
||||
*/
|
||||
public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>> extends BaseService {
|
||||
|
||||
/**
|
||||
* 持久层对象
|
||||
*/
|
||||
@Autowired
|
||||
protected D dao;
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public T get(Long id) {
|
||||
return dao.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public T get(T entity) {
|
||||
return dao.get(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public List<T> findList(T entity) {
|
||||
return dao.findList(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<T> findPage(Page<T> page, T entity) {
|
||||
entity.setPage(page);
|
||||
page.setList(dao.findList(entity));
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param entity
|
||||
*/
|
||||
public void save(T entity) {
|
||||
if (entity.getIsNewRecord()){
|
||||
dao.insert(entity);
|
||||
}else{
|
||||
dao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param entity
|
||||
*/
|
||||
public void delete(T entity) {
|
||||
dao.delete(entity);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* saveBatch(批量全部保存数据)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param data 数据集合
|
||||
* @param mClass 传入的dao.xml里的mapper
|
||||
* @author wx
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void saveBatch(List<T> data,@SuppressWarnings("rawtypes")Class mClass) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
T t = data.get(index);
|
||||
((CrudDao<T>) batchSqlSession.getMapper(mClass)).insert(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
// }catch (Exception e){
|
||||
// batchSqlSession.rollback();
|
||||
// throw e;
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* updateBatch(批量更新全部数据)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param data 数据集合
|
||||
* @param mClass 传入的dao.xml里的mapper
|
||||
* @author wx
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateBatch(List<T> data,@SuppressWarnings("rawtypes") Class mClass) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
T t = data.get(index);
|
||||
((CrudDao<T>) batchSqlSession.getMapper(mClass)).update(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
// }catch (Exception e){
|
||||
// batchSqlSession.rollback();
|
||||
// throw e;
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* deleteBatch(批量删除全部数据)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param data 数据集合
|
||||
* @param mClass 传入的dao.xml里的mapper
|
||||
* @author wx
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void deleteBatch(List<T> data,@SuppressWarnings("rawtypes") Class mClass) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < data.size();index++){
|
||||
T t = data.get(index);
|
||||
((CrudDao<T>) batchSqlSession.getMapper(mClass)).delete(t);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
// }catch (Exception e){
|
||||
// batchSqlSession.rollback();
|
||||
// throw e;
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* sendToMaatConvertor(转换配置为Maat格式)
|
||||
* (所有的配置需拥有一样的编译ID,action,serviceId,等属性)
|
||||
* @param cfg
|
||||
* @return
|
||||
*boolean
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public boolean sendToMaatConvertor(AreaIpCfg[] areaCfg,T ... cfg){
|
||||
if(cfg==null){
|
||||
throw new RuntimeException("转换出错,配置为空");
|
||||
}
|
||||
long compileId=0l;
|
||||
ToMaatBean toMaatBean=new ToMaatBean();
|
||||
MaatCfg maatCfg=new MaatCfg();
|
||||
if(cfg[0] instanceof BaseIpCfg){
|
||||
maatCfg.setIpCfg((BaseIpCfg[])cfg);
|
||||
compileId=((BaseIpCfg)cfg[0]).getCompileId();
|
||||
}else if(cfg[0] instanceof BaseStringCfg){
|
||||
maatCfg.setStrCfg((BaseStringCfg[])cfg);
|
||||
compileId=((BaseStringCfg)cfg[0]).getCompileId();
|
||||
}else if(cfg[0] instanceof ComplexkeywordCfg){
|
||||
maatCfg.setComplexStrCfg((ComplexkeywordCfg[])cfg);
|
||||
compileId=((ComplexkeywordCfg)cfg[0]).getCompileId();
|
||||
}
|
||||
if(areaCfg!=null){
|
||||
AreaIpCfg[] cfgArray=new AreaIpCfg[1];
|
||||
|
||||
}
|
||||
List<MaatCfg> serviceCfg=new ArrayList<>();
|
||||
serviceCfg.add(maatCfg);
|
||||
BaseCfg baseCfg=(BaseCfg)cfg[0];
|
||||
if(compileId==0l){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}else{
|
||||
toMaatBean.setCompileId(compileId);
|
||||
}
|
||||
if(baseCfg.getAction()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的action");
|
||||
}else{
|
||||
toMaatBean.setAction(baseCfg.getAction());
|
||||
}
|
||||
if(baseCfg.getIsAreaEffective()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的isAreaEffective");
|
||||
}else{
|
||||
toMaatBean.setIsAreaEffective(baseCfg.getIsAreaEffective());
|
||||
}
|
||||
if(baseCfg.getIsValid()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的isValid");
|
||||
}else{
|
||||
toMaatBean.setIsValid(baseCfg.getIsValid());
|
||||
}
|
||||
if(baseCfg.getRequestId()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的requestId");
|
||||
}else{
|
||||
toMaatBean.setRequestId(baseCfg.getRequestId());
|
||||
}
|
||||
if(baseCfg.getServiceId()==null){
|
||||
throw new RuntimeException("转换出错,未获取到正确的serviceId");
|
||||
}else{
|
||||
toMaatBean.setServiceId(baseCfg.getServiceId());
|
||||
}
|
||||
toMaatBean.setAreaEffectiveIds(baseCfg.getAreaEffectiveIds()==null?"":baseCfg.getAreaEffectiveIds());
|
||||
toMaatBean.setAttribute(baseCfg.getAttribute()==null?"":baseCfg.getAttribute());
|
||||
toMaatBean.setClassify(baseCfg.getClassify()==null?"":baseCfg.getClassify());
|
||||
toMaatBean.setLable(baseCfg.getLable()==null?"":baseCfg.getLable());
|
||||
Gson gson=new GsonBuilder().disableHtmlEscaping()
|
||||
.setDateFormat("yyyy-MM-dd HH:mm:ss")
|
||||
/*.setPrettyPrinting().serializeNulls()*/
|
||||
.excludeFieldsWithoutExposeAnnotation()
|
||||
.create();
|
||||
String json=gson.toJson(toMaatBean);
|
||||
//发送至maat,待完成
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nis.web.service.configuration;
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -10,10 +10,10 @@ import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.ServiceDictInfoDao;
|
||||
import com.nis.web.dao.basics.ServiceDictInfoDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@@ -172,6 +172,8 @@ public class ServiceDictInfoService extends BaseService{
|
||||
}
|
||||
SysUser user = UserUtils.getUser();
|
||||
if(StringUtil.isEmpty(serviceDictInfo.getServiceDictId())) {//新增
|
||||
Integer maxCode = serviceDictInfoDao.findMaxItemCode();
|
||||
serviceDictInfo.setItemCode(maxCode==null?1:(maxCode+1));
|
||||
serviceDictInfo.setIsValid(1);
|
||||
serviceDictInfo.setServiceDictCreator(user);
|
||||
serviceDictInfo.setCreateTime(new Date());
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.nis.web.service.configuration;
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -9,11 +9,9 @@ import org.springframework.stereotype.Service;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.SysDictInfo;
|
||||
import com.nis.domain.configuration.SysDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.SysDictInfoDao;
|
||||
import com.nis.web.dao.basics.SysDictInfoDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@@ -105,6 +103,10 @@ public class SysDictInfoService extends BaseService{
|
||||
}
|
||||
SysUser user = UserUtils.getUser();
|
||||
if(StringUtil.isEmpty(sysDictInfo.getSysDictId())) {//新增
|
||||
if(sysDictInfo.getItemCode()==null){
|
||||
Integer maxCode = sysDictInfoDao.findMaxItemCode();
|
||||
sysDictInfo.setItemCode(maxCode==null?1:(maxCode+1));
|
||||
}
|
||||
sysDictInfo.setIsValid(1);
|
||||
sysDictInfo.setSysDictCreator(user);
|
||||
sysDictInfo.setCreateTime(new Date());
|
||||
@@ -13,7 +13,7 @@
|
||||
type:'post',
|
||||
async:true,
|
||||
cache:false,
|
||||
url:'${ctx}/configuration/serviceDictInfo/ajaxItemType',
|
||||
url:'${ctx}/basics/serviceDictInfo/ajaxItemType',
|
||||
data:{parent:parent},
|
||||
success:function(data){
|
||||
$("#itemType option").each(function(){
|
||||
@@ -32,7 +32,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/serviceDictInfo/ajaxType',
|
||||
url:'${ctx}/basics/serviceDictInfo/ajaxType',
|
||||
data:{parent:$("#serviceDictInfoId").val(),child:$("#itemType option:selected").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
@@ -46,7 +46,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/serviceDictInfo/ajaxChildrenType',
|
||||
url:'${ctx}/basics/serviceDictInfo/ajaxChildrenType',
|
||||
data:{parent:"${serviceDictInfo.serviceDictId}",newItemType:$("#itemType option:selected").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
@@ -60,7 +60,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/serviceDictInfo/ajaxLeafChange',
|
||||
url:'${ctx}/basics/serviceDictInfo/ajaxLeafChange',
|
||||
data:{parent:"${serviceDictInfo.serviceDictId}",newIsLeaf:$("#isLeaf option:selected").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
@@ -75,14 +75,14 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/serviceDictInfo/ajaxLeafHasTree',
|
||||
url:'${ctx}/basics/serviceDictInfo/ajaxLeafHasTree',
|
||||
data:{serviceDictId:"${serviceDictInfo.serviceDictId}",newIsLeaf:$("#isLeaf option:selected").val(),parentId:$("#serviceDictInfoId").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
},"该配置无上级,不得设为叶子节点");
|
||||
},"该配置上级为根节点,不得设为叶子节点");
|
||||
|
||||
|
||||
|
||||
@@ -90,12 +90,6 @@
|
||||
$("#inputForm").validate({
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'itemCode':{
|
||||
required:true,
|
||||
digits:true,
|
||||
codeNumber:true,
|
||||
remote:"${ctx}/configuration/serviceDictInfo/isItemCodeRepeat?oldItemCode=${serviceDictInfo.itemCode}"
|
||||
},
|
||||
'itemValue':{
|
||||
required:true
|
||||
},
|
||||
@@ -110,12 +104,6 @@
|
||||
|
||||
},
|
||||
messages: {
|
||||
'itemCode':{
|
||||
required:'编码必须填写',
|
||||
digits:'请填写整数值',
|
||||
codeNumber:'请填写合适的数值(0~200000000)',
|
||||
remote:"该配置编码已存在"
|
||||
},
|
||||
'itemValue':{
|
||||
required:'编码对应值必须填写'
|
||||
},
|
||||
@@ -125,7 +113,7 @@
|
||||
},
|
||||
'isLeaf':{
|
||||
leafChange:'该配置包含下级配置,不得改为叶子节点',
|
||||
leafHasTree:'该配置无上级,不得设为叶子节点'
|
||||
leafHasTree:'该配置上级为根节点,不得设为叶子节点'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -182,14 +170,14 @@
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
|
||||
<form:hidden path="serviceDictId"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq '无上级'?'无上级':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
|
||||
title="菜单" url="/configuration/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq '根节点'?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
|
||||
title="菜单" url="/basics/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -208,12 +196,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>配置编码:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>配置内容:</label>
|
||||
<div class="col-md-4">
|
||||
@@ -35,13 +35,13 @@
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:hidden path="serviceDictId"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="${serviceDictInfo.parent.serviceDictId == 0?'无上级':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
<input value="${serviceDictInfo.parent.serviceDictId == 0?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -16,7 +16,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -37,9 +37,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
@@ -91,7 +91,7 @@
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
@@ -108,12 +108,12 @@
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
@@ -16,7 +16,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/list?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -37,9 +37,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
@@ -91,7 +91,7 @@
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
@@ -108,12 +108,12 @@
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
<li><a href="${ctx}/basics/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
@@ -13,7 +13,7 @@
|
||||
type:'post',
|
||||
async:true,
|
||||
cache:false,
|
||||
url:'${ctx}/configuration/sysDictInfo/ajaxItemType',
|
||||
url:'${ctx}/basics/sysDictInfo/ajaxItemType',
|
||||
data:{parent:parent},
|
||||
success:function(data){
|
||||
$("#itemType option").each(function(){
|
||||
@@ -32,7 +32,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/sysDictInfo/ajaxType',
|
||||
url:'${ctx}/basics/sysDictInfo/ajaxType',
|
||||
data:{parent:$("#sysDictInfoId").val(),child:$("#itemType option:selected").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
@@ -46,7 +46,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/sysDictInfo/ajaxChildrenType',
|
||||
url:'${ctx}/basics/sysDictInfo/ajaxChildrenType',
|
||||
data:{parent:"${sysDictInfo.sysDictId}",newItemType:$("#itemType option:selected").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
@@ -60,7 +60,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/sysDictInfo/ajaxLeafChange',
|
||||
url:'${ctx}/basics/sysDictInfo/ajaxLeafChange',
|
||||
data:{parent:"${sysDictInfo.sysDictId}",newIsLeaf:$("#isLeaf option:selected").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
@@ -75,14 +75,14 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/configuration/sysDictInfo/ajaxLeafHasTree',
|
||||
url:'${ctx}/basics/sysDictInfo/ajaxLeafHasTree',
|
||||
data:{sysDictId:"${sysDictInfo.sysDictId}",newIsLeaf:$("#isLeaf option:selected").val(),parentId:$("#sysDictInfoId").val()},
|
||||
success:function(data){
|
||||
flag=data;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
},"该配置无上级,不得设为叶子节点");
|
||||
},"该配置上级为根节点,不得设为叶子节点");
|
||||
|
||||
|
||||
|
||||
@@ -90,12 +90,6 @@
|
||||
$("#inputForm").validate({
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'itemCode':{
|
||||
required:true,
|
||||
digits:true,
|
||||
codeNumber:true,
|
||||
remote:"${ctx}/configuration/sysDictInfo/isItemCodeRepeat?oldItemCode=${sysDictInfo.itemCode}"
|
||||
},
|
||||
'itemValue':{
|
||||
required:true
|
||||
},
|
||||
@@ -110,12 +104,6 @@
|
||||
|
||||
},
|
||||
messages: {
|
||||
'itemCode':{
|
||||
required:'编码必须填写',
|
||||
digits:'请填写整数值',
|
||||
codeNumber:'请填写合适的数值(0~200000000)',
|
||||
remote:"该配置编码已存在"
|
||||
},
|
||||
'itemValue':{
|
||||
required:'编码对应值必须填写'
|
||||
},
|
||||
@@ -125,7 +113,7 @@
|
||||
},
|
||||
'isLeaf':{
|
||||
leafChange:'该配置包含下级配置,不得改为叶子节点',
|
||||
leafHasTree:'该配置无上级,不得设为叶子节点'
|
||||
leafHasTree:'该配置上级为根节点,不得设为叶子节点'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -182,14 +170,14 @@
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
|
||||
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
|
||||
<form:hidden path="sysDictId"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="sysDictInfo" name="parent.sysDictId" value="${sysDictInfo.parent.sysDictId}" labelName="parent.itemValue" labelValue="${sysDictInfo.parent.itemValue eq '无上级'?'无上级':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}"
|
||||
title="菜单" url="/configuration/sysDictInfo/treeData?itType=${itType}" extId="${sysDictInfo.sysDictId}" cssClass="required form-control"/>
|
||||
<sys:treeselect id="sysDictInfo" name="parent.sysDictId" value="${sysDictInfo.parent.sysDictId}" labelName="parent.itemValue" labelValue="${sysDictInfo.parent.itemValue eq '根节点'?'根节点':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}"
|
||||
title="菜单" url="/basics/sysDictInfo/treeData?itType=${itType}" extId="${sysDictInfo.sysDictId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -208,12 +196,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>配置编码:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>配置内容:</label>
|
||||
<div class="col-md-4">
|
||||
@@ -35,13 +35,13 @@
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:hidden path="sysDictId"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="${sysDictInfo.parent.sysDictId == 0?'无上级':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
<input value="${sysDictInfo.parent.sysDictId == 0?'根节点':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -16,7 +16,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -37,9 +37,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/sysDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
@@ -91,7 +91,7 @@
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${page.list}" var="sysDictInfo">
|
||||
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
|
||||
<td>${sysDictInfo.itemCode}</td>
|
||||
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
|
||||
@@ -108,12 +108,12 @@
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
@@ -16,7 +16,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/list?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/list?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
@@ -37,9 +37,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/sysDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
@@ -91,7 +91,7 @@
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="sysDictInfo">
|
||||
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
|
||||
<td>${sysDictInfo.itemCode}</td>
|
||||
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
|
||||
@@ -108,12 +108,12 @@
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
@@ -1,136 +0,0 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>标签配置信息</title>
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/markList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
function page2(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchMarkList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.dropdown-menu {
|
||||
min-width: 70px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/markList'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
标签配置管理
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i>标签配置列表
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchMarkList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">${page}</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user