Commit b3e25cd95f2dc4cd2ed8d7a7729d4df3927eefdf
1 parent
659147a329
Exists in
master
bug
Showing 2 changed files with 15 additions and 3 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/CommonController.java
View file @
b3e25cd
... | ... | @@ -50,15 +50,21 @@ |
50 | 50 | tkrecord.setHxgroupid(gLst.get(0).getHxgroupid()); |
51 | 51 | } |
52 | 52 | |
53 | + String hxgroupid=tkrecord.getHxgroupid(); | |
54 | + tkrecord.setHxgroupid(null); | |
53 | 55 | List<LymsTkrecord> tLst=lymsTkrecordService.list(Wrappers.query(tkrecord).orderByDesc("createdtime")); |
54 | 56 | if (tLst.size()>0){ |
55 | 57 | tkrecord=tLst.get(0); |
56 | 58 | tkrecord.setStat(1); |
57 | 59 | tkrecord.setUpdatedtime(new Date()); |
58 | 60 | tkrecord.setUpdatedby(updateby); |
61 | + tkrecord.setHxgroupid(hxgroupid); | |
59 | 62 | boolean f=lymsTkrecordService.saveOrUpdate(tkrecord); |
60 | 63 | |
61 | 64 | baseResponse.setErrorcode(f==true?0:1); |
65 | + } | |
66 | + if(baseResponse.getErrorcode()==1){ | |
67 | + baseResponse.setErrormsg("该问诊已结束!"); | |
62 | 68 | } |
63 | 69 | return baseResponse; |
64 | 70 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
b3e25cd
... | ... | @@ -90,6 +90,9 @@ |
90 | 90 | if (Objects.nonNull(qtype) && qtype == 2) {//从医院购买 |
91 | 91 | queryWrapper.inSql("id", "SELECT t.`pid` FROM lyms_tcard t WHERE t.`fid`=2"); |
92 | 92 | } |
93 | + if(StringUtils.isEmpty(patientInfo.getPname())){ | |
94 | + patientInfo.setPname(null); | |
95 | + } | |
93 | 96 | Page<PatientInfo> patientPagePage = patientInfoService.page(page, queryWrapper); |
94 | 97 | List<PatientInfo> pLst = patientInfoService.list(queryWrapper); |
95 | 98 | int daiCnt = pLst.parallelStream().mapToInt(PatientInfo::getCcnt).sum();//待使用数量 |
96 | 99 | |
... | ... | @@ -121,13 +124,16 @@ |
121 | 124 | BaseResponse baseResponse = new BaseResponse(); |
122 | 125 | log.info(">>>>>>>>>>>>>>>登记病例"); |
123 | 126 | baseResponse.setErrormsg(""); |
124 | - LymsPatient patient2 = lymsPatientService.getOne(Wrappers.query(patient).eq("idno", patient.getIdno())); | |
127 | + LymsPatient tmpP=new LymsPatient(); | |
128 | + tmpP.setIdno(patient.getIdno()); | |
129 | + LymsPatient patient2 = lymsPatientService.getOne(Wrappers.query(tmpP).eq("idno", patient.getIdno())); | |
125 | 130 | if (patient2 == null) { |
126 | 131 | patient.setCreatedtime(new Date()); |
127 | 132 | patient.setPpasswd(Constant.COMMON_PASSWD); |
128 | 133 | } else { |
129 | 134 | patient.setId(patient2.getId()); |
130 | 135 | patient.setUpdatedtime(new Date()); |
136 | + patient.setCcnt(patient2.getCcnt()+patient.getCcnt()); | |
131 | 137 | } |
132 | 138 | |
133 | 139 | if (result.hasErrors()) { |
... | ... | @@ -686,8 +692,8 @@ |
686 | 692 | public BaseResponse getPatientByIdno(String idno){ |
687 | 693 | BaseResponse baseResponse=new BaseResponse(); |
688 | 694 | try { |
689 | - PatientInfo patient=patientInfoService.getOne(new QueryWrapper<PatientInfo>().eq("idno", idno)); | |
690 | - baseResponse.setObject(null==patient?null:patient); | |
695 | + List<PatientInfo> pLst=patientInfoService.list(new QueryWrapper<PatientInfo>().eq("idno", idno)); | |
696 | + baseResponse.setObject(pLst.size()<1?null:pLst.get(0)); | |
691 | 697 | baseResponse.setErrormsg("成功"); |
692 | 698 | } catch (Exception e) { |
693 | 699 | baseResponse.setErrormsg("失败"); |