Commit c0ed9e59c7312228cfb27a19b54c3953e0835a27
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 11 changed files
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FolicAcidController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisCrisisItemController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.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/facade/PremaritalCheckupFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/FolicAcidQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PremaritalCheckupQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/NewBabyManagerQueryModel.java
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
c0ed9e5
... | ... | @@ -45,6 +45,8 @@ |
45 | 45 | |
46 | 46 | private String dueType; |
47 | 47 | |
48 | + private String pregnancyOut; | |
49 | + | |
48 | 50 | public Date getBuildDateStart() { |
49 | 51 | return buildDateStart; |
50 | 52 | } |
... | ... | @@ -433,6 +435,9 @@ |
433 | 435 | if (null != isNull) { |
434 | 436 | condition = condition.and("communityId", null, MongoOper.IS); |
435 | 437 | } |
438 | + if (null != pregnancyOut) { | |
439 | + condition = condition.and("pregnancyOut", pregnancyOut, MongoOper.IS); | |
440 | + } | |
436 | 441 | |
437 | 442 | if (!StringUtils.isEmpty(mcertNo)) { |
438 | 443 | condition = condition.and("mcertNo", mcertNo, MongoOper.IS); |
... | ... | @@ -642,6 +647,14 @@ |
642 | 647 | |
643 | 648 | public void setDueType(String dueType) { |
644 | 649 | this.dueType = dueType; |
650 | + } | |
651 | + | |
652 | + public String getPregnancyOut() { | |
653 | + return pregnancyOut; | |
654 | + } | |
655 | + | |
656 | + public void setPregnancyOut(String pregnancyOut) { | |
657 | + this.pregnancyOut = pregnancyOut; | |
645 | 658 | } |
646 | 659 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FolicAcidController.java
View file @
c0ed9e5
... | ... | @@ -57,6 +57,17 @@ |
57 | 57 | return folicAcidFacade.queryFolicAcid(folicAcidQueryRequest); |
58 | 58 | } |
59 | 59 | |
60 | + //删除叶酸发放记录 | |
61 | + @RequestMapping(value = "/deleteFolicAcid", method = RequestMethod.DELETE) | |
62 | + @ResponseBody | |
63 | + @TokenRequired | |
64 | + public BaseResponse deleteFolicAcid(@RequestParam("id") String id, | |
65 | + HttpServletRequest request) { | |
66 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
67 | + return folicAcidFacade.deleteFolicAcid(id,loginState.getId()); | |
68 | + } | |
69 | + | |
70 | + | |
60 | 71 | //叶酸数据导出 |
61 | 72 | @RequestMapping(value = "/folicAcidExport", method = RequestMethod.GET) |
62 | 73 | @ResponseBody |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisCrisisItemController.java
View file @
c0ed9e5
... | ... | @@ -26,9 +26,8 @@ |
26 | 26 | import java.util.*; |
27 | 27 | |
28 | 28 | /** |
29 | - * | |
30 | - * 危急管理列表 | |
31 | - * | |
29 | + * 危急管理列表 | |
30 | + * <p/> | |
32 | 31 | * Created by Administrator on 2016/10/19 0019. |
33 | 32 | */ |
34 | 33 | @Controller |
... | ... | @@ -46,17 +45,17 @@ |
46 | 45 | public void getEmergenceTreatments(HttpServletResponse response, |
47 | 46 | @RequestParam("page") int page, |
48 | 47 | @RequestParam("limit") int limit, |
49 | - @RequestParam(value = "id",required = false) String id, | |
50 | - @RequestParam(value = "cardNo",required = false) String cardNo, | |
51 | - @RequestParam(value = "phone",required = false) String phone, | |
52 | - @RequestParam(value = "age",required = false) Integer age, | |
53 | - @RequestParam(value = "startWeek",required = false) Integer startWeek, | |
54 | - @RequestParam(value = "endWeek",required = false) Integer endWeek, | |
55 | - @RequestParam(value = "name",required = false) String name, | |
56 | - @RequestParam(value = "status",required = false) Integer status, | |
57 | - @RequestParam(value = "refer",required = false) String refer, | |
58 | - @RequestParam(value = "doctor",required = false) String doctor | |
59 | - ){ | |
48 | + @RequestParam(value = "id", required = false) String id, | |
49 | + @RequestParam(value = "cardNo", required = false) String cardNo, | |
50 | + @RequestParam(value = "phone", required = false) String phone, | |
51 | + @RequestParam(value = "age", required = false) Integer age, | |
52 | + @RequestParam(value = "startWeek", required = false) Integer startWeek, | |
53 | + @RequestParam(value = "endWeek", required = false) Integer endWeek, | |
54 | + @RequestParam(value = "name", required = false) String name, | |
55 | + @RequestParam(value = "status", required = false) Integer status, | |
56 | + @RequestParam(value = "refer", required = false) String refer, | |
57 | + @RequestParam(value = "doctor", required = false) String doctor | |
58 | + ) { | |
60 | 59 | LisCrisisItemQuery query = new LisCrisisItemQuery(); |
61 | 60 | query.setPage(page); |
62 | 61 | query.setLimit(limit); |
63 | 62 | |
64 | 63 | |
... | ... | @@ -75,34 +74,39 @@ |
75 | 74 | |
76 | 75 | List<Map> list = new ArrayList<>(); |
77 | 76 | |
78 | - if (CollectionUtils.isNotEmpty(lisCrisisItemList)){ | |
79 | - for (LisCrisisItem data : lisCrisisItemList){ | |
80 | - Map<String,Object> map = new HashMap<>(); | |
81 | - map.put("id",data.getId()); | |
82 | - map.put("hospitalId",data.getHospitalId()); | |
83 | - map.put("name",data.getName()); | |
84 | - map.put("age",data.getAge()); | |
85 | - map.put("itemCode",data.getItemCode()); | |
86 | - map.put("itemName",data.getItemName()); | |
87 | - map.put("classify",data.getClassify()); | |
88 | - map.put("classifyName",data.getClassifyName()); | |
89 | - map.put("flag",data.getFlag()); | |
90 | - map.put("ref",data.getRef()); | |
91 | - map.put("result",data.getResult()); | |
92 | - map.put("unit",data.getUnit()); | |
93 | - map.put("applyDoctorCode",data.getApplyDoctorCode()); | |
94 | - map.put("applyDoctorName",data.getApplyDoctorName()); | |
77 | + if (CollectionUtils.isNotEmpty(lisCrisisItemList)) { | |
78 | + for (LisCrisisItem data : lisCrisisItemList) { | |
79 | + Map<String, Object> map = new HashMap<>(); | |
80 | + map.put("id", data.getId()); | |
81 | + map.put("hospitalId", data.getHospitalId()); | |
82 | + map.put("name", data.getName()); | |
83 | + map.put("age", data.getAge()); | |
84 | + map.put("itemCode", data.getItemCode()); | |
85 | + map.put("itemName", data.getItemName()); | |
86 | + map.put("classify", data.getClassify()); | |
87 | + map.put("classifyName", data.getClassifyName()); | |
88 | + map.put("flag", data.getFlag()); | |
89 | + map.put("ref", data.getRef()); | |
90 | + map.put("result", data.getResult()); | |
91 | + map.put("unit", data.getUnit()); | |
92 | + map.put("applyDoctorCode", data.getApplyDoctorCode()); | |
93 | + map.put("applyDoctorName", data.getApplyDoctorName()); | |
95 | 94 | map.put("publishTime", DateUtil.getyyyy_MM_dd(data.getPublishTime())); |
96 | - map.put("status",data.getStatus()); | |
97 | - map.put("statusName",data.getStatusName()); | |
95 | + map.put("status", data.getStatus()); | |
96 | + map.put("statusName", data.getStatusName()); | |
98 | 97 | |
99 | - map.put("patientName",data.getPatientName()); | |
100 | - map.put("cardNo",data.getCardNo()); | |
101 | - map.put("phone",data.getPhone()); | |
102 | - map.put("serviceType",data.getServiceType()); | |
103 | - map.put("serviceStatus",data.getServiceStatus()); | |
104 | - map.put("lastMenses",data.getLastMenses().getTime()); | |
105 | - map.put("week",data.getWeek()); | |
98 | + map.put("patientName", data.getPatientName()); | |
99 | + map.put("cardNo", data.getCardNo()); | |
100 | + map.put("phone", data.getPhone()); | |
101 | + map.put("serviceType", data.getServiceType()); | |
102 | + map.put("serviceStatus", data.getServiceStatus()); | |
103 | + map.put("lastMenses", data.getLastMenses().getTime()); | |
104 | + | |
105 | + if (data.getWeek() >= 42) { | |
106 | + map.put("week", "已分娩"); | |
107 | + } else { | |
108 | + map.put("week", data.getWeek() + "周"); | |
109 | + } | |
106 | 110 | map.put("pId", data.getPid()); |
107 | 111 | map.put("patientId", data.getPatientId()); |
108 | 112 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
c0ed9e5
... | ... | @@ -6,13 +6,17 @@ |
6 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | 7 | import com.lyms.platform.common.result.BaseListResponse; |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | +import com.lyms.platform.common.utils.BeanUtils; | |
10 | +import com.lyms.platform.common.utils.ExcelUtil; | |
9 | 11 | import com.lyms.platform.common.utils.ExceptionUtils; |
10 | 12 | import com.lyms.platform.operate.web.facade.MatDeliverFacade; |
11 | 13 | import com.lyms.platform.operate.web.request.ChildbirthManagerRequest; |
12 | 14 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; |
13 | 15 | import com.lyms.platform.operate.web.request.MatDeliverQueryRequest; |
14 | 16 | import com.lyms.platform.operate.web.request.NewBabyManagerRequest; |
17 | +import com.lyms.platform.operate.web.result.ChildbirthManagerQueryModel; | |
15 | 18 | import com.lyms.platform.operate.web.result.ChildbirthManagerResult; |
19 | +import com.lyms.platform.operate.web.result.NewBabyManagerQueryModel; | |
16 | 20 | import com.lyms.platform.operate.web.result.NewBabyManagerResult; |
17 | 21 | import org.apache.commons.lang.StringUtils; |
18 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
19 | 23 | |
... | ... | @@ -20,7 +24,12 @@ |
20 | 24 | import org.springframework.web.bind.annotation.*; |
21 | 25 | |
22 | 26 | import javax.servlet.http.HttpServletRequest; |
27 | +import javax.servlet.http.HttpServletResponse; | |
23 | 28 | import javax.validation.Valid; |
29 | +import java.util.ArrayList; | |
30 | +import java.util.HashMap; | |
31 | +import java.util.List; | |
32 | +import java.util.Map; | |
24 | 33 | |
25 | 34 | /** |
26 | 35 | * 产妇分娩记录 |
... | ... | @@ -128,6 +137,38 @@ |
128 | 137 | return baseListResponse; |
129 | 138 | } |
130 | 139 | |
140 | + @RequestMapping(value = "childbirthManagerExcel", method = RequestMethod.GET) | |
141 | + public void childbirthManagerExcel(HttpServletRequest httpServletRequest, @RequestBody ChildbirthManagerRequest childbirthManagerRequest, HttpServletResponse httpServletResponse) { | |
142 | + try { | |
143 | + childbirthManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); | |
144 | + // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 | |
145 | + @SuppressWarnings("unchecked") | |
146 | + List<ChildbirthManagerQueryModel> childbirthManagerQueryModelList = matDeliverFacade.childbirthManager(childbirthManagerRequest).getData(); | |
147 | + List<Map<String, Object>> list = new ArrayList<>(); | |
148 | + for (ChildbirthManagerQueryModel childbirthManagerQueryModel : childbirthManagerQueryModelList) { | |
149 | + Map<String, Object> map = BeanUtils.objectToObjectMap(childbirthManagerQueryModel); | |
150 | + list.add(map); | |
151 | + } | |
152 | + Map<String, String> header = new HashMap<>(); | |
153 | + header.put("dueDate", "分娩日期"); | |
154 | + header.put("username", "姓名"); | |
155 | + header.put("age", "年龄"); | |
156 | + header.put("cardNo", "证件号"); | |
157 | + header.put("dueWeek", "分娩孕周"); | |
158 | + header.put("deliveryMode", "分娩方式"); | |
159 | + header.put("maternalInfo", "产妇情况"); | |
160 | + header.put("tireNumber", "胎数"); | |
161 | + header.put("livingNumber", "活产数"); | |
162 | + header.put("deliverDoctor", "接生医生"); | |
163 | + header.put("phone", "联系方式"); | |
164 | + httpServletResponse.setContentType("application/force-download"); | |
165 | + httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("分娩管理.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
166 | + ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); | |
167 | + } catch (Exception e) { | |
168 | + ExceptionUtils.catchException(e, "childbirthManagerExcel异常"); | |
169 | + } | |
170 | + } | |
171 | + | |
131 | 172 | /** |
132 | 173 | * @auther HuJiaqi |
133 | 174 | * @createTime 2016年12月07日 17时50分 |
... | ... | @@ -151,6 +192,63 @@ |
151 | 192 | ExceptionUtils.catchException(e, "newBabyManager异常"); |
152 | 193 | } |
153 | 194 | return baseListResponse; |
195 | + } | |
196 | + | |
197 | + @RequestMapping(value = "newBabyManagerExcel", method = RequestMethod.GET) | |
198 | + public void newBabyManagerExcel(HttpServletRequest httpServletRequest, @RequestBody NewBabyManagerRequest newBabyManagerRequest, HttpServletResponse httpServletResponse) { | |
199 | + try { | |
200 | + newBabyManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); | |
201 | + // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 | |
202 | + @SuppressWarnings("unchecked") | |
203 | + List<NewBabyManagerQueryModel> newBabyManagerQueryModelList = matDeliverFacade.newBabyManager(newBabyManagerRequest).getData(); | |
204 | + List<Map<String, Object>> list = new ArrayList<>(); | |
205 | + for (NewBabyManagerQueryModel newBabyManagerQueryModel : newBabyManagerQueryModelList) { | |
206 | + Map<String, Object> map = BeanUtils.objectToObjectMap(newBabyManagerQueryModel); | |
207 | + Integer sex = newBabyManagerQueryModel.getSex(); | |
208 | + if (new Integer(0).equals(sex)) { | |
209 | + map.put("sex", "女"); | |
210 | + } | |
211 | + if (new Integer(1).equals(sex)) { | |
212 | + map.put("sex", "男"); | |
213 | + } | |
214 | + Integer highRisk = newBabyManagerQueryModel.getHighRisk(); | |
215 | + if (new Integer(0).equals(highRisk)) { | |
216 | + map.put("highRisk", "健康"); | |
217 | + } | |
218 | + if (new Integer(1).equals(highRisk)) { | |
219 | + map.put("highRisk", "高危"); | |
220 | + } | |
221 | + String dueType = newBabyManagerQueryModel.getDueType(); | |
222 | + if ("1".equals(dueType)) { | |
223 | + map.put("dueType", "顺产"); | |
224 | + } | |
225 | + if ("2".equals(dueType)) { | |
226 | + map.put("dueType", "刨宫产"); | |
227 | + } | |
228 | + list.add(map); | |
229 | + } | |
230 | + Map<String, String> header = new HashMap<>(); | |
231 | + header.put("birthYMD", "分娩日期"); | |
232 | + header.put("birthHM", "娩出时间"); | |
233 | + header.put("name", "姓名"); | |
234 | + header.put("sex", "性别"); | |
235 | + header.put("birthDays", "出生天数"); | |
236 | + header.put("highRisk", "是否高危"); | |
237 | + header.put("dueWeek", "分娩孕周"); | |
238 | + header.put("dueType", "分娩方式"); | |
239 | + header.put("babyHeight", "出生身长/cm"); | |
240 | + header.put("babyWeight", "出生体重/g"); | |
241 | + header.put("mname", "母亲姓名"); | |
242 | + header.put("age", "母亲年龄"); | |
243 | + header.put("mcertNo", "母亲证件号"); | |
244 | + header.put("mphone", "联系方式"); | |
245 | + header.put("deliverDoctor", "接生医生"); | |
246 | + httpServletResponse.setContentType("application/force-download"); | |
247 | + httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("新生儿管理.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
248 | + ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); | |
249 | + } catch (Exception e) { | |
250 | + ExceptionUtils.catchException(e, "childbirthManagerExcel异常"); | |
251 | + } | |
154 | 252 | } |
155 | 253 | |
156 | 254 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java
View file @
c0ed9e5
... | ... | @@ -19,14 +19,12 @@ |
19 | 19 | import com.lyms.platform.permission.model.Users; |
20 | 20 | import com.lyms.platform.permission.service.OrganizationService; |
21 | 21 | import com.lyms.platform.permission.service.UsersService; |
22 | -import com.lyms.platform.pojo.BasicConfig; | |
23 | 22 | import com.lyms.platform.pojo.FolicAcid; |
24 | 23 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
25 | 24 | import com.lyms.platform.query.FolicAcidQuery; |
26 | 25 | import com.lyms.platform.query.ResidentsArchiveQuery; |
27 | 26 | import org.apache.commons.collections.CollectionUtils; |
28 | 27 | import org.apache.commons.lang.StringUtils; |
29 | -import org.apache.struts.config.BaseConfig; | |
30 | 28 | import org.springframework.beans.factory.annotation.Autowired; |
31 | 29 | import org.springframework.stereotype.Component; |
32 | 30 | |
... | ... | @@ -173,7 +171,7 @@ |
173 | 171 | //妇女信息 |
174 | 172 | archiveMap = new HashMap<>(); |
175 | 173 | archiveMap.put("certificateNum", archiveModel.getCertificateNum()); |
176 | - archiveMap.put("certificateTypeId", CommonsHelper.getName1(archiveModel.getCertificateTypeId(),basicConfigService)); | |
174 | + archiveMap.put("certificateTypeId", archiveModel.getCertificateTypeId()); | |
177 | 175 | archiveMap.put("username", archiveModel.getUsername()); |
178 | 176 | archiveMap.put("birthday",archiveModel.getBirthday()); |
179 | 177 | archiveMap.put("age", archiveModel.getAge()); |
... | ... | @@ -212,8 +210,20 @@ |
212 | 210 | folicAcidQuery.setNeed("y"); |
213 | 211 | |
214 | 212 | folicAcidQuery.setHospitalId(queryRequest.getHospitalId()); |
215 | - folicAcidQuery.setDrawTimeStart(queryRequest.getDrawTimeStart()); | |
216 | - folicAcidQuery.setDrawTimeEnd(queryRequest.getDrawTimeEnd()); | |
213 | + | |
214 | + if(StringUtils.isNotEmpty(queryRequest.getDrawTime())){ | |
215 | + String[] dates = queryRequest.getDrawTime().split(" - "); | |
216 | + folicAcidQuery.setDrawTimeStart(DateUtil.parseYMD(dates[0])); | |
217 | + if(dates.length>=2){ | |
218 | + Date date= DateUtil.parseYMD(dates[1]); | |
219 | + if(null!=date){ | |
220 | + long d = date.getTime() + 86398000; | |
221 | + date = new Date(d); | |
222 | + } | |
223 | + folicAcidQuery.setDrawTimeEnd(date); | |
224 | + } | |
225 | + } | |
226 | + | |
217 | 227 | folicAcidQuery.setHighRisk(queryRequest.getHighRisk()); |
218 | 228 | |
219 | 229 | //省市区筛选机构 |
... | ... | @@ -276,6 +286,18 @@ |
276 | 286 | return baseListResponse; |
277 | 287 | } |
278 | 288 | |
289 | + public BaseResponse deleteFolicAcid(String id,Integer userId){ | |
290 | + BaseResponse br = new BaseResponse(); | |
291 | + if (StringUtils.isNotEmpty(id)){ | |
292 | + FolicAcid folicAcid = folicAcidService.getFolicAcid(id); | |
293 | + folicAcid.setYn(YnEnums.NO.getId()); | |
294 | + folicAcid.setModified(new Date()); | |
295 | + folicAcidService.updateFolicAcid(folicAcid,id); | |
296 | + return br.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
297 | + } | |
298 | + return br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("id is null"); | |
299 | + } | |
300 | + | |
279 | 301 | //叶酸发放导出 |
280 | 302 | public void folicAcidExport(FolicAcidQueryRequest queryRequest,Integer userId,HttpServletResponse response){ |
281 | 303 | OutputStream out = null; |
... | ... | @@ -287,8 +309,19 @@ |
287 | 309 | query.setYn(YnEnums.YES.getId()); |
288 | 310 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
289 | 311 | query.setHospitalId(hospitalId); |
290 | - query.setDrawTimeStart(queryRequest.getDrawTimeStart()); | |
291 | - query.setDrawTimeEnd(queryRequest.getDrawTimeEnd()); | |
312 | + | |
313 | + if(StringUtils.isNotEmpty(queryRequest.getDrawTime())){ | |
314 | + String[] dates = queryRequest.getDrawTime().split(" - "); | |
315 | + query.setDrawTimeStart(DateUtil.parseYMD(dates[0])); | |
316 | + if(dates.length>=2){ | |
317 | + Date date= DateUtil.parseYMD(dates[1]); | |
318 | + if(null!=date){ | |
319 | + long d = date.getTime() + 86398000; | |
320 | + date = new Date(d); | |
321 | + } | |
322 | + query.setDrawTimeEnd(date); | |
323 | + } | |
324 | + } | |
292 | 325 | query.setHighRisk(queryRequest.getHighRisk()); |
293 | 326 | |
294 | 327 | //省市区筛选机构 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
c0ed9e5
... | ... | @@ -928,7 +928,7 @@ |
928 | 928 | patientsQuery.setName(childbirthManagerRequest.getUserName()); |
929 | 929 | patientsQuery.setYn(YnEnums.YES.getId()); |
930 | 930 | patientsQuery.setType(3); |
931 | - // patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(childbirthManagerRequest.getOperatorId())); | |
931 | + patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(childbirthManagerRequest.getOperatorId())); | |
932 | 932 | patientsQuery.setCardNo(childbirthManagerRequest.getCardNo()); |
933 | 933 | patientsQuery.setPhone(childbirthManagerRequest.getPhone()); |
934 | 934 | patientsQuery.setHusbandPhone(childbirthManagerRequest.getHusbandPhone()); |
935 | 935 | |
... | ... | @@ -967,12 +967,23 @@ |
967 | 967 | ChildbirthManagerQueryModel childbirthManagerQueryModel = new ChildbirthManagerQueryModel(); |
968 | 968 | BeanUtils.copy(patients, childbirthManagerQueryModel); |
969 | 969 | BeanUtils.copy(maternalDeliverModel, childbirthManagerQueryModel); |
970 | + // 查询接生医生 | |
970 | 971 | try { |
971 | 972 | childbirthManagerQueryModel.setDeliverDoctor(usersService.getUsers(Integer.valueOf(maternalDeliverModel.getDeliverDoctor())).getName()); |
972 | 973 | } catch (Exception e) { |
973 | 974 | // 什么都不干 |
974 | 975 | } |
975 | 976 | childbirthManagerQueryModel.setAge(DateUtil.getAge(patients.getBirth())); |
977 | + // 查询活产数 | |
978 | + BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
979 | + babyModelQuery.setYn(YnEnums.YES.getId()); | |
980 | + babyModelQuery.setParentId(patients.getId()); | |
981 | + babyModelQuery.setPregnancyOut(RenShenJieJuEnums.O.getId()); | |
982 | + try { | |
983 | + childbirthManagerQueryModel.setLivingNumber(babyService.queryBabyWithQuery(babyModelQuery).size()); | |
984 | + } catch (Exception e) { | |
985 | + // 什么都不干 | |
986 | + } | |
976 | 987 | childbirthManagerQueryModelList.add(childbirthManagerQueryModel); |
977 | 988 | } |
978 | 989 | } |
... | ... | @@ -999,7 +1010,7 @@ |
999 | 1010 | babyModelQuery.setDueType(newBabyManagerRequest.getDueType()); |
1000 | 1011 | babyModelQuery.setPage(newBabyManagerRequest.getPage()); |
1001 | 1012 | babyModelQuery.setLimit(newBabyManagerRequest.getLimit()); |
1002 | - // babyModelQuery.setHospitalId(autoMatchFacade.getHospitalId(newBabyManagerRequest.getOperatorId())); | |
1013 | + babyModelQuery.setHospitalId(autoMatchFacade.getHospitalId(newBabyManagerRequest.getOperatorId())); | |
1003 | 1014 | babyModelQuery.setNeed("Need"); |
1004 | 1015 | |
1005 | 1016 | List<BabyModel> babyModelList = babyService.queryBabyWithQuery(babyModelQuery); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java
View file @
c0ed9e5
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 | import com.lyms.platform.common.enums.YnEnums; |
11 | 11 | import com.lyms.platform.common.result.BaseListResponse; |
12 | 12 | import com.lyms.platform.common.result.BaseObjectResponse; |
13 | +import com.lyms.platform.common.result.BaseResponse; | |
13 | 14 | import com.lyms.platform.common.utils.DateUtil; |
14 | 15 | import com.lyms.platform.common.utils.SystemConfig; |
15 | 16 | import com.lyms.platform.operate.web.request.PremaritalCheckupAddRequest; |
... | ... | @@ -28,6 +29,8 @@ |
28 | 29 | import org.springframework.data.domain.Sort; |
29 | 30 | import org.springframework.stereotype.Component; |
30 | 31 | |
32 | +import javax.servlet.http.HttpServletResponse; | |
33 | +import java.io.OutputStream; | |
31 | 34 | import java.util.*; |
32 | 35 | |
33 | 36 | /** |
... | ... | @@ -46,6 +49,8 @@ |
46 | 49 | private BasicConfigService basicConfigService; |
47 | 50 | @Autowired |
48 | 51 | private OrganizationService organizationService; |
52 | + @Autowired | |
53 | + private AutoMatchFacade autoMatchFacade; | |
49 | 54 | |
50 | 55 | /** |
51 | 56 | * 查询单个(男/女)婚前检查 |
... | ... | @@ -187,8 +192,19 @@ |
187 | 192 | query.setYn(YnEnums.YES.getId()); |
188 | 193 | query.setCertificateNum(request.getCardNo()); |
189 | 194 | query.setYiXueYiJian(request.getYiXueYiJian()); |
190 | - query.setPremaritalUpTimeStart(request.getPremaritalUpTimeStart()); | |
191 | - query.setPremaritalUpTimeEnd(request.getPremaritalUpTimeEnd()); | |
195 | + | |
196 | + if(StringUtils.isNotEmpty(request.getPremaritalUpTime())){ | |
197 | + String[] dates = request.getPremaritalUpTime().split(" - "); | |
198 | + query.setPremaritalUpTimeStart(DateUtil.parseYMD(dates[0])); | |
199 | + if(dates.length>=2){ | |
200 | + Date date= DateUtil.parseYMD(dates[1]); | |
201 | + if(null!=date){ | |
202 | + long d = date.getTime() + 86398000; | |
203 | + date = new Date(d); | |
204 | + } | |
205 | + query.setPremaritalUpTimeEnd(date); | |
206 | + } | |
207 | + } | |
192 | 208 | query.setSexType(request.getSexType()); |
193 | 209 | |
194 | 210 | if (CollectionUtils.isNotEmpty(parentIds)){ |
... | ... | @@ -210,7 +226,7 @@ |
210 | 226 | ResidentsArchiveModel model = residentsArchiveService.getResident(checkup.getParentId()); |
211 | 227 | map.put("premaritalUpTime", checkup.getPremaritalUpTime()); |
212 | 228 | map.put("username", model.getUsername()); |
213 | - map.put("certificateNum",checkup.getCertificateNum()); | |
229 | + map.put("certificateNum",model.getCertificateNum()); | |
214 | 230 | map.put("phone", model.getPhone()); |
215 | 231 | if (checkup.getJianChaJieGuo() != null && checkup.getJianChaJieGuo()== PhysiologyStatusEnum.NORMAL.getId()){ |
216 | 232 | map.put("jianChaJieGuo", PhysiologyStatusEnum.NORMAL.getTitle()); |
... | ... | @@ -221,6 +237,7 @@ |
221 | 237 | map.put("residence", CommonsHelper.getResidence(model.getProvinceId(),model.getCityId(),model.getAreaId(),model.getStreetId(), |
222 | 238 | model.getAddress(),basicConfigService)); |
223 | 239 | map.put("hunJianDoctor", checkup.getHunJianDoctor()); |
240 | + map.put("id", checkup.getId()); | |
224 | 241 | list.add(map); |
225 | 242 | } |
226 | 243 | } |
... | ... | @@ -267,7 +284,7 @@ |
267 | 284 | String id = null; |
268 | 285 | |
269 | 286 | PremaritalCheckup checkup = new PremaritalCheckup(); |
270 | - if (model.getSex() != null && model.getSex()== SystemConfig.WOMAN_ID){ | |
287 | + if (model.getSex() != null && model.getSex().equals(SystemConfig.WOMAN_ID)){ | |
271 | 288 | checkup.setSexType(1); |
272 | 289 | }else { |
273 | 290 | checkup.setSexType(2); |
... | ... | @@ -491,6 +508,33 @@ |
491 | 508 | id = premaritalCheckup.getId(); |
492 | 509 | } |
493 | 510 | return id; |
511 | + } | |
512 | + | |
513 | + //婚前检查导出 | |
514 | + public void premaritalCheckupExport(PremaritalCheckupQueryRequest request,Integer userId, | |
515 | + HttpServletResponse response){ | |
516 | + OutputStream out = null; | |
517 | + List<Map<String,Object>> list = new ArrayList<>(); | |
518 | + | |
519 | + try { | |
520 | + PremaritalCheckupQuery query = new PremaritalCheckupQuery(); | |
521 | + query.setYn(YnEnums.YES.getId()); | |
522 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
523 | + query.setHospitalId(hospitalId); | |
524 | + | |
525 | + if (StringUtils.isNotEmpty(request.getPremaritalUpTime())){ | |
526 | + | |
527 | + } | |
528 | + | |
529 | + | |
530 | + | |
531 | + | |
532 | + | |
533 | + }catch (Exception e){ | |
534 | + e.printStackTrace(); | |
535 | + } | |
536 | + | |
537 | + | |
494 | 538 | } |
495 | 539 | |
496 | 540 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/FolicAcidQueryRequest.java
View file @
c0ed9e5
... | ... | @@ -26,10 +26,8 @@ |
26 | 26 | private String cityId; |
27 | 27 | //区县 |
28 | 28 | private String areaId; |
29 | - //发放开始时间 | |
30 | - private Date drawTimeStart; | |
31 | - //结束时间 | |
32 | - private Date drawTimeEnd; | |
29 | + //领取时间 | |
30 | + private String drawTime; | |
33 | 31 | //高危因素 |
34 | 32 | private String highRisk; |
35 | 33 | |
36 | 34 | |
... | ... | @@ -97,20 +95,12 @@ |
97 | 95 | this.areaId = areaId; |
98 | 96 | } |
99 | 97 | |
100 | - public Date getDrawTimeStart() { | |
101 | - return drawTimeStart; | |
98 | + public String getDrawTime() { | |
99 | + return drawTime; | |
102 | 100 | } |
103 | 101 | |
104 | - public void setDrawTimeStart(Date drawTimeStart) { | |
105 | - this.drawTimeStart = drawTimeStart; | |
106 | - } | |
107 | - | |
108 | - public Date getDrawTimeEnd() { | |
109 | - return drawTimeEnd; | |
110 | - } | |
111 | - | |
112 | - public void setDrawTimeEnd(Date drawTimeEnd) { | |
113 | - this.drawTimeEnd = drawTimeEnd; | |
102 | + public void setDrawTime(String drawTime) { | |
103 | + this.drawTime = drawTime; | |
114 | 104 | } |
115 | 105 | |
116 | 106 | public String getHighRisk() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PremaritalCheckupQueryRequest.java
View file @
c0ed9e5
1 | 1 | package com.lyms.platform.operate.web.request; |
2 | 2 | |
3 | +import com.lyms.platform.common.core.annotation.form.Form; | |
4 | + | |
3 | 5 | import java.util.Date; |
4 | 6 | |
5 | 7 | /** |
... | ... | @@ -7,6 +9,7 @@ |
7 | 9 | * |
8 | 10 | * Created by Administrator on 2016/11/24 0024. |
9 | 11 | */ |
12 | +@Form | |
10 | 13 | public class PremaritalCheckupQueryRequest extends BasePageQueryRequest{ |
11 | 14 | |
12 | 15 | private String id; |
... | ... | @@ -18,10 +21,8 @@ |
18 | 21 | private String username; |
19 | 22 | //联系方式 |
20 | 23 | private String phone; |
21 | - //开始时间 | |
22 | - private Date premaritalUpTimeStart; | |
23 | - //结束时间 | |
24 | - private Date premaritalUpTimeEnd; | |
24 | + //检查时间 | |
25 | + private String premaritalUpTime; | |
25 | 26 | //医学意见 |
26 | 27 | private Integer yiXueYiJian; |
27 | 28 | //医院ID |
28 | 29 | |
... | ... | @@ -85,20 +86,12 @@ |
85 | 86 | this.phone = phone; |
86 | 87 | } |
87 | 88 | |
88 | - public Date getPremaritalUpTimeStart() { | |
89 | - return premaritalUpTimeStart; | |
89 | + public String getPremaritalUpTime() { | |
90 | + return premaritalUpTime; | |
90 | 91 | } |
91 | 92 | |
92 | - public void setPremaritalUpTimeStart(Date premaritalUpTimeStart) { | |
93 | - this.premaritalUpTimeStart = premaritalUpTimeStart; | |
94 | - } | |
95 | - | |
96 | - public Date getPremaritalUpTimeEnd() { | |
97 | - return premaritalUpTimeEnd; | |
98 | - } | |
99 | - | |
100 | - public void setPremaritalUpTimeEnd(Date premaritalUpTimeEnd) { | |
101 | - this.premaritalUpTimeEnd = premaritalUpTimeEnd; | |
93 | + public void setPremaritalUpTime(String premaritalUpTime) { | |
94 | + this.premaritalUpTime = premaritalUpTime; | |
102 | 95 | } |
103 | 96 | |
104 | 97 | public Integer getYiXueYiJian() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
View file @
c0ed9e5
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | * @createTime 2016年12月07日 16时39分 |
69 | 69 | * @discription 活产数 |
70 | 70 | */ |
71 | - // TODO 暂未确定 | |
71 | + private Integer livingNumber; | |
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @auther HuJiaqi |
... | ... | @@ -162,6 +162,14 @@ |
162 | 162 | |
163 | 163 | public void setPhone(String phone) { |
164 | 164 | this.phone = phone; |
165 | + } | |
166 | + | |
167 | + public Integer getLivingNumber() { | |
168 | + return livingNumber; | |
169 | + } | |
170 | + | |
171 | + public void setLivingNumber(Integer livingNumber) { | |
172 | + this.livingNumber = livingNumber; | |
165 | 173 | } |
166 | 174 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/NewBabyManagerQueryModel.java
View file @
c0ed9e5
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | /** |
18 | 18 | * @auther HuJiaqi |
19 | 19 | * @createTime 2016年12月08日 15时39分 |
20 | - * @discription | |
20 | + * @discription 娩出时间 | |
21 | 21 | */ |
22 | 22 | private String birthHM; |
23 | 23 | |
24 | 24 | |
... | ... | @@ -66,14 +66,14 @@ |
66 | 66 | /** |
67 | 67 | * @auther HuJiaqi |
68 | 68 | * @createTime 2016年12月08日 10时56分 |
69 | - * @discription 出生身长,单位厘米 | |
69 | + * @discription 出生身长/cm | |
70 | 70 | */ |
71 | 71 | private String babyHeight; |
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @auther HuJiaqi |
75 | 75 | * @createTime 2016年12月08日 10时57分 |
76 | - * @discription 出生体重,单位克 | |
76 | + * @discription 出生体重/g | |
77 | 77 | */ |
78 | 78 | private String babyWeight; |
79 | 79 |