Commit 5181170ea2a381910e936a8ab797b138d520828a
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 11 changed files
- platform-common/src/main/java/com/lyms/platform/common/enums/ErrorPatientEnums.java
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/Fm.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/LlfyFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RemoteFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
platform-common/src/main/java/com/lyms/platform/common/enums/ErrorPatientEnums.java
View file @
5181170
1 | +package com.lyms.platform.common.enums; | |
2 | + | |
3 | +/** | |
4 | + * 健康异常孕妇 | |
5 | + */ | |
6 | +public enum ErrorPatientEnums { | |
7 | + | |
8 | + PATIENT_WEIGHT(1), | |
9 | + TEMP(2), | |
10 | + BLOOD_PRESSURE(3), | |
11 | + BLOOD_SUGAR(4); | |
12 | + | |
13 | + ErrorPatientEnums(Integer id) { | |
14 | + this.id = id; | |
15 | + } | |
16 | + | |
17 | + private Integer id; | |
18 | + public Integer getId() { | |
19 | + return id; | |
20 | + } | |
21 | + | |
22 | + public void setId(Integer id) { | |
23 | + this.id = id; | |
24 | + } | |
25 | + | |
26 | +} |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
5181170
... | ... | @@ -1388,6 +1388,17 @@ |
1388 | 1388 | return restList; |
1389 | 1389 | } |
1390 | 1390 | |
1391 | + | |
1392 | + /** | |
1393 | + * 获取昨天五点的时间 | |
1394 | + * @return | |
1395 | + */ | |
1396 | + public static Date getYesterday() { | |
1397 | + Calendar calendar = Calendar.getInstance(); | |
1398 | + calendar.add(Calendar.DAY_OF_MONTH, -1); | |
1399 | + return getYmdDate(calendar.getTime()); | |
1400 | + } | |
1401 | + | |
1391 | 1402 | public static void main(String[] args) { |
1392 | 1403 | /* List<Map<String, Date>> monthBetween = getRange(parseYMD("2017-1-11"), parseYMD("2017-3-11")); |
1393 | 1404 | for (Map<String, Date> map : monthBetween) { |
... | ... | @@ -1397,6 +1408,7 @@ |
1397 | 1408 | }*/ |
1398 | 1409 | |
1399 | 1410 | Date date = parseDate("2017-11-30"); |
1411 | + System.out.println(getYesterday().toLocaleString()); | |
1400 | 1412 | System.out.println("当月第一天: " + getMonthDay(date, 0, 1).toLocaleString()); |
1401 | 1413 | System.out.println("当月最后一天: " + getMonthDay(date, 0, 0).toLocaleString()); |
1402 | 1414 | System.out.println("上月第一天: " + getMonthDay(date, -1, 1).toLocaleString()); |
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/Fm.java
View file @
5181170
... | ... | @@ -70,6 +70,53 @@ |
70 | 70 | |
71 | 71 | private String babyDate;//接收孕妇分娩最近日期 |
72 | 72 | |
73 | + | |
74 | + private String sxl; //用来接收乐陵失血量中间转换字段 | |
75 | + private String ccOne; //用来接收乐陵第一产程中间转化字段 | |
76 | + private String ccTwo; //用来接收乐陵第二产程中间转化字段 | |
77 | + private String ccThree; //用来接收乐陵第三产程中间转化字段 | |
78 | + private String total; //用来接收乐陵总产程中间转换字段 | |
79 | + | |
80 | + public String getSxl() { | |
81 | + return sxl; | |
82 | + } | |
83 | + | |
84 | + public void setSxl(String sxl) { | |
85 | + this.sxl = sxl; | |
86 | + } | |
87 | + | |
88 | + public String getCcOne() { | |
89 | + return ccOne; | |
90 | + } | |
91 | + | |
92 | + public void setCcOne(String ccOne) { | |
93 | + this.ccOne = ccOne; | |
94 | + } | |
95 | + | |
96 | + public String getCcTwo() { | |
97 | + return ccTwo; | |
98 | + } | |
99 | + | |
100 | + public void setCcTwo(String ccTwo) { | |
101 | + this.ccTwo = ccTwo; | |
102 | + } | |
103 | + | |
104 | + public String getCcThree() { | |
105 | + return ccThree; | |
106 | + } | |
107 | + | |
108 | + public void setCcThree(String ccThree) { | |
109 | + this.ccThree = ccThree; | |
110 | + } | |
111 | + | |
112 | + public String getTotal() { | |
113 | + return total; | |
114 | + } | |
115 | + | |
116 | + public void setTotal(String total) { | |
117 | + this.total = total; | |
118 | + } | |
119 | + | |
73 | 120 | public String getBabyDate() { |
74 | 121 | return babyDate; |
75 | 122 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/LlfyFmService.java
View file @
5181170
... | ... | @@ -136,12 +136,17 @@ |
136 | 136 | " 产妇离开产室情况 as MATERNAL_INFO,\n" + |
137 | 137 | " 会阴切开术 as PERINEAL_CONDITION,\n" + |
138 | 138 | //" 失血量 as SH_LOSE_BLOOD,\n" + |
139 | + " 失血量 as sxl,\n" + | |
139 | 140 | // " TH_LOSE_BLOOD as TH_LOSE_BLOOD,\n" + |
140 | 141 | // " 接生者 as DELIVER_DOCTOR,\n" + |
141 | 142 | // " 产程第一期 as PROD_PROCESS_ONE,\n" + |
143 | + " 产程第一期 as ccOne,\n" + | |
142 | 144 | // " 第二期 as PROD_PROCESS_TWO,\n" + |
145 | + " 第二期 as ccTwo,\n" + | |
143 | 146 | // " 第三期 as PROD_PROCESS_THREE,\n" + |
147 | + " 第三期 as ccThree,\n" + | |
144 | 148 | //" 总计 as TOTAL_PROCESS,\n" + |
149 | + " 总计 as total,\n" + | |
145 | 150 | " CONVERT(int,胎盘数量) as PLACENTA_NUM,\n" + |
146 | 151 | //" DELIVER_HOSPITAL as DELIVER_HOSPITAL,\n" + |
147 | 152 | " 产妇居住地址 as ADDR,\n"+ |
... | ... | @@ -149,7 +154,6 @@ |
149 | 154 | |
150 | 155 | |
151 | 156 | Connection conn = com.lyms.hospitalapi.llfy.ConnTools.makeHisConnection(); |
152 | - //Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeLocalConnection(); | |
153 | 157 | QueryRunner queryRunner = new QueryRunner(); |
154 | 158 | SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
155 | 159 | try { |
... | ... | @@ -163,7 +167,7 @@ |
163 | 167 | List<Fm> list = queryRunner.query(conn, sql, new BeanListHandler<Fm>(Fm.class)); |
164 | 168 | ExceptionUtils.catchException("size====" + list.size()); |
165 | 169 | |
166 | - /* List<Fm> list=new ArrayList<Fm>(); | |
170 | + /*List<Fm> list=new ArrayList<Fm>(); | |
167 | 171 | list.add(fm1);*/ |
168 | 172 | if(CollectionUtils.isNotEmpty(list)){ |
169 | 173 | |
... | ... | @@ -181,7 +185,7 @@ |
181 | 185 | //获取到这个孕妇的最近的分娩日期 |
182 | 186 | List<Fm> dateList = queryRunner.query(conn, dateSql, new BeanListHandler<Fm>(Fm.class)); |
183 | 187 | Calendar calendar = Calendar.getInstance(); |
184 | - calendar.setTime(fmt.parse(dateList.get(0).getBabyDate())); | |
188 | + calendar.setTime(fmt.parse(dateList.get(0).getBabyDate())); | |
185 | 189 | calendar.add(Calendar.DAY_OF_MONTH, -1); |
186 | 190 | Date sDate = calendar.getTime(); |
187 | 191 | String startDate = fmt.format(sDate); |
... | ... | @@ -211,6 +215,31 @@ |
211 | 215 | { |
212 | 216 | continue; |
213 | 217 | } |
218 | + | |
219 | + //将中间字段的值整理赋值到正式字段中 | |
220 | + int sxl = allFm.getSxl().length(); | |
221 | + allFm.setSH_LOSE_BLOOD(Integer.parseInt(allFm.getSxl().substring(0,sxl-2)));//失血量 | |
222 | + | |
223 | + String[] oneShi = allFm.getCcOne().split("时"); | |
224 | + int one = Integer.parseInt(oneShi[0])*60; | |
225 | + String[] oneFen = oneShi[1].split("分"); | |
226 | + allFm.setPROD_PROCESS_ONE(one+Integer.parseInt(oneFen[0]));//第一产程 | |
227 | + | |
228 | + String[] twoShi = allFm.getCcTwo().split("时"); | |
229 | + int two = Integer.parseInt(twoShi[0])*60; | |
230 | + String[] twoFen = twoShi[1].split("分"); | |
231 | + allFm.setPROD_PROCESS_TWO(two+Integer.parseInt(twoFen[0]));//第二产程 | |
232 | + | |
233 | + String[] threeShi = allFm.getCcThree().split("时"); | |
234 | + int three = Integer.parseInt(threeShi[0])*60; | |
235 | + String[] threeFen = threeShi[1].split("分"); | |
236 | + allFm.setPROD_PROCESS_THREE(three+Integer.parseInt(threeFen[0]));//第三产程 | |
237 | + | |
238 | + String[] totalShi = allFm.getTotal().split("时"); | |
239 | + int total = Integer.parseInt(totalShi[0])*60; | |
240 | + String[] totalFen = totalShi[1].split("分"); | |
241 | + allFm.setTOTAL_PROCESS(String.valueOf(total+Integer.parseInt(totalFen[0])));//总产程 | |
242 | + | |
214 | 243 | |
215 | 244 | PatientsQuery query = new PatientsQuery(); |
216 | 245 | query.setYn(YnEnums.YES.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
View file @
5181170
... | ... | @@ -24,6 +24,13 @@ |
24 | 24 | @Autowired |
25 | 25 | private AreaCountFacade areaCountFacade; |
26 | 26 | |
27 | + @ResponseBody | |
28 | + @RequestMapping(value = "/area/{id}", method = RequestMethod.GET) | |
29 | + public BaseResponse getAreaName(@PathVariable String id) { | |
30 | + return areaCountFacade.getAreaName(id); | |
31 | + } | |
32 | + | |
33 | + | |
27 | 34 | @RequestMapping(value = "/area/childs", method = RequestMethod.GET) |
28 | 35 | @ResponseBody |
29 | 36 | public BaseResponse getAreaChilds(@RequestParam String provinceName, String cityName, String areaName) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
5181170
... | ... | @@ -6,13 +6,12 @@ |
6 | 6 | import com.lyms.platform.common.base.BaseController; |
7 | 7 | import com.lyms.platform.common.base.LoginContext; |
8 | 8 | import com.lyms.platform.common.enums.YnEnums; |
9 | -import com.lyms.platform.common.result.BaseResponse; | |
10 | 9 | import com.lyms.platform.common.utils.JsonUtil; |
11 | 10 | import com.lyms.platform.common.utils.MessageUtil; |
12 | 11 | import com.lyms.platform.common.utils.PropertiesUtils; |
13 | 12 | import com.lyms.platform.common.utils.StringUtils; |
14 | 13 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
15 | -import com.lyms.platform.operate.web.facade.PatientFacade; | |
14 | +import com.lyms.platform.operate.web.facade.RemoteFacade; | |
16 | 15 | import com.lyms.platform.pojo.ArchiveData; |
17 | 16 | import com.lyms.platform.pojo.Patients; |
18 | 17 | import com.lyms.platform.query.ArchiveDataQuery; |
... | ... | @@ -21,9 +20,7 @@ |
21 | 20 | import org.apache.commons.httpclient.HttpClient; |
22 | 21 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 22 | import org.springframework.stereotype.Controller; |
24 | -import org.springframework.web.bind.annotation.RequestMapping; | |
25 | -import org.springframework.web.bind.annotation.RequestMethod; | |
26 | -import org.springframework.web.bind.annotation.RequestParam; | |
23 | +import org.springframework.web.bind.annotation.*; | |
27 | 24 | |
28 | 25 | import javax.servlet.http.HttpServletRequest; |
29 | 26 | import javax.servlet.http.HttpServletResponse; |
... | ... | @@ -41,7 +38,6 @@ |
41 | 38 | @Controller |
42 | 39 | public class RemoteController extends BaseController { |
43 | 40 | |
44 | - | |
45 | 41 | @Autowired |
46 | 42 | private PatientsService patientsService; |
47 | 43 | |
48 | 44 | |
... | ... | @@ -51,7 +47,16 @@ |
51 | 47 | @Autowired |
52 | 48 | private AutoMatchFacade autoMatchFacade; |
53 | 49 | |
50 | + @Autowired | |
51 | + private RemoteFacade remoteFacade; | |
52 | + | |
54 | 53 | public static final String center_statistics_url= PropertiesUtils.getPropertyValue("center_statistics_url"); |
54 | + | |
55 | + @ResponseBody | |
56 | + @RequestMapping(value = "/error/fy/list/{operaterId}", method = RequestMethod.GET) | |
57 | + public List<Map<String, Object>> errorYfList(@PathVariable String operaterId) { | |
58 | + return remoteFacade.errorYfList(operaterId); | |
59 | + } | |
55 | 60 | |
56 | 61 | @RequestMapping(value = "/bookArchive",method = RequestMethod.GET) |
57 | 62 | public void queryBookArchive(HttpServletResponse response, String idCard, String hospitalId,String cardNum,String phone) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
5181170
... | ... | @@ -1299,9 +1299,11 @@ |
1299 | 1299 | String hospitalId = autoMatchFacade.getHospitalId(getUserId(request)); |
1300 | 1300 | iSessionProvider.removeSession(token); |
1301 | 1301 | Map<String,String> param = new HashMap<>(); |
1302 | - param.put("token",token); | |
1303 | - operateLogFacade.addAddOptLog(getUserId(request), | |
1304 | - Integer.parseInt(hospitalId),param , OptActionEnums.ADD.getId(), "用户登出"); | |
1302 | + param.put("token", token); | |
1303 | + if(StringUtils.isNotEmpty(hospitalId)){ | |
1304 | + operateLogFacade.addAddOptLog(getUserId(request), | |
1305 | + Integer.parseInt(hospitalId), param, OptActionEnums.ADD.getId(), "用户登出"); | |
1306 | + } | |
1305 | 1307 | } |
1306 | 1308 | Map<String, Object> result = new HashMap<>(); |
1307 | 1309 | result.put("errorcode", ConstantInterface.SUCCESS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java
View file @
5181170
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RemoteFacade.java
View file @
5181170
1 | +package com.lyms.platform.operate.web.facade; | |
2 | + | |
3 | +import com.lyms.platform.common.enums.ErrorPatientEnums; | |
4 | +import com.lyms.platform.common.utils.DateUtil; | |
5 | +import com.lyms.platform.operate.web.utils.MathUtil; | |
6 | +import com.lyms.platform.pojo.BloodPressure; | |
7 | +import com.lyms.platform.pojo.PatientWeight; | |
8 | +import com.lyms.platform.pojo.Patients; | |
9 | +import com.lyms.platform.pojo.TempModel; | |
10 | +import org.apache.commons.collections.MapUtils; | |
11 | +import org.apache.commons.lang.StringUtils; | |
12 | +import org.springframework.beans.factory.annotation.Autowired; | |
13 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
14 | +import org.springframework.data.mongodb.core.query.Criteria; | |
15 | +import org.springframework.data.mongodb.core.query.Query; | |
16 | +import org.springframework.stereotype.Component; | |
17 | + | |
18 | +import java.util.*; | |
19 | + | |
20 | +/** | |
21 | + * Created by lt on 2017/12/4 0004 | |
22 | + */ | |
23 | +@Component | |
24 | +public class RemoteFacade { | |
25 | + | |
26 | + @Autowired | |
27 | + private MongoTemplate mongoTemplate; | |
28 | + | |
29 | + public List<Map<String, Object>> errorYfList(String operaterId) { | |
30 | + Date yesterday = DateUtil.getYesterday(); | |
31 | + List<Map<String, Object>> restList = new ArrayList<>(); | |
32 | + | |
33 | + List<PatientWeight> patientWeights = mongoTemplate.find(Query.query(Criteria.where("operaterId").is(operaterId)), PatientWeight.class); | |
34 | + List<BloodPressure> bloodPressures = mongoTemplate.find(Query.query(Criteria.where("operaterId").is(operaterId)), BloodPressure.class); | |
35 | + List<TempModel> tempModels = mongoTemplate.find(Query.query(Criteria.where("operaterId").is(operaterId)), TempModel.class); | |
36 | + | |
37 | + for (PatientWeight patientWeight : patientWeights) { | |
38 | + Patients patients = mongoTemplate.findById(patientWeight.getPatientId(), Patients.class); | |
39 | + String bmi = patientWeight.getBmi(); | |
40 | + Map<Integer, Double> highMap = new LinkedHashMap<>(); | |
41 | + Map<Integer, Double> lowMap = new LinkedHashMap<>(); | |
42 | + setMapInfo(highMap, lowMap, bmi); | |
43 | + Map<String, String> dayWeights = patientWeight.getDayWeights(); | |
44 | + Map<String, Object> temp = new HashMap<>(); | |
45 | + for (Map.Entry<String, String> entry : dayWeights.entrySet()) { | |
46 | + if(DateUtil.parseYMD(entry.getKey()).getTime() >= yesterday.getTime()) { | |
47 | + Integer week = DateUtil.getWeek2(patients.getLastMenses(), DateUtil.parseYMD(entry.getKey())); | |
48 | + Double addWeight = getAddWeight(patientWeight.getBeforeWeight(), entry.getValue()); | |
49 | + Double low = lowMap.get(week); | |
50 | + Double high = highMap.get(week); | |
51 | + if(addWeight < low || addWeight > high) { | |
52 | + temp.put("username", patients.getUsername()); | |
53 | + temp.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), new Date())); | |
54 | + temp.put("parentId", patientWeight.getPatientId()); | |
55 | + temp.put("id", patientWeight.getId()); | |
56 | + temp.put("day", entry.getKey()); | |
57 | + temp.put("desc", addWeight < low ? "增重过少" : "增重过多"); | |
58 | + temp.put("beforeWeight", patientWeight.getBeforeWeight()); | |
59 | + temp.put("nowWeight", patientWeight.getNowWeight()); | |
60 | + temp.put("addWeight", addWeight); | |
61 | + temp.put("ckz", "(" + lowMap.get(0) + "~" + highMap.get(0) + ")"); | |
62 | + temp.put("type", ErrorPatientEnums.PATIENT_WEIGHT); | |
63 | + } | |
64 | + } | |
65 | + } | |
66 | + if(MapUtils.isNotEmpty(temp)) { | |
67 | + restList.add(temp); | |
68 | + } | |
69 | + } | |
70 | + | |
71 | + for (TempModel tempModel : tempModels) { | |
72 | + Map<String, Object> temp = new HashMap<>(); | |
73 | + LinkedHashMap<String, Double> tempList = tempModel.getTempList(); | |
74 | + Patients patients = null; | |
75 | + for (Map.Entry<String, Double> entry : tempList.entrySet()) { | |
76 | + if(DateUtil.parseYMD(entry.getKey()).getTime() >= yesterday.getTime()) { | |
77 | + if(entry.getValue() < 36D || entry.getValue() > 38.5D ) { | |
78 | + /* patients = (patients == null ? mongoTemplate.findById(p, Patients.class) : patients); | |
79 | + temp.put("username", patients.getUsername()); | |
80 | + temp.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), new Date())); | |
81 | + temp.put("parentId", patientWeight.getPatientId()); | |
82 | + temp.put("id", patientWeight.getId()); | |
83 | + temp.put("day", entry.getKey()); | |
84 | + temp.put("desc", addWeight < low ? "增重过少" : "增重过多"); | |
85 | + temp.put("beforeWeight", patientWeight.getBeforeWeight()); | |
86 | + temp.put("nowWeight", patientWeight.getNowWeight()); | |
87 | + temp.put("addWeight", addWeight); | |
88 | + temp.put("ckz", "(" + lowMap.get(0) + "~" + highMap.get(0) + ")"); | |
89 | + temp.put("type", ErrorPatientEnums.PATIENT_WEIGHT);*/ | |
90 | + } | |
91 | + } | |
92 | + } | |
93 | + | |
94 | + } | |
95 | + | |
96 | + return restList; | |
97 | + } | |
98 | + | |
99 | + | |
100 | + /** | |
101 | + * 获取两个体重之间相差的数值 | |
102 | + */ | |
103 | + private Double getAddWeight(String before, String now) { | |
104 | + if(StringUtils.isEmpty(before) || StringUtils.isEmpty(now)) { | |
105 | + return 0D; | |
106 | + } | |
107 | + Double b = Double.parseDouble(before); | |
108 | + Double n = Double.parseDouble(now); | |
109 | + return MathUtil.doubleFormat2(n - b); | |
110 | + } | |
111 | + | |
112 | + private void setMapInfo(Map<Integer, Double> highMap, Map<Integer, Double> lowMap, String bmi) { | |
113 | + double low = 0D; | |
114 | + double low2 = 0D; | |
115 | + double high = 0D; | |
116 | + double high2 = 0D; | |
117 | + Double bmiD = 20D; // 小程序和app可能没有bmi 默认返回标准 | |
118 | + if(StringUtils.isNotEmpty(bmi)) { | |
119 | + bmiD = Double.parseDouble(bmi); | |
120 | + } | |
121 | + if(bmiD <= 18.5) { | |
122 | + low = 1.2; | |
123 | + low2 = 11.9; | |
124 | + high = 3.8; | |
125 | + high2 = 18.1; | |
126 | + } else if(bmiD > 18.5 && bmiD <= 24.9){ | |
127 | + low = 1.4; | |
128 | + low2 = 11.9; | |
129 | + high = 3.2; | |
130 | + high2 = 15.9; | |
131 | + } else if(bmiD > 24.9 && bmiD < 30){ | |
132 | + low = 1.1 ; | |
133 | + low2 = 7.1; | |
134 | + high = 3.1; | |
135 | + high2 = 11.6; | |
136 | + } else if(bmiD >= 30){ | |
137 | + low = 0.8 ; | |
138 | + low2 = 4.9; | |
139 | + high = 2.1; | |
140 | + high2 = 8.9; | |
141 | + } | |
142 | + double avg = low / 13; | |
143 | + for (int i = 0; i <= 13; i++) { | |
144 | + lowMap.put(i, i * avg); | |
145 | + } | |
146 | + double avg2 = (low2 - low) / 27; | |
147 | + for (int i = 1; i <= 27; i++) { | |
148 | + lowMap.put(13 + i, low + i * avg2); | |
149 | + } | |
150 | + double highAvg = high / 13; | |
151 | + for (int i = 0; i <= 13; i++) { | |
152 | + highMap.put(i, i * highAvg); | |
153 | + } | |
154 | + double highAvg2 = (high2 - high) / 27; | |
155 | + for (int i = 1; i <= 27; i++) { | |
156 | + highMap.put(13 + i, high + i * highAvg2); | |
157 | + } | |
158 | + } | |
159 | + | |
160 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
5181170
... | ... | @@ -54,6 +54,7 @@ |
54 | 54 | temp.put("pulse", bloodPressure.getPulse()); |
55 | 55 | temp.put("hospitalId", hospitalId); |
56 | 56 | BloodPressure bp = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(bloodPressure.getParentId()).and("yn").ne(0)), BloodPressure.class); |
57 | + bloodPressure.setModified(new Date()); | |
57 | 58 | if(bp == null) { |
58 | 59 | String parentId = mongoUtil.doHidePatient(bloodPressure.getParentId(), hospitalId); |
59 | 60 | bloodPressure.setParentId(parentId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
5181170
... | ... | @@ -88,6 +88,14 @@ |
88 | 88 | |
89 | 89 | public List<Map<String, Object>> getHospitals(Integer userId, String provinceId, String cityId, String areaId, String streetId) { |
90 | 90 | List<String> hospitalIds = accessPermissionFacade.getCurrentUserHospPermissions(userId); |
91 | + | |
92 | + if(CollectionUtils.isEmpty(hospitalIds)){ | |
93 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
94 | + if (null != hospital) { | |
95 | + hospitalIds.add(hospital); | |
96 | + } | |
97 | + } | |
98 | + | |
91 | 99 | List<Map<String, Object>> hospitals= couponMapper.findHospitalInfoByIds2(CollectionUtils.createMap("list", hospitalIds, "provinceId", provinceId, "cityId", cityId, "areaId", areaId, "streetId", streetId)); |
92 | 100 | return hospitals; |
93 | 101 | } |