Commit ef23f415da8358de41b03aefbde1db8c08595e0f

Authored by yangfei
1 parent abb505b833

自动生成追访信息

Showing 2 changed files with 25 additions and 26 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ ef23f41
... ... @@ -280,7 +280,7 @@
280 280 Patients p = yunBookbuildingService.addPregnantBookbuilding(patient);
281 281  
282 282 //添加追访信息
283   - addTrackDownInfo(userId, p, yunRequest);
  283 + addTrackDownInfo(userId, p);
284 284  
285 285 operateLogFacade.addAddOptLog(userId, Integer.valueOf(yunRequest.getHospitalId()), p, OptActionEnums.ADD.getId(), "孕妇建档");
286 286  
287 287  
... ... @@ -387,9 +387,8 @@
387 387 * 添加或更新追访信息
388 388 * @param userId
389 389 * @param patient
390   - * @param yunRequest
391 390 */
392   - public void addTrackDownInfo(Integer userId, Patients patient, YunBookbuildingAddRequest yunRequest) {
  391 + public void addTrackDownInfo(Integer userId, Patients patient) {
393 392 //添加产检追访信息
394 393 TrackDownRecord trackDownRecord = patient.build();
395 394 //根据patient查询是否存在追访信息
... ... @@ -547,7 +546,7 @@
547 546  
548 547  
549 548 //添加追访信息
550   - addTrackDownInfo(userId, p, yunRequest);
  549 + addTrackDownInfo(userId, p);
551 550  
552 551 operateLogFacade.addAddOptLog(userId, Integer.valueOf(patient.getHospitalId()), patient, OptActionEnums.ADD.getId(), "孕妇建档");
553 552  
... ... @@ -826,7 +825,7 @@
826 825 yunBookbuildingService.updatePregnant(patient, id);
827 826  
828 827 //更新产后追访信息
829   - addTrackDownInfo(userId,patient,yunRequest);
  828 + addTrackDownInfo(userId,patient);
830 829  
831 830 operateLogFacade.addModifyOptLog(userId, Integer.valueOf(beforePatient.getHospitalId()), beforePatient, patient, OptActionEnums.UPDATE.getId(), "孕妇建档修改");
832 831  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java View file @ ef23f41
... ... @@ -12,7 +12,6 @@
12 12 import com.lyms.platform.common.utils.StringUtils;
13 13 import com.lyms.platform.operate.web.request.BabyBookbuildingAddRequest;
14 14 import com.lyms.platform.operate.web.request.BasePageQueryRequest;
15   -import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest;
16 15 import com.lyms.platform.operate.web.result.PatientSerResult;
17 16 import com.lyms.platform.permission.model.*;
18 17 import com.lyms.platform.permission.service.*;
... ... @@ -272,10 +271,11 @@
272 271 } else {//孕妇建档服务数据处理
273 272 if (PatientSerEnums.SerTypeEnums.yqjzzd.getId() == Integer.parseInt(serInfo.get("serType"))) {//孕期精准指导同步到建档
274 273  
275   - YunBookbuildingAddRequest yunBookbuildingAddRequest = new YunBookbuildingAddRequest();
276   - yunBookbuildingAddRequest.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
277   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId());
278   - bookbuildingFacade.updatePregnantById(ps.getParentid(), yunBookbuildingAddRequest, userId);
  274 + Patients patient = new Patients();
  275 + patient.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
  276 + patient.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId());
  277 + bookbuildingFacade.updatePatientSerById(ps.getParentid(), patient);
  278 +
279 279 }else if(PatientSerEnums.SerTypeEnums.bzfw.getId().intValue() == Integer.parseInt(serInfo.get("serType"))){
280 280 PatientServiceQuery query = new PatientServiceQuery();
281 281 query.setParentid(ps.getParentid());
... ... @@ -283,10 +283,10 @@
283 283 int count = patientServiceService.queryPatientServiceCount(query);
284 284 //是否有增值服务--没有则处理标准服务
285 285 if (count == 0) {
286   - YunBookbuildingAddRequest yunBookbuildingAddRequest = new YunBookbuildingAddRequest();
287   - yunBookbuildingAddRequest.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId());
288   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId());
289   - bookbuildingFacade.updatePregnantById(ps.getParentid(), yunBookbuildingAddRequest, userId);
  286 + Patients patient = new Patients();
  287 + patient.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId());
  288 + patient.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId());
  289 + bookbuildingFacade.updatePatientSerById(ps.getParentid(), patient);
290 290 }
291 291 }
292 292 }
293 293  
294 294  
295 295  
296 296  
297 297  
... ... @@ -362,17 +362,17 @@
362 362 }
363 363 babyBookbuildingFacade.updateBabySerInfo(babyBookbuildingAddRequest);
364 364 } else {//孕妇建档服务数据处理
365   - YunBookbuildingAddRequest yunBookbuildingAddRequest = new YunBookbuildingAddRequest();
  365 + Patients patient = new Patients();
366 366 if (PatientSerEnums.SerTypeEnums.yqjzzd.getId().intValue() == ps.getSerType().intValue()) {//孕期精准指导同步到建档
367   - yunBookbuildingAddRequest.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
  367 + patient.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
368 368 if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.kt.getId().intValue()) {
369   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId());
  369 + patient.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId());
370 370 } else if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.td.getId().intValue()) {
371   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.UNSUBSCRIBE.getId());
  371 + patient.setServiceStatus(ServiceStatusEnums.UNSUBSCRIBE.getId());
372 372 } else if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.gq.getId().intValue()) {
373   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
  373 + patient.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
374 374 } else if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.zt.getId().intValue()) {
375   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.SUSPEND.getId());
  375 + patient.setServiceStatus(ServiceStatusEnums.SUSPEND.getId());
376 376 }
377 377 }else if(PatientSerEnums.SerTypeEnums.bzfw.getId().intValue() == ps.getSerType().intValue()){
378 378 PatientServiceQuery query = new PatientServiceQuery();
379 379  
380 380  
381 381  
382 382  
383 383  
... ... @@ -381,19 +381,19 @@
381 381 int count = patientServiceService.queryPatientServiceCount(query);
382 382 //是否有增值服务--没有则处理标准服务
383 383 if (count == 0) {
384   - yunBookbuildingAddRequest.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId());
  384 + patient.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId());
385 385 if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.kt.getId().intValue()) {
386   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId());
  386 + patient.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getId());
387 387 } else if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.td.getId().intValue()) {
388   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.UNSUBSCRIBE.getId());
  388 + patient.setServiceStatus(ServiceStatusEnums.UNSUBSCRIBE.getId());
389 389 } else if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.gq.getId().intValue()) {
390   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
  390 + patient.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
391 391 } else if (ps.getSerStatus().intValue() == PatientSerEnums.SerStatusEnums.zt.getId().intValue()) {
392   - yunBookbuildingAddRequest.setServiceStatus(ServiceStatusEnums.SUSPEND.getId());
  392 + patient.setServiceStatus(ServiceStatusEnums.SUSPEND.getId());
393 393 }
394 394 }
395 395 }
396   - bookbuildingFacade.updatePregnantById(ps.getParentid(), yunBookbuildingAddRequest, userId);
  396 + bookbuildingFacade.updatePatientSerById(ps.getParentid(), patient);
397 397 }
398 398  
399 399 operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), before, after, OptActionEnums.UPDATE.getId(), "修改服务");