Commit 8a71c967959bdd86c2af41bf4e24c6c698a40dfe

Authored by zhangchao
1 parent 2ce0651dda
Exists in dev

#fix:优化大同母子管理手册查询

Showing 3 changed files with 181 additions and 173 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java View file @ 8a71c96
... ... @@ -585,7 +585,7 @@
585 585 List<AntExRecordModel> recordModels= antExRecordService.queryAntExRecords(antExRecordQuery);
586 586  
587 587 AntExRecordModel antExRecordModel = new AntExRecordModel();
588   - antExRecordModel.setType(2);
  588 + //antExRecordModel.setType(2);
589 589 antExRecordModel.setHospitalId(patients.getHospitalId());
590 590 antExRecordModel.setLastMenses(patients.getLastMenses());
591 591 antExRecordModel.setName(patients.getUsername());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 8a71c96
... ... @@ -289,7 +289,7 @@
289 289 }
290 290 }
291 291 }
292   - if (StringUtils.isNotEmpty(yunRequest.getHighRiskFileCode())){
  292 + if (StringUtils.isNotEmpty(yunRequest.getHighRiskFileCode())) {
293 293 patientsQuery.setCardNo(null);
294 294 patientsQuery.setPhone(null);
295 295 patientsQuery.setHighRiskFileCode(yunRequest.getHighRiskFileCode());
296 296  
297 297  
... ... @@ -395,38 +395,38 @@
395 395 patient.setScreening(yunRequest.getScreening());//特殊产筛建档
396 396  
397 397 //如果建档医生是空则创建医生
398   - if (StringUtils.isEmpty(patient.getLastCheckEmployeeId())){
  398 + if (StringUtils.isEmpty(patient.getLastCheckEmployeeId())) {
399 399  
400   - Integer dockerId= usersService.getUserId(patient.getHospitalId(),yunRequest.getLastCheckEmployeeName());
401   - if (dockerId!=null){
402   - patient.setLastCheckEmployeeId(String.valueOf(dockerId));
403   - }else {
404   - if (StringUtils.isNotEmpty(yunRequest.getLastCheckEmployeeName())){
405   - //准备添加数据
406   - Users users = new Users();
407   - users.setType(UserTypeEnum.NORMAL_USER.getId()); //1普通用户
408   - //users.setDeptId(deptId);
409   - users.setOrgId(Integer.valueOf(patient.getHospitalId()));
410   - users.setName(yunRequest.getLastCheckEmployeeName());
411   - users.setAccount(yunRequest.getLastCheckEmployeeName());
412   - //users.setPhone(phone);
413   - users.setEnable(1);
414   - // users.setZhiChenId(zhiCId);
415   - users.setPwd(MD5Utils.md5("123456").toUpperCase());
416   - //users.setRemarks(remarks);
417   - // users.setKsId(ksId);
418   - // users.setPublishId(user.getId());
419   - // users.setPublishName(user.getName());
420   - users.setYn(YnEnums.YES.getId());
421   - users.setModified(new Date());
422   - users.setCreated(new Date());
423   - // users.setZhiChen(ZhiChenEnums.getById(zhiCId));
424   - // user.setDefaultPage(defaultPage);
425   - usersService.addUsers(users);
426   - patient.setLastCheckEmployeeId(String.valueOf(users.getId()));
427   - }
  400 + Integer dockerId = usersService.getUserId(patient.getHospitalId(), yunRequest.getLastCheckEmployeeName());
  401 + if (dockerId != null) {
  402 + patient.setLastCheckEmployeeId(String.valueOf(dockerId));
  403 + } else {
  404 + if (StringUtils.isNotEmpty(yunRequest.getLastCheckEmployeeName())) {
  405 + //准备添加数据
  406 + Users users = new Users();
  407 + users.setType(UserTypeEnum.NORMAL_USER.getId()); //1普通用户
  408 + //users.setDeptId(deptId);
  409 + users.setOrgId(Integer.valueOf(patient.getHospitalId()));
  410 + users.setName(yunRequest.getLastCheckEmployeeName());
  411 + users.setAccount(yunRequest.getLastCheckEmployeeName());
  412 + //users.setPhone(phone);
  413 + users.setEnable(1);
  414 + // users.setZhiChenId(zhiCId);
  415 + users.setPwd(MD5Utils.md5("123456").toUpperCase());
  416 + //users.setRemarks(remarks);
  417 + // users.setKsId(ksId);
  418 + // users.setPublishId(user.getId());
  419 + // users.setPublishName(user.getName());
  420 + users.setYn(YnEnums.YES.getId());
  421 + users.setModified(new Date());
  422 + users.setCreated(new Date());
  423 + // users.setZhiChen(ZhiChenEnums.getById(zhiCId));
  424 + // user.setDefaultPage(defaultPage);
  425 + usersService.addUsers(users);
  426 + patient.setLastCheckEmployeeId(String.valueOf(users.getId()));
  427 + }
428 428  
429   - }
  429 + }
430 430 }
431 431  
432 432 //生成条形码
... ... @@ -597,7 +597,7 @@
597 597 Patients patients = new Patients();
598 598 if (StringUtils.isNotEmpty(list.get(0).getAssistUserId()) && StringUtils.isNotEmpty(tempP.getId())) {
599 599 patients.setAssistUserId(list.get(0).getAssistUserId());
600   - }else {
  600 + } else {
601 601 patients.setAssistUserId(tempP.getBookbuildingDoctor());
602 602 archiveData.setAssistUserId(tempP.getBookbuildingDoctor());
603 603 }
... ... @@ -1221,7 +1221,7 @@
1221 1221 private void sendbuildingMsg(Patients patient, Integer subTypeId, String first, String keyWord1, String remark) {
1222 1222 if ("1000000016".equals(patient.getHospitalId())) {
1223 1223 try {
1224   - // Thread.sleep(5000);
  1224 + // Thread.sleep(5000);
1225 1225 logger.info("sendbuildingMsg startup");
1226 1226 List<MsgRequest> messages = new ArrayList<>();
1227 1227 MsgRequest mr = new MsgRequest();
1228 1228  
1229 1229  
1230 1230  
1231 1231  
1232 1232  
1233 1233  
1234 1234  
1235 1235  
1236 1236  
1237 1237  
1238 1238  
... ... @@ -1412,114 +1412,115 @@
1412 1412 @Autowired
1413 1413 private AppointmentService appointmentService;
1414 1414  
1415   - public void bookbuildingMsg(){
  1415 + public void bookbuildingMsg() {
1416 1416 //TODO 大同早上7点推送未建档提醒
1417   - String date= DateUtil.getyyyy_MM_dd(new Date());
1418   - String startTime=date+" 00:00:00";
1419   - String endTime=date+" 23:59:59";
1420   - List<AppointmentModel> modelList= appointmentService.queryAppointment("孙慧洁",startTime,endTime,null,null);
1421   - if (CollectionUtils.isNotEmpty(modelList)){
1422   - PatientsQuery patientsQuery =new PatientsQuery();
1423   - patientsQuery.setYn(1);
1424   - patientsQuery.setHospitalId("2100002419");
1425   - List<AppointmentModel> sendList=new ArrayList<>();
1426   - for (int i = 0,j=modelList.size(); i < j; i++) {
1427   - AppointmentModel appointmentModel= modelList.get(i);
1428   - String idCard=appointmentModel.getIdCard();
1429   - String phone=appointmentModel.getPhone();
1430   - String username=appointmentModel.getName();
1431   - if (StringUtils.isNotEmpty(idCard)){
1432   - patientsQuery.setCardNo(idCard);
1433   - }else {
1434   - if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){
1435   - patientsQuery.setName(username);
1436   - patientsQuery.setPhone(phone);
1437   - }else {
1438   - appointmentModel.setIsBuild(0);
1439   - }
1440   - }
1441   - if (appointmentModel.getIsBuild()==null){
1442   - List<Patients> patientsList= patientsService.queryPatient(patientsQuery);
1443   - if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)){
1444   - appointmentModel.setIsBuild(1);
1445   - }else {
1446   - appointmentModel.setIsBuild(0);
1447   - }
1448   - }
1449   - if (appointmentModel.getIsBuild()==0){
1450   - sendList.add(appointmentModel);
1451   - }
  1417 + String date = DateUtil.getyyyy_MM_dd(DateUtil.addDay(new Date(),1));
  1418 + String startTime = date + " 00:00:00";
  1419 + String endTime = date + " 23:59:59";
  1420 + List<AppointmentModel> modelList = appointmentService.queryAppointment("孙慧洁", startTime, endTime, null, null);
  1421 + if (CollectionUtils.isNotEmpty(modelList)) {
  1422 + PatientsQuery patientsQuery = new PatientsQuery();
  1423 + patientsQuery.setYn(1);
  1424 + patientsQuery.setHospitalId("2100002419");
  1425 + List<AppointmentModel> sendList = new ArrayList<>();
  1426 + for (int i = 0, j = modelList.size(); i < j; i++) {
  1427 + AppointmentModel appointmentModel = modelList.get(i);
  1428 + String idCard = appointmentModel.getIdCard();
  1429 + String phone = appointmentModel.getPhone();
  1430 + String username = appointmentModel.getName();
  1431 + if (StringUtils.isNotEmpty(idCard)) {
  1432 + patientsQuery.setCardNo(idCard);
  1433 + } else {
  1434 + if (StringUtils.isNotEmpty(username) && StringUtils.isNotEmpty(phone)) {
  1435 + patientsQuery.setName(username);
  1436 + patientsQuery.setPhone(phone);
  1437 + } else {
  1438 + appointmentModel.setIsBuild(0);
1452 1439 }
1453   - if (CollectionUtils.isNotEmpty(sendList)){
1454   - sendAppointmentMsg(sendList,date);
  1440 + }
  1441 + if (appointmentModel.getIsBuild() == null) {
  1442 + List<Patients> patientsList = patientsService.queryPatient(patientsQuery);
  1443 + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)) {
  1444 + appointmentModel.setIsBuild(1);
  1445 + } else {
  1446 + appointmentModel.setIsBuild(0);
1455 1447 }
1456 1448 }
  1449 + if (appointmentModel.getIsBuild() == 0) {
  1450 + sendList.add(appointmentModel);
  1451 + }
  1452 + }
  1453 + if (CollectionUtils.isNotEmpty(sendList)) {
  1454 + sendAppointmentMsg(sendList, date);
  1455 + }
  1456 + }
1457 1457  
1458 1458  
1459   - }
  1459 + }
1460 1460  
1461 1461  
1462   - public void sendAppointmentMsg(List<AppointmentModel> appointmentModels,String date){
1463   - try {
1464   - logger.info("sendAppointmentMsg startup");
1465   - // Thread.sleep(3000);
1466   - List<MsgRequest> messages = new ArrayList<>();
1467   - final String hospitalId ="2100002419";
1468   - for (AppointmentModel appointmentModel:appointmentModels){
1469   - MsgRequest request = new MsgRequest();
1470   - String title = "建档提醒短信";
1471   - String messageContent = "【大同市第一人民医院】提醒您:您还未在我院建立孕期档案,为了更好的给您提供产检服务,请尽快携带身份证、母子健康手册以及产检检查资料前往我院门诊二层孕妇网络中心进行建档。" +
1472   - "温馨提示:“母子健康手册”在个人居住地社区卫生服务机构领取(需携带孕妇身份证明及产检资料)。";
1473   - request.setServiceType(3);
1474   - //短信发送状态
1475   - request.setSmsStatus(SmsStatusEnums.WFS.getId());
1476   - //平台ID
1477   - request.setTypeId(ProjectTypeEnums.YNXT.getId());
1478   - //服务对象 1孕妇 2儿童 3产妇
1479   - request.setObjType(1);
1480   - request.setWxTempId("tx-UmDE3YMgYaAeFccXB7HITuG_tiP9LMdX2bvBpus");
1481   - request.setPhone(appointmentModel.getPhone());
1482   - request.setPlanTime(DateUtil.getyyyy_MM_dd_hms(new Date()));
1483   - request.setSubTypeId(SmsServiceEnums.FWKT.getId());
1484   - request.setStatus(MsgStatusEnums.NO_SEND.getId());
1485   - request.setTimeType(1);
1486   - request.setHospitalId(hospitalId);
1487   - request.setPatientId(appointmentModel.getVccardNo());
1488   - request.setTempId(appointmentModel.getVccardNo());
1489   - request.setCreated(DateUtil.getyyyy_MM_dd_hms(new Date()));
1490   - request.setFirst(messageContent);
1491   - request.setKeyword1(title);
1492   - request.setKeyword2(date);
1493   - messages.add(request);
1494   - }
1495   - smsConfigFacade.saveMsg(messages, hospitalId);
1496   - logger.info("sendAppointmentMsg end");
1497   - } catch (Exception e) {
1498   - logger.error("sendAppointmentMsg Exception " + e);
  1462 + public void sendAppointmentMsg(List<AppointmentModel> appointmentModels, String date) {
  1463 + try {
  1464 + logger.info("sendAppointmentMsg startup");
  1465 + // Thread.sleep(3000);
  1466 + List<MsgRequest> messages = new ArrayList<>();
  1467 + final String hospitalId = "2100002419";
  1468 + for (AppointmentModel appointmentModel : appointmentModels) {
  1469 + MsgRequest request = new MsgRequest();
  1470 + String title = "建档提醒短信";
  1471 + String messageContent = "【大同市第一人民医院】提醒您:您还未在我院建立孕期档案,为了更好的给您提供产检服务,请尽快携带身份证、母子健康手册以及产检检查资料前往我院门诊二层孕妇网络中心进行建档。" +
  1472 + "温馨提示:“母子健康手册”在个人居住地社区卫生服务机构领取(需携带孕妇身份证明及产检资料)。";
  1473 + request.setServiceType(3);
  1474 + //短信发送状态
  1475 + request.setSmsStatus(SmsStatusEnums.WFS.getId());
  1476 + //平台ID
  1477 + request.setTypeId(ProjectTypeEnums.YNXT.getId());
  1478 + //服务对象 1孕妇 2儿童 3产妇
  1479 + request.setObjType(1);
  1480 + request.setWxTempId("tx-UmDE3YMgYaAeFccXB7HITuG_tiP9LMdX2bvBpus");
  1481 + request.setPhone(appointmentModel.getPhone());
  1482 + request.setPlanTime(DateUtil.getyyyy_MM_dd_hms(new Date()));
  1483 + request.setSubTypeId(SmsServiceEnums.FWKT.getId());
  1484 + request.setStatus(MsgStatusEnums.NO_SEND.getId());
  1485 + request.setTimeType(1);
  1486 + request.setHospitalId(hospitalId);
  1487 + request.setPatientId(appointmentModel.getVccardNo());
  1488 + request.setTempId(appointmentModel.getVccardNo());
  1489 + request.setCreated(DateUtil.getyyyy_MM_dd_hms(new Date()));
  1490 + request.setFirst(messageContent);
  1491 + request.setKeyword1(title);
  1492 + request.setKeyword2(date);
  1493 + messages.add(request);
1499 1494 }
  1495 + smsConfigFacade.saveMsg(messages, hospitalId);
  1496 + logger.info("sendAppointmentMsg end");
  1497 + } catch (Exception e) {
  1498 + logger.error("sendAppointmentMsg Exception " + e);
  1499 + }
1500 1500 }
1501 1501  
1502 1502  
1503   - private static final long TIMES = 24 * 60 * 60 * 1000 - 1;
  1503 + private static final long TIMES = 24 * 60 * 60 * 1000 - 1;
  1504 +
1504 1505 /**
1505 1506 * 大同下午18点推送预建档未审核提醒
1506 1507 */
1507 1508 public void archiveServiceSync() {
1508   - ArchiveDataQuery archiveDataQuery =new ArchiveDataQuery();
  1509 + ArchiveDataQuery archiveDataQuery = new ArchiveDataQuery();
1509 1510 archiveDataQuery.setHospitalId("2100002419");
1510 1511 Date start = DateUtil.getYMDTime();
1511 1512 Date end = new Date(start.getTime() + TIMES);
1512 1513 archiveDataQuery.setCreatedStart(start);
1513 1514 archiveDataQuery.setCreatedEnd(end);
1514 1515 archiveDataQuery.setHasBuildDate(false);
1515   - final List<ArchiveData> archiveDataList= archiveDataServicer.query(archiveDataQuery.convertToQuery());
  1516 + final List<ArchiveData> archiveDataList = archiveDataServicer.query(archiveDataQuery.convertToQuery());
1516 1517  
1517   - if (CollectionUtils.isNotEmpty(archiveDataList)){
  1518 + if (CollectionUtils.isNotEmpty(archiveDataList)) {
1518 1519 new Thread(new Runnable() {
1519 1520 @Override
1520 1521 public void run() {
1521 1522 for (int i = 0, j = archiveDataList.size(); i < j; i++) {
1522   - ArchiveData archiveData= archiveDataList.get(i);
  1523 + ArchiveData archiveData = archiveDataList.get(i);
1523 1524 sendArchiveMsg(archiveData);
1524 1525 }
1525 1526 }
... ... @@ -1529,8 +1530,8 @@
1529 1530  
1530 1531 }
1531 1532  
1532   - public void sendArchiveMsg(ArchiveData archiveData){
1533   - if ("2100002419".equals(archiveData.getHospitalId())){
  1533 + public void sendArchiveMsg(ArchiveData archiveData) {
  1534 + if ("2100002419".equals(archiveData.getHospitalId())) {
1534 1535 try {
1535 1536 logger.info("sendArchiveMsg startup");
1536 1537 List<MsgRequest> messages = new ArrayList<>();
... ... @@ -1583,7 +1584,7 @@
1583 1584 Date twenty = DateUtil.addDay(day, -21);
1584 1585 Date twentyEight = DateUtil.addDay(day, -28);
1585 1586 Map<String, Date> params = new HashMap<>();
1586   - /* params.put("day",day);*/
  1587 + /* params.put("day",day);*/
1587 1588 params.put("seven", seven);
1588 1589 params.put("fourteen", fourteen);
1589 1590 params.put("twenty", twenty);
1590 1591  
... ... @@ -1749,21 +1750,21 @@
1749 1750 }
1750 1751 }
1751 1752 if (StringUtils.isNotEmpty(yunRequest.getHighRiskFileCode())) {
1752   - if (pat != null){
1753   - if(StringUtils.isEmpty(pat.getHighRiskFileCode()) ||!yunRequest.getHighRiskFileCode().equals(pat.getHighRiskFileCode())) {
1754   - patientsQuery.setCardNo(null);
1755   - patientsQuery.setPhone(null);
1756   - patientsQuery.setHighRiskFileCode(yunRequest.getHighRiskFileCode());
1757   - //判断该手机号码在 孕期内有没有建档
1758   - patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
1759   - if (CollectionUtils.isNotEmpty(patients)) {
1760   - br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
1761   - br.setErrormsg("该高危专号已存在");
1762   - return br;
  1753 + if (pat != null) {
  1754 + if (StringUtils.isEmpty(pat.getHighRiskFileCode()) || !yunRequest.getHighRiskFileCode().equals(pat.getHighRiskFileCode())) {
  1755 + patientsQuery.setCardNo(null);
  1756 + patientsQuery.setPhone(null);
  1757 + patientsQuery.setHighRiskFileCode(yunRequest.getHighRiskFileCode());
  1758 + //判断该手机号码在 孕期内有没有建档
  1759 + patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
  1760 + if (CollectionUtils.isNotEmpty(patients)) {
  1761 + br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
  1762 + br.setErrormsg("该高危专号已存在");
  1763 + return br;
  1764 + }
1763 1765 }
1764 1766 }
1765 1767 }
1766   - }
1767 1768 // if (pat != null && StringUtils.isNotEmpty(pat.getVcCardNo()) && !pat.getVcCardNo().equals(yunRequest.getVcCardNo())) {
1768 1769 //
1769 1770 // //就诊卡号判断
... ... @@ -1784,8 +1785,6 @@
1784 1785 }
1785 1786  
1786 1787  
1787   -
1788   -
1789 1788 Patients patient = getPatientsData(yunRequest);
1790 1789 patient.setYyzyfmHospitalId(yunRequest.getYyzyfmHospitalId());
1791 1790 patient.setNextCheckTime(DateUtil.parseYMD(yunRequest.getNextCheckTime()));
1792 1791  
1793 1792  
1794 1793  
... ... @@ -1843,18 +1842,18 @@
1843 1842 }*/
1844 1843  
1845 1844 //如果建档医生是空则创建医生
1846   - if (StringUtils.isEmpty(patient.getLastCheckEmployeeId())){
  1845 + if (StringUtils.isEmpty(patient.getLastCheckEmployeeId())) {
1847 1846  
1848   - Integer dockerId= usersService.getUserId(hospitalId,yunRequest.getLastCheckEmployeeName());
1849   - if (dockerId!=null){
  1847 + Integer dockerId = usersService.getUserId(hospitalId, yunRequest.getLastCheckEmployeeName());
  1848 + if (dockerId != null) {
1850 1849 patient.setLastCheckEmployeeId(String.valueOf(dockerId));
1851   - }else {
1852   - if(StringUtils.isNotEmpty(yunRequest.getLastCheckEmployeeName())){
  1850 + } else {
  1851 + if (StringUtils.isNotEmpty(yunRequest.getLastCheckEmployeeName())) {
1853 1852 //准备添加数据
1854 1853 Users users = new Users();
1855 1854 users.setType(UserTypeEnum.NORMAL_USER.getId()); //1普通用户
1856 1855 //users.setDeptId(deptId);
1857   - users.setOrgId(Integer.valueOf(StringUtils.isNotEmpty(patient.getHospitalId())?patient.getHospitalId():hospitalId));
  1856 + users.setOrgId(Integer.valueOf(StringUtils.isNotEmpty(patient.getHospitalId()) ? patient.getHospitalId() : hospitalId));
1858 1857 users.setName(yunRequest.getLastCheckEmployeeName());
1859 1858 users.setAccount(yunRequest.getLastCheckEmployeeName());
1860 1859 //users.setPhone(phone);
... ... @@ -3008,6 +3007,7 @@
3008 3007 result.setLastCheckEmployeeId(p.getLastCheckEmployeeId());
3009 3008 result.setUserType(p.getUserType());
3010 3009 result.setDept(p.getDept());
  3010 + result.setLowerHairOgr(p.getLowerHairOgr());
3011 3011 return result;
3012 3012 }
3013 3013  
3014 3014  
3015 3015  
3016 3016  
... ... @@ -3732,22 +3732,22 @@
3732 3732 return patientId;
3733 3733 }
3734 3734  
3735   - public BaseResponse deleteVideo(String fileName){
  3735 + public BaseResponse deleteVideo(String fileName) {
3736 3736 BaseObjectResponse objectResponse = new BaseObjectResponse();
3737 3737 try {
3738   - String arrays[]= fileName.split("/id_photo");
3739   - if (arrays.length>1){
3740   - File file = new File(BASE_IMG_PATH +arrays[1]);
  3738 + String arrays[] = fileName.split("/id_photo");
  3739 + if (arrays.length > 1) {
  3740 + File file = new File(BASE_IMG_PATH + arrays[1]);
3741 3741 file.delete();
3742 3742 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
3743 3743 objectResponse.setErrormsg("成功");
3744 3744 return objectResponse;
3745   - }else {
  3745 + } else {
3746 3746 objectResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
3747 3747 objectResponse.setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
3748 3748 return objectResponse;
3749 3749 }
3750   - }catch (Exception e){
  3750 + } catch (Exception e) {
3751 3751 ExceptionUtils.catchException(e, "上传文件发生异常");
3752 3752 objectResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
3753 3753 objectResponse.setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
3754 3754  
... ... @@ -3763,15 +3763,15 @@
3763 3763 try {
3764 3764  
3765 3765 //临时路径
3766   - String tempsDirPath="tempsDir";
  3766 + String tempsDirPath = "tempsDir";
3767 3767 //创建临时文件储存目录
3768 3768 File tempsDir = new File(BASE_IMG_PATH + File.separator + tempsDirPath, fileName);
3769 3769 if (!tempsDir.exists()) {
3770 3770 tempsDir.mkdirs();
3771 3771 }
3772 3772 //储存为临时文件
3773   - System.out.println(tempsDir.getAbsolutePath()+"/"+fileName+".part"+ chunk);
3774   - File tempFile = new File(tempsDir.getAbsolutePath()+"/"+fileName+".part"+ chunk);
  3773 + System.out.println(tempsDir.getAbsolutePath() + "/" + fileName + ".part" + chunk);
  3774 + File tempFile = new File(tempsDir.getAbsolutePath() + "/" + fileName + ".part" + chunk);
3775 3775 file.transferTo(tempFile);
3776 3776 //检查分片是否下载完成
3777 3777 int successChunks = FileUtils.getInstance().successChunks(fileName, chunks);
... ... @@ -3781,7 +3781,7 @@
3781 3781 String imgPath = DateUtil.getYmd(new Date());
3782 3782 //分片下载完成后合并分片为文件
3783 3783 FileUtils.getInstance().mergeChunks(tempsDir.getAbsolutePath(),
3784   - BASE_IMG_PATH + File.separator +imgPath
  3784 + BASE_IMG_PATH + File.separator + imgPath
3785 3785 , fileName, chunks);
3786 3786 //返回文件地址
3787 3787 objectResponse.setData(imgPath + "/" + fileName);
3788 3788  
3789 3789  
3790 3790  
... ... @@ -4572,32 +4572,31 @@
4572 4572 }
4573 4573 }
4574 4574  
4575   - public void testInit(){
4576   - AntExRecordQuery antExRecordQuery=new AntExRecordQuery();
4577   - antExRecordQuery.setType(2);
  4575 + public void testInit() {
  4576 + AntExRecordQuery antExRecordQuery = new AntExRecordQuery();
  4577 + antExRecordQuery.setType(1);
4578 4578 antExRecordQuery.setHospitalId("2100002419");
4579   - List<AntExRecordModel> recordModels= antExRecordService.queryAntExRecords(antExRecordQuery);
4580   - if (CollectionUtils.isNotEmpty(recordModels)){
4581   - for (AntExRecordModel antExRecordModel : recordModels){
4582   - List hRisk= antExRecordModel.gethRisk();
4583   - if (CollectionUtils.isNotEmpty(hRisk)){
4584   - antExRecordModel.sethRisk(hRisk);
4585   - antExRecordModel.sethLevel(antExRecordModel.gethLevel());
4586   - antExRecordModel.sethScore(antExRecordModel.gethScore());
4587   - }else {
4588   - AntExRecordModel antExRecordModel1= recordModels.get(recordModels.size()-1);
4589   - antExRecordModel.sethRisk(antExRecordModel1.gethRisk());
4590   - antExRecordModel.sethLevel(antExRecordModel1.gethLevel());
4591   - antExRecordModel.sethScore(antExRecordModel1.gethScore());
4592   - }
  4579 + List<AntExRecordModel> recordModels = antExRecordService.queryAntExRecords(antExRecordQuery);
  4580 + if (CollectionUtils.isNotEmpty(recordModels)) {
  4581 + for (AntExRecordModel antExRecordModel : recordModels) {
  4582 + List hRisk = antExRecordModel.gethRisk();
  4583 + if (CollectionUtils.isEmpty(hRisk)) {
  4584 + antExRecordQuery.setType(2);
  4585 + antExRecordQuery.setParentId(antExRecordModel.getParentId());
  4586 + List<AntExRecordModel> antExRecordModels = antExRecordService.queryAntExRecords(antExRecordQuery);
  4587 + if (CollectionUtils.isNotEmpty(antExRecordModels)) {
  4588 + if (CollectionUtils.isNotEmpty(antExRecordModels.get(0).gethRisk())) {
  4589 + antExRecordModel.sethRisk(antExRecordModels.get(0).gethRisk());
  4590 + antExRecordModel.sethLevel(antExRecordModels.get(0).gethLevel());
  4591 + antExRecordModel.sethScore(antExRecordModels.get(0).gethScore());
  4592 + antExRecordService.updateOne(antExRecordModel, antExRecordModel.getId());
4593 4593  
4594   - antExRecordService.updateOne(antExRecordModel,antExRecordModel.getId());
4595   - }
4596   - }
  4594 + }
  4595 + }
  4596 + }
4597 4597  
4598   -
4599   -
4600   -
  4598 + }
  4599 + }
4601 4600  
4602 4601 }
4603 4602  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PregnantInfoResult.java View file @ 8a71c96
... ... @@ -58,6 +58,15 @@
58 58 //大同职工专属 1为是 0为否
59 59 private Integer userType;
60 60 private String dept;
  61 + private String lowerHairOgr;
  62 +
  63 + public String getLowerHairOgr() {
  64 + return lowerHairOgr;
  65 + }
  66 +
  67 + public void setLowerHairOgr(String lowerHairOgr) {
  68 + this.lowerHairOgr = lowerHairOgr;
  69 + }
61 70  
62 71 public String getDept() {
63 72 return dept;