Commit 9f138bd5c38b0d4675db2f237f343065914c1a03
Exists in
master
and in
7 other branches
Merge remote-tracking branch 'origin/master'
Showing 14 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommonService.java
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.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/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommonService.java
View file @
9f138bd
1 | +package com.lyms.platform.biz.service; | |
2 | + | |
3 | +import com.lyms.platform.common.enums.RiskDefaultTypeEnum; | |
4 | +import com.lyms.platform.common.utils.ExceptionUtils; | |
5 | +import com.lyms.platform.common.utils.JsonUtil; | |
6 | +import com.lyms.platform.pojo.BasicConfig; | |
7 | +import org.apache.commons.collections.CollectionUtils; | |
8 | +import org.apache.commons.lang.StringUtils; | |
9 | +import org.springframework.beans.factory.annotation.Autowired; | |
10 | +import org.springframework.stereotype.Service; | |
11 | + | |
12 | +import java.util.ArrayList; | |
13 | +import java.util.HashMap; | |
14 | +import java.util.List; | |
15 | +import java.util.Map; | |
16 | + | |
17 | +/** | |
18 | + * Created by Administrator on 2016/12/26 0026. | |
19 | + */ | |
20 | +@Service | |
21 | +public class CommonService { | |
22 | + @Autowired | |
23 | + private BasicConfigService basicConfigService; | |
24 | + | |
25 | + | |
26 | + /** | |
27 | + * 还原高危因素 | |
28 | + * | |
29 | + * @param factor | |
30 | + * @return | |
31 | + */ | |
32 | + public String resloveFactor(List<String> factor) { | |
33 | + String result = ""; | |
34 | + if (CollectionUtils.isNotEmpty(factor)) { | |
35 | + StringBuilder sb = new StringBuilder(56); | |
36 | + for (String srt : factor) { | |
37 | + if (StringUtils.isNotEmpty(srt)) { | |
38 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(srt); | |
39 | + if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) { | |
40 | + sb.append(basicConfig.getName()).append(','); | |
41 | + } | |
42 | + } | |
43 | + } | |
44 | + if (sb.toString().endsWith(",")) { | |
45 | + result = (sb.substring(0, sb.length() - 1)); | |
46 | + } else { | |
47 | + result = (sb.toString()); | |
48 | + } | |
49 | + } | |
50 | + return result; | |
51 | + } | |
52 | + | |
53 | + | |
54 | + | |
55 | + /** | |
56 | + * 高危id转成列表 | |
57 | + * | |
58 | + * @param riskLevel | |
59 | + * @return | |
60 | + */ | |
61 | + public List findRiskLevel(List<String> riskLevel) { | |
62 | + List level = new ArrayList(); | |
63 | + if (CollectionUtils.isNotEmpty(riskLevel)) { | |
64 | + try { | |
65 | + for (String str : riskLevel) { | |
66 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str); | |
67 | + if (null != basicConfig) { | |
68 | + Map map = new HashMap(); | |
69 | + String name = basicConfig.getName(); | |
70 | + if (name.indexOf("预警") > -1) { | |
71 | + name = name.replace("预警", ""); | |
72 | + } | |
73 | + map.put("name", name); | |
74 | + map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
75 | + level.add(map); | |
76 | + } | |
77 | + } | |
78 | + } catch (Exception e) { | |
79 | + ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); | |
80 | + } | |
81 | + } | |
82 | + return filter(level); | |
83 | + } | |
84 | + | |
85 | + | |
86 | + | |
87 | + | |
88 | + /** | |
89 | + * 高危id转成列表 | |
90 | + * | |
91 | + * @param riskLevel | |
92 | + * @return | |
93 | + */ | |
94 | + public List findRiskLevel(String riskLevel) { | |
95 | + List level = new ArrayList(); | |
96 | + if (StringUtils.isNotEmpty(riskLevel)) { | |
97 | + try { | |
98 | + List<String> list = JsonUtil.jkstr2Obj(riskLevel, List.class); | |
99 | + for (String str : list) { | |
100 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str); | |
101 | + if (null != basicConfig) { | |
102 | + Map map = new HashMap(); | |
103 | + String name = basicConfig.getName(); | |
104 | + if (name.indexOf("预警") > -1) { | |
105 | + name = name.replace("预警", ""); | |
106 | + } | |
107 | + map.put("name", name); | |
108 | + map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); | |
109 | + level.add(map); | |
110 | + } | |
111 | + } | |
112 | + } catch (Exception e) { | |
113 | + ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); | |
114 | + } | |
115 | + } | |
116 | + return filter(level); | |
117 | + } | |
118 | + | |
119 | + public static List filter(List<java.util.Map> level) { | |
120 | + List list = new ArrayList(); | |
121 | + List addEdList = new ArrayList(); | |
122 | + for (java.util.Map map : level) { | |
123 | + if (!addEdList.contains(map.get("name"))) { | |
124 | + list.add(map); | |
125 | + addEdList.add(map.get("name")); | |
126 | + } | |
127 | + } | |
128 | + return list; | |
129 | + } | |
130 | +} |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
9f138bd
... | ... | @@ -7,9 +7,11 @@ |
7 | 7 | import java.util.Calendar; |
8 | 8 | import java.util.Date; |
9 | 9 | import java.util.GregorianCalendar; |
10 | +import java.util.concurrent.locks.Lock; | |
11 | +import java.util.concurrent.locks.ReentrantLock; | |
10 | 12 | |
11 | 13 | public class DateUtil { |
12 | - | |
14 | + private static Lock lock = new ReentrantLock(); | |
13 | 15 | public static SimpleDateFormat dd = new SimpleDateFormat("dd"); |
14 | 16 | public static SimpleDateFormat ymd = new SimpleDateFormat("yyyyMMdd"); |
15 | 17 | public static SimpleDateFormat y_m_d = new SimpleDateFormat("yyyy-MM-dd"); |
16 | 18 | |
17 | 19 | |
... | ... | @@ -215,10 +217,14 @@ |
215 | 217 | if (s == null) { |
216 | 218 | return null; |
217 | 219 | } |
220 | + | |
218 | 221 | try { |
222 | + lock.lock(); | |
219 | 223 | return y_m_d.parse(s); |
220 | 224 | } catch (Exception e) { |
221 | 225 | return null; |
226 | + }finally { | |
227 | + lock.unlock(); | |
222 | 228 | } |
223 | 229 | } |
224 | 230 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
9f138bd
... | ... | @@ -176,9 +176,12 @@ |
176 | 176 | * |
177 | 177 | * @return |
178 | 178 | */ |
179 | - public BaseResponse findAntEx(@Valid AntExManagerQueryRequest antExManagerQueryRequest){ | |
180 | - | |
181 | - return null; | |
179 | + @RequestMapping(method = RequestMethod.GET, value = "/antex/antexrecordlist") | |
180 | + @ResponseBody | |
181 | + @TokenRequired | |
182 | + public BaseResponse findAntEx(@Valid AntExManagerQueryRequest antExManagerQueryRequest,HttpServletRequest request){ | |
183 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
184 | + return antExRecordFacade.findList(antExManagerQueryRequest,loginState.getId()); | |
182 | 185 | } |
183 | 186 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
9f138bd
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | */ |
107 | 107 | @RequestMapping(value = "/queryResidentsArchiveById/{id}", method = RequestMethod.GET) |
108 | 108 | @ResponseBody |
109 | -// @TokenRequired | |
109 | + @TokenRequired | |
110 | 110 | public BaseObjectResponse queryResidentsArchiveById(@PathVariable("id")String id){ |
111 | 111 | BaseObjectResponse objectResponse = residentsArchiveFacade.queryResidentsArchiveById(id); |
112 | 112 | return objectResponse; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
9f138bd
... | ... | @@ -776,7 +776,7 @@ |
776 | 776 | |
777 | 777 | String weight = checkModel.getWeight(); |
778 | 778 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(weight)) { |
779 | - String value = babyCheckFacade.getGrowthValue(birth,Double.parseDouble(weight),babyModel.getSex(),3); | |
779 | + String value = babyCheckFacade.getGrowthValue(birth,Double.parseDouble(weight),babyModel.getSex(),0); | |
780 | 780 | checkModel.setWeightEvaluate(value); |
781 | 781 | } |
782 | 782 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
9f138bd
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | -import com.lyms.platform.biz.service.AntExRecordService; | |
4 | -import com.lyms.platform.biz.service.BasicConfigService; | |
5 | -import com.lyms.platform.biz.service.PatientsService; | |
3 | +import com.lyms.platform.biz.service.*; | |
6 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | 5 | import com.lyms.platform.common.enums.RiskDefaultTypeEnum; |
8 | 6 | import com.lyms.platform.common.enums.YnEnums; |
9 | 7 | |
10 | 8 | |
... | ... | @@ -21,13 +19,17 @@ |
21 | 19 | import com.lyms.platform.permission.model.Users; |
22 | 20 | import com.lyms.platform.permission.service.UsersService; |
23 | 21 | import com.lyms.platform.pojo.AntExRecordModel; |
22 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
24 | 23 | import com.lyms.platform.pojo.BasicConfig; |
25 | 24 | import com.lyms.platform.pojo.Patients; |
25 | +import com.lyms.platform.query.AntExChuQuery; | |
26 | +import com.lyms.platform.query.AntExQuery; | |
26 | 27 | import com.lyms.platform.query.AntExRecordQuery; |
27 | 28 | import com.lyms.platform.query.PatientsQuery; |
28 | 29 | import org.apache.commons.collections.CollectionUtils; |
29 | 30 | import org.apache.commons.lang.math.NumberUtils; |
30 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
32 | +import org.springframework.data.domain.Sort; | |
31 | 33 | import org.springframework.stereotype.Component; |
32 | 34 | |
33 | 35 | import java.util.*; |
... | ... | @@ -49,6 +51,10 @@ |
49 | 51 | private PatientsService patientsService; |
50 | 52 | @Autowired |
51 | 53 | private BasicConfigService basicConfigService; |
54 | + @Autowired | |
55 | + private CommonService commonService; | |
56 | + @Autowired | |
57 | + private AntenatalExaminationService antExService; | |
52 | 58 | |
53 | 59 | public void syncAntRecordToList(String hospitalId) { |
54 | 60 | recordService.syncAntRecordToList(hospitalId); |
... | ... | @@ -60,7 +66,6 @@ |
60 | 66 | * @return |
61 | 67 | */ |
62 | 68 | public BaseResponse findList(AntExManagerQueryRequest antExManagerQueryRequest, Integer userId) { |
63 | - | |
64 | 69 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
65 | 70 | AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); |
66 | 71 | antExRecordQuery.setHospitalId(hospitalId); |
67 | 72 | |
68 | 73 | |
... | ... | @@ -70,13 +75,66 @@ |
70 | 75 | antExRecordQuery.setName(antExManagerQueryRequest.getName()); |
71 | 76 | antExRecordQuery.setPhone(antExManagerQueryRequest.getPhone()); |
72 | 77 | |
73 | - | |
74 | - List<AntExManagerResult> data =new ArrayList<>(); | |
78 | + List<AntExManagerResult> data = new ArrayList<>(); | |
75 | 79 | List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery); |
76 | 80 | if (CollectionUtils.isNotEmpty(antExRecordModelList)) { |
81 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
82 | + AntExQuery antExQuery = new AntExQuery(); | |
77 | 83 | for (AntExRecordModel e : antExRecordModelList) { |
78 | 84 | AntExManagerResult antExManagerResult = new AntExManagerResult(); |
79 | 85 | antExManagerResult.convertToResult(e); |
86 | + //登记人 | |
87 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(e.getBuildDoctor())) { | |
88 | + if (NumberUtils.isNumber(e.getBuildDoctor())) { | |
89 | + Users users = usersService.getUsers(NumberUtils.toInt(e.getBuildDoctor())); | |
90 | + if (null != users) { | |
91 | + antExManagerResult.setlName(users.getName()); | |
92 | + } else { | |
93 | + antExManagerResult.setlName(e.getBuildDoctor()); | |
94 | + } | |
95 | + } else { | |
96 | + antExManagerResult.setlName(e.getBuildDoctor()); | |
97 | + } | |
98 | + } | |
99 | + //产检医生 | |
100 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(e.getCheckDoctor())) { | |
101 | + if (NumberUtils.isNumber(e.getBuildDoctor())) { | |
102 | + Users users = usersService.getUsers(NumberUtils.toInt(e.getCheckDoctor())); | |
103 | + if (null != users) { | |
104 | + antExManagerResult.setCheckDoctor(users.getName()); | |
105 | + } else { | |
106 | + antExManagerResult.setCheckDoctor(e.getCheckDoctor()); | |
107 | + } | |
108 | + } else { | |
109 | + antExManagerResult.setCheckDoctor(e.getCheckDoctor()); | |
110 | + } | |
111 | + } | |
112 | + | |
113 | + antExQuery.setPid(e.getPid()); | |
114 | + antExQuery.setYn(YnEnums.YES.getId()); | |
115 | + antExQuery.setHospitalId(null); | |
116 | + antExChuQuery.setPid(e.getPid()); | |
117 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
118 | + antExChuQuery.setHospitalId(null); | |
119 | + | |
120 | + | |
121 | + int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); | |
122 | + antExChuQuery.setHospitalId(null); | |
123 | + int b = antExService.queryAntExChuCount(antExChuQuery.convertToQuery()); | |
124 | + antExQuery.setHospitalId(hospitalId); | |
125 | + //本院的复诊记录 | |
126 | + int chi = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); | |
127 | + antExChuQuery.setHospitalId(hospitalId); | |
128 | + //本院的初诊记录 | |
129 | + int chb = antExService.queryAntExChuCount(antExChuQuery.convertToQuery()); | |
130 | + antExManagerResult.settTimes(i + b); | |
131 | + antExManagerResult.setChTimes(chi + chb); | |
132 | + | |
133 | + //高危因素 | |
134 | + antExManagerResult.setrLevel(commonService.findRiskLevel(e.gethLevel())); | |
135 | + antExManagerResult.setRiskFactor(commonService.resloveFactor(e.gethRisk())); | |
136 | + | |
137 | + data.add(antExManagerResult); | |
80 | 138 | } |
81 | 139 | } |
82 | 140 | return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
9f138bd
... | ... | @@ -1050,6 +1050,7 @@ |
1050 | 1050 | organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())); |
1051 | 1051 | } |
1052 | 1052 | pid = patients.getPid(); |
1053 | + //当主档案的医院不在group组里需要显示本来的隐藏档案 | |
1053 | 1054 | if(!"2".equals(patients.getEnable())){ |
1054 | 1055 | listData.add(new AntData(patients, null != organization ? organization.getName() : "")); |
1055 | 1056 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
9f138bd
... | ... | @@ -979,6 +979,18 @@ |
979 | 979 | result.setBabyDiagnosis(model.getBabyDiagnosis()); |
980 | 980 | result.setBlNo(model.getBlNo()); |
981 | 981 | result.setDueWeek(model.getDueWeek()); |
982 | + | |
983 | + if (StringUtils.isNotEmpty(model.getDeliverOrg())) | |
984 | + { | |
985 | + Organization org = organizationService.getOrganization(Integer.parseInt(model.getDeliverOrg())); | |
986 | + if (org != null) | |
987 | + { | |
988 | + result.setDeliverOrg(org.getName()); | |
989 | + } | |
990 | + } | |
991 | + | |
992 | + | |
993 | + | |
982 | 994 | return result; |
983 | 995 | } |
984 | 996 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
9f138bd
... | ... | @@ -536,7 +536,7 @@ |
536 | 536 | List<Patients> list = patientsService.queryPatient(patientsQuery); |
537 | 537 | if (CollectionUtils.isNotEmpty(list)) |
538 | 538 | { |
539 | - HighScoreResult res = antenatalExaminationFacade.getPatLastRiskByDate(list.get(0).getPid(), false, model.getBirth(),null); | |
539 | + HighScoreResult res = antenatalExaminationFacade.getPatLastRiskByDate(list.get(0).getPid(), false,list.get(0).getLastMenses() ,model.getBirth()); | |
540 | 540 | List<String> listHighRisk = res.getHighRisk(); |
541 | 541 | |
542 | 542 | if (CollectionUtils.isNotEmpty(listHighRisk)) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
9f138bd
... | ... | @@ -78,6 +78,7 @@ |
78 | 78 | @Autowired |
79 | 79 | private BasicConfigService basicConfigService; |
80 | 80 | |
81 | + | |
81 | 82 | private static Map<Integer, String> ONE_ENUMS = new HashMap<>(); |
82 | 83 | |
83 | 84 | private static Map<String, List> babyMap = new HashMap<>(); |
84 | 85 | |
... | ... | @@ -131,14 +132,14 @@ |
131 | 132 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
132 | 133 | MaternalDeliverModel maternalDeliverModel = deliverAddRequest.convertToDataModel(); |
133 | 134 | |
134 | - Organization og = organizationService.getOrganization(Integer.valueOf(hospitalId)); | |
135 | - //区域模式 | |
136 | - if (og.getbStatus()!=1) { | |
135 | + //表示区域的 | |
136 | + if (StringUtils.isNotEmpty(organizationGroupsFacade.findByCurrentUserId(hospitalId))) { | |
137 | 137 | String parentId =antenatalExaminationFacade.handHideBuild(deliverAddRequest.getPid(), deliverAddRequest.getParentId(), userId); |
138 | 138 | if (StringUtils.isEmpty(parentId)) { |
139 | 139 | logger.warn("get handHideBuild parentId is null."); |
140 | 140 | } |
141 | 141 | maternalDeliverModel.setParentId(parentId); |
142 | + deliverAddRequest.setParentId(parentId); | |
142 | 143 | } |
143 | 144 | |
144 | 145 | //增加 |
145 | 146 | |
... | ... | @@ -285,12 +286,24 @@ |
285 | 286 | if (CollectionUtils.isNotEmpty(list)) { |
286 | 287 | for (MatDeliverAddRequest.Baby baby : list) { |
287 | 288 | MaternalDeliverModel.Baby babyModel = baby.convertToDataModel(); |
289 | + //判断妊娠结局是活产才添加数据 | |
290 | + BabyModel babyModel1=new BabyModel(); | |
291 | + MatDeliverQuery query=new MatDeliverQuery(); | |
292 | + query.setParentId(deliverAddRequest.getParentId()); | |
293 | + babyModel1.setParentId(deliverAddRequest.getParentId()); | |
294 | + if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { | |
295 | + babyModel1.setYn(YnEnums.YES.getId()); | |
296 | + }else{ | |
297 | + babyModel1.setYn(YnEnums.NO.getId()); | |
298 | + } | |
299 | + babyService.findAndModify(query.convertToQuery(), babyModel1); | |
288 | 300 | babyList.add(babyModel); |
289 | 301 | } |
290 | 302 | maternalDeliverModel.setBaby(babyList); |
291 | 303 | } |
292 | 304 | |
293 | 305 | matDeliverService.updateOne(maternalDeliverModel, maternalDeliverModel.getId()); |
306 | + | |
294 | 307 | if (null != deliverAddRequest.getDueDate()) { |
295 | 308 | Date fmDate = DateUtil.parseYMD(deliverAddRequest.getDueDate()); |
296 | 309 | PatientsQuery patientsQuery = new PatientsQuery(); |
... | ... | @@ -456,7 +469,7 @@ |
456 | 469 | babyList.add(baby1); |
457 | 470 | //填充小孩基本信息 |
458 | 471 | BabyModel babyModel = fillBaby(patients, deliverAddRequest); |
459 | - babyModel.setDeliverOrg(hospital); | |
472 | + babyModel.setDeliverOrg(deliverAddRequest.getFmHospital()); | |
460 | 473 | baby.setId(baby1.getId()); |
461 | 474 | babyModel.setBirth(DateUtil.parseYMDHM(baby.getDueTime())); |
462 | 475 | babyModel.setYn(YnEnums.YES.getId()); |
... | ... | @@ -511,6 +524,7 @@ |
511 | 524 | babyModel.setPid(personService.addPerson(personModel).getId()); |
512 | 525 | } |
513 | 526 | babyIds.add(babyService.addOneBaby(babyModel).getId()); |
527 | + baby1.setId(babyModel.getId()); | |
514 | 528 | if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { |
515 | 529 | ExceptionUtils.catchException("分娩---------->" + babyModel.getMphone() + ";name=" + babyModel.getName()); |
516 | 530 | //儿童建档 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntExManagerResult.java
View file @
9f138bd
... | ... | @@ -2,16 +2,18 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.base.IBasicResultConvert; |
4 | 4 | import com.lyms.platform.common.utils.DateUtil; |
5 | +import com.lyms.platform.common.utils.StringUtils; | |
5 | 6 | import com.lyms.platform.pojo.AntExChuModel; |
6 | 7 | import com.lyms.platform.pojo.AntExRecordModel; |
7 | 8 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
8 | 9 | import com.lyms.platform.pojo.Patients; |
9 | 10 | |
10 | 11 | import java.util.List; |
12 | +import java.util.Map; | |
11 | 13 | |
12 | 14 | /** |
13 | - * 产检管理列表 | |
14 | - * | |
15 | + * 产检管理列表 | |
16 | + * <p/> | |
15 | 17 | * Created by Administrator on 2016/12/19 0019. |
16 | 18 | */ |
17 | 19 | public class AntExManagerResult { |
18 | 20 | |
... | ... | @@ -27,9 +29,10 @@ |
27 | 29 | private String age; |
28 | 30 | //产检孕周 |
29 | 31 | private String cDueWeek; |
30 | - | |
32 | + //风险等级 | |
33 | + private List<Map> rLevel; | |
31 | 34 | //高危因素 |
32 | - private List riskFactor; | |
35 | + private String riskFactor; | |
33 | 36 | //高危评分 |
34 | 37 | private String riskScore; |
35 | 38 | //本院产检次数 |
36 | 39 | |
... | ... | @@ -48,16 +51,28 @@ |
48 | 51 | //联系电话 |
49 | 52 | private String phone; |
50 | 53 | |
51 | - public AntexListResult convertToResult(AntExRecordModel e) { | |
54 | + public List<Map> getrLevel() { | |
55 | + return rLevel; | |
56 | + } | |
57 | + | |
58 | + public void setrLevel(List<Map> rLevel) { | |
59 | + this.rLevel = rLevel; | |
60 | + } | |
61 | + | |
62 | + public AntExManagerResult convertToResult(AntExRecordModel e) { | |
52 | 63 | setParentId(e.getParentId()); |
53 | 64 | setId(e.getId()); |
54 | 65 | setCheckTime(DateUtil.getyyyy_MM_dd(e.getCheckTime())); |
55 | 66 | setName(e.getName()); |
56 | 67 | setAge(DateUtil.getAge(e.getBrith()) + ""); |
57 | 68 | setPhone(e.getPhone()); |
58 | - int days=DateUtil.getDays(e.getCheckTime(),e.getLastMenses()); | |
59 | -// setcDueWeek(e.getCheckTime()); | |
60 | - return null; | |
69 | + setBarCode(e.getBarCode()); | |
70 | + int days = DateUtil.getDays(e.getCheckTime(), e.getLastMenses()); | |
71 | + setcDueWeek(StringUtils.dueWeek(days)); | |
72 | + setDueDate(DateUtil.getyyyy_MM_dd(e.getDueDate())); | |
73 | + setRiskScore(e.gethScore() + ""); | |
74 | + setNextCheckTime(DateUtil.getyyyy_MM_dd(e.getNextCheckTime())); | |
75 | + return this; | |
61 | 76 | } |
62 | 77 | |
63 | 78 | public String getId() { |
64 | 79 | |
... | ... | @@ -116,11 +131,11 @@ |
116 | 131 | this.cDueWeek = cDueWeek; |
117 | 132 | } |
118 | 133 | |
119 | - public List getRiskFactor() { | |
134 | + public String getRiskFactor() { | |
120 | 135 | return riskFactor; |
121 | 136 | } |
122 | 137 | |
123 | - public void setRiskFactor(List riskFactor) { | |
138 | + public void setRiskFactor(String riskFactor) { | |
124 | 139 | this.riskFactor = riskFactor; |
125 | 140 | } |
126 | 141 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewListResult.java
View file @
9f138bd
... | ... | @@ -40,7 +40,16 @@ |
40 | 40 | private String addDueDate="0"; |
41 | 41 | |
42 | 42 | private String lastBuildTime; |
43 | + private String pid; | |
43 | 44 | |
45 | + public String getPid() { | |
46 | + return pid; | |
47 | + } | |
48 | + | |
49 | + public void setPid(String pid) { | |
50 | + this.pid = pid; | |
51 | + } | |
52 | + | |
44 | 53 | //<!---------基本信息-----------> |
45 | 54 | private List data = new ArrayList(); |
46 | 55 | private String cTime; |
... | ... | @@ -174,6 +183,7 @@ |
174 | 183 | } |
175 | 184 | } catch (Exception e) { |
176 | 185 | } |
186 | + setPid(patients.getPid()); | |
177 | 187 | setAddDueDate(patients.getBuildType()==2?"1":"0"); |
178 | 188 | setName(patients.getUsername()); |
179 | 189 | setPhone(patients.getPhone()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
View file @
9f138bd
1 | 1 | package com.lyms.platform.operate.web.utils; |
2 | 2 | |
3 | -import com.lyms.platform.biz.service.BabyBookbuildingService; | |
4 | 3 | import com.lyms.platform.biz.service.BabyCheckService; |
5 | 4 | import com.lyms.platform.common.utils.ExceptionUtils; |
6 | 5 | import com.lyms.platform.operate.web.result.BabyGrowthCountResult; |
7 | 6 | import com.lyms.platform.query.BabyCheckModelQuery; |
8 | -import com.lyms.platform.query.BabyModelQuery; | |
9 | 7 | import org.apache.commons.collections.CollectionUtils; |
10 | 8 | |
11 | 9 | import java.util.ArrayList; |
... | ... | @@ -34,7 +32,7 @@ |
34 | 32 | List<BabyGrowthCountResult> results = new ArrayList<>(); |
35 | 33 | if (CollectionUtils.isNotEmpty(growth)) { |
36 | 34 | |
37 | - int batchSize = 1; | |
35 | + int batchSize = 2; | |
38 | 36 | int end = 0; |
39 | 37 | List<Future> futures = new ArrayList<>(); |
40 | 38 | for (int i = 0; i < growth.size(); i += batchSize) { |
41 | 39 | |
... | ... | @@ -73,13 +71,17 @@ |
73 | 71 | Future f = pool.submit(c); |
74 | 72 | futures.add(f); |
75 | 73 | } |
76 | - for (Future f : futures) { | |
77 | - try { | |
78 | - results.addAll((List) f.get(30, TimeUnit.SECONDS)); | |
79 | - } catch (Exception e) { | |
80 | - ExceptionUtils.catchException(e, "baby growth count"); | |
74 | + if (CollectionUtils.isNotEmpty(futures)) | |
75 | + { | |
76 | + for (Future f : futures) { | |
77 | + try { | |
78 | + results.addAll((List) f.get(30, TimeUnit.SECONDS)); | |
79 | + } catch (Exception e) { | |
80 | + ExceptionUtils.catchException(e, "baby growth count"); | |
81 | + } | |
81 | 82 | } |
82 | 83 | } |
84 | + | |
83 | 85 | } |
84 | 86 | |
85 | 87 | return results; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
View file @
9f138bd
... | ... | @@ -216,10 +216,7 @@ |
216 | 216 | riskPatientsResult.setServiceStatus(ServiceStatusEnums.getNameById(patients.getServiceStatus())); |
217 | 217 | riskPatientsResult.setcTime(nextCheckTime); |
218 | 218 | stopWatch.start("query findLastRisk"); |
219 | - /*HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), true); | |
220 | - riskPatientsResult.setrFactor(highScoreResult.gethighRiskStr()); | |
221 | - riskPatientsResult.setrLevel(highScoreResult.filter(highScoreResult.getLevel())); | |
222 | - riskPatientsResult.sethScore(highScoreResult.getScore());*/ | |
219 | + | |
223 | 220 | //高危因素 |
224 | 221 | List<String> factor = patients.getRiskFactorId(); |
225 | 222 |