Commit baf0cfeaeb305ac12fa1441db5f34c5a67ed21b3
1 parent
9713d52dad
Exists in
master
and in
6 other branches
Merge branch 'master' of E:\regional-platform with conflicts.
Showing 4 changed files with 335 additions and 61 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
baf0cfe
| ... | ... | @@ -312,9 +312,6 @@ |
| 312 | 312 | * @param cqSieveQueryRequest |
| 313 | 313 | * @param request |
| 314 | 314 | * @param response |
| 315 | - * | |
| 316 | - * | |
| 317 | - * | |
| 318 | 315 | */ |
| 319 | 316 | @TokenRequired |
| 320 | 317 | @RequestMapping(value = "exportSieveReportExcl", method = RequestMethod.POST) |
| ... | ... | @@ -345,6 +342,19 @@ |
| 345 | 342 | sieveFacade.SieveHistory(startTime, endTime, hospital, provinceId, cityId, areaId); |
| 346 | 343 | } |
| 347 | 344 | |
| 345 | + /** | |
| 346 | + * 产筛导出2.0版 | |
| 347 | + * | |
| 348 | + * @param cqSieveQueryRequest | |
| 349 | + * @param request | |
| 350 | + * @param response | |
| 351 | + */ | |
| 352 | + @RequestMapping(value = "/exportSieve", method = RequestMethod.GET) | |
| 353 | + @TokenRequired | |
| 354 | + public void exportSieve(@Valid CqSieveQueryRequest cqSieveQueryRequest, HttpServletRequest request, HttpServletResponse response) { | |
| 355 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 356 | + sieveFacade.exportSieve(cqSieveQueryRequest, loginState.getId(), response); | |
| 357 | + } | |
| 348 | 358 | |
| 349 | 359 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
baf0cfe
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | import com.lyms.platform.operate.web.result.*; |
| 19 | 19 | import com.lyms.platform.operate.web.service.ITrackDownService; |
| 20 | 20 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| 21 | -import com.lyms.platform.operate.web.worker.DueOrgCountWorker; | |
| 22 | -import com.lyms.platform.operate.web.worker.GravidaVisitHistory; | |
| 23 | 21 | import com.lyms.platform.operate.web.worker.SieveHistory; |
| 24 | 22 | import com.lyms.platform.operate.web.worker.SieveWorker; |
| 25 | 23 | import com.lyms.platform.permission.model.Organization; |
| ... | ... | @@ -35,7 +33,6 @@ |
| 35 | 33 | import org.apache.commons.lang.math.NumberUtils; |
| 36 | 34 | import org.springframework.beans.factory.annotation.Autowired; |
| 37 | 35 | import org.springframework.beans.factory.annotation.Qualifier; |
| 38 | -import org.springframework.data.mongodb.core.MongoTemplate; | |
| 39 | 36 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| 40 | 37 | import org.springframework.stereotype.Component; |
| 41 | 38 | |
| ... | ... | @@ -98,8 +95,6 @@ |
| 98 | 95 | @Autowired |
| 99 | 96 | private AntenatalExaminationFacade antenatalExaminationFacade; |
| 100 | 97 | |
| 101 | - @Autowired | |
| 102 | - private MongoTemplate mongoTemplate; | |
| 103 | 98 | |
| 104 | 99 | /** |
| 105 | 100 | * 增加一条产筛结果记录 |
| ... | ... | @@ -556,7 +551,7 @@ |
| 556 | 551 | if (end > list.size()) { |
| 557 | 552 | end = list.size(); |
| 558 | 553 | } |
| 559 | - listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService, diagnosisService, basicConfigService, mongoTemplate))); | |
| 554 | + listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService, diagnosisService, basicConfigService, usersService, sieveService))); | |
| 560 | 555 | } |
| 561 | 556 | for (Future f : listFuture) { |
| 562 | 557 | try { |
| ... | ... | @@ -973,9 +968,6 @@ |
| 973 | 968 | sieveResultInfo.put("sampleInfoId", sieveResultModel.getSampleInfoId()); |
| 974 | 969 | sieveResultInfo.put("sampleReportId", sieveResultModel.getSampleReportId()); |
| 975 | 970 | |
| 976 | - // 是否已出报告 1-是 2/null-否、打印次数 | |
| 977 | - sieveResultInfo.put("hasReport", sieveResultModel.getHasReport()); | |
| 978 | - sieveResultInfo.put("printSize", sieveResultModel.getPrintSize()); | |
| 979 | 971 | |
| 980 | 972 | String tszhzValue = ""; |
| 981 | 973 | if (StringUtils.isNotEmpty(sieveResultModel.getTszhz()) && sieveResultModel.getTszhzValue() != null && sieveResultModel.getTszhzValue().size() > 0) { |
| ... | ... | @@ -2244,6 +2236,65 @@ |
| 2244 | 2236 | }*/ |
| 2245 | 2237 | } |
| 2246 | 2238 | } |
| 2239 | + | |
| 2240 | + public void exportSieve(CqSieveQueryRequest cqSieveQueryRequest, Integer id, HttpServletResponse response) { | |
| 2241 | + try { | |
| 2242 | + BaseListResponse listResponse = (BaseListResponse) queryList(cqSieveQueryRequest, id, null, false); | |
| 2243 | + | |
| 2244 | + List<SieveListResult> list = listResponse.getData(); | |
| 2245 | + List<Map<String, Object>> datas = new ArrayList<>(); | |
| 2246 | + | |
| 2247 | + if (CollectionUtils.isNotEmpty(list)) { | |
| 2248 | + for (SieveListResult sive : list) { | |
| 2249 | + Map<String, Object> data = new HashMap<>(); | |
| 2250 | + data.put("aoolyHospital", sive.getApplyHospital()); | |
| 2251 | + data.put("versionNo", sive.getNumber()); | |
| 2252 | + data.put("exportTime", sive.getExportTime()); | |
| 2253 | + data.put("highRisk", sive.getZtfxText()); | |
| 2254 | + data.put("collectBloodTime", sive.getCollectionDate()); | |
| 2255 | + data.put("name", sive.getName()); | |
| 2256 | + data.put("age", sive.getAge()); | |
| 2257 | + data.put("collectBloodWeek", sive.getCollectionWeek()); | |
| 2258 | + data.put("birthday", sive.getBirthday()); | |
| 2259 | + data.put("cardNo", sive.getCardNo()); | |
| 2260 | + data.put("placeDomicile", sive.getPlaceDomicile());//com.lyms.platform.common.utils.StringUtils.encryPhone(sive.getRealPhone()) | |
| 2261 | + data.put("residence", sive.getResidence()); | |
| 2262 | + data.put("phone", sive.getPhone()); | |
| 2263 | + data.put("lastMenstrual", sive.getLastMenstrual()); | |
| 2264 | + data.put("dueDate", sive.getDueDate()); | |
| 2265 | + data.put("bScanInfo", sive.getbScanInfo()); | |
| 2266 | + data.put("foundHospital", sive.getFoundHospital()); | |
| 2267 | + datas.add(data); | |
| 2268 | + } | |
| 2269 | + } | |
| 2270 | + OutputStream out = response.getOutputStream(); | |
| 2271 | + Map<String, String> cnames = new LinkedHashMap<>(); | |
| 2272 | + cnames.put("name", "姓名"); | |
| 2273 | + cnames.put("age", "年龄"); | |
| 2274 | + cnames.put("aoolyHospital", "送检医院"); | |
| 2275 | + cnames.put("versionNo", "版本号"); | |
| 2276 | + cnames.put("exportTime", "报告日期"); | |
| 2277 | + cnames.put("highRisk", "整体风险"); | |
| 2278 | + cnames.put("collectBloodTime", "采血日期"); | |
| 2279 | + cnames.put("collectBloodWeek", "采血当天孕周"); | |
| 2280 | + cnames.put("birthday", "出生年月"); | |
| 2281 | + cnames.put("cardNo", "身份证号"); | |
| 2282 | + cnames.put("placeDomicile", "户籍地"); | |
| 2283 | + cnames.put("residence", "现住地址"); | |
| 2284 | + cnames.put("phone", "手机号码"); | |
| 2285 | + cnames.put("lastMenstrual", "末次月经"); | |
| 2286 | + cnames.put("dueDate", "预产期"); | |
| 2287 | + cnames.put("bScanInfo", "B超信息"); | |
| 2288 | + cnames.put("foundHospital", "建档机构"); | |
| 2289 | + response.setContentType("application/octet-stream"); | |
| 2290 | + response.setCharacterEncoding("UTF-8"); | |
| 2291 | + response.setHeader("Content-Disposition", "attachment;fileName=" + "csdata.xls"); | |
| 2292 | + ExcelUtil.toExcel(out, datas, cnames); | |
| 2293 | + } catch (Exception e) { | |
| 2294 | + ExceptionUtils.catchException(e, "产筛导出异常"); | |
| 2295 | + } | |
| 2296 | + } | |
| 2297 | + | |
| 2247 | 2298 | |
| 2248 | 2299 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
View file @
baf0cfe
| ... | ... | @@ -71,6 +71,186 @@ |
| 71 | 71 | //新增产前诊断信息 |
| 72 | 72 | private List<Map<String, String>> dia; |
| 73 | 73 | |
| 74 | + | |
| 75 | + //联系方式 | |
| 76 | + private String phone; | |
| 77 | + | |
| 78 | + //联系方式 | |
| 79 | + private String realPhone; | |
| 80 | + | |
| 81 | + //产前诊断 1 已检查 0 未检查 | |
| 82 | + private String cqStatus; | |
| 83 | + //产前诊断结果 | |
| 84 | + private String cqResult = SPIT; | |
| 85 | + //妊娠结局 | |
| 86 | + private String renShenResult = SPIT; | |
| 87 | + private Integer status; | |
| 88 | + //状态文本 | |
| 89 | + private String statusText; | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 省市区 | |
| 93 | + **/ | |
| 94 | + private String censusAddress; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 血清学筛查 2/无创基因筛查 3/二者都用 | |
| 98 | + */ | |
| 99 | + private String sieveTypeStr; | |
| 100 | + | |
| 101 | + /** | |
| 102 | + * 1/免费 2/自费 | |
| 103 | + */ | |
| 104 | + private String costTypeStr; | |
| 105 | + | |
| 106 | + /** | |
| 107 | + * 1/正式报告 2/重取样报告 3/失败报告 | |
| 108 | + */ | |
| 109 | + private String reportTypeStr; | |
| 110 | + | |
| 111 | + //申请医生 | |
| 112 | + private String applyDoctor; | |
| 113 | + | |
| 114 | + //报告时间 | |
| 115 | + private String exportTime; | |
| 116 | + | |
| 117 | + //标本号 | |
| 118 | + private String number; | |
| 119 | + | |
| 120 | + //采血日期 | |
| 121 | + private String collectionDate; | |
| 122 | + | |
| 123 | + //采血当天孕周 | |
| 124 | + private String collectionWeek; | |
| 125 | + | |
| 126 | + //出生年月 | |
| 127 | + private String birthday; | |
| 128 | + | |
| 129 | + //身份证号码 | |
| 130 | + private String cardNo; | |
| 131 | + | |
| 132 | + //户籍地 | |
| 133 | + private String placeDomicile; | |
| 134 | + | |
| 135 | + //现住地 | |
| 136 | + private String residence; | |
| 137 | + | |
| 138 | + //末次月经 | |
| 139 | + private String lastMenstrual; | |
| 140 | + | |
| 141 | + //预产期 | |
| 142 | + private String dueDate; | |
| 143 | + | |
| 144 | + //B超信息 | |
| 145 | + private String bScanInfo; | |
| 146 | + | |
| 147 | + //建档机构 | |
| 148 | + private String foundHospital; | |
| 149 | + | |
| 150 | + public String getExportTime() { | |
| 151 | + return exportTime; | |
| 152 | + } | |
| 153 | + | |
| 154 | + public void setExportTime(String exportTime) { | |
| 155 | + this.exportTime = exportTime; | |
| 156 | + } | |
| 157 | + | |
| 158 | + public String getCardNo() { | |
| 159 | + return cardNo; | |
| 160 | + } | |
| 161 | + | |
| 162 | + public void setCardNo(String cardNo) { | |
| 163 | + this.cardNo = cardNo; | |
| 164 | + } | |
| 165 | + | |
| 166 | + public String getPlaceDomicile() { | |
| 167 | + return placeDomicile; | |
| 168 | + } | |
| 169 | + | |
| 170 | + public void setPlaceDomicile(String placeDomicile) { | |
| 171 | + this.placeDomicile = placeDomicile; | |
| 172 | + } | |
| 173 | + | |
| 174 | + public String getResidence() { | |
| 175 | + return residence; | |
| 176 | + } | |
| 177 | + | |
| 178 | + public void setResidence(String residence) { | |
| 179 | + this.residence = residence; | |
| 180 | + } | |
| 181 | + | |
| 182 | + public String getLastMenstrual() { | |
| 183 | + return lastMenstrual; | |
| 184 | + } | |
| 185 | + | |
| 186 | + public void setLastMenstrual(String lastMenstrual) { | |
| 187 | + this.lastMenstrual = lastMenstrual; | |
| 188 | + } | |
| 189 | + | |
| 190 | + public String getDueDate() { | |
| 191 | + return dueDate; | |
| 192 | + } | |
| 193 | + | |
| 194 | + public void setDueDate(String dueDate) { | |
| 195 | + this.dueDate = dueDate; | |
| 196 | + } | |
| 197 | + | |
| 198 | + public String getbScanInfo() { | |
| 199 | + return bScanInfo; | |
| 200 | + } | |
| 201 | + | |
| 202 | + public void setbScanInfo(String bScanInfo) { | |
| 203 | + this.bScanInfo = bScanInfo; | |
| 204 | + } | |
| 205 | + | |
| 206 | + public String getFoundHospital() { | |
| 207 | + return foundHospital; | |
| 208 | + } | |
| 209 | + | |
| 210 | + public void setFoundHospital(String foundHospital) { | |
| 211 | + this.foundHospital = foundHospital; | |
| 212 | + } | |
| 213 | + | |
| 214 | + public String getBirthday() { | |
| 215 | + return birthday; | |
| 216 | + } | |
| 217 | + | |
| 218 | + public void setBirthday(String birthday) { | |
| 219 | + this.birthday = birthday; | |
| 220 | + } | |
| 221 | + | |
| 222 | + public String getCollectionWeek() { | |
| 223 | + return collectionWeek; | |
| 224 | + } | |
| 225 | + | |
| 226 | + public void setCollectionWeek(String collectionWeek) { | |
| 227 | + this.collectionWeek = collectionWeek; | |
| 228 | + } | |
| 229 | + | |
| 230 | + public String getCollectionDate() { | |
| 231 | + return collectionDate; | |
| 232 | + } | |
| 233 | + | |
| 234 | + public void setCollectionDate(String collectionDate) { | |
| 235 | + this.collectionDate = collectionDate; | |
| 236 | + } | |
| 237 | + | |
| 238 | + public String getNumber() { | |
| 239 | + return number; | |
| 240 | + } | |
| 241 | + | |
| 242 | + public void setNumber(String number) { | |
| 243 | + this.number = number; | |
| 244 | + } | |
| 245 | + | |
| 246 | + public String getApplyDoctor() { | |
| 247 | + return applyDoctor; | |
| 248 | + } | |
| 249 | + | |
| 250 | + public void setApplyDoctor(String applyDoctor) { | |
| 251 | + this.applyDoctor = applyDoctor; | |
| 252 | + } | |
| 253 | + | |
| 74 | 254 | private Boolean huaDaPushResult; |
| 75 | 255 | |
| 76 | 256 | public Boolean getHuaDaPushResult() { |
| ... | ... | @@ -182,43 +362,6 @@ |
| 182 | 362 | public void setZtfxText(String ztfxText) { |
| 183 | 363 | this.ztfxText = ztfxText; |
| 184 | 364 | } |
| 185 | - | |
| 186 | - //联系方式 | |
| 187 | - private String phone; | |
| 188 | - | |
| 189 | - //联系方式 | |
| 190 | - private String realPhone; | |
| 191 | - | |
| 192 | - //产前诊断 1 已检查 0 未检查 | |
| 193 | - private String cqStatus; | |
| 194 | - //产前诊断结果 | |
| 195 | - private String cqResult = SPIT; | |
| 196 | - //妊娠结局 | |
| 197 | - private String renShenResult = SPIT; | |
| 198 | - private Integer status; | |
| 199 | - //状态文本 | |
| 200 | - private String statusText; | |
| 201 | - | |
| 202 | - /** | |
| 203 | - * 省市区 | |
| 204 | - **/ | |
| 205 | - private String censusAddress; | |
| 206 | - | |
| 207 | - /** | |
| 208 | - * 血清学筛查 2/无创基因筛查 3/二者都用 | |
| 209 | - */ | |
| 210 | - private String sieveTypeStr; | |
| 211 | - | |
| 212 | - /** | |
| 213 | - * 1/免费 2/自费 | |
| 214 | - */ | |
| 215 | - private String costTypeStr; | |
| 216 | - | |
| 217 | - /** | |
| 218 | - * 1/正式报告 2/重取样报告 3/失败报告 | |
| 219 | - */ | |
| 220 | - private String reportTypeStr; | |
| 221 | - | |
| 222 | 365 | |
| 223 | 366 | public String getCensusAddress() { |
| 224 | 367 | return censusAddress; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker.java
View file @
baf0cfe
| ... | ... | @@ -3,28 +3,21 @@ |
| 3 | 3 | import com.lyms.platform.biz.service.*; |
| 4 | 4 | import com.lyms.platform.common.enums.YnEnums; |
| 5 | 5 | import com.lyms.platform.common.utils.DateUtil; |
| 6 | +import com.lyms.platform.common.utils.DefenceUtils; | |
| 6 | 7 | import com.lyms.platform.operate.web.result.SieveListResult; |
| 7 | 8 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| 8 | 9 | import com.lyms.platform.permission.model.Organization; |
| 9 | 10 | import com.lyms.platform.permission.service.OrganizationService; |
| 11 | +import com.lyms.platform.permission.service.UsersService; | |
| 10 | 12 | import com.lyms.platform.pojo.*; |
| 11 | -import com.lyms.platform.query.AntExChuQuery; | |
| 12 | -import com.lyms.platform.query.AntExQuery; | |
| 13 | -import com.lyms.platform.query.DiagnosisQuery; | |
| 14 | -import com.lyms.platform.query.ReferralApplyOrderQuery; | |
| 13 | +import com.lyms.platform.query.*; | |
| 15 | 14 | import org.apache.commons.collections.CollectionUtils; |
| 16 | 15 | import org.apache.commons.lang.StringUtils; |
| 17 | 16 | import org.apache.commons.lang.math.NumberUtils; |
| 18 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 19 | 18 | import org.springframework.data.domain.Sort; |
| 20 | -import org.springframework.data.mongodb.core.MongoTemplate; | |
| 21 | -import org.springframework.data.mongodb.core.query.Criteria; | |
| 22 | -import org.springframework.data.mongodb.core.query.Query; | |
| 23 | 19 | |
| 24 | -import java.util.ArrayList; | |
| 25 | -import java.util.HashMap; | |
| 26 | -import java.util.List; | |
| 27 | -import java.util.Map; | |
| 20 | +import java.util.*; | |
| 28 | 21 | import java.util.concurrent.Callable; |
| 29 | 22 | |
| 30 | 23 | /** |
| 31 | 24 | |
| ... | ... | @@ -48,10 +41,13 @@ |
| 48 | 41 | private DiagnosisService diagnosisService; |
| 49 | 42 | private BasicConfigService basicConfigService; |
| 50 | 43 | |
| 44 | + private SieveService sieveService; | |
| 45 | + | |
| 51 | 46 | private MongoTemplate mongoTemplate; |
| 52 | 47 | |
| 53 | 48 | public SieveWorker(String hospitalId, List<SieveModel> list, AntenatalExaminationService antService, |
| 54 | 49 | PatientsService patientsService, ApplyOrderService applyOrderService, |
| 50 | + OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService, UsersService usersService, SieveService sieveService) { | |
| 55 | 51 | OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService, MongoTemplate mongoTemplate) { |
| 56 | 52 | this.hospitalId = hospitalId; |
| 57 | 53 | this.list = list; |
| 58 | 54 | |
| ... | ... | @@ -61,12 +57,22 @@ |
| 61 | 57 | this.organizationService = organizationService; |
| 62 | 58 | this.diagnosisService = diagnosisService; |
| 63 | 59 | this.basicConfigService = basicConfigService; |
| 60 | + this.usersService = usersService; | |
| 61 | + this.sieveService = sieveService; | |
| 64 | 62 | this.mongoTemplate = mongoTemplate; |
| 65 | 63 | } |
| 66 | 64 | |
| 67 | 65 | @Override |
| 68 | 66 | public List<SieveListResult> call() throws Exception { |
| 69 | 67 | List<SieveListResult> results = new ArrayList<>(); |
| 68 | + Map<String, String> data = new HashMap<>(); | |
| 69 | + data.put("1", "单胎"); | |
| 70 | + data.put("2", "双胎"); | |
| 71 | + data.put("3", "多胎"); | |
| 72 | + data.put("4", "异常(单胎)"); | |
| 73 | + data.put("5", "异常(双胎)"); | |
| 74 | + data.put("6", "异常(多胎)"); | |
| 75 | + data.put("7", "减胎"); | |
| 70 | 76 | for (SieveModel sieveModel : list) { |
| 71 | 77 | SieveListResult sieveListResult = new SieveListResult(); |
| 72 | 78 | sieveListResult.setReviceStatus(sieveModel.getReviceStatus()); |
| ... | ... | @@ -74,6 +80,45 @@ |
| 74 | 80 | antExQuery.setYn(YnEnums.YES.getId()); |
| 75 | 81 | antExQuery.setHospitalId(hospitalId); |
| 76 | 82 | antExQuery.setParentId(sieveModel.getParentId()); |
| 83 | + | |
| 84 | + | |
| 85 | + //获取产筛申请数据 | |
| 86 | + SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
| 87 | + sieveApplyOrderQuery.setSort("created descc"); | |
| 88 | + sieveApplyOrderQuery.setParentId(sieveModel.getParentId()); | |
| 89 | + sieveApplyOrderQuery.setHospitalId(sieveModel.getHospitalId()); | |
| 90 | + sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); | |
| 91 | + | |
| 92 | + //查询报告出具时间 | |
| 93 | + SieveResultQuery sieveResultQuery = new SieveResultQuery(); | |
| 94 | + sieveResultQuery.setSort("created descc"); | |
| 95 | + sieveResultQuery.setParentId(sieveModel.getParentId()); | |
| 96 | + sieveResultQuery.setYn(YnEnums.YES.getId()); | |
| 97 | + List<SieveResultModel> resultModels = sieveService.queryListSieveResult(sieveResultQuery); | |
| 98 | + if (CollectionUtils.isNotEmpty(resultModels)) { | |
| 99 | + SieveResultModel resultModel = resultModels.get(0); | |
| 100 | + sieveListResult.setExportTime(DateUtil.getyyyy_MM_dd(resultModel.getResultTime())); | |
| 101 | + } | |
| 102 | + List<SieveApplyOrderModel> applyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
| 103 | + //采血日期 | |
| 104 | + Date collectionDate = null; | |
| 105 | + if (CollectionUtils.isNotEmpty(applyOrderModels)) { | |
| 106 | + SieveApplyOrderModel sieveApplyOrderModel = applyOrderModels.get(0); | |
| 107 | + //送检医生 | |
| 108 | + sieveListResult.setApplyDoctor(StringUtils.isNotEmpty(sieveApplyOrderModel.getApplyDoctor()) ? usersService.getUsers(Integer.valueOf(sieveApplyOrderModel.getApplyDoctor())).getName() : "--"); | |
| 109 | + //版本号 | |
| 110 | + sieveListResult.setNumber(sieveApplyOrderModel.getNumber()); | |
| 111 | + //采血日期 | |
| 112 | + sieveListResult.setCollectionDate(DateUtil.getyyyy_MM_dd(sieveApplyOrderModel.getCollectionDate())); | |
| 113 | + collectionDate = sieveApplyOrderModel.getCollectionDate(); | |
| 114 | + //B超信息 | |
| 115 | + //血清 | |
| 116 | + if ("1".equals(sieveApplyOrderModel.getSieveType())) { | |
| 117 | + sieveListResult.setbScanInfo(sieveApplyOrderModel.getBpd() + "," + sieveApplyOrderModel.getCrl()); | |
| 118 | + } else if ("2".equals(sieveApplyOrderModel.getSieveType())) { | |
| 119 | + sieveListResult.setbScanInfo(StringUtils.isNotEmpty(sieveApplyOrderModel.getFetusNum()) ? data.get(sieveApplyOrderModel.getFetusNum()) : "--"); | |
| 120 | + } | |
| 121 | + } | |
| 77 | 122 | List<AntenatalExaminationModel> list1 = antService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); |
| 78 | 123 | if (CollectionUtils.isNotEmpty(list1)) { |
| 79 | 124 | if (StringUtils.isNotEmpty(list1.get(0).getTireNumber())) { |
| ... | ... | @@ -93,6 +138,8 @@ |
| 93 | 138 | } |
| 94 | 139 | |
| 95 | 140 | sieveListResult.convertToResult(sieveModel); |
| 141 | + | |
| 142 | + | |
| 96 | 143 | Patients patients = patientsService.findOnePatientById(sieveModel.getParentId()); |
| 97 | 144 | if (null != patients) { |
| 98 | 145 | sieveListResult.setIsGravida((patients.getType() == 3 && patients.getFmDate() != null) ? "0" : "1"); |
| ... | ... | @@ -102,6 +149,29 @@ |
| 102 | 149 | sieveListResult.setcDueWeek("已分娩"); |
| 103 | 150 | } |
| 104 | 151 | sieveListResult.setAge(DateUtil.getAge(patients.getBirth()) + "岁"); |
| 152 | + //采血当天孕周 | |
| 153 | + sieveListResult.setCollectionWeek(collectionDate != null ? DateUtil.getWeekDesc(patients.getLastMenses(), collectionDate) : "--"); | |
| 154 | + //出生年月日 | |
| 155 | + sieveListResult.setBirthday(DateUtil.getyyyy_MM_dd(patients.getBirth())); | |
| 156 | + //身份证号码 | |
| 157 | + sieveListResult.setCardNo(DefenceUtils.getCardNo(patients.getCardNo())); | |
| 158 | + //电话号码 | |
| 159 | + sieveListResult.setPhone(DefenceUtils.getPhone(patients.getPhone())); | |
| 160 | + //户籍地 | |
| 161 | + sieveListResult.setPlaceDomicile(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), | |
| 162 | + patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); | |
| 163 | + | |
| 164 | + //居住地 | |
| 165 | + sieveListResult.setResidence(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
| 166 | + patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); | |
| 167 | + //末次月经 | |
| 168 | + sieveListResult.setLastMenstrual(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
| 169 | + Date dueDate = DateUtil.addDay(DateUtil.addMonth(patients.getLastMenses(), 9), 7); | |
| 170 | + //预产期 | |
| 171 | + sieveListResult.setDueDate(DateUtil.getyyyy_MM_dd(dueDate)); | |
| 172 | + //建档机构 | |
| 173 | + sieveListResult.setFoundHospital(StringUtils.isNotEmpty(patients.getHospitalId()) ? organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName() : "--"); | |
| 174 | + | |
| 105 | 175 | } |
| 106 | 176 | |
| 107 | 177 | //转诊状态 0转诊 1待接收 2已转出 |