Commit bbadac7f5872a40e52b9dcf6faf0af0fd0bcc2a3

Authored by yangfei
1 parent f187272261

听力诊断查询条件bug解决

Showing 5 changed files with 73 additions and 20 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java View file @ bbadac7
... ... @@ -2,7 +2,6 @@
2 2  
3 3 import org.joda.time.DateTime;
4 4  
5   -import java.text.Format;
6 5 import java.text.ParseException;
7 6 import java.text.SimpleDateFormat;
8 7 import java.util.Calendar;
9 8  
... ... @@ -964,14 +963,14 @@
964 963 * @param end
965 964 * @return
966 965 */
967   - public static String getWeekDesc(Date start, Date end) {
  966 + public static String getWeekDesc(Date start, Date end) {
968 967 if(start == null || end == null) {
969 968 return "孕0周+0天";
970 969 }
971 970 Integer betweenDay = DateUtil.getDays(start, end);
972 971 Integer week = betweenDay / 7;
973 972 Integer day = betweenDay % 7;
974   - return "孕" + week + "周+" + day + "天";
  973 + return "孕" + week + "周+" + (day > 0 ? "+" + day + "天" : "");
975 974 }
976 975  
977 976 /**
platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/PieReportModel.java View file @ bbadac7
... ... @@ -6,15 +6,52 @@
6 6 /**
7 7 * @auther yangfei
8 8 * @createTime 2017年09月27日 11时59分
9   - * @discription
  9 + * @discription 饼状图统计
10 10 */
11 11 public class PieReportModel {
12 12 /**
13   - *
  13 + * 列数据
14 14 */
15 15 public List<String> legendData;
16 16 /** 数据列表 */
17 17 private List<Map<String, Object>> seriesData;
  18 + /** 报表数据 */
  19 + private Object data;
  20 + /**
  21 + * 其他数据
  22 + */
  23 + private Map<String,Integer> otherMap;
18 24  
  25 + public Map<String, Integer> getOtherMap() {
  26 + return otherMap;
  27 + }
  28 +
  29 + public void setOtherMap(Map<String, Integer> otherMap) {
  30 + this.otherMap = otherMap;
  31 + }
  32 +
  33 + public List<String> getLegendData() {
  34 + return legendData;
  35 + }
  36 +
  37 + public void setLegendData(List<String> legendData) {
  38 + this.legendData = legendData;
  39 + }
  40 +
  41 + public List<Map<String, Object>> getSeriesData() {
  42 + return seriesData;
  43 + }
  44 +
  45 + public void setSeriesData(List<Map<String, Object>> seriesData) {
  46 + this.seriesData = seriesData;
  47 + }
  48 +
  49 + public Object getData() {
  50 + return data;
  51 + }
  52 +
  53 + public void setData(Object data) {
  54 + this.data = data;
  55 + }
19 56 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java View file @ bbadac7
... ... @@ -806,9 +806,9 @@
806 806  
807 807 //医院id
808 808 String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
809   - //确诊 加入确诊时间
  809 + //确诊 加入确诊时间未诊断时间
810 810 if(obj.getIsconfirm()==1){
811   - obj.setConfirmTime(new Date());
  811 + obj.setConfirmTime(obj.getDiagnoseTime());
812 812 }
813 813 String pid = babyModel.getPid();
814 814 obj.setPid(pid);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ bbadac7
... ... @@ -1309,14 +1309,12 @@
1309 1309 }
1310 1310 babyEarBirthView.setFetuEmbarras(fetuStr);
1311 1311  
1312   - String apgarScore = (babyPatientExtendEarBirth.getApgarScoreOne() == null ? "" : babyPatientExtendEarBirth.getApgarScoreOne()) + "-" + (babyPatientExtendEarBirth.getApgarScoreFive() == null ? "" : babyPatientExtendEarBirth.getApgarScoreFive()) + "-" + (babyPatientExtendEarBirth.getApgarScoreTen() == null ? "" : babyPatientExtendEarBirth.getApgarScoreTen());
1313   -
1314   - if (babyPatientExtendEarBirth.getFetuEmbarras() != null && babyPatientExtendEarBirth.getFetuEmbarras() == 1) {
1315   - apgarScore += "不详";
  1312 + String apgarScore ="";
  1313 + if (babyPatientExtendEarBirth.getApgarScoreOne() != null && babyPatientExtendEarBirth.getApgarScoreFive() != null && babyPatientExtendEarBirth.getApgarScoreTen() != null) {
  1314 + apgarScore = babyPatientExtendEarBirth.getApgarScoreOne() + UnitConstants.FEN + " - " + babyPatientExtendEarBirth.getApgarScoreFive() + UnitConstants.FEN + " - " + babyPatientExtendEarBirth.getApgarScoreTen() + UnitConstants.FEN;
1316 1315 }
1317 1316 babyEarBirthView.setApgarScore(apgarScore);
1318 1317  
1319   -
1320 1318 String deformity = "";
1321 1319 if (babyPatientExtendEarBirth.getDeformityType() != null && babyPatientExtendEarBirth.getDeformityType() == 1) {
1322 1320 deformity = "有";
... ... @@ -1814,7 +1812,7 @@
1814 1812 screenQuery.setStatus(0);
1815 1813 screenQuery.setSort("screen_date");
1816 1814 screenQuery.setNeed("y");
1817   - screenQuery.setOffset((earScreenListRequest.getPage()-1)*earScreenListRequest.getLimit());
  1815 + screenQuery.setOffset((earScreenListRequest.getPage() - 1) * earScreenListRequest.getLimit());
1818 1816 screenQuery.setLimit(earScreenListRequest.getLimit());
1819 1817  
1820 1818 //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java View file @ bbadac7
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3 3 import com.lyms.hospitalapi.llfy.LlfyHisService;
  4 +import com.lyms.hospitalapi.pojo.PieReportModel;
4 5 import com.lyms.platform.biz.service.PatientsService;
5 6 import com.lyms.platform.common.constants.ErrorCodeConstants;
6 7 import com.lyms.platform.common.enums.MakeHospitalEnums;
... ... @@ -17,6 +18,7 @@
17 18 import com.lyms.platform.pojo.Patients;
18 19 import com.lyms.platform.query.PatientsQuery;
19 20 import org.apache.commons.collections.CollectionUtils;
  21 +import org.apache.commons.collections.map.HashedMap;
20 22 import org.springframework.beans.factory.annotation.Autowired;
21 23 import org.springframework.stereotype.Component;
22 24  
... ... @@ -50,7 +52,7 @@
50 52 * @param id
51 53 * @return
52 54 */
53   - public BaseListResponse reportHospit(PatientMarkRequest patientMarkRequest, Integer id){
  55 + public BaseResponse reportHospit(PatientMarkRequest patientMarkRequest, Integer id){
54 56 PatientMarkHospitalQuery query = new PatientMarkHospitalQuery();
55 57 //根据用户id获取医院ID
56 58 String hospitalId = autoMatchFacade.getHospitalId(id);
57 59  
58 60  
59 61  
... ... @@ -72,19 +74,36 @@
72 74 List<ReportMakeHosptail> reportMakeHosptails = patientMarkHospitalService.reportPatMarkHospByMakeDoctor(query);
73 75 //总数据
74 76 int count = patientMarkHospitalService.queryPatientMarkHospitalCount(query);
  77 +
  78 +
  79 + //列数据
  80 + List<String> legendData = new ArrayList<>();
  81 + List<Map<String, Object>> serData = new ArrayList<>();
  82 + Map<String,Integer> otherMap = new HashedMap();
  83 + otherMap.put("count",count);
  84 +
75 85 for(ReportMakeHosptail rm:reportMakeHosptails){
  86 + Map<String, Object> map = new HashedMap();
76 87 Users users = usersService.getUsers(Integer.parseInt(rm.getDoctorId()));
77 88 if (users != null) {
78 89 rm.setDoctorName(users.getName());
79 90 } else {
80 91 rm.setDoctorName("产检医生");
81 92 }
  93 + legendData.add(rm.getDoctorName());
  94 + map.put("value",rm.getNum());
  95 + map.put("name",rm.getDoctorName());
  96 + serData.add(map);
82 97 }
83   -
84   -
85   -
86   -
87   - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(reportMakeHosptails);
  98 + PieReportModel pieReportModel = new PieReportModel();
  99 + pieReportModel.setLegendData(legendData);
  100 + pieReportModel.setSeriesData(serData);
  101 + pieReportModel.setData(reportMakeHosptails);
  102 + pieReportModel.setOtherMap(otherMap);
  103 + BaseResponse result = new BaseResponse();
  104 + result.setObject(pieReportModel);
  105 + result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  106 + return result;
88 107 }
89 108  
90 109 /**