Commit c6b1a32c93ffc5b445ce8a005948e7e0401ed50d
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 9 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IDoctorUserMapServiceDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DoctorUserMapDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DoctorUserMapService.java
- platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
- platform-dal/src/main/java/com/lyms/platform/pojo/DoctorUserMap.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IDoctorUserMapService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/DoctorUserMapServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IDoctorUserMapServiceDao.java
View file @
c6b1a32
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DoctorUserMapDaoImpl.java
View file @
c6b1a32
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IDoctorUserMapServiceDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.pojo.DoctorUserMap; | |
| 6 | +import org.springframework.stereotype.Repository; | |
| 7 | + | |
| 8 | +@Repository | |
| 9 | +public class DoctorUserMapDaoImpl extends BaseMongoDAOImpl<DoctorUserMap> implements IDoctorUserMapServiceDao { | |
| 10 | + | |
| 11 | + @Override | |
| 12 | + public void add(DoctorUserMap doctorUserMap) { | |
| 13 | + save(doctorUserMap); | |
| 14 | + } | |
| 15 | + | |
| 16 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DoctorUserMapService.java
View file @
c6b1a32
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.lyms.platform.biz.dal.IDoctorUserMapServiceDao; | |
| 5 | +import com.lyms.platform.pojo.DoctorUserMap; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +@Service | |
| 10 | +public class DoctorUserMapService { | |
| 11 | + | |
| 12 | + @Autowired | |
| 13 | + private IDoctorUserMapServiceDao doctorUserMapServiceDao; | |
| 14 | + | |
| 15 | + public void add(DoctorUserMap doctorUserMap) { | |
| 16 | + doctorUserMapServiceDao.add(doctorUserMap); | |
| 17 | + } | |
| 18 | + | |
| 19 | +} |
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
View file @
c6b1a32
| ... | ... | @@ -57,6 +57,7 @@ |
| 57 | 57 | PatientCheckTicket("PatientCheckTicket", 97531000450L), |
| 58 | 58 | AntExPRecordModel("AntExPRecordModel", 97531000451L), |
| 59 | 59 | PatientWeight("PatientWeight", 97531000111L), |
| 60 | + DoctorUserMap("DoctorUserMap", 97531222111L), | |
| 60 | 61 | BloodPressure("BloodPressure", 97531333111L), |
| 61 | 62 | BloodSugar("BloodSugar", 97111333111L), |
| 62 | 63 | TempModel("TempModel", 97111333112L), |
platform-dal/src/main/java/com/lyms/platform/pojo/DoctorUserMap.java
View file @
c6b1a32
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 添加体重的时候 绑定医生和患者的关系 | |
| 9 | + */ | |
| 10 | +@Document(collection="lyms_doctor_user") | |
| 11 | +public class DoctorUserMap extends BaseModel { | |
| 12 | + | |
| 13 | + private static final long serialVersionUID = SerialIdEnum.DoctorUserMap.getCid(); | |
| 14 | + | |
| 15 | + private String id; | |
| 16 | + | |
| 17 | + private String patientId; | |
| 18 | + | |
| 19 | + private String doctorName; | |
| 20 | + | |
| 21 | + private String hospitalName; | |
| 22 | + | |
| 23 | + private String foreignId; | |
| 24 | + | |
| 25 | + public String getId() { | |
| 26 | + return id; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setId(String id) { | |
| 30 | + this.id = id; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public String getPatientId() { | |
| 34 | + return patientId; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setPatientId(String patientId) { | |
| 38 | + this.patientId = patientId; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public String getDoctorName() { | |
| 42 | + return doctorName; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setDoctorName(String doctorName) { | |
| 46 | + this.doctorName = doctorName; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public String getHospitalName() { | |
| 50 | + return hospitalName; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setHospitalName(String hospitalName) { | |
| 54 | + this.hospitalName = hospitalName; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public String getForeignId() { | |
| 58 | + return foreignId; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setForeignId(String foreignId) { | |
| 62 | + this.foreignId = foreignId; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public DoctorUserMap(String patientId, String doctorName, String hospitalName, String foreignId) { | |
| 66 | + this.patientId = patientId; | |
| 67 | + this.doctorName = doctorName; | |
| 68 | + this.hospitalName = hospitalName; | |
| 69 | + this.foreignId = foreignId; | |
| 70 | + } | |
| 71 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
c6b1a32
| ... | ... | @@ -144,6 +144,11 @@ |
| 144 | 144 | |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | + @ResponseBody | |
| 148 | + @RequestMapping("/sync/doctor/user") | |
| 149 | + public List<DoctorUserMap> doctorUserMaps() { | |
| 150 | + return mongoTemplate.findAllAndRemove(new Query(), DoctorUserMap.class); | |
| 151 | + } | |
| 147 | 152 | |
| 148 | 153 | @ResponseBody |
| 149 | 154 | @RequestMapping("/init/patient/weight") |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IDoctorUserMapService.java
View file @
c6b1a32
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/DoctorUserMapServiceImpl.java
View file @
c6b1a32
| 1 | +package com.lyms.platform.operate.web.service.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.service.DoctorUserMapService; | |
| 4 | +import com.lyms.platform.common.result.BaseResponse; | |
| 5 | +import com.lyms.platform.operate.web.service.IDoctorUserMapService; | |
| 6 | +import com.lyms.platform.pojo.DoctorUserMap; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | + | |
| 11 | +@Service | |
| 12 | +public class DoctorUserMapServiceImpl extends BaseServiceImpl implements IDoctorUserMapService { | |
| 13 | + | |
| 14 | + @Autowired | |
| 15 | + private DoctorUserMapService doctorUserMapService; | |
| 16 | + | |
| 17 | + @Autowired | |
| 18 | + private MongoTemplate mongoTemplate; | |
| 19 | + | |
| 20 | + @Override | |
| 21 | + public void add(DoctorUserMap doctorUserMap) { | |
| 22 | + doctorUserMapService.add(doctorUserMap); | |
| 23 | + } | |
| 24 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
c6b1a32
| 1 | 1 | package com.lyms.platform.operate.web.service.impl; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.biz.service.DoctorUserMapService; | |
| 3 | 4 | import com.lyms.platform.biz.service.PatientWeightService2; |
| 4 | 5 | import com.lyms.platform.biz.service.PatientsService; |
| 5 | -import com.lyms.platform.common.enums.*; | |
| 6 | +import com.lyms.platform.common.enums.BregmaticEnums2; | |
| 7 | +import com.lyms.platform.common.enums.OptActionEnums; | |
| 8 | +import com.lyms.platform.common.enums.RemoteServerEnmus; | |
| 6 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 7 | 10 | import com.lyms.platform.common.result.PageResult; |
| 8 | 11 | import com.lyms.platform.common.result.RespBuilder; |
| ... | ... | @@ -16,6 +19,7 @@ |
| 16 | 19 | import com.lyms.platform.operate.web.utils.MathUtil; |
| 17 | 20 | import com.lyms.platform.operate.web.utils.MongoUtil; |
| 18 | 21 | import com.lyms.platform.permission.dao.master.CouponMapper; |
| 22 | +import com.lyms.platform.pojo.DoctorUserMap; | |
| 19 | 23 | import com.lyms.platform.pojo.PatientWeight; |
| 20 | 24 | import com.lyms.platform.pojo.Patients; |
| 21 | 25 | import net.sf.json.JSONArray; |
| ... | ... | @@ -59,6 +63,9 @@ |
| 59 | 63 | @Autowired |
| 60 | 64 | private OrganizationGroupsFacade groupsFacade; |
| 61 | 65 | |
| 66 | + @Autowired | |
| 67 | + private DoctorUserMapService doctorUserMapService; | |
| 68 | + | |
| 62 | 69 | /** |
| 63 | 70 | * 最低:0~13 : 0~1.9 13~40 1.9~11.9 |
| 64 | 71 | * 最高: 0~2.2 2.2~15.9 |
| 65 | 72 | |
| 66 | 73 | |
| ... | ... | @@ -88,15 +95,18 @@ |
| 88 | 95 | } |
| 89 | 96 | |
| 90 | 97 | // 绑定医生和患者的关系 |
| 91 | - String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); | |
| 98 | + /* String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); | |
| 92 | 99 | Map<String, String> param = new HashMap<>(); |
| 93 | 100 | param.put("doctorName", couponMapper.findUserName(userId + "")); |
| 94 | 101 | param.put("patientId", patients.getId()); |
| 95 | 102 | param.put("hospitalName", couponMapper.findHospitalNameById(hospitalId)); |
| 96 | 103 | param.put("foreignId", userId + ""); |
| 97 | 104 | String s = HttpClientUtil.doPost(patSerSyncUrl + "/grWeContr/bindDoctorUser", param, "UTF-8"); |
| 98 | - System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param); | |
| 105 | + System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param);*/ | |
| 99 | 106 | |
| 107 | + DoctorUserMap doctorUserMap = new DoctorUserMap(patientWeight.getPatientId(), couponMapper.findUserName(userId + ""), couponMapper.findHospitalNameById(hospitalId), userId + ""); | |
| 108 | + doctorUserMapService.add(doctorUserMap); | |
| 109 | + | |
| 100 | 110 | /* if(pw != null && StringUtils.isNotEmpty(patientWeight.getBeforeWeight())) { |
| 101 | 111 | return RespBuilder.buildErro(ResponseCode.PATIENT_WEIGHT_IS_EXIST); |
| 102 | 112 | }*/ |
| 103 | 113 | |
| ... | ... | @@ -580,14 +590,17 @@ |
| 580 | 590 | operateLogFacade.addModifyOptLog(userId, Integer.valueOf(hospitalId), beforePatientWeight, patientWeight,OptActionEnums.UPDATE.getId(), "修改孕体重"); |
| 581 | 591 | |
| 582 | 592 | // 绑定医生和患者的关系 |
| 583 | - String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); | |
| 593 | + /* String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); | |
| 584 | 594 | Map<String, String> param = new HashMap<>(); |
| 585 | 595 | param.put("doctorName", couponMapper.findUserName(userId + "")); |
| 586 | 596 | param.put("patientId", patientWeight.getPatientId()); |
| 587 | 597 | param.put("hospitalName", couponMapper.findHospitalNameById(hospitalId)); |
| 588 | 598 | param.put("foreignId", userId + ""); |
| 589 | 599 | String s = HttpClientUtil.doPost(patSerSyncUrl + "/grWeContr/bindDoctorUser", param, "UTF-8"); |
| 590 | - System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param); | |
| 600 | + System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param);*/ | |
| 601 | + | |
| 602 | + DoctorUserMap doctorUserMap = new DoctorUserMap(patientWeight.getPatientId(), couponMapper.findUserName(userId + ""), couponMapper.findHospitalNameById(hospitalId), userId + ""); | |
| 603 | + doctorUserMapService.add(doctorUserMap); | |
| 591 | 604 | |
| 592 | 605 | if(StringUtils.isNotEmpty(beforeWeight)) { |
| 593 | 606 | patientWeight.setBeforeWeight(beforeWeight); |