diff --git a/src/main/java/org/jeecgframework/web/system/controller/core/SystemController.java b/src/main/java/org/jeecgframework/web/system/controller/core/SystemController.java index f3fb7733..651e43f9 100644 --- a/src/main/java/org/jeecgframework/web/system/controller/core/SystemController.java +++ b/src/main/java/org/jeecgframework/web/system/controller/core/SystemController.java @@ -7,14 +7,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -32,15 +25,7 @@ import org.jeecgframework.core.constant.Globals; import org.jeecgframework.core.extend.hqlsearch.parse.ObjectParseUtil; import org.jeecgframework.core.extend.hqlsearch.parse.PageValueConvertRuleEnum; import org.jeecgframework.core.extend.hqlsearch.parse.vo.HqlRuleEnum; -import org.jeecgframework.core.util.JSONHelper; -import org.jeecgframework.core.util.ListUtils; -import org.jeecgframework.core.util.MutiLangSqlCriteriaUtil; -import org.jeecgframework.core.util.MutiLangUtil; -import org.jeecgframework.core.util.ResourceUtil; -import org.jeecgframework.core.util.SetListSort; -import org.jeecgframework.core.util.StringUtil; -import org.jeecgframework.core.util.YouBianCodeUtil; -import org.jeecgframework.core.util.oConvertUtils; +import org.jeecgframework.core.util.*; import org.jeecgframework.tag.core.easyui.TagUtil; import org.jeecgframework.tag.vo.datatable.SortDirection; import org.jeecgframework.tag.vo.easyui.ComboTreeModel; @@ -277,36 +262,6 @@ public class SystemController extends BaseController { return new ModelAndView("system/type/typeListForTypegroup"); } -// @RequestMapping(params = "typeGroupTree") -// @ResponseBody -// public List typeGroupTree(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) { -// CriteriaQuery cq = new CriteriaQuery(TSTypegroup.class); -// List typeGroupList = systemService.getListByCriteriaQuery(cq, false); -// List trees = new ArrayList(); -// for (TSTypegroup obj : typeGroupList) { -// ComboTree tree = new ComboTree(); -// tree.setId(obj.getId()); -// tree.setText(obj.getTypegroupname()); -// List types = obj.getTSTypes(); -// if (types != null) { -// if (types.size() > 0) { -// //tree.setState("closed"); -// List children = new ArrayList(); -// for (TSType type : types) { -// ComboTree tree2 = new ComboTree(); -// tree2.setId(type.getId()); -// tree2.setText(type.getTypename()); -// children.add(tree2); -// } -// tree.setChildren(children); -// } -// } -// //tree.setChecked(false); -// trees.add(tree); -// } -// return trees; -// } - @RequestMapping(params = "typeGridTree") @ResponseBody @Deprecated // add-begin-end--Author:zhangguoming Date:20140928 for:数据字典修改,该方法启用,数据字典不在已树结构展示了 @@ -360,41 +315,6 @@ public class SystemController extends BaseController { return treeGrids; } -// private void assembleConditionForMutilLang(CriteriaQuery cq, String typegroupname, List typegroupnameKeyList) { -// Map typegroupnameMap = new HashMap(); -// for (String nameKey : typegroupnameKeyList) { -// String name = mutiLangService.getLang(nameKey); -// typegroupnameMap.put(nameKey, name); -// } -// List tepegroupnameParamList = new ArrayList(); -// for (Map.Entry entry : typegroupnameMap.entrySet()) { -// String key = entry.getKey(); -// String value = entry.getValue(); -// if (typegroupname.startsWith("*") && typegroupname.endsWith("*")) { -// if (value.contains(typegroupname)) { -// tepegroupnameParamList.add(key); -// } -// } else if(typegroupname.startsWith("*")) { -// if (value.endsWith(typegroupname.substring(1))) { -// tepegroupnameParamList.add(key); -// } -// } else if(typegroupname.endsWith("*")) { -// if (value.startsWith(typegroupname.substring(0, typegroupname.length() -1))) { -// tepegroupnameParamList.add(key); -// } -// } else { -// if (value.equals(typegroupname)) { -// tepegroupnameParamList.add(key); -// } -// } -// } -// -// if (tepegroupnameParamList.size() > 0) { -// cq.in("typegroupname", tepegroupnameParamList.toArray()); -// cq.add(); -// } -// } - /** * 删除类型分组或者类型(ID以G开头的是分组) * @@ -1255,7 +1175,9 @@ public class SystemController extends BaseController { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; MultipartFile mf=multipartRequest.getFile("file");// 获取上传文件对象 fileName = mf.getOriginalFilename();// 获取文件名 - String savePath = file.getPath() + File.separator + fileName; + String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase(); + // TODO: 2022/11/30 判断文件后缀 + String savePath = file.getPath() + File.separator + fileName; File savefile = new File(savePath); FileCopyUtils.copy(mf.getBytes(), savefile); msg="上传成功";