From 2e1fc763314f7231780c7d6e36fd6922548b285a Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期三, 04 六月 2025 18:16:52 +0800 Subject: [PATCH] zjh20250604 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjProjectController.java | 151 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 147 insertions(+), 4 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjProjectController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjProjectController.java index 8b7e808..85781cc 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjProjectController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjProjectController.java @@ -93,7 +93,7 @@ List<TjProject> tjProjects = tjProjectService.getDxTjProjectList(); String config = configService.selectConfigByKey("tj_dxsxtj"); if (null != config && config.equals("N")) { - tjProjects = tjProjectService.getOpenDxTjProjectList(); + tjProjects = tjProjectService.getOpenDxTjProjectList(null); } if (tjProjects != null) { for (TjProject project : tjProjects) { @@ -591,7 +591,7 @@ List<TjProject> tjProjects = tjProjectService.getDxTjProjectList(); String config = configService.selectConfigByKey("tj_dxsxtj"); if (null != config && config.equals("N")) { - tjProjects = tjProjectService.getOpenDxTjProjectList(); + tjProjects = tjProjectService.getOpenDxTjProjectList(null); } String key = configService.selectConfigByKey("is_open_sfxm"); Map<String, Object> map = new HashMap<>(); @@ -604,11 +604,11 @@ @GetMapping("/getProParentIdDxListByFenYe") @ApiOperation(value = "閫夋嫨浣撴椤圭洰(鎵�鏈夐〉闈㈤」鐩�)閫夊崟椤规椂璋冪敤鐨勬帴鍙�(鏈夊垎椤�)") - public AjaxResult getProParentIdDxListByFenYe(@RequestParam(defaultValue = "1") int page,@RequestParam(defaultValue = "10") int pageSize) { + public AjaxResult getProParentIdDxListByFenYe(@RequestParam(defaultValue = "1") int page,@RequestParam(defaultValue = "10") int pageSize,String nr) { List<TjProject> tjProjects = tjProjectService.getDxTjProjectList(); String config = configService.selectConfigByKey("tj_dxsxtj"); if (null != config && config.equals("N")) { - tjProjects = tjProjectService.getOpenDxTjProjectList(); + tjProjects = tjProjectService.getOpenDxTjProjectList(nr); } String key = configService.selectConfigByKey("is_open_sfxm"); Map<String, Object> map = new HashMap<>(); @@ -662,4 +662,147 @@ throw new RuntimeException(e); } } + + + @GetMapping("/getProListByBblx") + @ApiOperation(value = "鏌ヨ鏍囨湰瀵瑰簲椤圭洰鎴栨湭瀵瑰簲鏍囨湰鐨勯」鐩�") + public AjaxResult getProListByBblx(@ApiParam(value = "鏍囨湰绫诲瀷")@RequestParam(required = false) String bblx) { + try { + List<TjProject> projectList =tjProjectService.getProListByBblx(bblx); + return AjaxResult.success(projectList); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @GetMapping("/delProByBblx") + @ApiOperation(value = "鍒犻櫎椤圭洰瀵瑰簲鏍囨湰") + @Transactional + public AjaxResult delProByBblx(@ApiParam(value = "椤圭洰ID")@RequestParam(required = false) String proId) { + try { + TjProject tjProject = tjProjectService.getById(proId); + tjProject.setSpecimenType(null); + tjProjectService.updateById(tjProject); + return AjaxResult.success(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + + @PostMapping("/updateProByBblx") + @ApiOperation(value = "淇敼鎵�閫夐」鐩殑鏍囨湰绫诲瀷") + @Transactional + public AjaxResult updateProByBblx(@ApiParam(value = "椤圭洰ID闆嗗悎")@RequestParam(required = false) List<String> proIds, + @ApiParam(value = "鏍囨湰绫诲瀷")@RequestParam(required = false)String bblx) { + try { + if(null != proIds && !proIds.isEmpty()){ + for (String proId : proIds) { + TjProject tjProject = tjProjectService.getById(proId); + tjProject.setSpecimenType(bblx); + tjProjectService.updateById(tjProject); + } + } + return AjaxResult.success(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + + + + + + @GetMapping("/getProListByBwwh") + @ApiOperation(value = "鏌ヨ閮ㄤ綅瀵瑰簲椤圭洰鎴栨湭瀵瑰簲閮ㄤ綅鐨勯」鐩�") + public AjaxResult getProListByBwwh(@ApiParam(value = "鏍囨湰绫诲瀷")@RequestParam(required = false) String bw) { + try { + List<TjProject> projectList =tjProjectService.getProListByBwwh(bw); + return AjaxResult.success(projectList); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @GetMapping("/delProByBbwwh") + @ApiOperation(value = "鍒犻櫎椤圭洰瀵瑰簲閮ㄤ綅") + @Transactional + public AjaxResult delProByBbwwh(@ApiParam(value = "椤圭洰ID")@RequestParam(required = false) String proId) { + try { + TjProject tjProject = tjProjectService.getById(proId); + tjProject.setCheckBw(null); + tjProjectService.updateById(tjProject); + return AjaxResult.success(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @PostMapping("/updateProByBwwh") + @ApiOperation(value = "淇敼鎵�閫夐」鐩殑閮ㄤ綅") + @Transactional + public AjaxResult updateProByBwwh(@ApiParam(value = "椤圭洰ID闆嗗悎")@RequestParam(required = false) List<String> proIds, + @ApiParam(value = "鏍囨湰绫诲瀷")@RequestParam(required = false)String bw) { + try { + if(null != proIds && !proIds.isEmpty()){ + for (String proId : proIds) { + TjProject tjProject = tjProjectService.getById(proId); + tjProject.setCheckBw(bw); + tjProjectService.updateById(tjProject); + } + } + return AjaxResult.success(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + +// @PostMapping("/addOrupdateProByBz") +// @ApiOperation(value = "鏂板鎴栦慨鏀规墍閫夐」鐩殑瀵瑰簲鐥呯淇℃伅") +// @Transactional +// public AjaxResult addOrupdateProByBz(@ApiParam(value = "椤圭洰ID闆嗗悎")@RequestParam(required = false) List<String> proIds, +// @ApiParam(value = "鐥呯ID")@RequestParam(required = false)String bz) { +// try { +// if(null != proIds && !proIds.isEmpty()){ +// bzProService.remove(new LambdaQueryWrapper<>(TjBzPro.class).eq(TjBzPro::getBzId,bz)); +// for (String proId : proIds) { +// TjBzPro bzPro=new TjBzPro(); +// bzPro.setBzId(Long.valueOf(bz)); +// bzPro.setProId(Long.valueOf(proId)); +// bzProService.save(bzPro); +// } +// } +// return AjaxResult.success(); +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// } +// +// +// @GetMapping("/getProByBz") +// @ApiOperation(value = "鏌ヨ鐥呯瀵瑰簲椤圭洰") +// public AjaxResult getProByBz(@ApiParam(value = "鐥呯ID")@RequestParam(required = false)String bz) { +// try { +// List<TjBzPro> list = bzProService.list(new LambdaQueryWrapper<>(TjBzPro.class).eq(TjBzPro::getBzId, bz)); +// return AjaxResult.success(list); +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// } +// +// +// @DeleteMapping("/delProByBz") +// @ApiOperation(value = "鍒犻櫎鐥呯瀵瑰簲椤圭洰") +// public AjaxResult delProByBz(@ApiParam(value = "鐥呯ID")@RequestParam(required = false)String bz, +// @ApiParam(value = "椤圭洰ID")@RequestParam(required = false)String proId) { +// try { +// bzProService.remove(new LambdaQueryWrapper<>(TjBzPro.class).eq(TjBzPro::getBzId,bz).eq(TjBzPro::getProId,proId)); +// return AjaxResult.success(); +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// } + } -- Gitblit v1.8.0