From bfdc738a7d11d7a132747c52fe51f6887405fae4 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 04 七月 2024 16:29:21 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java | 10 ++-- smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java | 64 ++++++++++++++++---------------- smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 22 +++++----- smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java | 4 +- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java index 3758096..efedc9a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java @@ -69,7 +69,7 @@ * 鑾峰彇瀹f暀璧勬枡搴撹缁嗕俊鎭� */ @PreAuthorize("@ss.hasPermi('system:library:query')") - @GetMapping(value = "/{id}") + @GetMapping(value = "/getInfo/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(heLibraryService.selectHeLibraryById(id)); } @@ -79,7 +79,7 @@ */ @PreAuthorize("@ss.hasPermi('system:library:add')") @Log(title = "瀹f暀璧勬枡搴�", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") public AjaxResult add(@RequestBody HeLibrary heLibrary) { return toAjax(heLibraryService.insertHeLibrary(heLibrary)); } @@ -89,7 +89,7 @@ */ @PreAuthorize("@ss.hasPermi('system:library:edit')") @Log(title = "瀹f暀璧勬枡搴�", businessType = BusinessType.UPDATE) - @PutMapping + @PostMapping("/edit") public AjaxResult edit(@RequestBody HeLibrary heLibrary) { return toAjax(heLibraryService.updateHeLibrary(heLibrary)); } @@ -110,8 +110,8 @@ */ @ApiOperation("鏂板鎴栦慨鏀瑰鏁欒鎯�") @PreAuthorize("@ss.hasPermi('system:script:list')") - @PostMapping("/saveOrUpdateScript") - public AjaxResult saveOrUpdateScript(@RequestBody HeLibraryVO heLibraryVO) { + @PostMapping("/saveOrUpdateHeLibrary") + public AjaxResult saveOrUpdateHeLibrary(@RequestBody HeLibraryVO heLibraryVO) { if (ObjectUtils.isEmpty(heLibraryVO)) { throw new BaseException("鍏ュ弬涓虹┖锛岃妫�鏌ュ叆鍙�"); } diff --git a/smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java index b04ad51..9a4cc9f 100644 --- a/smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java @@ -113,38 +113,38 @@ i = heLibraryMapper.updateHeLibrary(heLibrary); } log.info("鏂板鎴栦慨鏀瑰鏁欒鎯呯殑id涓猴細{}", heLibrary.getId()); - - //瀵规爣绛捐繘琛屽鐞� - for (HeLibraryTag heLibraryTag : heLibraryVO.getHeLibraryTagList()) { - if (heLibraryTag.getIsoperation() != null && heLibraryTag.getIsoperation() == 1) { - //鏂板 - heLibraryTag.setHeid(heLibrary.getId()); - heLibraryTagMapper.insertHeLibraryTag(heLibraryTag); - } else if (heLibraryTag.getIsoperation() != null && heLibraryTag.getIsoperation() == 2) { - //淇敼 - heLibraryTag.setHeid(heLibrary.getId()); - heLibraryTagMapper.updateHeLibraryTag(heLibraryTag); - } else if (heLibraryTag.getIsoperation() != null && heLibraryTag.getIsoperation() == 3) { - //鍒犻櫎 - if (heLibraryTag.getId() == null) { - log.info("鍒犻櫎澶辫触,妯℃澘鎸囨爣id涓虹┖"); - } else { - heLibraryTagMapper.deleteHeLibraryTagById(heLibraryTag.getId()); - } - } - } - - //瀵圭瀹よ繘琛屽鐞� - for (TempDetpRelevance tempDetpRelevance : heLibraryVO.getTempDetpRelevances()) { - if (tempDetpRelevance.getId() == null) { - //鏂板 - tempDetpRelevance.setTempid(heLibrary.getId()); - tempDetpRelevance.setType(3L); - tempDetpRelevanceMapper.insertTempDetpRelevance(tempDetpRelevance); - } else { - tempDetpRelevanceMapper.updateTempDetpRelevance(tempDetpRelevance); - } - } +// +// //瀵规爣绛捐繘琛屽鐞� +// for (HeLibraryTag heLibraryTag : heLibraryVO.getHeLibraryTagList()) { +// if (heLibraryTag.getIsoperation() != null && heLibraryTag.getIsoperation() == 1) { +// //鏂板 +// heLibraryTag.setHeid(heLibrary.getId()); +// heLibraryTagMapper.insertHeLibraryTag(heLibraryTag); +// } else if (heLibraryTag.getIsoperation() != null && heLibraryTag.getIsoperation() == 2) { +// //淇敼 +// heLibraryTag.setHeid(heLibrary.getId()); +// heLibraryTagMapper.updateHeLibraryTag(heLibraryTag); +// } else if (heLibraryTag.getIsoperation() != null && heLibraryTag.getIsoperation() == 3) { +// //鍒犻櫎 +// if (heLibraryTag.getId() == null) { +// log.info("鍒犻櫎澶辫触,妯℃澘鎸囨爣id涓虹┖"); +// } else { +// heLibraryTagMapper.deleteHeLibraryTagById(heLibraryTag.getId()); +// } +// } +// } +// +// //瀵圭瀹よ繘琛屽鐞� +// for (TempDetpRelevance tempDetpRelevance : heLibraryVO.getTempDetpRelevances()) { +// if (tempDetpRelevance.getId() == null) { +// //鏂板 +// tempDetpRelevance.setTempid(heLibrary.getId()); +// tempDetpRelevance.setType(3L); +// tempDetpRelevanceMapper.insertTempDetpRelevance(tempDetpRelevance); +// } else { +// tempDetpRelevanceMapper.updateTempDetpRelevance(tempDetpRelevance); +// } +// } return i; } diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java index d7708ee..3a87814 100644 --- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java @@ -133,13 +133,13 @@ if (CollectionUtils.isNotEmpty(patArchiveVO.getTagList())) { //澶勭悊鏍囩锛堟柊澧炪�佸垹闄わ級 for (PatArchivetag patArchivetag : patArchiveVO.getTagList()) { - if (patArchivetag.getIsoperation() != null && patArchivetag.getIsoperation() == 1) { + if (patArchivetag.getIsoperation() != null && patArchivetag.getIsoperation() == 1 || patArchivetag.getIsoperation() == null && patArchiveVO.getIsoperation() == 1) { //鏂板 patArchivetag.setUpdateBy(null); patArchivetag.setCreateTime(new Date()); patArchivetag.setPatid(patArchive.getPatid()); patArchivetagMapper.insertPatArchivetag(patArchivetag); - } else if (patArchivetag.getIsoperation() != null && patArchivetag.getIsoperation() == 3) { + } else if (patArchivetag.getIsoperation() != null && patArchivetag.getIsoperation() == 3 || patArchivetag.getIsoperation() == null && patArchiveVO.getIsoperation() == 3) { patArchivetag.setDelFlag("1"); //鍒犻櫎 log.info("鏍囩鐨刬d涓猴細{}", patArchivetag.getTagid()); diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml index f07f481..3af7acc 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml @@ -225,11 +225,9 @@ <select id="selectPatArchiveInfoByAllhosp" parameterType="com.smartor.domain.PatArchiveReq" resultMap="PatArchiveResult"> - select - c.tagname as tag, - b.tagid as tagid, + SELECT a.patid, - a.name, + a.NAME, a.sex, a.nation, a.native_place, @@ -254,22 +252,24 @@ a.isupload, a.upload_time, a.viptype, - a.pattype - from pat_archive a,pat_archivetag b ,base_tag c + a.pattype, + b.tagname AS tag, + b.tagid AS tagid + FROM + pat_archive a + LEFT JOIN pat_archivetag b ON a.patid = b.patid AND b.del_flag = 0 <where> - a.patid = b.patid and b.tagid = c.tagid + a.del_flag = 0 <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> <if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if> <if test="pid != null and pid != ''">and a.patid = #{pid}</if> <if test="telcode != null and telcode != ''">and a.telcode = #{telcode}</if> - <if test="tagIds != null and tagIds != ''">and c.tagid in + <if test="tagIds != null and tagIds != ''">and b.tagid in <foreach collection="tagIds" item="tagId" open="(" separator="," close=")"> #{tagId} </foreach> </if> - AND b.del_flag != 1 - AND c.del_flag != 1 - AND a.del_flag != 1 + </where> </select> -- Gitblit v1.9.3