Commit b4fa96281c1ea218dff51c2bd36afbf72b7f2342
1 parent
a5e216a811
Exists in
master
and in
6 other branches
增值服务同步
Showing 3 changed files with 10 additions and 51 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientService.java
View file @
b4fa962
| ... | ... | @@ -14,11 +14,11 @@ |
| 14 | 14 | */ |
| 15 | 15 | private String pid; |
| 16 | 16 | /** |
| 17 | - * 服务类型(1-高危精准指导、2-体重、3-血糖、4-血压、5-专家咨询) | |
| 17 | + * 服务类型(1-孕期精准医疗、2-体重管理、3-血糖管理、4-血压管理、5-专家咨询、6-标准服务) | |
| 18 | 18 | */ |
| 19 | 19 | private Integer serType; |
| 20 | 20 | /** |
| 21 | - * 服务类型(1-高危精准指导、2-体重、3-血糖、4-血压、5-专家咨询) | |
| 21 | + * 服务类型(1-孕期精准医疗、2-体重管理、3-血糖管理、4-血压管理、5-专家咨询、6-标准服务) | |
| 22 | 22 | */ |
| 23 | 23 | private String serTypes; |
| 24 | 24 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SyncDataController.java
View file @
b4fa962
| ... | ... | @@ -86,7 +86,7 @@ |
| 86 | 86 | @RequestParam(value = "method", required = true) String method |
| 87 | 87 | ) { |
| 88 | 88 | try { |
| 89 | - System.out.println("数据同步开始:action:" + action + ",synForm:" + synForm); | |
| 89 | + System.out.println("数据同步开始:action:" + action + ",method:" + method+",synForm:"+synForm); | |
| 90 | 90 | WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext(); |
| 91 | 91 | //返回值 |
| 92 | 92 | BaseResponse baseResponse = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
b4fa962
| ... | ... | @@ -455,61 +455,16 @@ |
| 455 | 455 | return baseResponse; |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - /** | |
| 459 | - * 小程序调用:获取已经领取设备,但是还未同步的数据 | |
| 460 | - */ | |
| 461 | - public BaseResponse getAlreaRece() { | |
| 462 | - PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 463 | - //待同步默认不需要同步、1-待同步、2-已同步 | |
| 464 | - patientQuery.setSynStatus(1); | |
| 465 | - patientQuery.setSql("and order_id is not null"); | |
| 466 | - List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 467 | - List<String> orders = new ArrayList<>(); | |
| 468 | - for (PatientService ps : patientServices) { | |
| 469 | - orders.add(ps.getOrderId()); | |
| 470 | - } | |
| 471 | 458 | |
| 472 | - BaseResponse baseResponse = new BaseResponse(); | |
| 473 | - baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 474 | - baseResponse.setObject(orders); | |
| 475 | - baseResponse.setErrormsg("成功"); | |
| 476 | - return baseResponse; | |
| 477 | - } | |
| 478 | - | |
| 479 | 459 | /** |
| 480 | - * 小程序调用:修改领取设备同步状态为已同步 | |
| 460 | + * 小程序调用:新增或修改、领取服务同步到小程序 | |
| 481 | 461 | * |
| 482 | - * @param orderIds 订单号集合 | |
| 483 | 462 | * @return |
| 484 | 463 | */ |
| 485 | - public BaseResponse receivePatientService(String orderIds) { | |
| 486 | - PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 487 | - patientQuery.setSql("and order_id in (" + orderIds + ")"); | |
| 488 | - | |
| 489 | - List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 490 | - if (CollectionUtils.isNotEmpty(patientServices)) { | |
| 491 | - for (PatientService ps : patientServices) { | |
| 492 | - ps.setSynStatus(2); | |
| 493 | - patientServiceService.updatePatientService(ps); | |
| 494 | - } | |
| 495 | - } | |
| 496 | - | |
| 497 | - BaseResponse baseResponse = new BaseResponse(); | |
| 498 | - baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 499 | - baseResponse.setErrormsg("成功"); | |
| 500 | - return baseResponse; | |
| 501 | - } | |
| 502 | - | |
| 503 | - /** | |
| 504 | - * 小程序调用:新增或修改的服务同步到小程序 | |
| 505 | - * | |
| 506 | - * @return | |
| 507 | - */ | |
| 508 | 464 | public BaseResponse synPatientService() { |
| 509 | 465 | BaseResponse baseResponse = new BaseResponse(); |
| 510 | 466 | try { |
| 511 | 467 | PatientServiceQuery patientQuery = new PatientServiceQuery(); |
| 512 | - patientQuery.setSql("and order_id is null"); | |
| 513 | 468 | patientQuery.setSynStatus(1); |
| 514 | 469 | List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); |
| 515 | 470 | Map<String, String> params = new HashMap<>(); |
| 516 | 471 | |
| 517 | 472 | |
| 518 | 473 | |
| ... | ... | @@ -520,14 +475,18 @@ |
| 520 | 475 | jsonObject.put("parentid", ps.getParentid()); |
| 521 | 476 | jsonObject.put("pid", ps.getPid()); |
| 522 | 477 | jsonObject.put("serType", ps.getSerType()); |
| 478 | + //指定医生 | |
| 523 | 479 | jsonObject.put("serDoct", ps.getSerDoct()); |
| 480 | + //服务状态 | |
| 524 | 481 | jsonObject.put("serStatus", ps.getSerStatus()); |
| 525 | 482 | jsonObject.put("hospitalId", ps.getHospitalId()); |
| 483 | + //领取状态 | |
| 484 | + jsonObject.put("status",ps.getStatus()); | |
| 526 | 485 | jsonObject.put("createDate", DateUtil.getyyyy_MM_dd_hms(ps.getCreateDate())); |
| 527 | 486 | jsonArray.add(jsonObject); |
| 528 | 487 | } |
| 529 | 488 | params.put("data", jsonArray.toString()); |
| 530 | - | |
| 489 | + baseResponse.setObject(params); | |
| 531 | 490 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 532 | 491 | baseResponse.setErrormsg("成功"); |
| 533 | 492 | return baseResponse; |
| ... | ... | @@ -539,7 +498,7 @@ |
| 539 | 498 | } |
| 540 | 499 | |
| 541 | 500 | /** |
| 542 | - * 小程序调用:修改新增、修改服务同步状态为已同步 | |
| 501 | + * 小程序调用:修改新增、修改、领取服务同步状态为已同步 | |
| 543 | 502 | * |
| 544 | 503 | * @param ids id集合 |
| 545 | 504 | */ |