From c4f1fcc51989a014f9737689c123b3266f13ccda Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期二, 20 二月 2024 18:07:44 +0800 Subject: [PATCH] zjh 2024/02/20--1 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java | 102 ++++++++++++++++++++++++++++++++------------------ 1 files changed, 65 insertions(+), 37 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java index 0d03dae..eff536a 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java @@ -10,12 +10,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.base.Joiner; +import com.ltkj.common.core.domain.TreeSelect; import com.ltkj.common.core.domain.entity.SysUser; import com.ltkj.common.core.redis.RedisCache; import com.ltkj.common.utils.SecurityUtils; import com.ltkj.common.utils.bean.BeanUtils; import com.ltkj.framework.config.MatchUtils; import com.ltkj.hosp.domain.*; +import com.ltkj.hosp.mapper.TestMapper; import com.ltkj.hosp.service.*; import com.ltkj.system.domain.SysPost; import com.ltkj.system.domain.SysUserPost; @@ -97,6 +99,8 @@ private ITjRulesService tjRulesService; @Autowired public RedisTemplate<Object,Object> redisTemplate; + @Resource + private TestMapper testMapper; /** @@ -446,21 +450,20 @@ SysPost byId = postService.getById(one.getPostId()); if (byId.getPostName().equals("褰曞叆鍛�")) { ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId)); - } } } } else { ksproList = projectService.getKsTjProjectIdList(); } - + if (ksproList == null || ksproList.size() == 0) { + return AjaxResult.error("璇峰畬鍠勭瀹ら」鐩俊鎭�"); + } //绛涢�夊寲楠岀殑椤圭洰銆� ksproList = ksproList.stream() .filter(element -> element ==1633660948860522629L) .collect(Collectors.toList()); - if (ksproList == null || ksproList.size() == 0) { - return AjaxResult.error("璇峰畬鍠勭瀹ら」鐩俊鎭�"); - } + List<TjCustomer> customerLis = new ArrayList<>(); //鏍规嵁浣撴鍙锋煡 @@ -599,26 +602,17 @@ return AjaxResult.success("鏆傛棤鏁版嵁"); } } - List<TjCustomer> customerLists = new ArrayList<>(); + List<TjCustomer> customerLists = null; if (type == 0) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); } if (type == 1) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); } asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); - if (customerLists != null && customerLists.size() > 0) { - Collections.reverse(customerLists); - List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); - Map<String, Object> map = new HashMap<>(); - map.put("date", customerList); - map.put("total", customerLists.size()); - return AjaxResult.success(map); - } else { - AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis); - if (map != null) return map; - return AjaxResult.success("鏆傛椂娌℃湁鏁版嵁"); - } + AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis); + if (map != null) return map; + return AjaxResult.success("鏆傛椂娌℃湁鏁版嵁"); } @@ -664,6 +658,9 @@ ksproList = projectService.getKsTjProjectIdList(); } //绛涢�夊奖鍍忕殑椤圭洰銆� + if (ksproList.size() == 0) { + return AjaxResult.error("璇峰畬鍠勭瀹ら」鐩俊鎭�"); + } ksproList = ksproList.stream() .filter(element -> element ==1633660948860522589L // || element ==1633660948860522504L @@ -679,10 +676,6 @@ // element ==1633660948860522531L|| element ==1633660948860522533L ) .collect(Collectors.toList()); - - if (ksproList == null || ksproList.size() == 0) { - return AjaxResult.error("璇峰畬鍠勭瀹ら」鐩俊鎭�"); - } List<TjCustomer> customerLis = new ArrayList<>(); //鏍规嵁浣撴鍙锋煡 @@ -821,27 +814,54 @@ return AjaxResult.success("鏆傛棤鏁版嵁"); } } - List<TjCustomer> customerLists = new ArrayList<>(); + List<TjCustomer> customerLists = null; if (type == 0) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); } if (type == 1) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); } - asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); - if (customerLists != null && customerLists.size() > 0) { - Collections.reverse(customerLists); - List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); - Map<String, Object> map = new HashMap<>(); - map.put("date", customerList); - map.put("total", customerLists.size()); - return AjaxResult.success(map); - } else { +// asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); +// if (customerLists.size() > 0) { +// Collections.reverse(customerLists); +// List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); +// Map<String, Object> map = new HashMap<>(); +// map.put("date", customerList); +// map.put("total", customerLists.size()); +// return AjaxResult.success(map); +// } else { AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis); if (map != null) return map; return AjaxResult.success("鏆傛椂娌℃湁鏁版嵁"); - } +// } } + + + @GetMapping("/getTjYxjcList") + @ApiOperation("鏌ヨ涓汉褰卞搷妫�鏌ラ」鐩粨鏋滈泦") + public AjaxResult getTjYxjcList(@ApiParam(value = "濮撳悕") @RequestParam String patname, + @ApiParam(value = "鎬у埆") @RequestParam String sex, + @ApiParam(value = "骞撮緞") @RequestParam String patage, + @ApiParam(value = "骞撮緞鍗曚綅") @RequestParam String patagename, + @ApiParam(value = "鐢熸棩)") @RequestParam Date patbirth) { + + String format = DateUtil.format(patbirth, "yyyy.MM.dd"); + + List<Map<String, Object>> tjYxjcList = testMapper.getTjYxjcList(patname,sex,patage+patagename,format); + return AjaxResult.success(tjYxjcList); + } + + +// @GetMapping("/getSsTjYxjcList") +// @ApiOperation("鏌ヨ涓汉褰卞搷妫�鏌ラ」鐩粨鏋滈泦(鎼滅礌鐢�)") +// public AjaxResult getSsTjYxjcList(@ApiParam(value = "濮撳悕") @RequestParam String patname, +// @ApiParam(value = "鎬у埆") @RequestParam String sex, +// @ApiParam(value = "骞撮緞") @RequestParam String patage) { +// +// +// List<Map<String, Object>> tjYxjcList = testMapper.getTjYxjcList(patname,sex,null,null); +// return AjaxResult.success(tjYxjcList); +// } @@ -1395,6 +1415,14 @@ } + @GetMapping("/deptTree111") + @ApiOperation("鑾峰彇閮ㄩ棬鏍戝垪琛�1111111111") + public AjaxResult deptTree111(SysDept dept) { + final List<TreeSelect> treeSelects = deptService.selectDeptTreeList1(dept); + return success(treeSelects); + } + + /** * 鑾峰彇瀛愮瀹ら儴闂ㄥ垪琛� */ -- Gitblit v1.8.0