| | |
| | | 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; |
| | |
| | | private ITjRulesService tjRulesService; |
| | | @Autowired |
| | | public RedisTemplate<Object,Object> redisTemplate; |
| | | @Resource |
| | | private TestMapper testMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | 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<>(); |
| | | |
| | | //根据体检号查 |
| | |
| | | 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("暂时没有数据"); |
| | | } |
| | | |
| | | |
| | |
| | | ksproList = projectService.getKsTjProjectIdList(); |
| | | } |
| | | //筛选影像的项目。 |
| | | if (ksproList.size() == 0) { |
| | | return AjaxResult.error("请完善科室项目信息"); |
| | | } |
| | | ksproList = ksproList.stream() |
| | | .filter(element -> element ==1633660948860522589L |
| | | // || element ==1633660948860522504L |
| | |
| | | // element ==1633660948860522531L|| element ==1633660948860522533L |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (ksproList == null || ksproList.size() == 0) { |
| | | return AjaxResult.error("请完善科室项目信息"); |
| | | } |
| | | List<TjCustomer> customerLis = new ArrayList<>(); |
| | | |
| | | //根据体检号查 |
| | |
| | | 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); |
| | | // } |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/deptTree111") |
| | | @ApiOperation("获取部门树列表1111111111") |
| | | public AjaxResult deptTree111(SysDept dept) { |
| | | final List<TreeSelect> treeSelects = deptService.selectDeptTreeList1(dept); |
| | | return success(treeSelects); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取子科室部门列表 |
| | | */ |