Commit 75d14c4b339566fdc214b4ba0cd7e49cd4130bad
1 parent
6cde518072
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 157 additions and 139 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
75d14c4
| ... | ... | @@ -157,11 +157,11 @@ |
| 157 | 157 | public void addOrUpdateSieveModel(SieveAddRequest sieveAddRequest, Integer userId, SieveResultModel sieveResultModel) { |
| 158 | 158 | SieveQuery sieveQuery = new SieveQuery(); |
| 159 | 159 | sieveQuery.setParentId(sieveAddRequest.getParentId()); |
| 160 | - if(StringUtils.isNotEmpty(sieveAddRequest.getLymsSieveId())){ | |
| 160 | + if (StringUtils.isNotEmpty(sieveAddRequest.getLymsSieveId())) { | |
| 161 | 161 | sieveQuery.setId(sieveAddRequest.getLymsSieveId()); |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - if(StringUtils.isNotEmpty(sieveAddRequest.getSiveType())){ | |
| 164 | + if (StringUtils.isNotEmpty(sieveAddRequest.getSiveType())) { | |
| 165 | 165 | sieveQuery.setSieveType(sieveAddRequest.getSiveType()); |
| 166 | 166 | } |
| 167 | 167 | sieveQuery.setYn(YnEnums.YES.getId()); |
| 168 | 168 | |
| 169 | 169 | |
| ... | ... | @@ -467,18 +467,15 @@ |
| 467 | 467 | sieveQuery.setName(cqSieveQueryRequest.getName()); |
| 468 | 468 | sieveQuery.setCardNo(cqSieveQueryRequest.getCardNo()); |
| 469 | 469 | |
| 470 | - if (StringUtils.isNotEmpty(cqSieveQueryRequest.getVcCardNo())) | |
| 471 | - { | |
| 470 | + if (StringUtils.isNotEmpty(cqSieveQueryRequest.getVcCardNo())) { | |
| 472 | 471 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 473 | 472 | patientsQuery.setHospitalId(hospitalId); |
| 474 | 473 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 475 | 474 | patientsQuery.setVcCardNo(cqSieveQueryRequest.getVcCardNo()); |
| 476 | 475 | List<Patients> localPatients = patientsService.queryPatient(patientsQuery); |
| 477 | - if (CollectionUtils.isNotEmpty(localPatients)) | |
| 478 | - { | |
| 476 | + if (CollectionUtils.isNotEmpty(localPatients)) { | |
| 479 | 477 | List<String> ids = new ArrayList<>(); |
| 480 | - for (Patients pat : localPatients) | |
| 481 | - { | |
| 478 | + for (Patients pat : localPatients) { | |
| 482 | 479 | ids.add(pat.getId()); |
| 483 | 480 | } |
| 484 | 481 | sieveQuery.setParentIds(ids); |
| ... | ... | @@ -968,6 +965,7 @@ |
| 968 | 965 | |
| 969 | 966 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(patientBaseResult); |
| 970 | 967 | } |
| 968 | + | |
| 971 | 969 | public BaseResponse querySievePatientInfo(String cardNo, String vcCardNo, Integer userId) { |
| 972 | 970 | |
| 973 | 971 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| ... | ... | @@ -1011,7 +1009,7 @@ |
| 1011 | 1009 | |
| 1012 | 1010 | /* |
| 1013 | 1011 | 20200608 产筛修改 wtt ,去掉已申请过产筛限制,可以多次申请产筛*/ |
| 1014 | - SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); | |
| 1012 | + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); | |
| 1015 | 1013 | sieveApplyOrderQuery1.setParentId(pat.getId()); |
| 1016 | 1014 | sieveApplyOrderQuery1.setHospitalId(hospitalId); |
| 1017 | 1015 | sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); |
| ... | ... | @@ -1175,7 +1173,7 @@ |
| 1175 | 1173 | result.put("patientID", sieveApply.getPatientID()); |
| 1176 | 1174 | result.put("applicationNo", sieveApply.getApplicationNo()); |
| 1177 | 1175 | result.put("smoking", sieveApply.getSmoking()); |
| 1178 | - if(sieveApply.getInsulin()!=null){ | |
| 1176 | + if (sieveApply.getInsulin() != null) { | |
| 1179 | 1177 | result.put("insulin", sieveApply.getInsulin().toString()); |
| 1180 | 1178 | } |
| 1181 | 1179 | result.put("hC", sieveApply.gethC()); |
| 1182 | 1180 | |
| 1183 | 1181 | |
| ... | ... | @@ -1190,14 +1188,14 @@ |
| 1190 | 1188 | result.put("transferDate", DateUtil.getyyyy_MM_dd(sieveApply.getTransferDate())); |
| 1191 | 1189 | result.put("donorBirthDate", DateUtil.getyyyy_MM_dd(sieveApply.getDonorBirthDate())); |
| 1192 | 1190 | result.put("nasalBone", sieveApply.getNasalBone()); |
| 1193 | - if(sieveApply.getMonozygous()!=null){ | |
| 1191 | + if (sieveApply.getMonozygous() != null) { | |
| 1194 | 1192 | result.put("monozygous", sieveApply.getMonozygous().toString()); |
| 1195 | 1193 | } |
| 1196 | 1194 | result.put("patientType", sieveApply.getPatientType()); |
| 1197 | - if( pat!= null && StringUtils.isEmpty(sieveApply.getCaiyangyunzhou())){ | |
| 1198 | - yunZhouMth(sieveApply,pat); | |
| 1195 | + if (pat != null && StringUtils.isEmpty(sieveApply.getCaiyangyunzhou())) { | |
| 1196 | + yunZhouMth(sieveApply, pat); | |
| 1199 | 1197 | result.put("caiyangyunzhou", sieveApply.getCaiyangyunzhou()); |
| 1200 | - }else { | |
| 1198 | + } else { | |
| 1201 | 1199 | result.put("caiyangyunzhou", sieveApply.getCaiyangyunzhou()); |
| 1202 | 1200 | } |
| 1203 | 1201 | result.put("id", sieveApply.getId()); |
| 1204 | 1202 | |
| ... | ... | @@ -1240,10 +1238,10 @@ |
| 1240 | 1238 | result.put("fetusNum", sieveApply.getFetusNum()); |
| 1241 | 1239 | result.put("fetusAbnormalInfo", sieveApply.getFetusAbnormalInfo()); |
| 1242 | 1240 | result.put("sieveModel", sieveApply.getSieveModel()); |
| 1243 | - if(pat!=null && StringUtils.isEmpty(sieveApply.getUltrasonicNtWeek())){ | |
| 1244 | - yunZhouMth(sieveApply,pat); | |
| 1241 | + if (pat != null && StringUtils.isEmpty(sieveApply.getUltrasonicNtWeek())) { | |
| 1242 | + yunZhouMth(sieveApply, pat); | |
| 1245 | 1243 | result.put("ultrasonicNtWeek", sieveApply.getUltrasonicNtWeek()); |
| 1246 | - }else { | |
| 1244 | + } else { | |
| 1247 | 1245 | result.put("ultrasonicNtWeek", sieveApply.getUltrasonicNtWeek()); |
| 1248 | 1246 | } |
| 1249 | 1247 | result.put("ultrasonicNtVal", sieveApply.getUltrasonicNtVal()); |
| 1250 | 1248 | |
| 1251 | 1249 | |
| ... | ... | @@ -1333,15 +1331,15 @@ |
| 1333 | 1331 | sieveResultInfo.put("sampleReportId", sieveResultModel.getSampleReportId()); |
| 1334 | 1332 | sieveResultInfo.put("hasReport", sieveResultModel.getHasReport()); |
| 1335 | 1333 | |
| 1336 | - sieveResultInfo.put("uE3",sieveResultModel.getuE3() != null ? sieveResultModel.getuE3() + "ng/ml" : ""); | |
| 1337 | - sieveResultInfo.put("uE3Mom",sieveResultModel.getuE3Mom() != null ? sieveResultModel.getuE3Mom() : ""); | |
| 1338 | - if(sieveResultModel.getTszhzValue()!=null && !sieveResultModel.getTszhzValue().isEmpty()){//21-三体 | |
| 1334 | + sieveResultInfo.put("uE3", sieveResultModel.getuE3() != null ? sieveResultModel.getuE3() + "ng/ml" : ""); | |
| 1335 | + sieveResultInfo.put("uE3Mom", sieveResultModel.getuE3Mom() != null ? sieveResultModel.getuE3Mom() : ""); | |
| 1336 | + if (sieveResultModel.getTszhzValue() != null && !sieveResultModel.getTszhzValue().isEmpty()) {//21-三体 | |
| 1339 | 1337 | sieveResultInfo.put("tszhzValue", sieveResultModel.getTszhzValue()); |
| 1340 | 1338 | } |
| 1341 | - if(sieveResultModel.getSbstValue()!=null &&!sieveResultModel.getSbstValue().isEmpty()){//18-三体 | |
| 1339 | + if (sieveResultModel.getSbstValue() != null && !sieveResultModel.getSbstValue().isEmpty()) {//18-三体 | |
| 1342 | 1340 | sieveResultInfo.put("sbstValue", sieveResultModel.getSbstValue()); |
| 1343 | 1341 | } |
| 1344 | - if(sieveResultModel.getStzhz13Value()!=null &&!sieveResultModel.getStzhz13Value().isEmpty()){// 神经管畸形 NTD | |
| 1342 | + if (sieveResultModel.getStzhz13Value() != null && !sieveResultModel.getStzhz13Value().isEmpty()) {// 神经管畸形 NTD | |
| 1345 | 1343 | sieveResultInfo.put("stzhz13Value", sieveResultModel.getStzhz13Value()); |
| 1346 | 1344 | } |
| 1347 | 1345 | |
| ... | ... | @@ -1372,6 +1370,9 @@ |
| 1372 | 1370 | String valueTwo = sieveResultModel.getSjgjxValue().get("valueTwo"); |
| 1373 | 1371 | sjgjx = valueOne + "/" + valueTwo + ("0".equals(sieveResultModel.getSjgjx()) ? "低风险" : "1".equals(sieveResultModel.getSjgjx()) ? "临界值" : "高风险"); |
| 1374 | 1372 | } |
| 1373 | + if("".equals(sjgjx)){ | |
| 1374 | + sjgjx = sieveResultModel.getSjgjx(); | |
| 1375 | + } | |
| 1375 | 1376 | sieveResultInfo.put("sjgjx", sjgjx); |
| 1376 | 1377 | |
| 1377 | 1378 | String stzhz13 = ""; |
| 1378 | 1379 | |
| 1379 | 1380 | |
| ... | ... | @@ -1396,14 +1397,15 @@ |
| 1396 | 1397 | |
| 1397 | 1398 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(map); |
| 1398 | 1399 | } |
| 1400 | + | |
| 1399 | 1401 | private void yunZhouMth(SieveApplyOrderModel sieveApplyOrderModel, Patients p) { |
| 1400 | 1402 | //打印需要 根据采样时间算出采样孕周 |
| 1401 | - if(sieveApplyOrderModel.getCollectionDate()!=null && p.getLastMenses()!=null){ | |
| 1402 | - sieveApplyOrderModel.setCaiyangyunzhou(DateUtil.getWeekDesc(p.getLastMenses(),sieveApplyOrderModel.getCollectionDate())); | |
| 1403 | + if (sieveApplyOrderModel.getCollectionDate() != null && p.getLastMenses() != null) { | |
| 1404 | + sieveApplyOrderModel.setCaiyangyunzhou(DateUtil.getWeekDesc(p.getLastMenses(), sieveApplyOrderModel.getCollectionDate())); | |
| 1403 | 1405 | } |
| 1404 | 1406 | // 根据B超时间算出B超孕周 |
| 1405 | - if(sieveApplyOrderModel.getBcCheckDate()!=null && p.getLastMenses()!=null){ | |
| 1406 | - sieveApplyOrderModel.setUltrasonicNtWeek(DateUtil.getWeekDesc(p.getLastMenses(),sieveApplyOrderModel.getBcCheckDate())); | |
| 1407 | + if (sieveApplyOrderModel.getBcCheckDate() != null && p.getLastMenses() != null) { | |
| 1408 | + sieveApplyOrderModel.setUltrasonicNtWeek(DateUtil.getWeekDesc(p.getLastMenses(), sieveApplyOrderModel.getBcCheckDate())); | |
| 1407 | 1409 | } |
| 1408 | 1410 | } |
| 1409 | 1411 | |
| 1410 | 1412 | |
| 1411 | 1413 | |
| 1412 | 1414 | |
| 1413 | 1415 | |
| 1414 | 1416 | |
| 1415 | 1417 | |
| 1416 | 1418 | |
| 1417 | 1419 | |
| ... | ... | @@ -2727,90 +2729,97 @@ |
| 2727 | 2729 | |
| 2728 | 2730 | if (CollectionUtils.isNotEmpty(list)) { |
| 2729 | 2731 | for (SieveListResult2 sive : list) { |
| 2730 | - Map<String, Object> data = new HashMap<>(); | |
| 2731 | - if(StringUtils.isEmpty(sive.getNumber())){ | |
| 2732 | - continue; | |
| 2733 | - } | |
| 2734 | - data.put("ApplicationNo", "");//新增 | |
| 2735 | - data.put("SampleID", sive.getNumber());//样本号(标本号) | |
| 2736 | - data.put("LastName", sive.getName());//姓名 | |
| 2737 | - data.put("FirstName", "");//姓名2 | |
| 2738 | - data.put("PatientID", sive.getPatientID());//孕妇编号 | |
| 2739 | -// data.put("ApplicationNo", sive.getPatientID());//申请单号 | |
| 2740 | - data.put("BirthDate", sive.getBirthday());//生日 | |
| 2741 | -// data.put("Address", sive.getPlaceDomicile());//地址 | |
| 2742 | - data.put("Address", "");//地址 | |
| 2743 | - data.put("Phone", sive.getPhone());//电话 | |
| 2744 | 2732 | try { |
| 2745 | - if(sive.getNoOfFetuses() == null || sive.getNoOfFetuses()==0 ){ | |
| 2733 | + Map<String, Object> data = new HashMap<>(); | |
| 2734 | + if (StringUtils.isEmpty(sive.getNumber())) { | |
| 2735 | + continue; | |
| 2736 | + } | |
| 2737 | + data.put("ApplicationNo", "");//新增 | |
| 2738 | + data.put("SampleID", sive.getNumber());//样本号(标本号) | |
| 2739 | + data.put("LastName", sive.getName());//姓名 | |
| 2740 | + data.put("FirstName", "");//姓名2 | |
| 2741 | + data.put("PatientID", sive.getPatientID());//孕妇编号 | |
| 2742 | + // data.put("ApplicationNo", sive.getPatientID());//申请单号 | |
| 2743 | + data.put("BirthDate", sive.getBirthday());//生日 | |
| 2744 | + // data.put("Address", sive.getPlaceDomicile());//地址 | |
| 2745 | + data.put("Address", "");//地址 | |
| 2746 | + data.put("Phone", sive.getPhone());//电话 | |
| 2747 | + try { | |
| 2748 | + if (sive.getNoOfFetuses() == null || sive.getNoOfFetuses() == 0) { | |
| 2749 | + data.put("NoOfFetuses", 1); | |
| 2750 | + } else { | |
| 2751 | + data.put("NoOfFetuses", sive.getNoOfFetuses());//胎儿数(胎数) | |
| 2752 | + } | |
| 2753 | + } catch (Exception e) { | |
| 2754 | + e.printStackTrace(); | |
| 2746 | 2755 | data.put("NoOfFetuses", 1); |
| 2747 | - }else { | |
| 2748 | - data.put("NoOfFetuses", sive.getNoOfFetuses());//胎儿数(胎数) | |
| 2749 | 2756 | } |
| 2750 | - } catch (Exception e) { | |
| 2751 | - e.printStackTrace(); | |
| 2752 | - data.put("NoOfFetuses",1); | |
| 2753 | - } | |
| 2754 | - data.put("LMPDate", sive.getLastMenstrual());//末次月经必填 | |
| 2757 | + data.put("LMPDate", sive.getLastMenstrual());//末次月经必填 | |
| 2755 | 2758 | |
| 2756 | - try { | |
| 2757 | - if(sive.getSmoking() == 0 || sive.getSmoking() == 1){ | |
| 2758 | - data.put("Smoking", sive.getSmoking());//吸烟 | |
| 2759 | - }else { | |
| 2760 | - data.put("Smoking", 0);//吸烟 | |
| 2759 | + try { | |
| 2760 | + if (sive.getSmoking() == 0 || sive.getSmoking() == 1) { | |
| 2761 | + data.put("Smoking", sive.getSmoking());//吸烟 | |
| 2762 | + } else { | |
| 2763 | + data.put("Smoking", 0);//吸烟 | |
| 2764 | + } | |
| 2765 | + } catch (Exception e) { | |
| 2766 | + data.put("Smoking", 0); | |
| 2761 | 2767 | } |
| 2762 | - } catch (Exception e) { | |
| 2763 | - data.put("Smoking", 0); | |
| 2764 | - } | |
| 2765 | 2768 | |
| 2766 | 2769 | |
| 2767 | - data.put("Weight", sive.getWeight());//体重 | |
| 2768 | - data.put("Insulin", sive.getInsulin());//I-型糖尿病 | |
| 2769 | - data.put("CollectionDate", sive.getCollectionDate());//采样日期(采血日期) | |
| 2770 | - data.put("ReceivedDate", sive.getSendTime());//送检日期 | |
| 2771 | - data.put("ScanDate", sive.getBcCheckDate());//B超日期(B超检查日期)必填 | |
| 2772 | - if(StringUtils.isNotEmpty(sive.getCrl()) && !" ".equals(sive.getCrl()) ){ | |
| 2773 | - Integer crl = Integer.parseInt(sive.getCrl()); | |
| 2774 | - crl = (crl * 10); | |
| 2775 | - data.put("CRL", crl.toString());//B超信息 CRL | |
| 2776 | - } | |
| 2777 | - if(StringUtils.isNotEmpty(sive.getBpd()) && !" ".equals(sive.getBpd()) ){ | |
| 2778 | - Integer bpdint = Integer.parseInt(sive.getBpd()); | |
| 2779 | - bpdint = (bpdint * 10); | |
| 2780 | - data.put("BPD", bpdint.toString());//B超信息 bpd | |
| 2781 | - } | |
| 2782 | - if(sive.gethC() !=null && sive.gethC()!=0){ | |
| 2783 | - data.put("HC", sive.gethC() * 10); | |
| 2784 | - } | |
| 2785 | - data.put("NasalBone", sive.getNasalBone());//鼻骨 | |
| 2786 | - data.put("MannualEntry", sive.getMannualEntry());//B超孕天 | |
| 2770 | + data.put("Weight", sive.getWeight());//体重 | |
| 2771 | + data.put("Insulin", sive.getInsulin());//I-型糖尿病 | |
| 2772 | + data.put("CollectionDate", sive.getCollectionDate());//采样日期(采血日期) | |
| 2773 | + data.put("ReceivedDate", sive.getSendTime());//送检日期 | |
| 2774 | + data.put("ScanDate", sive.getBcCheckDate());//B超日期(B超检查日期)必填 | |
| 2787 | 2775 | |
| 2788 | - if(sive.getnT() !=null && sive.getnT()!=0){ | |
| 2789 | - data.put("NT", sive.getnT() * 10); | |
| 2790 | - } | |
| 2791 | - data.put("ResponsibleCode", sive.getResponsibleCode());//送检单位编号(送检医院) | |
| 2792 | - data.put("T21", sive.getT21());//既往T21 | |
| 2793 | - data.put("T18", sive.getT18());//既往T18 | |
| 2794 | - data.put("NTD", sive.getnTD());//既往NTD | |
| 2795 | - data.put("ARMethod", sive.getaRMethod());//辅助生殖方法 | |
| 2796 | - data.put("ExtractionDate", sive.getExtractionDate());//辅助生殖之提取日期 | |
| 2797 | - data.put("TransferDate", sive.getTransferDate());//辅助生殖之移植日期 | |
| 2798 | - data.put("DonorBirthDate", sive.getDonorBirthDate());//辅助生殖之捐赠者生日 | |
| 2799 | - data.put("PatientType", sive.getPatientType());//孕妇筛查类型PatientType | |
| 2800 | - data.put("Monozygous", sive.getMonozygous());//单卵 | |
| 2801 | - data.put("RecordID", "");//新增 | |
| 2802 | - /* data.put("Ethnicity", sive.getEthnicity());//种族(名族) | |
| 2803 | - data.put("IdCard", sive.getCardNo());//身份证号 | |
| 2804 | - */ | |
| 2805 | - if(StringUtils.isEmpty(sive.getSieveApplyOrderModelId())){ | |
| 2776 | + if (StringUtils.isNotEmpty(sive.getCrl()) && !" ".equals(sive.getCrl())) { | |
| 2777 | + Double crl = Double.parseDouble(sive.getCrl()); | |
| 2778 | + crl = (crl * 10); | |
| 2779 | + data.put("CRL", crl.toString());//B超信息 CRL | |
| 2780 | + } | |
| 2781 | + if (StringUtils.isNotEmpty(sive.getBpd()) && !" ".equals(sive.getBpd())) { | |
| 2782 | + Double bpdint = Double.parseDouble(sive.getBpd().trim()); | |
| 2783 | + bpdint = (bpdint * 10); | |
| 2784 | + data.put("BPD", bpdint.toString());//B超信息 bpd | |
| 2785 | + } | |
| 2786 | + if (sive.gethC() != null && sive.gethC() != 0) { | |
| 2787 | + data.put("HC", sive.gethC() * 10); | |
| 2788 | + } | |
| 2789 | + data.put("NasalBone", sive.getNasalBone());//鼻骨 | |
| 2790 | + data.put("MannualEntry", sive.getMannualEntry());//B超孕天 | |
| 2791 | + | |
| 2792 | + if (sive.getnT() != null && sive.getnT() != 0) { | |
| 2793 | + data.put("NT", sive.getnT() * 10); | |
| 2794 | + } | |
| 2795 | + data.put("ResponsibleCode", sive.getResponsibleCode());//送检单位编号(送检医院) | |
| 2796 | + data.put("T21", sive.getT21());//既往T21 | |
| 2797 | + data.put("T18", sive.getT18());//既往T18 | |
| 2798 | + data.put("NTD", sive.getnTD());//既往NTD | |
| 2799 | + data.put("ARMethod", sive.getaRMethod());//辅助生殖方法 | |
| 2800 | + data.put("ExtractionDate", sive.getExtractionDate());//辅助生殖之提取日期 | |
| 2801 | + data.put("TransferDate", sive.getTransferDate());//辅助生殖之移植日期 | |
| 2802 | + data.put("DonorBirthDate", sive.getDonorBirthDate());//辅助生殖之捐赠者生日 | |
| 2803 | + data.put("PatientType", sive.getPatientType());//孕妇筛查类型PatientType | |
| 2804 | + data.put("Monozygous", sive.getMonozygous());//单卵 | |
| 2805 | + data.put("RecordID", "");//新增 | |
| 2806 | + /* data.put("Ethnicity", sive.getEthnicity());//种族(名族) | |
| 2807 | + data.put("IdCard", sive.getCardNo());//身份证号 | |
| 2808 | + */ | |
| 2809 | + if (StringUtils.isEmpty(sive.getSieveApplyOrderModelId())) { | |
| 2810 | + continue; | |
| 2811 | + } | |
| 2812 | + SieveApplyOrderModel sieveApplyOrderModel = new SieveApplyOrderModel(); | |
| 2813 | + sieveApplyOrderModel.setId(sive.getSieveApplyOrderModelId()); | |
| 2814 | + sieveApplyOrderModel.setIeStatus(1);//1导出,没有该字段没有导出 | |
| 2815 | + applyOrderService.updateSieve(sieveApplyOrderModel); | |
| 2816 | + | |
| 2817 | + datas.add(data); | |
| 2818 | + | |
| 2819 | + } catch (NumberFormatException e) { | |
| 2820 | + e.printStackTrace(); | |
| 2806 | 2821 | continue; |
| 2807 | 2822 | } |
| 2808 | - SieveApplyOrderModel sieveApplyOrderModel = new SieveApplyOrderModel(); | |
| 2809 | - sieveApplyOrderModel.setId(sive.getSieveApplyOrderModelId()); | |
| 2810 | - sieveApplyOrderModel.setIeStatus(1);//1导出,没有该字段没有导出 | |
| 2811 | - applyOrderService.updateSieve(sieveApplyOrderModel); | |
| 2812 | - | |
| 2813 | - datas.add(data); | |
| 2814 | 2823 | } |
| 2815 | 2824 | } |
| 2816 | 2825 | OutputStream out = response.getOutputStream(); |
| ... | ... | @@ -2869,6 +2878,7 @@ |
| 2869 | 2878 | |
| 2870 | 2879 | /** |
| 2871 | 2880 | * 功能描述 产筛导入3.0版 血清学筛查 excle 2003 |
| 2881 | + * | |
| 2872 | 2882 | * @author 武涛涛 |
| 2873 | 2883 | * @date 2020/6/15 |
| 2874 | 2884 | */ |
| ... | ... | @@ -2903,7 +2913,7 @@ |
| 2903 | 2913 | } |
| 2904 | 2914 | list.add(importResult); |
| 2905 | 2915 | //1 根据标本号更新数据 |
| 2906 | - if (StringUtils.isEmpty(importResult.get样本编号()) ) { | |
| 2916 | + if (StringUtils.isEmpty(importResult.get样本编号())) { | |
| 2907 | 2917 | continue; |
| 2908 | 2918 | } |
| 2909 | 2919 | String hospitalId = autoMatchFacade.getHospitalId(id); |
| ... | ... | @@ -2912,7 +2922,7 @@ |
| 2912 | 2922 | sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); |
| 2913 | 2923 | sieveApplyOrderQuery1.setHospitalId(hospitalId); |
| 2914 | 2924 | List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); |
| 2915 | - if (CollectionUtils.isEmpty(list1) ) { | |
| 2925 | + if (CollectionUtils.isEmpty(list1)) { | |
| 2916 | 2926 | continue; |
| 2917 | 2927 | } |
| 2918 | 2928 | SieveApplyOrderModel sieveApplyOrderModel1 = list1.get(0); |
| 2919 | 2929 | |
| ... | ... | @@ -2946,9 +2956,9 @@ |
| 2946 | 2956 | Integer t21 = Integer.parseInt(importResult.getT21风险值()); |
| 2947 | 2957 | if (t21 <= 270) { |
| 2948 | 2958 | sieveAddRequest.setTszhz("0");//低风险 |
| 2949 | - } else if (t21 > 270 && t21< 1000) { | |
| 2959 | + } else if (t21 > 270 && t21 < 1000) { | |
| 2950 | 2960 | sieveAddRequest.setTszhz("1");//临界值 |
| 2951 | - }else if (t21 > 1000) { | |
| 2961 | + } else if (t21 > 1000) { | |
| 2952 | 2962 | sieveAddRequest.setTszhz("2");//高风险 |
| 2953 | 2963 | } |
| 2954 | 2964 | } |
| 2955 | 2965 | |
| ... | ... | @@ -2962,9 +2972,9 @@ |
| 2962 | 2972 | Integer t18 = Integer.parseInt(importResult.getT18风险值()); |
| 2963 | 2973 | if (t18 <= 350) { |
| 2964 | 2974 | sieveAddRequest.setSbst("0");//低风险 |
| 2965 | - } else if (t18 > 350 && t18<1000) { | |
| 2975 | + } else if (t18 > 350 && t18 < 1000) { | |
| 2966 | 2976 | sieveAddRequest.setSbst("1");//临界值 |
| 2967 | - }else if (t18 > 1000) { | |
| 2977 | + } else if (t18 > 1000) { | |
| 2968 | 2978 | sieveAddRequest.setSbst("2");//高风险 |
| 2969 | 2979 | } |
| 2970 | 2980 | } |
| 2971 | 2981 | |
| ... | ... | @@ -2998,10 +3008,10 @@ |
| 2998 | 3008 | if (StringUtils.isNotEmpty(importResult.getAFP校正MOM值())) {//AFP校正MOM值 |
| 2999 | 3009 | sieveAddRequest.setHafpMom(importResult.getAFP校正MOM值()); |
| 3000 | 3010 | } |
| 3001 | - if(StringUtils.isNotEmpty(importResult.getuE3UPDCN浓度())){ //uE3 | |
| 3011 | + if (StringUtils.isNotEmpty(importResult.getuE3UPDCN浓度())) { //uE3 | |
| 3002 | 3012 | sieveAddRequest.setuE3(importResult.getuE3UPDCN浓度()); |
| 3003 | 3013 | } |
| 3004 | - if(StringUtils.isNotEmpty(importResult.getuE3UPDCN校正MOM值())){ //uE3MOM | |
| 3014 | + if (StringUtils.isNotEmpty(importResult.getuE3UPDCN校正MOM值())) { //uE3MOM | |
| 3005 | 3015 | sieveAddRequest.setuE3(importResult.getuE3UPDCN校正MOM值()); |
| 3006 | 3016 | } |
| 3007 | 3017 | //sieveAddRequest.setCheckerId(); |
| ... | ... | @@ -3013,7 +3023,7 @@ |
| 3013 | 3023 | sieveResultQuery.setLymsSieveId(sieveApplyOrderModel1.getLymsSieveId()); |
| 3014 | 3024 | sieveResultQuery.setParentId(sieveApplyOrderModel1.getParentId()); |
| 3015 | 3025 | List<SieveResultModel> sieveResultModellist = sieveService.queryListSieveResult(sieveResultQuery); |
| 3016 | - if(CollectionUtils.isNotEmpty(sieveResultModellist)){ | |
| 3026 | + if (CollectionUtils.isNotEmpty(sieveResultModellist)) { | |
| 3017 | 3027 | SieveResultModel sieveResultModel = sieveResultModellist.get(0); |
| 3018 | 3028 | sieveAddRequest.setId(sieveResultModel.getId()); |
| 3019 | 3029 | addOneSieve(sieveAddRequest, id); |
| 3020 | 3030 | |
| ... | ... | @@ -3022,11 +3032,10 @@ |
| 3022 | 3032 | sieveAddRequest.setCheckerId(String.valueOf(id)); //检验者 |
| 3023 | 3033 | addOneSieve(sieveAddRequest, id); |
| 3024 | 3034 | //记录一下添加成功内容 |
| 3025 | - operateLogFacade.addModifyOptLog(id, Integer.parseInt(hospitalId),sieveAddRequest, sieveAddRequest, OptActionEnums.UPDATE.getId(), "导入添加产筛信息"); | |
| 3035 | + operateLogFacade.addModifyOptLog(id, Integer.parseInt(hospitalId), sieveAddRequest, sieveAddRequest, OptActionEnums.UPDATE.getId(), "导入添加产筛信息"); | |
| 3026 | 3036 | } |
| 3027 | 3037 | |
| 3028 | 3038 | |
| 3029 | - | |
| 3030 | 3039 | } |
| 3031 | 3040 | } catch (Exception e) { |
| 3032 | 3041 | e.printStackTrace(); |
| 3033 | 3042 | |
| ... | ... | @@ -3035,8 +3044,10 @@ |
| 3035 | 3044 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 3036 | 3045 | |
| 3037 | 3046 | } |
| 3047 | + | |
| 3038 | 3048 | /** |
| 3039 | 3049 | * 功能描述 是读取2007 excle的方法 |
| 3050 | + * | |
| 3040 | 3051 | * @author 武涛涛 |
| 3041 | 3052 | * @date 2020/6/23 |
| 3042 | 3053 | */ |
| 3043 | 3054 | |
| ... | ... | @@ -3094,9 +3105,9 @@ |
| 3094 | 3105 | } |
| 3095 | 3106 | list.add(importResult); |
| 3096 | 3107 | System.out.println("list: " + list.size()); |
| 3097 | - System.out.println("importResult.toString(): "+importResult.toString()); | |
| 3108 | + System.out.println("importResult.toString(): " + importResult.toString()); | |
| 3098 | 3109 | //1 根据标本号更新数据 |
| 3099 | - if (StringUtils.isEmpty(importResult.get样本编号()) ) { | |
| 3110 | + if (StringUtils.isEmpty(importResult.get样本编号())) { | |
| 3100 | 3111 | continue; |
| 3101 | 3112 | } |
| 3102 | 3113 | String hospitalId = autoMatchFacade.getHospitalId(id); |
| 3103 | 3114 | |
| ... | ... | @@ -3106,12 +3117,12 @@ |
| 3106 | 3117 | // sieveApplyOrderQuery1.setHospitalId(hospitalId); |
| 3107 | 3118 | List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); |
| 3108 | 3119 | |
| 3109 | - System.out.println("list1.size(): "+list1.size()); | |
| 3110 | - if (CollectionUtils.isEmpty(list1) ) { | |
| 3120 | + System.out.println("list1.size(): " + list1.size()); | |
| 3121 | + if (CollectionUtils.isEmpty(list1)) { | |
| 3111 | 3122 | continue; |
| 3112 | 3123 | } |
| 3113 | 3124 | SieveApplyOrderModel sieveApplyOrderModel1 = list1.get(0); |
| 3114 | - System.out.println("sieveApplyOrderModel1 : "+sieveApplyOrderModel1.toString()); | |
| 3125 | + System.out.println("sieveApplyOrderModel1 : " + sieveApplyOrderModel1.toString()); | |
| 3115 | 3126 | //判断如果没有LymsSieveId就更新上 |
| 3116 | 3127 | if (StringUtils.isEmpty(sieveApplyOrderModel1.getLymsSieveId())) { |
| 3117 | 3128 | SieveQuery sieveQuery = new SieveQuery(); |
| ... | ... | @@ -3138,11 +3149,14 @@ |
| 3138 | 3149 | map.put("valueTwo", importResult.getT21风险值()); |
| 3139 | 3150 | sieveAddRequest.setTszhzValue(map); |
| 3140 | 3151 | } |
| 3141 | - if (StringUtils.isNotEmpty(importResult.getT21风险结果())) { | |
| 3142 | - if ("低风险".equals(importResult.getT21风险结果())) { | |
| 3143 | - sieveAddRequest.setTszhz("0"); | |
| 3144 | - } else if ("高风险".equals(importResult.getT21风险结果())) { | |
| 3145 | - sieveAddRequest.setTszhz("2"); | |
| 3152 | + if (StringUtils.isNotEmpty(importResult.getT21风险值()) && !" ".equals(importResult.getT21风险值())) { | |
| 3153 | + Integer t21 = Integer.parseInt(importResult.getT21风险值()); | |
| 3154 | + if (t21 <= 270) { | |
| 3155 | + sieveAddRequest.setTszhz("2");//高风险 | |
| 3156 | + } else if (t21 > 270 && t21 < 1000) { | |
| 3157 | + sieveAddRequest.setTszhz("1");//临界值 | |
| 3158 | + } else if (t21 > 1000) { | |
| 3159 | + sieveAddRequest.setTszhz("0");//低风险 | |
| 3146 | 3160 | } |
| 3147 | 3161 | } |
| 3148 | 3162 | if (StringUtils.isNotEmpty(importResult.getT18风险值())) {//18-三体 T18风险结果 |
| ... | ... | @@ -3151,11 +3165,14 @@ |
| 3151 | 3165 | map.put("valueTwo", importResult.getT18风险值()); |
| 3152 | 3166 | sieveAddRequest.setSbstValue(map); |
| 3153 | 3167 | } |
| 3154 | - if (StringUtils.isNotEmpty(importResult.getT18风险结果())) { | |
| 3155 | - if ("低风险".equals(importResult.getT18风险结果())) { | |
| 3156 | - sieveAddRequest.setSbst("0"); | |
| 3157 | - } else if ("高风险".equals(importResult.getT18风险结果())) { | |
| 3158 | - sieveAddRequest.setSbst("2"); | |
| 3168 | + if (StringUtils.isNotEmpty(importResult.getT18风险值())) { | |
| 3169 | + Integer t18 = Integer.parseInt(importResult.getT18风险值()); | |
| 3170 | + if (t18 <= 350) { | |
| 3171 | + sieveAddRequest.setSbst("2");//高风险 | |
| 3172 | + } else if (t18 > 350 && t18 < 1000) { | |
| 3173 | + sieveAddRequest.setSbst("1");//临界值 | |
| 3174 | + } else if (t18 > 1000) { | |
| 3175 | + sieveAddRequest.setSbst("0");//低风险 | |
| 3159 | 3176 | } |
| 3160 | 3177 | } |
| 3161 | 3178 | sieveAddRequest.setStzhz13Value(null); //13-三体 导入的excel表格中没有该字段 |
| 3162 | 3179 | |
| 3163 | 3180 | |
| ... | ... | @@ -3168,10 +3185,11 @@ |
| 3168 | 3185 | sieveAddRequest.setSjgjxValue(map); |
| 3169 | 3186 | ; |
| 3170 | 3187 | } |
| 3188 | + System.out.println("importResult.getNTD风险结果(): "+importResult.getNTD风险结果()); | |
| 3171 | 3189 | if (StringUtils.isNotEmpty(importResult.getNTD风险结果())) { |
| 3172 | - if ("低风险".equals(importResult.getNTD风险结果())) { | |
| 3190 | + if ("低风险".equals(importResult.getNTD风险结果()) || importResult.getNTD风险结果().contains("低") ) { | |
| 3173 | 3191 | sieveAddRequest.setSjgjx("0"); |
| 3174 | - } else if ("高风险".equals(importResult.getNTD风险结果())) { | |
| 3192 | + } else if ("高风险".equals(importResult.getNTD风险结果())|| importResult.getNTD风险结果().contains("高")) { | |
| 3175 | 3193 | sieveAddRequest.setSjgjx("2"); |
| 3176 | 3194 | } |
| 3177 | 3195 | } |
| 3178 | 3196 | |
| ... | ... | @@ -3188,10 +3206,10 @@ |
| 3188 | 3206 | if (StringUtils.isNotEmpty(importResult.getAFP校正MOM值())) {//AFP校正MOM值 |
| 3189 | 3207 | sieveAddRequest.setHafpMom(importResult.getAFP校正MOM值()); |
| 3190 | 3208 | } |
| 3191 | - if(StringUtils.isNotEmpty(importResult.getuE3UPDCN浓度())){ //uE3 | |
| 3209 | + if (StringUtils.isNotEmpty(importResult.getuE3UPDCN浓度())) { //uE3 | |
| 3192 | 3210 | sieveAddRequest.setuE3(importResult.getuE3UPDCN浓度()); |
| 3193 | 3211 | } |
| 3194 | - if(StringUtils.isNotEmpty(importResult.getuE3UPDCN校正MOM值())){ //uE3MOM | |
| 3212 | + if (StringUtils.isNotEmpty(importResult.getuE3UPDCN校正MOM值())) { //uE3MOM | |
| 3195 | 3213 | sieveAddRequest.setuE3(importResult.getuE3UPDCN校正MOM值()); |
| 3196 | 3214 | } |
| 3197 | 3215 | //sieveAddRequest.setCheckerId(); |
| 3198 | 3216 | |
| 3199 | 3217 | |
| 3200 | 3218 | |
| 3201 | 3219 | |
| ... | ... | @@ -3203,22 +3221,22 @@ |
| 3203 | 3221 | sieveResultQuery.setLymsSieveId(sieveApplyOrderModel1.getLymsSieveId()); |
| 3204 | 3222 | sieveResultQuery.setParentId(sieveApplyOrderModel1.getParentId()); |
| 3205 | 3223 | sieveResultQuery.setYn(YnEnums.YES.getId()); |
| 3206 | - System.out.println("sieveApplyOrderModel1.getLymsSieveId():"+sieveApplyOrderModel1.getLymsSieveId()); | |
| 3207 | - System.out.println("sieveApplyOrderModel1.getParentId():"+sieveApplyOrderModel1.getParentId()); | |
| 3224 | + System.out.println("sieveApplyOrderModel1.getLymsSieveId():" + sieveApplyOrderModel1.getLymsSieveId()); | |
| 3225 | + System.out.println("sieveApplyOrderModel1.getParentId():" + sieveApplyOrderModel1.getParentId()); | |
| 3208 | 3226 | List<SieveResultModel> sieveResultModellist = sieveService.queryListSieveResult(sieveResultQuery); |
| 3209 | - System.out.println("//避免一个产筛申请出现多次结果: "+sieveResultModellist.size()); | |
| 3227 | + System.out.println("//避免一个产筛申请出现多次结果: " + sieveResultModellist.size()); | |
| 3210 | 3228 | |
| 3211 | - if(CollectionUtils.isNotEmpty(sieveResultModellist)){ | |
| 3229 | + if (CollectionUtils.isNotEmpty(sieveResultModellist)) { | |
| 3212 | 3230 | SieveResultModel sieveResultModel = sieveResultModellist.get(0); |
| 3213 | 3231 | sieveAddRequest.setId(sieveResultModel.getId()); |
| 3214 | 3232 | addOneSieve(sieveAddRequest, id); |
| 3215 | 3233 | } |
| 3216 | 3234 | sieveAddRequest.setExamineId(String.valueOf(id)); //审核者 |
| 3217 | 3235 | sieveAddRequest.setCheckerId(String.valueOf(id)); //检验者 |
| 3218 | - System.out.println("sieveAddRequest: "+sieveAddRequest.toString() +" ---- id: "+id); | |
| 3236 | + System.out.println("sieveAddRequest: " + sieveAddRequest.toString() + " ---- id: " + id); | |
| 3219 | 3237 | addOneSieve(sieveAddRequest, id); |
| 3220 | 3238 | //记录一下添加成功内容 |
| 3221 | - operateLogFacade.addModifyOptLog(id, Integer.parseInt(hospitalId),sieveAddRequest, sieveAddRequest, OptActionEnums.UPDATE.getId(), "导入添加产筛信息"); | |
| 3239 | + operateLogFacade.addModifyOptLog(id, Integer.parseInt(hospitalId), sieveAddRequest, sieveAddRequest, OptActionEnums.UPDATE.getId(), "导入添加产筛信息"); | |
| 3222 | 3240 | |
| 3223 | 3241 | |
| 3224 | 3242 | } |