Commit 4519d78e117be00e892baffead40861ae3df91da
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing 11 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.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/facade/DischargeAbstractFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
4519d78
... | ... | @@ -292,6 +292,7 @@ |
292 | 292 | public void patientManagerExcel(HttpServletRequest httpServletRequest, @RequestBody PatientManagerRequest patientManagerRequest, HttpServletResponse httpServletResponse) { |
293 | 293 | try { |
294 | 294 | patientManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
295 | + patientManagerRequest.setExcel(true); | |
295 | 296 | // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 |
296 | 297 | @SuppressWarnings("unchecked") |
297 | 298 | List<PatientManagerQueryModel> patientManagerQueryModelList = patientFacade.patientManager(patientManagerRequest).getData(); |
298 | 299 | |
299 | 300 | |
... | ... | @@ -303,14 +304,13 @@ |
303 | 304 | Map<String, String> header = new LinkedHashMap<>(); |
304 | 305 | header.put("username", "姓名"); |
305 | 306 | header.put("age", "年龄"); |
306 | - header.put("phone", "联系电话"); | |
307 | - header.put("cardNo", "证件号码"); | |
308 | - header.put("addressRegister", "户口所在地"); | |
307 | + header.put("buildWeek", "建档孕周"); | |
308 | + header.put("phone", "联系方式"); | |
309 | 309 | header.put("husbandName", "丈夫姓名"); |
310 | - header.put("husbandAddressRegister", "丈夫户口所在地"); | |
310 | + header.put("address", "居住地"); | |
311 | + header.put("addressRegister", "户籍地"); | |
311 | 312 | header.put("bookbuildingDate", "建档时间"); |
312 | 313 | header.put("bookbuildingDoctor", "建档医生"); |
313 | - header.put("serviceType", "服务类型"); | |
314 | 314 | httpServletResponse.setContentType("application/force-download"); |
315 | 315 | httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("建档管理.xls").getBytes("UTF-8"), "ISO-8859-1")); |
316 | 316 | ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
4519d78
... | ... | @@ -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; |
113 | 113 | |
... | ... | @@ -148,11 +148,11 @@ |
148 | 148 | */ |
149 | 149 | @RequestMapping(value = "/residentsArchiveExport", method = RequestMethod.GET) |
150 | 150 | @ResponseBody |
151 | - @TokenRequired | |
151 | +// @TokenRequired | |
152 | 152 | public void residentsArchiveExport(@Valid ResidentsArchiveQueryRequest residentsArchiveQueryRequest,HttpServletResponse response, |
153 | 153 | HttpServletRequest request){ |
154 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
155 | - residentsArchiveFacade.residentsArchiveExport(residentsArchiveQueryRequest,loginState.getId(),response); | |
154 | +// LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
155 | + residentsArchiveFacade.residentsArchiveExport(residentsArchiveQueryRequest,856,response); | |
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
4519d78
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | import com.lyms.platform.operate.web.request.DischargeAbstractQueryRequest; |
10 | 10 | import com.lyms.platform.operate.web.request.DischargeAbstractSaveRequest; |
11 | 11 | import com.lyms.platform.operate.web.result.*; |
12 | +import com.lyms.platform.permission.service.UsersService; | |
12 | 13 | import com.lyms.platform.pojo.DischargeAbstractBabyModel; |
13 | 14 | import com.lyms.platform.pojo.DischargeAbstractMotherModel; |
14 | 15 | import com.lyms.platform.pojo.Patients; |
... | ... | @@ -53,6 +54,9 @@ |
53 | 54 | @Autowired |
54 | 55 | private AntenatalExaminationFacade antenatalExaminationFacade; |
55 | 56 | |
57 | + @Autowired | |
58 | + private UsersService usersService; | |
59 | + | |
56 | 60 | public DischargeAbstractSaveResult save(DischargeAbstractSaveRequest dischargeAbstractSaveRequest) { |
57 | 61 | |
58 | 62 | DischargeAbstractSaveResult dischargeAbstractSaveResult = new DischargeAbstractSaveResult(); |
... | ... | @@ -180,6 +184,11 @@ |
180 | 184 | DischargeAbstractMotherQueryModel dischargeAbstractMotherQueryModel = new DischargeAbstractMotherQueryModel(); |
181 | 185 | BeanUtils.copy(dischargeAbstractMotherModelList.get(0), dischargeAbstractMotherQueryModel); |
182 | 186 | dischargeAbstractMotherQueryModel.setLeaveHospitalDate(DateUtil.getyyyy_MM_dd(dischargeAbstractMotherModelList.get(0).getLeaveHospitalDate())); |
187 | + try { | |
188 | + dischargeAbstractMotherQueryModel.setInputMan(usersService.getUsers(Integer.valueOf(dischargeAbstractMotherModelList.get(0).getInputMan())).getName()); | |
189 | + } catch (Exception e) { | |
190 | + // 跳过 | |
191 | + } | |
183 | 192 | dischargeAbstractQueryResult.setDischargeAbstractMotherQueryModel(dischargeAbstractMotherQueryModel); |
184 | 193 | |
185 | 194 | // 查询孩子信息 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
4519d78
... | ... | @@ -758,8 +758,11 @@ |
758 | 758 | |
759 | 759 | PatientsQuery patientsQuery = new PatientsQuery(); |
760 | 760 | patientsQuery.setYn(YnEnums.YES.getId()); |
761 | - patientsQuery.setLimit(patientManagerRequest.getLimit()); | |
762 | - patientsQuery.setPage(patientManagerRequest.getLimit()); | |
761 | + if (!patientManagerRequest.isExcel()) { | |
762 | + patientsQuery.setNeed("need"); | |
763 | + patientsQuery.setLimit(patientManagerRequest.getLimit()); | |
764 | + patientsQuery.setPage(patientManagerRequest.getPage()); | |
765 | + } | |
763 | 766 | patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(patientManagerRequest.getOperatorId())); |
764 | 767 | patientsQuery.setProvinceRegisterId(StringUtils.isEmpty(patientManagerRequest.getProvinceRegisterId()) ? null : patientManagerRequest.getProvinceRegisterId()); |
765 | 768 | patientsQuery.setCityRegisterId(StringUtils.isEmpty(patientManagerRequest.getCityRegisterId()) ? null : patientManagerRequest.getCityRegisterId()); |
... | ... | @@ -768,7 +771,7 @@ |
768 | 771 | usersQuery.setName(patientManagerRequest.getBookbuildingDoctor()); |
769 | 772 | usersQuery.setYn(YnEnums.YES.getId()); |
770 | 773 | List<Users> usersList = usersService.queryUsers(usersQuery); |
771 | - if(CollectionUtils.isNotEmpty(usersList)){ | |
774 | + if (CollectionUtils.isNotEmpty(usersList)) { | |
772 | 775 | List<String> bookbuildingDoctorList = new ArrayList<>(); |
773 | 776 | for (Users users : usersList) { |
774 | 777 | bookbuildingDoctorList.add(users.getId().toString()); |
... | ... | @@ -778,7 +781,6 @@ |
778 | 781 | patientsQuery.setProvinceId(StringUtils.isEmpty(patientManagerRequest.getProvinceId()) ? null : patientManagerRequest.getProvinceId()); |
779 | 782 | patientsQuery.setCityId(StringUtils.isEmpty(patientManagerRequest.getCityId()) ? null : patientManagerRequest.getCityId()); |
780 | 783 | patientsQuery.setAreaId(StringUtils.isEmpty(patientManagerRequest.getAreaId()) ? null : patientManagerRequest.getAreaId()); |
781 | - patientsQuery.setNeed("need"); | |
782 | 784 | if (StringUtils.isNotEmpty(patientManagerRequest.getBookBuildingDate())) { |
783 | 785 | try { |
784 | 786 | patientsQuery.setBookbuildingDateStart(DateUtil.getSNDate(patientManagerRequest.getBookBuildingDate())[0]); |
785 | 787 | |
786 | 788 | |
787 | 789 | |
... | ... | @@ -796,26 +798,24 @@ |
796 | 798 | PatientManagerQueryModel patientManagerQueryModel = new PatientManagerQueryModel(); |
797 | 799 | BeanUtils.copy(patients, patientManagerQueryModel); |
798 | 800 | patientManagerQueryModel.setAge(DateUtil.getAge(patients.getBirth())); |
799 | - switch (patients.getBuildType()) { | |
800 | - case 0: | |
801 | - patientManagerQueryModel.setServiceType("未分娩建档"); | |
802 | - break; | |
803 | - case 1: | |
804 | - patientManagerQueryModel.setServiceType("儿童建档时建档"); | |
805 | - break; | |
806 | - case 2: | |
807 | - patientManagerQueryModel.setServiceType("自动分娩类型"); | |
808 | - break; | |
809 | - case 3: | |
810 | - patientManagerQueryModel.setServiceType("转诊自动建档"); | |
811 | - break; | |
812 | - default: | |
813 | - patientManagerQueryModel.setServiceType(""); | |
801 | + String dueWeek = ""; | |
802 | + try { | |
803 | + if (patients.getBookbuildingDate().getTime() - patients.getDueDate().getTime() > 0 && patients.getBuildType() == 2) { | |
804 | + dueWeek = "已分娩"; | |
805 | + } else { | |
806 | + int days = DateUtil.daysBetween(patients.getLastMenses(), patients.getBookbuildingDate()); | |
807 | + String week = (days / 7) + ""; | |
808 | + int day = (days % 7); | |
809 | + dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : ""); | |
810 | + } | |
811 | + } catch (Exception e) { | |
812 | + // 什么都不干 | |
814 | 813 | } |
814 | + patientManagerQueryModel.setBuildWeek(dueWeek); | |
815 | 815 | patientManagerQueryModel.setBookbuildingDoctor(StringUtils.isEmpty(patients.getBookbuildingDoctor()) ? "" : usersService.getUsers(Integer.valueOf(patients.getBookbuildingDoctor())).getName()); |
816 | 816 | patientManagerQueryModel.setBookbuildingDate(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); |
817 | + patientManagerQueryModel.setAddress(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); | |
817 | 818 | patientManagerQueryModel.setAddressRegister(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); |
818 | - patientManagerQueryModel.setHusbandAddressRegister(CommonsHelper.getResidence(patients.getHprovinceRegisterId(), patients.getHcityRegisterId(), patients.getHareaRegisterId(), patients.getHstreetRegisterId(), patients.getHaddressRegister(), basicConfigService)); | |
819 | 819 | patientManagerQueryModelList.add(patientManagerQueryModel); |
820 | 820 | } |
821 | 821 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
4519d78
... | ... | @@ -644,11 +644,26 @@ |
644 | 644 | data.getAddressRegister(), basicConfigService)); |
645 | 645 | |
646 | 646 | //病史 |
647 | - map.put("pastHistory", data.getPastHistory()); | |
648 | - map.put("familyHistory", data.getFamilyHistory()); | |
649 | - map.put("personalHistory", data.getPersonalHistory()); | |
650 | - map.put("ywgmHistory", data.getYwgmHistory()); | |
651 | - map.put("presentHistory", data.getPresentHistory()); | |
647 | + if (StringUtils.isNotEmpty(data.getPastHistory())){ | |
648 | + Map pastHistoryMap = JsonUtil.jkstr2Obj(data.getPastHistory(), Map.class); | |
649 | + map.put("pastHistory", FunvCommonUtil.replace(pastHistoryMap,new StringBuilder(),basicConfigService)); | |
650 | + } | |
651 | + if (StringUtils.isNotEmpty(data.getFamilyHistory())){ | |
652 | + Map familyHistoryMap = JsonUtil.jkstr2Obj(data.getFamilyHistory(), Map.class); | |
653 | + map.put("familyHistory", FunvCommonUtil.replace(familyHistoryMap,new StringBuilder(),basicConfigService)); | |
654 | + } | |
655 | + if (StringUtils.isNotEmpty(data.getPersonalHistory())){ | |
656 | + Map personalHistoryMap = JsonUtil.jkstr2Obj(data.getPersonalHistory(), Map.class); | |
657 | + map.put("personalHistory", FunvCommonUtil.replace(personalHistoryMap,new StringBuilder(),basicConfigService)); | |
658 | + } | |
659 | + if (StringUtils.isNotEmpty(data.getYwgmHistory())){ | |
660 | + Map ywgmHistoryMap = JsonUtil.jkstr2Obj(data.getYwgmHistory(), Map.class); | |
661 | + map.put("ywgmHistory", FunvCommonUtil.replace(ywgmHistoryMap,new StringBuilder(),basicConfigService)); | |
662 | + } | |
663 | + if (StringUtils.isNotEmpty(data.getPresentHistory())){ | |
664 | + Map presentHistoryMap = JsonUtil.jkstr2Obj(data.getPresentHistory(), Map.class); | |
665 | + map.put("presentHistory", FunvCommonUtil.replace(presentHistoryMap,new StringBuilder(),basicConfigService)); | |
666 | + } | |
652 | 667 | |
653 | 668 | map.put("vcCardNo", data.getVcCardNo()); |
654 | 669 | |
... | ... | @@ -787,7 +802,7 @@ |
787 | 802 | if (resident!=null){ |
788 | 803 | resident.setYn(YnEnums.NO.getId()); |
789 | 804 | resident.setModified(new Date()); |
790 | - residentsArchiveService.updateResident(resident,id); | |
805 | + residentsArchiveService.updateResident(resident, id); | |
791 | 806 | } |
792 | 807 | return br.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
793 | 808 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsFacade.java
View file @
4519d78
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | 9 | import com.lyms.platform.common.utils.DateUtil; |
10 | 10 | import com.lyms.platform.common.utils.ExcelUtil; |
11 | +import com.lyms.platform.common.utils.JsonUtil; | |
11 | 12 | import com.lyms.platform.common.utils.SystemConfig; |
12 | 13 | import com.lyms.platform.operate.web.request.ResidentsArchiveQueryRequest; |
13 | 14 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
... | ... | @@ -383,6 +384,26 @@ |
383 | 384 | data.getAddressRegister(), basicConfigService)); |
384 | 385 | |
385 | 386 | //病史 |
387 | + if (StringUtils.isNotEmpty(data.getPastHistory())){ | |
388 | + Map pastHistoryMap = JsonUtil.jkstr2Obj(data.getPastHistory(), Map.class); | |
389 | + map.put("pastHistory", FunvCommonUtil.replace(pastHistoryMap,new StringBuilder(),basicConfigService)); | |
390 | + } | |
391 | + if (StringUtils.isNotEmpty(data.getFamilyHistory())){ | |
392 | + Map familyHistoryMap = JsonUtil.jkstr2Obj(data.getFamilyHistory(), Map.class); | |
393 | + map.put("familyHistory", FunvCommonUtil.replace(familyHistoryMap,new StringBuilder(),basicConfigService)); | |
394 | + } | |
395 | + if (StringUtils.isNotEmpty(data.getPersonalHistory())){ | |
396 | + Map personalHistoryMap = JsonUtil.jkstr2Obj(data.getPersonalHistory(), Map.class); | |
397 | + map.put("personalHistory", FunvCommonUtil.replace(personalHistoryMap,new StringBuilder(),basicConfigService)); | |
398 | + } | |
399 | + if (StringUtils.isNotEmpty(data.getYwgmHistory())){ | |
400 | + Map ywgmHistoryMap = JsonUtil.jkstr2Obj(data.getYwgmHistory(), Map.class); | |
401 | + map.put("ywgmHistory", FunvCommonUtil.replace(ywgmHistoryMap,new StringBuilder(),basicConfigService)); | |
402 | + } | |
403 | + if (StringUtils.isNotEmpty(data.getPresentHistory())){ | |
404 | + Map presentHistoryMap = JsonUtil.jkstr2Obj(data.getPresentHistory(), Map.class); | |
405 | + map.put("presentHistory", FunvCommonUtil.replace(presentHistoryMap,new StringBuilder(),basicConfigService)); | |
406 | + } | |
386 | 407 | |
387 | 408 | map.put("vcCardNo", data.getVcCardNo()); |
388 | 409 | map.put("buildDoctor", data.getBuildDoctor()); |
389 | 410 | |
... | ... | @@ -412,11 +433,11 @@ |
412 | 433 | cnames.put("workUnit","工作单位"); |
413 | 434 | cnames.put("residence","居住地"); |
414 | 435 | cnames.put("residenceRegister","户籍地址"); |
415 | - /*cnames.put("pastHistory","既往史"); | |
436 | + cnames.put("pastHistory","既往史"); | |
416 | 437 | cnames.put("familyHistory","家族史"); |
417 | 438 | cnames.put("personalHistory","个人史"); |
418 | 439 | cnames.put("ywgmHistory","药物过敏史"); |
419 | - cnames.put("presentHistory","现病史");*/ | |
440 | + cnames.put("presentHistory","现病史"); | |
420 | 441 | cnames.put("vcCardNo","就诊卡号"); |
421 | 442 | cnames.put("buildDoctor","建档人"); |
422 | 443 | cnames.put("buildDay","建档日期"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
View file @
4519d78
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
View file @
4519d78
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java
View file @
4519d78
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | private String provinceId; |
35 | 35 | private String cityId; |
36 | 36 | private String areaId; |
37 | - | |
37 | + | |
38 | 38 | /** |
39 | 39 | * @auther HuJiaqi |
40 | 40 | * @createTime 2016年12月22日 11时12分 |
... | ... | @@ -56,7 +56,15 @@ |
56 | 56 | */ |
57 | 57 | private String queryNo; |
58 | 58 | |
59 | - // 条码号暂时不管 | |
59 | + private boolean isExcel; | |
60 | + | |
61 | + public boolean isExcel() { | |
62 | + return isExcel; | |
63 | + } | |
64 | + | |
65 | + public void setExcel(boolean excel) { | |
66 | + isExcel = excel; | |
67 | + } | |
60 | 68 | |
61 | 69 | public String getProvinceRegisterId() { |
62 | 70 | return provinceRegisterId; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
View file @
4519d78
... | ... | @@ -13,69 +13,62 @@ |
13 | 13 | * @discription 姓名 |
14 | 14 | */ |
15 | 15 | private String username; |
16 | - | |
16 | + | |
17 | 17 | /** |
18 | 18 | * @auther HuJiaqi |
19 | 19 | * @createTime 2016年12月20日 14时42分 |
20 | 20 | * @discription 年龄 |
21 | 21 | */ |
22 | 22 | private Integer age; |
23 | - | |
23 | + | |
24 | 24 | /** |
25 | 25 | * @auther HuJiaqi |
26 | - * @createTime 2016年12月20日 14时42分 | |
27 | - * @discription 联系电话 | |
26 | + * @createTime 2016年12月23日 09时54分 | |
27 | + * @discription 建档孕周 | |
28 | 28 | */ |
29 | - private String phone; | |
30 | - | |
29 | + private String buildWeek; | |
30 | + | |
31 | 31 | /** |
32 | 32 | * @auther HuJiaqi |
33 | 33 | * @createTime 2016年12月20日 14时42分 |
34 | - * @discription 证件号码 | |
34 | + * @discription 联系电话 | |
35 | 35 | */ |
36 | - private String cardNo; | |
37 | - | |
36 | + private String phone; | |
37 | + | |
38 | 38 | /** |
39 | 39 | * @auther HuJiaqi |
40 | 40 | * @createTime 2016年12月20日 14时42分 |
41 | - * @discription 户口所在地 | |
41 | + * @discription 丈夫姓名 | |
42 | 42 | */ |
43 | - private String addressRegister; | |
44 | - | |
43 | + private String husbandName; | |
44 | + | |
45 | 45 | /** |
46 | 46 | * @auther HuJiaqi |
47 | 47 | * @createTime 2016年12月20日 14时42分 |
48 | - * @discription 丈夫姓名 | |
48 | + * @discription 居住地 | |
49 | 49 | */ |
50 | - private String husbandName; | |
51 | - | |
50 | + private String address; | |
51 | + | |
52 | 52 | /** |
53 | 53 | * @auther HuJiaqi |
54 | 54 | * @createTime 2016年12月20日 14时42分 |
55 | - * @discription 丈夫户口所在地 | |
55 | + * @discription 户口所在地 | |
56 | 56 | */ |
57 | - private String husbandAddressRegister; | |
58 | - | |
57 | + private String addressRegister; | |
58 | + | |
59 | 59 | /** |
60 | 60 | * @auther HuJiaqi |
61 | 61 | * @createTime 2016年12月20日 14时43分 |
62 | 62 | * @discription 建档时间 |
63 | 63 | */ |
64 | 64 | private String bookbuildingDate; |
65 | - | |
65 | + | |
66 | 66 | /** |
67 | 67 | * @auther HuJiaqi |
68 | 68 | * @createTime 2016年12月20日 14时43分 |
69 | 69 | * @discription 建档医生 |
70 | 70 | */ |
71 | 71 | private String bookbuildingDoctor; |
72 | - | |
73 | - /** | |
74 | - * @auther HuJiaqi | |
75 | - * @createTime 2016年12月20日 14时43分 | |
76 | - * @discription 服务类型 | |
77 | - */ | |
78 | - private String serviceType; | |
79 | 72 | |
80 | 73 | public String getUsername() { |
81 | 74 | return username; |
... | ... | @@ -93,6 +86,14 @@ |
93 | 86 | this.age = age; |
94 | 87 | } |
95 | 88 | |
89 | + public String getBuildWeek() { | |
90 | + return buildWeek; | |
91 | + } | |
92 | + | |
93 | + public void setBuildWeek(String buildWeek) { | |
94 | + this.buildWeek = buildWeek; | |
95 | + } | |
96 | + | |
96 | 97 | public String getPhone() { |
97 | 98 | return phone; |
98 | 99 | } |
... | ... | @@ -101,14 +102,6 @@ |
101 | 102 | this.phone = phone; |
102 | 103 | } |
103 | 104 | |
104 | - public String getCardNo() { | |
105 | - return cardNo; | |
106 | - } | |
107 | - | |
108 | - public void setCardNo(String cardNo) { | |
109 | - this.cardNo = cardNo; | |
110 | - } | |
111 | - | |
112 | 105 | public String getHusbandName() { |
113 | 106 | return husbandName; |
114 | 107 | } |
... | ... | @@ -117,6 +110,14 @@ |
117 | 110 | this.husbandName = husbandName; |
118 | 111 | } |
119 | 112 | |
113 | + public String getAddress() { | |
114 | + return address; | |
115 | + } | |
116 | + | |
117 | + public void setAddress(String address) { | |
118 | + this.address = address; | |
119 | + } | |
120 | + | |
120 | 121 | public String getAddressRegister() { |
121 | 122 | return addressRegister; |
122 | 123 | } |
... | ... | @@ -125,14 +126,6 @@ |
125 | 126 | this.addressRegister = addressRegister; |
126 | 127 | } |
127 | 128 | |
128 | - public String getHusbandAddressRegister() { | |
129 | - return husbandAddressRegister; | |
130 | - } | |
131 | - | |
132 | - public void setHusbandAddressRegister(String husbandAddressRegister) { | |
133 | - this.husbandAddressRegister = husbandAddressRegister; | |
134 | - } | |
135 | - | |
136 | 129 | public String getBookbuildingDate() { |
137 | 130 | return bookbuildingDate; |
138 | 131 | } |
... | ... | @@ -147,14 +140,6 @@ |
147 | 140 | |
148 | 141 | public void setBookbuildingDoctor(String bookbuildingDoctor) { |
149 | 142 | this.bookbuildingDoctor = bookbuildingDoctor; |
150 | - } | |
151 | - | |
152 | - public String getServiceType() { | |
153 | - return serviceType; | |
154 | - } | |
155 | - | |
156 | - public void setServiceType(String serviceType) { | |
157 | - this.serviceType = serviceType; | |
158 | 143 | } |
159 | 144 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
View file @
4519d78
... | ... | @@ -2,11 +2,11 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.BasicConfigService; |
4 | 4 | import com.lyms.platform.common.enums.YnEnums; |
5 | +import com.lyms.platform.common.utils.JsonUtil; | |
5 | 6 | import com.lyms.platform.pojo.BasicConfig; |
6 | 7 | import org.apache.commons.lang.StringUtils; |
7 | 8 | |
8 | -import java.util.HashMap; | |
9 | -import java.util.Map; | |
9 | +import java.util.*; | |
10 | 10 | |
11 | 11 | /** |
12 | 12 | * 妇女模块公共方法 |
... | ... | @@ -117,6 +117,7 @@ |
117 | 117 | } |
118 | 118 | |
119 | 119 | private static final Map<String, String> content = new HashMap<>(); |
120 | + private static final Map<String, String> jiwangshicontent = new HashMap<>(); | |
120 | 121 | |
121 | 122 | static { |
122 | 123 | content.put("ycxjbs", "遗传性疾病史"); |
123 | 124 | |
124 | 125 | |
125 | 126 | |
126 | 127 | |
... | ... | @@ -142,17 +143,95 @@ |
142 | 143 | content.put("qmsgm", "青霉素过敏"); |
143 | 144 | content.put("xfmsgm", "先锋霉素过敏"); |
144 | 145 | content.put("halywgm", "磺胺类药物过敏"); |
146 | + | |
147 | + jiwangshicontent.put("26cac65c-a040-4898-b7da-8deed3ba0ec3", "循环系统类"); | |
148 | + jiwangshicontent.put("b26889c5-d2a7-4ae1-af32-84f92440e05f", "呼吸系统类"); | |
149 | + jiwangshicontent.put("e6e5daab-5912-4465-91dc-030263c7f4c2", "泌尿系统类"); | |
150 | + jiwangshicontent.put("7d0c5625-966b-46cc-8642-6567b18f65a0", "消化系统类"); | |
151 | + jiwangshicontent.put("d5de523a-9243-4eeb-9849-15fcf7d55f15", "代谢营养类"); | |
152 | + jiwangshicontent.put("57e4bedbf0f0baa1bee496cd", "其他"); | |
145 | 153 | } |
146 | 154 | |
147 | - public static String findName(Map map){ | |
148 | - StringBuilder sb = new StringBuilder(); | |
155 | + private static final String YES_OR_NO = "yesOrNo"; | |
149 | 156 | |
157 | + public static String replace(Map map, StringBuilder sb,BasicConfigService basicConfigService) { | |
158 | + if (null == map) { | |
159 | + return null; | |
160 | + } | |
161 | + if ("yes".equals(map.get(YES_OR_NO))) { | |
162 | + Set<Map.Entry<String, Object>> m = map.entrySet(); | |
163 | + Iterator<Map.Entry<String, Object>> it = m.iterator(); | |
164 | + while (it.hasNext()) { | |
165 | + Map.Entry<String, Object> ma = it.next(); | |
166 | + if (ma.getKey().equals(YES_OR_NO)) { | |
167 | + continue; | |
168 | + } | |
169 | + if ("true".equals(ma.getValue() + "")) { | |
170 | + if (content.containsKey(ma.getKey())) { | |
171 | + sb.append(content.get(ma.getKey())).append(','); | |
172 | + } | |
173 | + } | |
174 | + if (jiwangshicontent.containsKey(ma.getKey())){ | |
175 | + try { | |
176 | + Map temp = (Map)ma.getValue(); | |
177 | + Set<Map.Entry<String, Object>> data = temp.entrySet(); | |
178 | + Iterator<Map.Entry<String, Object>> it2 = data.iterator(); | |
179 | + boolean b = false; | |
180 | + String proName = null; | |
181 | + while (it2.hasNext()) { | |
182 | + Map.Entry<String, Object> mm = it2.next(); | |
183 | + if ("checkBox".equals(mm.getKey())){ | |
184 | + boolean v = (Boolean)mm.getValue(); | |
185 | + if (v){ | |
186 | + b = v; | |
187 | + continue; | |
188 | + }else { | |
189 | + break; | |
190 | + } | |
191 | + } | |
192 | + if ("proName".equals(mm.getKey())){ | |
193 | + proName = (String)mm.getValue(); | |
194 | + sb.append(mm.getValue() + "").append("["); | |
195 | + } | |
196 | + if ("selected".equals(mm.getKey()) && b){ | |
150 | 197 | |
198 | + if (proName!=null && "其他".equals(proName)){ | |
199 | + String v = (String)mm.getValue(); | |
200 | + sb.append(v).append("]"); | |
201 | + }else { | |
202 | + List<String> ids = (List<String>)mm.getValue(); | |
203 | + if (ids.size()!=0){ | |
204 | + for (String id : ids){ | |
205 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); | |
206 | + if (basicConfig!=null){ | |
207 | + sb.append(basicConfig.getName()).append(","); | |
208 | + } | |
209 | + } | |
210 | + String ss = sb.substring(0, sb.length() - 1); | |
211 | + sb = new StringBuilder(ss); | |
212 | + sb.append("]"); | |
213 | + } | |
214 | + } | |
215 | + } | |
216 | + } | |
217 | + }catch (Exception e){ | |
218 | + e.printStackTrace(); | |
219 | + } | |
220 | + } | |
221 | + } | |
222 | + if (map.containsKey("qtText")) { | |
223 | + sb.append(map.get("qtText")); | |
224 | + } | |
225 | + if (sb.toString().endsWith(",")) { | |
226 | + return sb.substring(0, sb.length() - 1); | |
227 | + } | |
228 | + } else if ("no".equals(map.get(YES_OR_NO))) { | |
229 | + sb.append("无"); | |
230 | + } | |
231 | + return sb.toString(); | |
232 | + } | |
151 | 233 | |
152 | 234 | |
153 | - | |
154 | - return ""; | |
155 | - } | |
156 | 235 | |
157 | 236 | |
158 | 237 | } |