Commit 6ec8d73aa8b3b2d705abfe005a38d14895209012
1 parent
dcb91e4951
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 453 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySpecialDiseaseClinicFacade.java
View file @
6ec8d73
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import com.lyms.platform.common.utils.PropertiesUtils; |
| 13 | 13 | import com.lyms.platform.common.utils.StringUtils; |
| 14 | 14 | import com.lyms.platform.operate.web.request.BabySpecialDiseaseClinicRequest; |
| 15 | +import com.lyms.platform.operate.web.result.BabySpecialDiseaseClinicResult; | |
| 15 | 16 | import com.lyms.platform.operate.web.service.impl.BaseServiceImpl; |
| 16 | 17 | import com.lyms.platform.pojo.BabyModel; |
| 17 | 18 | import com.lyms.platform.pojo.BabySpecialDiseaseClinicModel; |
| ... | ... | @@ -20,6 +21,7 @@ |
| 20 | 21 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 21 | 22 | import org.springframework.stereotype.Component; |
| 22 | 23 | |
| 24 | +import java.util.ArrayList; | |
| 23 | 25 | import java.util.Date; |
| 24 | 26 | import java.util.List; |
| 25 | 27 | |
| ... | ... | @@ -191,7 +193,9 @@ |
| 191 | 193 | BaseObjectResponse br = new BaseObjectResponse(); |
| 192 | 194 | if(StringUtils.isNotEmpty(id)){ |
| 193 | 195 | BabySpecialDiseaseClinicModel babySpecialDiseaseClinicModel = babySDCService.queryBabySpecialDiseaseClinicById(id); |
| 194 | - br.setData(babySpecialDiseaseClinicModel); | |
| 196 | + BabySpecialDiseaseClinicResult babySpecialDiseaseClinicResult = new BabySpecialDiseaseClinicResult(); | |
| 197 | + babySpecialDiseaseClinicResult.convertToResult(babySpecialDiseaseClinicModel); | |
| 198 | + br.setData(babySpecialDiseaseClinicResult); | |
| 195 | 199 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 196 | 200 | br.setErrormsg("成功"); |
| 197 | 201 | } |
| 198 | 202 | |
| 199 | 203 | |
| 200 | 204 | |
| 201 | 205 | |
| 202 | 206 | |
| ... | ... | @@ -209,30 +213,35 @@ |
| 209 | 213 | |
| 210 | 214 | BaseObjectResponse br = new BaseObjectResponse(); |
| 211 | 215 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 212 | - List<BabySpecialDiseaseClinicModel> babySpecialDiseaseClinicModels = null; | |
| 216 | + List<BabySpecialDiseaseClinicResult> babySpecialDiseaseClinicResults = new ArrayList<>(); | |
| 213 | 217 | //单人多条专病记录 |
| 214 | 218 | if( StringUtils.isNotEmpty(babyQuery.getBuildId()) ){ |
| 215 | 219 | babyQuery.setYn(YnEnums.YES.getId()); |
| 216 | 220 | babyQuery.setHospitalId(hospitalId); |
| 217 | - babySpecialDiseaseClinicModels = babySDCService.queryBabySpecialDiseaseClinicRecord(babyQuery); | |
| 218 | - | |
| 221 | + List<BabySpecialDiseaseClinicModel> babySpecialDiseaseClinicModels = babySDCService.queryBabySpecialDiseaseClinicRecord(babyQuery); | |
| 222 | + br.setData(babySpecialDiseaseClinicModels); | |
| 223 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 224 | + br.setErrormsg("成功"); | |
| 225 | + return br; | |
| 219 | 226 | }else if(StringUtils.isEmpty(babyQuery.getBuildId()) ){ |
| 220 | 227 | babyQuery.setNeed("true"); |
| 221 | 228 | babyQuery.setYn(YnEnums.YES.getId()); |
| 222 | 229 | babyQuery.setHospitalId(hospitalId); |
| 223 | - babySpecialDiseaseClinicModels = babySDCService.queryBabySpecialDiseaseClinicRecord(babyQuery); | |
| 230 | + List<BabySpecialDiseaseClinicModel> babySpecialDiseaseClinicModels = babySDCService.queryBabySpecialDiseaseClinicRecord(babyQuery); | |
| 224 | 231 | for (int i = 0; i < babySpecialDiseaseClinicModels.size(); i++) { |
| 225 | 232 | BabySpecialDiseaseClinicModel babySpecialDiseaseClinicModel = babySpecialDiseaseClinicModels.get(i); |
| 226 | - if(babySpecialDiseaseClinicModel !=null && StringUtils.isNotEmpty(babySpecialDiseaseClinicModel.getMphone())){ | |
| 227 | - babySpecialDiseaseClinicModel.setMphone(StringUtils.encryPhone(babySpecialDiseaseClinicModel.getMphone())); | |
| 233 | + BabySpecialDiseaseClinicResult babySpecialDiseaseClinicResult = new BabySpecialDiseaseClinicResult(); | |
| 234 | + if(babySpecialDiseaseClinicModel !=null ){ | |
| 235 | + babySpecialDiseaseClinicResult.convertToResult(babySpecialDiseaseClinicModel); | |
| 236 | + babySpecialDiseaseClinicResults.add(babySpecialDiseaseClinicResult); | |
| 228 | 237 | } |
| 229 | 238 | } |
| 230 | 239 | } |
| 231 | - | |
| 232 | - br.setData(babySpecialDiseaseClinicModels); | |
| 240 | + br.setData(babySpecialDiseaseClinicResults); | |
| 233 | 241 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 234 | 242 | br.setErrormsg("成功"); |
| 235 | 243 | return br; |
| 244 | + | |
| 236 | 245 | } |
| 237 | 246 | |
| 238 | 247 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySpecialDiseaseClinicResult.java
View file @
6ec8d73
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.lyms.platform.common.base.IBasicResultConvert; | |
| 5 | +import com.lyms.platform.common.utils.DateUtil; | |
| 6 | +import com.lyms.platform.common.utils.StringUtils; | |
| 7 | +import com.lyms.platform.pojo.AmniocentesisInfoModel; | |
| 8 | +import com.lyms.platform.pojo.BabySpecialDiseaseClinicModel; | |
| 9 | + | |
| 10 | +import java.util.Date; | |
| 11 | + | |
| 12 | +public class BabySpecialDiseaseClinicResult extends BabySpecialDiseaseClinicModel implements IBasicResultConvert<BabySpecialDiseaseClinicResult, BabySpecialDiseaseClinicModel> { | |
| 13 | + //儿童性别 | |
| 14 | + private String sexstr; | |
| 15 | + //儿童生日 | |
| 16 | + private String birthdaystr; | |
| 17 | + //检查日期 | |
| 18 | + private String checkDatestr; | |
| 19 | + //下次预约 | |
| 20 | + private String nextDatestr; | |
| 21 | + | |
| 22 | + //建档时间 | |
| 23 | + private String buildDatestr; | |
| 24 | + | |
| 25 | + public String getBirthdaystr() { | |
| 26 | + return birthdaystr; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getSexstr() { | |
| 30 | + return sexstr; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setSexstr(String sexstr) { | |
| 34 | + this.sexstr = sexstr; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setBirthdaystr(String birthdaystr) { | |
| 38 | + this.birthdaystr = birthdaystr; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public String getCheckDatestr() { | |
| 42 | + return checkDatestr; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setCheckDatestr(String checkDatestr) { | |
| 46 | + this.checkDatestr = checkDatestr; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public String getNextDatestr() { | |
| 50 | + return nextDatestr; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setNextDatestr(String nextDatestr) { | |
| 54 | + this.nextDatestr = nextDatestr; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public String getBuildDatestr() { | |
| 58 | + return buildDatestr; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setBuildDatestr(String buildDatestr) { | |
| 62 | + this.buildDatestr = buildDatestr; | |
| 63 | + } | |
| 64 | + | |
| 65 | + @Override | |
| 66 | + public BabySpecialDiseaseClinicResult convertToResult(BabySpecialDiseaseClinicModel destModel) { | |
| 67 | + | |
| 68 | + setId(destModel.getId()); | |
| 69 | + setBuildId(destModel.getBuildId()); | |
| 70 | + setPid(destModel.getPid()); | |
| 71 | + setHospitalId(destModel.getHospitalId()); | |
| 72 | + setMcertNo(destModel.getMcertNo()); | |
| 73 | + setEncoded(destModel.getEncoded()); | |
| 74 | + setCertNo(destModel.getCertNo()); | |
| 75 | + setVcCardNo(destModel.getVcCardNo()); | |
| 76 | + setsINCard(destModel.getsINCard()); | |
| 77 | + setMonth(destModel.getMonth()); | |
| 78 | + setChiefComplaint(destModel.getChiefComplaint()); | |
| 79 | + setPresentDisease(destModel.getPresentDisease()); | |
| 80 | + setPastHistory(destModel.getPastHistory()); | |
| 81 | + setDiagnosis(destModel.getDiagnosis()); | |
| 82 | + setCheckDoctor(destModel.getCheckDoctor()); | |
| 83 | + setBuildDoctorId(destModel.getBuildDoctorId()); | |
| 84 | + setBuildDoctorName(destModel.getBuildDoctorName()); | |
| 85 | + | |
| 86 | + | |
| 87 | + setName(destModel.getName()); | |
| 88 | + if(destModel.getSex()==0){ | |
| 89 | + setSexstr("女"); | |
| 90 | + }else if(destModel.getSex()==1){ | |
| 91 | + setSexstr("男"); | |
| 92 | + }else { | |
| 93 | + setSexstr("_"); | |
| 94 | + } | |
| 95 | + setCheckMonth(destModel.getCheckMonth()); | |
| 96 | + setBirthdaystr(DateUtil.getYyyyMmDd(destModel.getBirthday())); | |
| 97 | + setBuildDatestr(DateUtil.getYyyyMmDd((destModel).getBuildDate())); | |
| 98 | + setMname(destModel.getMname()); | |
| 99 | + setNextDatestr(DateUtil.getYyyyMmDd((destModel).getNextDate())); | |
| 100 | + setZbProject(destModel.getZbProject()); | |
| 101 | + if(StringUtils.isNotEmpty(destModel.getMphone())){ | |
| 102 | + setMphone(StringUtils.encryPhone(destModel.getMphone())); | |
| 103 | + } | |
| 104 | + setCheckDatestr(DateUtil.getYyyyMmDd((destModel).getCheckDate())); | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + return this; | |
| 109 | + } | |
| 110 | + | |
| 111 | + @Override | |
| 112 | + public String getId() { | |
| 113 | + return super.getId(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + @Override | |
| 117 | + public void setId(String id) { | |
| 118 | + super.setId(id); | |
| 119 | + } | |
| 120 | + | |
| 121 | + @Override | |
| 122 | + public Integer getYn() { | |
| 123 | + return super.getYn(); | |
| 124 | + } | |
| 125 | + | |
| 126 | + @Override | |
| 127 | + public void setYn(Integer yn) { | |
| 128 | + super.setYn(yn); | |
| 129 | + } | |
| 130 | + | |
| 131 | + @Override | |
| 132 | + public String getBuildId() { | |
| 133 | + return super.getBuildId(); | |
| 134 | + } | |
| 135 | + | |
| 136 | + @Override | |
| 137 | + public void setBuildId(String buildId) { | |
| 138 | + super.setBuildId(buildId); | |
| 139 | + } | |
| 140 | + | |
| 141 | + @Override | |
| 142 | + public Date getCreateDate() { | |
| 143 | + return super.getCreateDate(); | |
| 144 | + } | |
| 145 | + | |
| 146 | + @Override | |
| 147 | + public void setCreateDate(Date createDate) { | |
| 148 | + super.setCreateDate(createDate); | |
| 149 | + } | |
| 150 | + | |
| 151 | + @Override | |
| 152 | + public Date getModifyDate() { | |
| 153 | + return super.getModifyDate(); | |
| 154 | + } | |
| 155 | + | |
| 156 | + @Override | |
| 157 | + public void setModifyDate(Date modifyDate) { | |
| 158 | + super.setModifyDate(modifyDate); | |
| 159 | + } | |
| 160 | + | |
| 161 | + @Override | |
| 162 | + public String getMname() { | |
| 163 | + return super.getMname(); | |
| 164 | + } | |
| 165 | + | |
| 166 | + @Override | |
| 167 | + public void setMname(String mname) { | |
| 168 | + super.setMname(mname); | |
| 169 | + } | |
| 170 | + | |
| 171 | + @Override | |
| 172 | + public String getMcertNo() { | |
| 173 | + return super.getMcertNo(); | |
| 174 | + } | |
| 175 | + | |
| 176 | + @Override | |
| 177 | + public void setMcertNo(String mcertNo) { | |
| 178 | + super.setMcertNo(mcertNo); | |
| 179 | + } | |
| 180 | + | |
| 181 | + @Override | |
| 182 | + public String getMphone() { | |
| 183 | + return super.getMphone(); | |
| 184 | + } | |
| 185 | + | |
| 186 | + @Override | |
| 187 | + public void setMphone(String mphone) { | |
| 188 | + super.setMphone(mphone); | |
| 189 | + } | |
| 190 | + | |
| 191 | + @Override | |
| 192 | + public String getName() { | |
| 193 | + return super.getName(); | |
| 194 | + } | |
| 195 | + | |
| 196 | + @Override | |
| 197 | + public void setName(String name) { | |
| 198 | + super.setName(name); | |
| 199 | + } | |
| 200 | + | |
| 201 | + @Override | |
| 202 | + public String getEncoded() { | |
| 203 | + return super.getEncoded(); | |
| 204 | + } | |
| 205 | + | |
| 206 | + @Override | |
| 207 | + public void setEncoded(String encoded) { | |
| 208 | + super.setEncoded(encoded); | |
| 209 | + } | |
| 210 | + | |
| 211 | + @Override | |
| 212 | + public String getCertNo() { | |
| 213 | + return super.getCertNo(); | |
| 214 | + } | |
| 215 | + | |
| 216 | + @Override | |
| 217 | + public void setCertNo(String certNo) { | |
| 218 | + super.setCertNo(certNo); | |
| 219 | + } | |
| 220 | + | |
| 221 | + @Override | |
| 222 | + public Integer getSex() { | |
| 223 | + return super.getSex(); | |
| 224 | + } | |
| 225 | + | |
| 226 | + @Override | |
| 227 | + public void setSex(Integer sex) { | |
| 228 | + super.setSex(sex); | |
| 229 | + } | |
| 230 | + | |
| 231 | + @Override | |
| 232 | + public String getVcCardNo() { | |
| 233 | + return super.getVcCardNo(); | |
| 234 | + } | |
| 235 | + | |
| 236 | + @Override | |
| 237 | + public void setVcCardNo(String vcCardNo) { | |
| 238 | + super.setVcCardNo(vcCardNo); | |
| 239 | + } | |
| 240 | + | |
| 241 | + @Override | |
| 242 | + public String getsINCard() { | |
| 243 | + return super.getsINCard(); | |
| 244 | + } | |
| 245 | + | |
| 246 | + @Override | |
| 247 | + public void setsINCard(String sINCard) { | |
| 248 | + super.setsINCard(sINCard); | |
| 249 | + } | |
| 250 | + | |
| 251 | + @Override | |
| 252 | + public Date getBirthday() { | |
| 253 | + return super.getBirthday(); | |
| 254 | + } | |
| 255 | + | |
| 256 | + @Override | |
| 257 | + public void setBirthday(Date birthday) { | |
| 258 | + super.setBirthday(birthday); | |
| 259 | + } | |
| 260 | + | |
| 261 | + @Override | |
| 262 | + public Integer getMonth() { | |
| 263 | + return super.getMonth(); | |
| 264 | + } | |
| 265 | + | |
| 266 | + @Override | |
| 267 | + public void setMonth(Integer month) { | |
| 268 | + super.setMonth(month); | |
| 269 | + } | |
| 270 | + | |
| 271 | + @Override | |
| 272 | + public String getZbProject() { | |
| 273 | + return super.getZbProject(); | |
| 274 | + } | |
| 275 | + | |
| 276 | + @Override | |
| 277 | + public void setZbProject(String zbProject) { | |
| 278 | + super.setZbProject(zbProject); | |
| 279 | + } | |
| 280 | + | |
| 281 | + @Override | |
| 282 | + public Date getCheckDate() { | |
| 283 | + return super.getCheckDate(); | |
| 284 | + } | |
| 285 | + | |
| 286 | + @Override | |
| 287 | + public void setCheckDate(Date checkDate) { | |
| 288 | + super.setCheckDate(checkDate); | |
| 289 | + } | |
| 290 | + | |
| 291 | + @Override | |
| 292 | + public String getCheckMonth() { | |
| 293 | + return super.getCheckMonth(); | |
| 294 | + } | |
| 295 | + | |
| 296 | + @Override | |
| 297 | + public void setCheckMonth(String checkMonth) { | |
| 298 | + super.setCheckMonth(checkMonth); | |
| 299 | + } | |
| 300 | + | |
| 301 | + @Override | |
| 302 | + public String getChiefComplaint() { | |
| 303 | + return super.getChiefComplaint(); | |
| 304 | + } | |
| 305 | + | |
| 306 | + @Override | |
| 307 | + public void setChiefComplaint(String chiefComplaint) { | |
| 308 | + super.setChiefComplaint(chiefComplaint); | |
| 309 | + } | |
| 310 | + | |
| 311 | + @Override | |
| 312 | + public String getPresentDisease() { | |
| 313 | + return super.getPresentDisease(); | |
| 314 | + } | |
| 315 | + | |
| 316 | + @Override | |
| 317 | + public void setPresentDisease(String presentDisease) { | |
| 318 | + super.setPresentDisease(presentDisease); | |
| 319 | + } | |
| 320 | + | |
| 321 | + @Override | |
| 322 | + public String getPastHistory() { | |
| 323 | + return super.getPastHistory(); | |
| 324 | + } | |
| 325 | + | |
| 326 | + @Override | |
| 327 | + public void setPastHistory(String pastHistory) { | |
| 328 | + super.setPastHistory(pastHistory); | |
| 329 | + } | |
| 330 | + | |
| 331 | + @Override | |
| 332 | + public String getDiagnosis() { | |
| 333 | + return super.getDiagnosis(); | |
| 334 | + } | |
| 335 | + | |
| 336 | + @Override | |
| 337 | + public void setDiagnosis(String diagnosis) { | |
| 338 | + super.setDiagnosis(diagnosis); | |
| 339 | + } | |
| 340 | + | |
| 341 | + @Override | |
| 342 | + public String getPid() { | |
| 343 | + return super.getPid(); | |
| 344 | + } | |
| 345 | + | |
| 346 | + @Override | |
| 347 | + public void setPid(String pid) { | |
| 348 | + super.setPid(pid); | |
| 349 | + } | |
| 350 | + | |
| 351 | + @Override | |
| 352 | + public String getCheckDoctor() { | |
| 353 | + return super.getCheckDoctor(); | |
| 354 | + } | |
| 355 | + | |
| 356 | + @Override | |
| 357 | + public void setCheckDoctor(String checkDoctor) { | |
| 358 | + super.setCheckDoctor(checkDoctor); | |
| 359 | + } | |
| 360 | + | |
| 361 | + @Override | |
| 362 | + public Date getNextDate() { | |
| 363 | + return super.getNextDate(); | |
| 364 | + } | |
| 365 | + | |
| 366 | + @Override | |
| 367 | + public void setNextDate(Date nextDate) { | |
| 368 | + super.setNextDate(nextDate); | |
| 369 | + } | |
| 370 | + | |
| 371 | + @Override | |
| 372 | + public Date getBuildDate() { | |
| 373 | + return super.getBuildDate(); | |
| 374 | + } | |
| 375 | + | |
| 376 | + @Override | |
| 377 | + public void setBuildDate(Date buildDate) { | |
| 378 | + super.setBuildDate(buildDate); | |
| 379 | + } | |
| 380 | + | |
| 381 | + @Override | |
| 382 | + public String getBuildDoctorId() { | |
| 383 | + return super.getBuildDoctorId(); | |
| 384 | + } | |
| 385 | + | |
| 386 | + @Override | |
| 387 | + public void setBuildDoctorId(String buildDoctorId) { | |
| 388 | + super.setBuildDoctorId(buildDoctorId); | |
| 389 | + } | |
| 390 | + | |
| 391 | + @Override | |
| 392 | + public String getBuildDoctorName() { | |
| 393 | + return super.getBuildDoctorName(); | |
| 394 | + } | |
| 395 | + | |
| 396 | + @Override | |
| 397 | + public void setBuildDoctorName(String buildDoctorName) { | |
| 398 | + super.setBuildDoctorName(buildDoctorName); | |
| 399 | + } | |
| 400 | + | |
| 401 | + @Override | |
| 402 | + public String getHospitalId() { | |
| 403 | + return super.getHospitalId(); | |
| 404 | + } | |
| 405 | + | |
| 406 | + @Override | |
| 407 | + public void setHospitalId(String hospitalId) { | |
| 408 | + super.setHospitalId(hospitalId); | |
| 409 | + } | |
| 410 | + | |
| 411 | + @Override | |
| 412 | + public int hashCode() { | |
| 413 | + return super.hashCode(); | |
| 414 | + } | |
| 415 | + | |
| 416 | + @Override | |
| 417 | + public boolean equals(Object obj) { | |
| 418 | + return super.equals(obj); | |
| 419 | + } | |
| 420 | + | |
| 421 | + @Override | |
| 422 | + protected Object clone() throws CloneNotSupportedException { | |
| 423 | + return super.clone(); | |
| 424 | + } | |
| 425 | + | |
| 426 | + @Override | |
| 427 | + public String toString() { | |
| 428 | + return super.toString(); | |
| 429 | + } | |
| 430 | + | |
| 431 | + @Override | |
| 432 | + protected void finalize() throws Throwable { | |
| 433 | + super.finalize(); | |
| 434 | + } | |
| 435 | +} |