Commit d17d75b09976f8d995cec65cf447911bd72edfc6
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DepartController.java
View file @
d17d75b
| ... | ... | @@ -197,17 +197,26 @@ |
| 197 | 197 | * PC-查询同一家医院科室名称是否重复 |
| 198 | 198 | * @param hid 所属医院 |
| 199 | 199 | * @param dname 科室名称 |
| 200 | + * @param did 修改时用 | |
| 200 | 201 | * @return true 可以使用,false已经存在 |
| 201 | 202 | */ |
| 202 | 203 | @GetMapping("getDepartByParam") |
| 203 | - public BaseResponse getDepartByParam(Integer hid,String dname){ | |
| 204 | + public BaseResponse getDepartByParam(Integer hid,String dname,@RequestParam(required = false) Integer did){ | |
| 204 | 205 | BaseResponse baseResponse=new BaseResponse(); |
| 205 | 206 | try { |
| 206 | 207 | QueryWrapper<LymsHdepart> queryWrapper=new QueryWrapper<>(); |
| 207 | 208 | queryWrapper.eq("hid", hid); |
| 208 | 209 | queryWrapper.eq("dname", dname); |
| 209 | - LymsHdepart lymsHdepart=lymsHdepartService.getOne(queryWrapper); | |
| 210 | - baseResponse.setObject(null==lymsHdepart?true:false); | |
| 210 | + if(null!=did){//修改的时候判断是否重复 | |
| 211 | + QueryWrapper<LymsHdepart> queryWrapper2=new QueryWrapper<>(); | |
| 212 | + queryWrapper2.eq("did", did); | |
| 213 | + LymsHdepart lymsHdepart2=lymsHdepartService.getOne(queryWrapper2); | |
| 214 | + LymsHdepart lymsHdepart=lymsHdepartService.getOne(queryWrapper); | |
| 215 | + baseResponse.setObject(null==lymsHdepart?true:(lymsHdepart2.getDname().equals(dname)?true:false)); | |
| 216 | + }else { | |
| 217 | + LymsHdepart lymsHdepart=lymsHdepartService.getOne(queryWrapper); | |
| 218 | + baseResponse.setObject(null==lymsHdepart?true:false); | |
| 219 | + } | |
| 211 | 220 | baseResponse.setErrormsg("成功"); |
| 212 | 221 | } catch (Exception e) { |
| 213 | 222 | baseResponse.setErrormsg("失败"); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
d17d75b
| ... | ... | @@ -678,16 +678,16 @@ |
| 678 | 678 | } |
| 679 | 679 | |
| 680 | 680 | /** |
| 681 | - * PC-查询患者身份证号是否重复 | |
| 681 | + * PC-二次添加患者,输入身份证号显示相关信息 | |
| 682 | 682 | * @param idno 患者身份证号码 |
| 683 | - * @return true 可以使用,false已经存在 | |
| 683 | + * @return | |
| 684 | 684 | */ |
| 685 | 685 | @GetMapping("getPatientByIdno") |
| 686 | 686 | public BaseResponse getPatientByIdno(String idno){ |
| 687 | 687 | BaseResponse baseResponse=new BaseResponse(); |
| 688 | 688 | try { |
| 689 | - LymsPatient patient=lymsPatientService.getOne(new QueryWrapper<LymsPatient>().eq("idno", idno)); | |
| 690 | - baseResponse.setObject(null==patient?true:false); | |
| 689 | + PatientInfo patient=patientInfoService.getOne(new QueryWrapper<PatientInfo>().eq("idno", idno)); | |
| 690 | + baseResponse.setObject(null==patient?null:patient); | |
| 691 | 691 | baseResponse.setErrormsg("成功"); |
| 692 | 692 | } catch (Exception e) { |
| 693 | 693 | baseResponse.setErrormsg("失败"); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java
View file @
d17d75b
| ... | ... | @@ -11,10 +11,7 @@ |
| 11 | 11 | import com.lyms.talkonlineweb.service.LymsDictService; |
| 12 | 12 | import com.lyms.talkonlineweb.service.RegionsService; |
| 13 | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 14 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 15 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 16 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 17 | -import org.springframework.web.bind.annotation.RestController; | |
| 14 | +import org.springframework.web.bind.annotation.*; | |
| 18 | 15 | |
| 19 | 16 | import java.util.List; |
| 20 | 17 | |
| 21 | 18 | |
| 22 | 19 | |
| 23 | 20 | |
| ... | ... | @@ -95,20 +92,30 @@ |
| 95 | 92 | } |
| 96 | 93 | |
| 97 | 94 | /** |
| 98 | - * PC-查询同vtype类型字code典编码是否重复 | |
| 95 | + * PC-查询同vtype类型,字典编码是否重复 | |
| 99 | 96 | * @param vtype 所属类型 |
| 100 | 97 | * @param code 编码 |
| 98 | + * @param value 取值 | |
| 99 | + * @param id 修改时用 | |
| 101 | 100 | * @return true 可以使用,false已经存在 |
| 102 | 101 | */ |
| 103 | 102 | @GetMapping("getDictByParam") |
| 104 | - public BaseResponse getDictByParam(Integer vtype,Integer code){ | |
| 103 | + public BaseResponse getDictByParam(Integer vtype, Integer code,String value, @RequestParam(required = false) Integer id){ | |
| 105 | 104 | BaseResponse baseResponse=new BaseResponse(); |
| 106 | 105 | try { |
| 107 | 106 | QueryWrapper<LymsDict> queryWrapper=new QueryWrapper<>(); |
| 108 | 107 | queryWrapper.eq("vtype", vtype); |
| 109 | - queryWrapper.eq("code", code); | |
| 110 | - LymsDict dict=lymsDictService.getOne(queryWrapper); | |
| 111 | - baseResponse.setObject(null==dict?true:false); | |
| 108 | + queryWrapper.eq("code", code).or().eq("value",value ); | |
| 109 | + if(null!=id){//修改的时候判断是否重复 | |
| 110 | + QueryWrapper<LymsDict> queryWrapper2=new QueryWrapper<>(); | |
| 111 | + queryWrapper2.eq("id", id); | |
| 112 | + LymsDict dict2=lymsDictService.getOne(queryWrapper2); | |
| 113 | + LymsDict dict=lymsDictService.getOne(queryWrapper); | |
| 114 | + baseResponse.setObject(null==dict?true:(dict2.getCode().equals(code)&&dict2.getValue().equals(value)?true:false)); | |
| 115 | + }else { | |
| 116 | + LymsDict dict=lymsDictService.getOne(queryWrapper); | |
| 117 | + baseResponse.setObject(null==dict?true:false); | |
| 118 | + } | |
| 112 | 119 | baseResponse.setErrormsg("成功"); |
| 113 | 120 | } catch (Exception e) { |
| 114 | 121 | baseResponse.setErrormsg("失败"); |