Commit e44d79ec1fd403b19a95fd58cfbfe25dbbe25bbf
1 parent
fdbb203232
Exists in
master
and in
6 other branches
体重
Showing 2 changed files with 195 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostReviewController.java
View file @
e44d79e
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | public BaseObjectResponse postpartumReview(Date startDate, Date endDate, String doctorId, |
150 | 150 | Integer startDay, Integer endDay, String zyList, String jcxList, String gcDoctorId, |
151 | 151 | String key, Integer page, Integer limit, HttpServletRequest request, |
152 | - String hospitalId, | |
152 | + String hid, | |
153 | 153 | String area, |
154 | 154 | //产后修改修养地 |
155 | 155 | String provincePostRestId, |
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | ) { |
170 | 170 | return postReviewService.postpartumReview(getUserId(request), startDate, endDate, doctorId, key, page, limit, startDay, |
171 | 171 | endDay, zyList, jcxList,gcDoctorId, |
172 | - hospitalId, | |
172 | + hid, | |
173 | 173 | area, |
174 | 174 | provincePostRestId, |
175 | 175 | cityPostRestId, |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
e44d79e
... | ... | @@ -6067,6 +6067,199 @@ |
6067 | 6067 | |
6068 | 6068 | |
6069 | 6069 | /** |
6070 | + * 导出一段时间内的分娩信息身份证号 | |
6071 | + * @param response | |
6072 | + * @param start | |
6073 | + * @param end | |
6074 | + */ | |
6075 | + @RequestMapping(value = "/exportHandleFmDataCc", method = RequestMethod.GET) | |
6076 | + @ResponseBody | |
6077 | + public void exportHandleFmDataCc(HttpServletResponse response,String start,String end) | |
6078 | + { | |
6079 | + MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
6080 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
6081 | + Date startDate1 = DateUtil.parseYMD(start); | |
6082 | + Date endDate1 = DateUtil.getDayLastSecond(DateUtil.parseYMD(end)); | |
6083 | + matDeliverQuery.setCreatedStart(startDate1); | |
6084 | + matDeliverQuery.setEndStart(endDate1); | |
6085 | + List<Map<String, Object>> datas = new ArrayList<>(); | |
6086 | + List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery); | |
6087 | + if (CollectionUtils.isNotEmpty(maternalDeliverModels)) | |
6088 | + { | |
6089 | + for (MaternalDeliverModel maternalDeliverModel : maternalDeliverModels) | |
6090 | + { | |
6091 | + try | |
6092 | + { | |
6093 | + if (maternalDeliverModel.getDueDate1() == null) | |
6094 | + { | |
6095 | + continue; | |
6096 | + } | |
6097 | + Map<String, Object> data = new HashMap<>(); | |
6098 | + Patients patients = patientsService.findOnePatientById(maternalDeliverModel.getParentId()); | |
6099 | + if (patients == null) | |
6100 | + { | |
6101 | + continue; | |
6102 | + } | |
6103 | + if(StringUtils.isNotEmpty(patients.getSource())) | |
6104 | + { | |
6105 | + patients = patientsService.findOnePatientById(patients.getSource()); | |
6106 | + } | |
6107 | + | |
6108 | + String pid = maternalDeliverModel.getPid(); | |
6109 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
6110 | + antExChuQuery.setPid(pid); | |
6111 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
6112 | + antExChuQuery.setCheckTimeStart(DateUtil.addMonth(maternalDeliverModel.getDueDate1(),-12)); | |
6113 | + antExChuQuery.setCheckTimeEnd(maternalDeliverModel.getDueDate1()); | |
6114 | + List <AntExChuModel> antExChu = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
6115 | + Integer prodTime = null; | |
6116 | + if (CollectionUtils.isNotEmpty(antExChu)) { | |
6117 | + prodTime = antExChu.get(0).getProdTime(); | |
6118 | + } | |
6119 | + | |
6120 | + data.put("prodTime",prodTime == null ? "-" : prodTime); | |
6121 | + data.put("name",patients.getUsername()); | |
6122 | + data.put("cardNo",patients.getCardNo()); | |
6123 | + data.put("fmDate",maternalDeliverModel.getDueDate()); | |
6124 | + data.put("buildDate",DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); | |
6125 | + data.put("buildHospital",organizationService.getOrganization(Integer.parseInt(patients.getHospitalId())).getName()); | |
6126 | + | |
6127 | + data.put("fmWeek",maternalDeliverModel.getDueWeek()); | |
6128 | + //户籍地址 | |
6129 | + data.put("residence", CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), | |
6130 | + patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); | |
6131 | + | |
6132 | + //居住地 | |
6133 | + data.put("register", CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
6134 | + patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); | |
6135 | + | |
6136 | + datas.add(data); | |
6137 | + }catch (Exception e) | |
6138 | + { | |
6139 | + | |
6140 | + } | |
6141 | + } | |
6142 | + } | |
6143 | + | |
6144 | + OutputStream out = null; | |
6145 | + try { | |
6146 | + out = response.getOutputStream(); | |
6147 | + Map <String, String> cnames = new LinkedHashMap <>(); | |
6148 | + cnames.put("name", "姓名"); | |
6149 | + cnames.put("cardNo", "身份证号"); | |
6150 | + cnames.put("fmDate", "分娩时间"); | |
6151 | + cnames.put("buildDate", "建档时间"); | |
6152 | + cnames.put("buildHospital", "建档机构"); | |
6153 | + cnames.put("fmWeek", "分娩孕周"); | |
6154 | + cnames.put("prodTime", "产次"); | |
6155 | + //户籍地址 | |
6156 | + cnames.put("residence","户籍地"); | |
6157 | + //居住地 | |
6158 | + cnames.put("register", "居住地"); | |
6159 | +// cnames.put("fmHospital","分娩机构"); | |
6160 | +// cnames.put("fmType", "分娩方式"); | |
6161 | +// cnames.put("pregnancyOut", "围产儿情况"); | |
6162 | +// cnames.put("num", "活产数"); | |
6163 | +// cnames.put("sex", "性别"); | |
6164 | +// cnames.put("weight", "出生体重"); | |
6165 | + response.setContentType("application/octet-stream"); | |
6166 | + response.setCharacterEncoding("UTF-8"); | |
6167 | + response.setHeader("Content-Disposition", "attachment;fileName=" + "分娩.xls"); | |
6168 | + ExcelUtil.toExcel(out, datas, cnames); | |
6169 | + } catch (IOException e) { | |
6170 | + e.printStackTrace(); | |
6171 | + } | |
6172 | + } | |
6173 | + | |
6174 | + | |
6175 | + /** | |
6176 | + * 导出一段建档时间内的孕产妇, | |
6177 | + * @param response | |
6178 | + * @param start | |
6179 | + * @param end | |
6180 | + */ | |
6181 | + @RequestMapping(value = "/exportHandleBuildCc", method = RequestMethod.GET) | |
6182 | + @ResponseBody | |
6183 | + public void exportHandleBuildCc(HttpServletResponse response,String start,String end) | |
6184 | + { | |
6185 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
6186 | + //排查本院隐藏建档 | |
6187 | + patientsQuery.setExtEnable(false); | |
6188 | + patientsQuery.setBuildTypeNot(1); | |
6189 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
6190 | + Date startDate1 = DateUtil.parseYMD(start); | |
6191 | + Date endDate1 = DateUtil.getDayLastSecond(DateUtil.parseYMD(end)); | |
6192 | + patientsQuery.setBookbuildingDateStart(startDate1); | |
6193 | + patientsQuery.setBookbuildingDateEnd(endDate1); | |
6194 | + List<Map<String, Object>> datas = new ArrayList<>(); | |
6195 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
6196 | + if (CollectionUtils.isNotEmpty(patientses)) | |
6197 | + { | |
6198 | + for (Patients patients : patientses) | |
6199 | + { | |
6200 | + try | |
6201 | + { | |
6202 | + if (patients.getBookbuildingDate() == null) | |
6203 | + { | |
6204 | + continue; | |
6205 | + } | |
6206 | + Map<String, Object> data = new HashMap<>(); | |
6207 | + String pid = patients.getPid(); | |
6208 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
6209 | + antExChuQuery.setPid(pid); | |
6210 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
6211 | + antExChuQuery.setCheckTimeStart(patients.getBookbuildingDate()); | |
6212 | + antExChuQuery.setCheckTimeEnd(DateUtil.addMonth(patients.getBookbuildingDate(),12)); | |
6213 | + List <AntExChuModel> antExChu = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
6214 | + Integer prodTime = null; | |
6215 | + if (CollectionUtils.isNotEmpty(antExChu)) { | |
6216 | + prodTime = antExChu.get(0).getProdTime(); | |
6217 | + } | |
6218 | + | |
6219 | + data.put("prodTime",prodTime == null ? "-" : prodTime); | |
6220 | + data.put("name",patients.getUsername()); | |
6221 | + data.put("cardNo",patients.getCardNo()); | |
6222 | + data.put("buildDate",DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); | |
6223 | + data.put("buildHospital",organizationService.getOrganization(Integer.parseInt(patients.getHospitalId())).getName()); | |
6224 | + //户籍地址 | |
6225 | + data.put("residence", CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), | |
6226 | + patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); | |
6227 | + //居住地 | |
6228 | + data.put("register", CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
6229 | + patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); | |
6230 | + | |
6231 | + datas.add(data); | |
6232 | + }catch (Exception e) | |
6233 | + { | |
6234 | + | |
6235 | + } | |
6236 | + } | |
6237 | + } | |
6238 | + | |
6239 | + OutputStream out = null; | |
6240 | + try { | |
6241 | + out = response.getOutputStream(); | |
6242 | + Map <String, String> cnames = new LinkedHashMap <>(); | |
6243 | + cnames.put("name", "姓名"); | |
6244 | + cnames.put("cardNo", "身份证号"); | |
6245 | + cnames.put("buildDate", "建档时间"); | |
6246 | + cnames.put("buildHospital", "建档机构"); | |
6247 | + cnames.put("prodTime", "产次"); | |
6248 | + //户籍地址 | |
6249 | + cnames.put("residence","户籍地"); | |
6250 | + //居住地 | |
6251 | + cnames.put("register", "居住地"); | |
6252 | + response.setContentType("application/octet-stream"); | |
6253 | + response.setCharacterEncoding("UTF-8"); | |
6254 | + response.setHeader("Content-Disposition", "attachment;fileName=" + "分娩.xls"); | |
6255 | + ExcelUtil.toExcel(out, datas, cnames); | |
6256 | + } catch (IOException e) { | |
6257 | + e.printStackTrace(); | |
6258 | + } | |
6259 | + } | |
6260 | + | |
6261 | + | |
6262 | + /** | |
6070 | 6263 | * 秦皇岛妇幼孕妇补填血压 |
6071 | 6264 | * @return |
6072 | 6265 | */ |