Commit 9074ef0e69b2630b5984d2248788844147124381
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 8 changed files
- platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
- platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyHisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
View file @
9074ef0
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyHisService.java
View file @
9074ef0
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.lyms.platform.common.utils.DateUtil; |
| 5 | 5 | import com.lyms.platform.common.utils.ExceptionUtils; |
| 6 | 6 | import com.lyms.platform.pojo.LisReport; |
| 7 | +import com.lyms.platform.permission.model.LisReportModel; | |
| 7 | 8 | import com.lyms.platform.pojo.LisReportItem; |
| 8 | 9 | import org.apache.commons.collections.CollectionUtils; |
| 9 | 10 | import org.apache.commons.dbutils.DbUtils; |
| 10 | 11 | |
| 11 | 12 | |
| 12 | 13 | |
| 13 | 14 | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | |
| ... | ... | @@ -237,30 +238,31 @@ |
| 237 | 238 | Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeHisConnection(); |
| 238 | 239 | QueryRunner queryRunner = new QueryRunner(true); |
| 239 | 240 | try { |
| 240 | - String sql = "select TYPE as classifyName,NAME as name,LIS_ID as hospitalId,BHNUM as patientHid,VCCARDNO as vcCardNo,SEX as sex,to_number(replace(AGE,'岁') ) as age,APPLY_DEPT as deptName,APPLY_DOCTOR as applyDoctorName,CHECKER as checkDoctorName,PUBLISH_TIME as publishTime from zlhis.lis_report_info where VCCARDNO ='"+cardNo+"' order by LIS_ID desc"; | |
| 241 | + String sql = "select LIS_ID as lisId,TITLE as title,TYPE as type,VCCARDNO as vcCardNo, NAME as name,BHNUM as bhnum,SEX as sex,to_number(replace(AGE,'岁') ) as age,APPLY_TIME as applyTime,CHECK_TIME as checkTime,PUBLISH_TIME as publishTime,APPLY_DOCTOR as applyDoctor,APPLY_DEPT as applyDept,CHECKER as checker,MODIFIED as modified,CREATED as created from zlhis.lis_report_info where VCCARDNO ='"+cardNo+"' order by LIS_ID desc"; | |
| 241 | 242 | String subSql = "select LIS_ID as id,CODE as code,NAME as name,RESULT as result,RESULT_FLAG as flag,REF as ref,UNIT as unit,RESULT_TYPE as resultType from zlhis.lis_report_item where LIS_ID='"; |
| 242 | - List<LisReport> lisReportList = queryRunner.query(conn, sql, new BeanListHandler<LisReport>(LisReport.class)); | |
| 243 | + List<LisReportModel> lisReportList = queryRunner.query(conn, sql, new BeanListHandler<LisReportModel>(LisReportModel.class)); | |
| 243 | 244 | List<LisCheckInfo> list = new ArrayList<>(); |
| 244 | 245 | if (lisReportList.size() > 0) { |
| 245 | - for (LisReport lisReport:lisReportList) { | |
| 246 | + for (LisReportModel lisReportModel:lisReportList) { | |
| 246 | 247 | // hospitalId为申请号 |
| 247 | - if (StringUtils.isNotBlank(lisReport.getHospitalId())) { | |
| 248 | - List<LisReportItem> lisReportItemList = queryRunner.query(conn, subSql+lisReport.getHospitalId()+"'", new BeanListHandler<LisReportItem>(LisReportItem.class)); | |
| 248 | + if (StringUtils.isNotBlank(lisReportModel.getLisId())) { | |
| 249 | + List<LisReportItem> lisReportItemList = queryRunner.query(conn, subSql+lisReportModel.getLisId()+"'", new BeanListHandler<LisReportItem>(LisReportItem.class)); | |
| 249 | 250 | if (lisReportItemList != null && lisReportItemList.size() > 0) { |
| 250 | 251 | CheckResponse check = new CheckResponse(); |
| 251 | - check.setModified(lisReport.getPublishTime()); | |
| 252 | + check.setModified(lisReportModel.getPublishTime()); | |
| 252 | 253 | check.setType(1); |
| 253 | - check.setName(lisReport.getName()); | |
| 254 | - check.setTitle(lisReport.getClassifyName()); | |
| 254 | + check.setName(lisReportModel.getName()); | |
| 255 | + check.setTitle(lisReportModel.getTitle()); | |
| 255 | 256 | check.setHospitalName("德州市妇幼保健院");//新增医院名称字段赋值 |
| 256 | - if (lisReport.getAge() != null) { | |
| 257 | - check.setAge(lisReport.getAge().toString()); | |
| 257 | + if (lisReportModel.getAge() != null) { | |
| 258 | + check.setAge(lisReportModel.getAge()); | |
| 258 | 259 | } |
| 259 | - check.setApplyDate(lisReport.getPublishTime()); | |
| 260 | - check.setApplyDateStr(DateUtil.getyyyy_MM_dd(lisReport.getPublishTime())); | |
| 261 | - check.setCheckDept(lisReport.getDeptName()); | |
| 262 | - check.setDoctor(lisReport.getApplyDoctorName()); | |
| 263 | - check.setSex(lisReport.getSex()); | |
| 260 | + check.setApplyDate(lisReportModel.getApplyTime()); | |
| 261 | + check.setApplyDateStr(DateUtil.getyyyy_MM_dd(lisReportModel.getApplyTime())); | |
| 262 | + check.setCheckDept(lisReportModel.getApplyDept()); | |
| 263 | + check.setDoctor(lisReportModel.getApplyDoctor()); | |
| 264 | + check.setSex(lisReportModel.getSex()); | |
| 265 | + check.setModified(lisReportModel.getModified()); | |
| 264 | 266 | List<CheckItemResponse> itemList = new ArrayList<>(); |
| 265 | 267 | check.setItemList(itemList); |
| 266 | 268 | for (LisReportItem checkItem:lisReportItemList) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java
View file @
9074ef0
| ... | ... | @@ -147,6 +147,7 @@ |
| 147 | 147 | @RequestParam(required = false) Integer status, |
| 148 | 148 | @RequestHeader("Authorization") String token) { |
| 149 | 149 | |
| 150 | + System.out.println("patientIds="+patientIds); | |
| 150 | 151 | if (!"3d19960bf3e81e7d816c4f26051c49ba".equals(token)) |
| 151 | 152 | { |
| 152 | 153 | ExceptionUtils.catchException("The request token is " + token); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
9074ef0
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.ArchiveDataServicer; |
| 4 | +import com.lyms.platform.biz.service.PatientsService; | |
| 4 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
| 5 | 6 | import com.lyms.platform.common.base.BaseController; |
| 6 | 7 | import com.lyms.platform.common.base.LoginContext; |
| 8 | +import com.lyms.platform.common.enums.YnEnums; | |
| 7 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 8 | 10 | import com.lyms.platform.common.utils.JsonUtil; |
| 9 | 11 | import com.lyms.platform.common.utils.MessageUtil; |
| 10 | 12 | import com.lyms.platform.common.utils.PropertiesUtils; |
| 13 | +import com.lyms.platform.common.utils.StringUtils; | |
| 14 | +import com.lyms.platform.operate.web.facade.AutoMatchFacade; | |
| 15 | +import com.lyms.platform.operate.web.facade.PatientFacade; | |
| 11 | 16 | import com.lyms.platform.pojo.ArchiveData; |
| 17 | +import com.lyms.platform.pojo.Patients; | |
| 12 | 18 | import com.lyms.platform.query.ArchiveDataQuery; |
| 19 | +import com.lyms.platform.query.PatientsQuery; | |
| 20 | +import org.apache.commons.collections.CollectionUtils; | |
| 13 | 21 | import org.apache.commons.httpclient.HttpClient; |
| 14 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 15 | 23 | import org.springframework.stereotype.Controller; |
| 16 | 24 | |
| 17 | 25 | |
| ... | ... | @@ -32,9 +40,16 @@ |
| 32 | 40 | @Controller |
| 33 | 41 | public class RemoteController extends BaseController { |
| 34 | 42 | |
| 43 | + | |
| 35 | 44 | @Autowired |
| 45 | + private PatientsService patientsService; | |
| 46 | + | |
| 47 | + @Autowired | |
| 36 | 48 | private ArchiveDataServicer archiveDataServicer; |
| 37 | 49 | |
| 50 | + @Autowired | |
| 51 | + private AutoMatchFacade autoMatchFacade; | |
| 52 | + | |
| 38 | 53 | public static final String center_statistics_url= PropertiesUtils.getPropertyValue("center_statistics_url"); |
| 39 | 54 | |
| 40 | 55 | @RequestMapping(value = "/bookArchive",method = RequestMethod.GET) |
| 41 | 56 | |
| ... | ... | @@ -61,12 +76,32 @@ |
| 61 | 76 | * @return |
| 62 | 77 | */ |
| 63 | 78 | @RequestMapping(value = "/bookArchive/history",method = RequestMethod.GET) |
| 64 | - public void getBookArchive(HttpServletResponse response, String idCard,String cardNum,String phone){ | |
| 79 | + @TokenRequired | |
| 80 | + public void getBookArchive(HttpServletResponse response, String idCard,String cardNum,String phone, HttpServletRequest request){ | |
| 81 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 65 | 82 | ArchiveDataQuery query = new ArchiveDataQuery(); |
| 66 | 83 | query.setIdCard(idCard); |
| 67 | 84 | query.setCardNum(cardNum); |
| 68 | 85 | query.setPhone(phone); |
| 69 | 86 | List<ArchiveData> list = archiveDataServicer.query(query.convertToQuery()); |
| 87 | + | |
| 88 | + if (CollectionUtils.isEmpty(list) && StringUtils.isNotEmpty(cardNum)) | |
| 89 | + { | |
| 90 | + //根据用户id获取医院ID | |
| 91 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 92 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 93 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 94 | + patientsQuery.setVcCardNo(cardNum); | |
| 95 | + patientsQuery.setHospitalId(hospitalId); | |
| 96 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
| 97 | + if (CollectionUtils.isNotEmpty(patientses) && patientses.get(0) != null && StringUtils.isNotEmpty(patientses.get(0).getCardNo())) | |
| 98 | + { | |
| 99 | + query = new ArchiveDataQuery(); | |
| 100 | + query.setIdCard(patientses.get(0).getCardNo()); | |
| 101 | + list = archiveDataServicer.query(query.convertToQuery()); | |
| 102 | + } | |
| 103 | + } | |
| 104 | + | |
| 70 | 105 | if (list!=null && list.size() > 0) { |
| 71 | 106 | Map map = JsonUtil.str2Obj(list.get(0).getJsonData(), HashMap.class); |
| 72 | 107 | if(null!=map&&map.containsKey("history")){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
9074ef0
| ... | ... | @@ -2326,7 +2326,7 @@ |
| 2326 | 2326 | for (BabyModel model : models) { |
| 2327 | 2327 | Map<String, Object> data = new HashMap<>(); |
| 2328 | 2328 | if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { |
| 2329 | - data.put("highRisk", "健康"); | |
| 2329 | + data.put("highRisk", ""); //jira WEB-1547 | |
| 2330 | 2330 | } else { |
| 2331 | 2331 | data.put("highRisk", "高危"); |
| 2332 | 2332 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
9074ef0
| ... | ... | @@ -79,9 +79,9 @@ |
| 79 | 79 | if("7".equals(HIS_VERSION)){ |
| 80 | 80 | //根据调用接口获取四川南充中心医院的Lis数据 |
| 81 | 81 | result.addAll(NczxyyLisService.queryLisCheckList(vcCardNo)); |
| 82 | - }else if("6".equals(HIS_VERSION)){ | |
| 83 | - //调用德州妇幼lis接口 | |
| 84 | - result.addAll(DzfyHisService.queryLisCheckList(vcCardNo)); | |
| 82 | +// }else if("6".equals(HIS_VERSION)){ | |
| 83 | +// //调用德州妇幼lis接口 | |
| 84 | +// result.addAll(DzfyHisService.queryLisCheckList(vcCardNo)); | |
| 85 | 85 | } |
| 86 | 86 | else{ |
| 87 | 87 | result.addAll(queryLisCheckList(vcCardNo,phone,userId)); |
| ... | ... | @@ -552,6 +552,7 @@ |
| 552 | 552 | |
| 553 | 553 | Map<String,String> hospitalNames = getHospitalNames(hosptalIds); |
| 554 | 554 | lises = lisService.queryLisDataByQuery(query); |
| 555 | + System.out.println("patientIds==" + patientIds + "; lies siez = " + lises.size()); | |
| 555 | 556 | // 排序 |
| 556 | 557 | Collections.sort(lises, new Comparator() { |
| 557 | 558 | public int compare(Object a, Object b) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
View file @
9074ef0
| ... | ... | @@ -289,7 +289,58 @@ |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |
| 292 | + * 同步聊城东昌区妇幼数据到线上 | |
| 292 | 293 | * 定时任务配置applicationContext.xml |
| 294 | + */ | |
| 295 | + public void lcdcqfySyncDataSSL() { | |
| 296 | + | |
| 297 | + try{ | |
| 298 | + String json = HttpClientUtil.doPost("https://area-lc-api.healthbaby.com.cn:55581/findSyncData", new HashMap<String, String>(), "utf-8"); | |
| 299 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(json)) | |
| 300 | + { | |
| 301 | + List<SyncDataModel> list = JsonUtil.toList(json, SyncDataModel.class); | |
| 302 | + System.out.println("lcdcqfy syncdata size = "+ list.size()); | |
| 303 | + int batchSize = 200; | |
| 304 | + int end = 0; | |
| 305 | + for (int i = 0; i < list.size(); i += batchSize) { | |
| 306 | + end = (end + batchSize); | |
| 307 | + if (end > list.size()) { | |
| 308 | + end = list.size(); | |
| 309 | + } | |
| 310 | + System.out.println("lcdcqfy start:" + i + ",end:" + end); | |
| 311 | + final List<SyncDataModel> tempList = list.subList(i, end); | |
| 312 | + new Thread(new Runnable() { | |
| 313 | + @Override | |
| 314 | + public void run() { | |
| 315 | + if (CollectionUtils.isNotEmpty(tempList)) | |
| 316 | + { | |
| 317 | + StringBuffer ids = new StringBuffer(); | |
| 318 | + for (SyncDataModel model : tempList) { | |
| 319 | + boolean boo = mongoSyncService.syncData(model.getAction(), model.getDataId(), model.getClassName(), model.getJsonData()); | |
| 320 | + if (boo) { | |
| 321 | + ids.append(model.getId()); | |
| 322 | + ids.append(","); | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if (ids.length() > 0) { | |
| 326 | + Map<String,String> params = new HashMap<String, String>(); | |
| 327 | + params.put("ids", ids.toString()); | |
| 328 | + String result = HttpClientUtil.doPost("https://area-lc-api.healthbaby.com.cn:55581/updateSyncData", params, "utf-8"); | |
| 329 | + System.out.println("lcdcqfy exc result = "+ result); | |
| 330 | + } | |
| 331 | + } | |
| 332 | + } | |
| 333 | + }).start(); | |
| 334 | + } | |
| 335 | + } | |
| 336 | + }catch(Exception ex){ | |
| 337 | + ExceptionUtils.catchException(ex, "lcdcqfy Error."); | |
| 338 | + } | |
| 339 | + } | |
| 340 | + | |
| 341 | + | |
| 342 | + /** | |
| 343 | + * 定时任务配置applicationContext.xml | |
| 293 | 344 | * |
| 294 | 345 | */ |
| 295 | 346 | public void syncDataSSL() |
| ... | ... | @@ -315,6 +366,12 @@ |
| 315 | 366 | nczxyySyncDataSSL(); |
| 316 | 367 | } |
| 317 | 368 | },"nczxyy-thread").start(); |
| 369 | + new Thread(new Runnable() { | |
| 370 | + @Override | |
| 371 | + public void run() { | |
| 372 | + lcdcqfySyncDataSSL(); | |
| 373 | + } | |
| 374 | + },"lcdcqfy-thread").start(); | |
| 318 | 375 | |
| 319 | 376 | } |
| 320 | 377 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
9074ef0
| 1 | 1 | package com.lyms.platform.operate.web.service.impl; |
| 2 | 2 | |
| 3 | +import com.alibaba.fastjson.JSON; | |
| 4 | +import com.alibaba.fastjson.JSONPObject; | |
| 3 | 5 | import com.lyms.hospitalapi.pojo.ReportModel; |
| 4 | 6 | import com.lyms.platform.biz.service.CommonService; |
| 5 | 7 | import com.lyms.platform.common.enums.CouponEnums; |
| 6 | 8 | |
| ... | ... | @@ -1232,11 +1234,11 @@ |
| 1232 | 1234 | PageResult pageResult = new PageResult(count, currentPage, pageSize, rest); |
| 1233 | 1235 | for (String pid : ids) { |
| 1234 | 1236 | Map<String, Object> tempMap = new HashMap<>(); |
| 1235 | - PersonModel personModel = mongoTemplate.findById(pid, PersonModel.class); | |
| 1236 | - if(personModel != null) { | |
| 1237 | + List<Patients> patients = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid).and("yn").ne("0")), Patients.class); | |
| 1238 | + if(CollectionUtils.isNotEmpty(patients)) { | |
| 1239 | + /** 设置本院产检次数 + 总产检次数 */ | |
| 1237 | 1240 | List<AntenatalExaminationModel> antenatalExaminationModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class); |
| 1238 | 1241 | List<AntExChuModel> antExChuModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class); |
| 1239 | - tempMap.put("NAME", personModel.getName()); | |
| 1240 | 1242 | tempMap.put("TOTAL_NUM", antenatalExaminationModels.size() + antExChuModels.size()); |
| 1241 | 1243 | Integer benyuan = 0; |
| 1242 | 1244 | for (AntenatalExaminationModel antenatalExaminationModel : antenatalExaminationModels) { |
| 1243 | 1245 | |
| 1244 | 1246 | |
| 1245 | 1247 | |
| 1246 | 1248 | |
| 1247 | 1249 | |
| ... | ... | @@ -1250,38 +1252,84 @@ |
| 1250 | 1252 | } |
| 1251 | 1253 | } |
| 1252 | 1254 | tempMap.put("BENYUAN_NUM", benyuan); |
| 1253 | - if(CollectionUtils.isNotEmpty(antenatalExaminationModels)) { | |
| 1254 | - AntenatalExaminationModel examinationModel = antenatalExaminationModels.get(0); | |
| 1255 | - tempMap.put("YUNZHOU", DateUtil.getWeek(examinationModel.getLastMenses(), examinationModel.getCheckDate())); | |
| 1256 | - tempMap.put("HIGH_RISK_GRADE", mongoUtil.findName(examinationModel.getRiskScore())); | |
| 1257 | - tempMap.put("HIGH_RISK_FACTOR", mongoUtil.findName(examinationModel.getRiskFactor())); | |
| 1258 | -// tempMap.put("EDD_DATE", examinationModel.); | |
| 1259 | - tempMap.put("LAST_EXAMINE_DATE", DateUtil.getyyyy_MM_dd(examinationModel.getLastMenses())); | |
| 1260 | - String prodDoctor = examinationModel.getCheckDoctor(); | |
| 1261 | - if(StringUtils.isNotBlank(prodDoctor)) { | |
| 1262 | - Users users = usersService.getUsers(Integer.parseInt(prodDoctor)); | |
| 1263 | - tempMap.put("DOCTOR_NAME", users == null ? null : users.getName()); | |
| 1255 | + | |
| 1256 | + if(patients.size() == 1) { | |
| 1257 | + Patients p = patients.get(0); | |
| 1258 | + tempMap.put("NAME", p.getUsername()); | |
| 1259 | + tempMap.put("YUNZHOU", DateUtil.getWeek(p.getLastMenses(), p.getLastCTime())); | |
| 1260 | + String riskLevelId = p.getRiskLevelId(); | |
| 1261 | + if(StringUtils.isNotBlank(riskLevelId)) { | |
| 1262 | + List<String> basicIds = JSON.parseArray(riskLevelId, String.class); | |
| 1263 | + String HIGH_RISK_GRADE = ""; | |
| 1264 | + for (String basicId : basicIds) { | |
| 1265 | + HIGH_RISK_GRADE = HIGH_RISK_GRADE + mongoUtil.findName(basicId) + ","; | |
| 1266 | + } | |
| 1267 | + tempMap.put("HIGH_RISK_GRADE", HIGH_RISK_GRADE.substring(0, HIGH_RISK_GRADE.length() - 1)); /** 高危等级 */ | |
| 1264 | 1268 | } |
| 1265 | - } else if(CollectionUtils.isNotEmpty(antExChuModels)) { | |
| 1266 | - AntExChuModel antExChuModel = antExChuModels.get(0); | |
| 1267 | - tempMap.put("YUNZHOU", DateUtil.getWeek(antExChuModel.getLastMenses(), antExChuModel.getCheckTime())); | |
| 1268 | - List riskLeve = commonService.findRiskLevel(commonService.findRiskLevel(antExChuModel.getHighrisk())); | |
| 1269 | - tempMap.put("HIGH_RISK_GRADE", mongoUtil.findName(antExChuModel.getHighriskSocre())); /** 高危等级 */ | |
| 1270 | - tempMap.put("HIGH_RISK_FACTOR", mongoUtil.findName(antExChuModel.getHighrisk())); /** 风险因素 */ | |
| 1271 | - tempMap.put("EDD_DATE", antExChuModel.getDueDate()); | |
| 1272 | - tempMap.put("LAST_EXAMINE_DATE", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); | |
| 1273 | - String prodDoctor = antExChuModel.getProdDoctor(); | |
| 1269 | + tempMap.put("HIGH_RISK_FACTOR", p.getoRiskFactor()); /** 风险因素 */ | |
| 1270 | + tempMap.put("EDD_DATE", p.getDueDate()); | |
| 1271 | + tempMap.put("LAST_EXAMINE_DATE", DateUtil.getyyyy_MM_dd(p.getLastCTime())); | |
| 1272 | + String prodDoctor = p.getBookbuildingDoctor(); | |
| 1274 | 1273 | if(StringUtils.isNotBlank(prodDoctor)) { |
| 1275 | 1274 | Users users = usersService.getUsers(Integer.parseInt(prodDoctor)); |
| 1276 | 1275 | tempMap.put("DOCTOR_NAME", users == null ? null : users.getName()); |
| 1277 | 1276 | } |
| 1278 | 1277 | } |
| 1278 | + } else { | |
| 1279 | 1279 | |
| 1280 | - rest.add(tempMap); | |
| 1281 | 1280 | } |
| 1282 | - setColor(rest); | |
| 1283 | - pageResult.setGrid(rest); | |
| 1281 | + | |
| 1282 | +// PersonModel personModel = mongoTemplate.findById(pid, PersonModel.class); | |
| 1283 | +// if(personModel != null) { | |
| 1284 | +// List<AntenatalExaminationModel> antenatalExaminationModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class); | |
| 1285 | +// List<AntExChuModel> antExChuModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class); | |
| 1286 | +// tempMap.put("NAME", personModel.getName()); | |
| 1287 | +// tempMap.put("TOTAL_NUM", antenatalExaminationModels.size() + antExChuModels.size()); | |
| 1288 | +// Integer benyuan = 0; | |
| 1289 | +// for (AntenatalExaminationModel antenatalExaminationModel : antenatalExaminationModels) { | |
| 1290 | +// if(antenatalExaminationModel.getHospitalId().equals(hospitalId)) { | |
| 1291 | +// benyuan++; | |
| 1292 | +// } | |
| 1293 | +// } | |
| 1294 | +// for (AntExChuModel antExChuModel : antExChuModels) { | |
| 1295 | +// if(antExChuModel.getHospitalId().equals(hospitalId)) { | |
| 1296 | +// benyuan++; | |
| 1297 | +// } | |
| 1298 | +// } | |
| 1299 | +// tempMap.put("BENYUAN_NUM", benyuan); | |
| 1300 | +// if(CollectionUtils.isNotEmpty(antenatalExaminationModels)) { | |
| 1301 | +// AntenatalExaminationModel examinationModel = antenatalExaminationModels.get(0); | |
| 1302 | +// tempMap.put("YUNZHOU", DateUtil.getWeek(examinationModel.getLastMenses(), examinationModel.getCheckDate())); | |
| 1303 | +// tempMap.put("HIGH_RISK_GRADE", mongoUtil.findName(examinationModel.getRiskScore())); | |
| 1304 | +// tempMap.put("HIGH_RISK_FACTOR", mongoUtil.findName(examinationModel.getRiskFactor())); | |
| 1305 | +//// tempMap.put("EDD_DATE", examinationModel.); | |
| 1306 | +// tempMap.put("LAST_EXAMINE_DATE", DateUtil.getyyyy_MM_dd(examinationModel.getLastMenses())); | |
| 1307 | +// String prodDoctor = examinationModel.getCheckDoctor(); | |
| 1308 | +// if(StringUtils.isNotBlank(prodDoctor)) { | |
| 1309 | +// Users users = usersService.getUsers(Integer.parseInt(prodDoctor)); | |
| 1310 | +// tempMap.put("DOCTOR_NAME", users == null ? null : users.getName()); | |
| 1311 | +// } | |
| 1312 | +// } else if(CollectionUtils.isNotEmpty(antExChuModels)) { | |
| 1313 | +// AntExChuModel antExChuModel = antExChuModels.get(0); | |
| 1314 | +// tempMap.put("YUNZHOU", DateUtil.getWeek(antExChuModel.getLastMenses(), antExChuModel.getCheckTime())); | |
| 1315 | +// List riskLeve = commonService.findRiskLevel(commonService.findRiskLevel(antExChuModel.getHighrisk())); | |
| 1316 | +// tempMap.put("HIGH_RISK_GRADE", mongoUtil.findName(antExChuModel.getHighriskSocre())); /** 高危等级 */ | |
| 1317 | +// tempMap.put("HIGH_RISK_FACTOR", mongoUtil.findName(antExChuModel.getHighrisk())); /** 风险因素 */ | |
| 1318 | +// tempMap.put("EDD_DATE", antExChuModel.getDueDate()); | |
| 1319 | +// tempMap.put("LAST_EXAMINE_DATE", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); | |
| 1320 | +// String prodDoctor = antExChuModel.getProdDoctor(); | |
| 1321 | +// if(StringUtils.isNotBlank(prodDoctor)) { | |
| 1322 | +// Users users = usersService.getUsers(Integer.parseInt(prodDoctor)); | |
| 1323 | +// tempMap.put("DOCTOR_NAME", users == null ? null : users.getName()); | |
| 1324 | +// } | |
| 1325 | +// } | |
| 1326 | + | |
| 1327 | + rest.add(tempMap); | |
| 1328 | +// } | |
| 1329 | + // | |
| 1284 | 1330 | } |
| 1331 | + pageResult.setGrid(rest); | |
| 1332 | + setColor(rest); | |
| 1285 | 1333 | return RespBuilder.buildSuccess(pageResult); |
| 1286 | 1334 | } |
| 1287 | 1335 |