Commit abc0446adccafc37683c3a5c7c78100558391453

Authored by wtt
1 parent 0cdf426706

update

Showing 1 changed file with 39 additions and 42 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ abc0446
... ... @@ -784,20 +784,7 @@
784 784 trackDownRecordService.updateTrackDownParent(trackDownRecord, excAddRequest.getParentId());
785 785 }*/
786 786 antenatalExaminationService.addOneAntEx(antExChuModel);
787   - /**
788   - * 秦皇岛区域定制:初诊选择预约住院分娩医院同时,修改档案的预约住院分娩医院
789   - * @Author: 武涛涛
790   - * @Date: 2021/4/21 15:56
791   - */
792 787  
793   - Organization og = organizationService.getOrganization(Integer.valueOf(hospitalId));
794   - //秦皇岛区域
795   - if(og!=null && "2".equals(og.getCityId()) && StringUtils.isNotEmpty(excAddRequest.getYyzyfmHospitalId()) && StringUtils.isNotEmpty(antExChuModel.getParentId())){
796   - Patients patients1 = new Patients();
797   - patients1.setId(antExChuModel.getParentId());
798   - patients1.setYyzyfmHospitalId(excAddRequest.getYyzyfmHospitalId());
799   - patientsService.updatePatient(patients1);
800   - }
801 788  
802 789 excAddRequest.setId(antExChuModel.getId());
803 790  
804 791  
... ... @@ -899,7 +886,20 @@
899 886 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("您已经做过初诊");
900 887 }
901 888 }
  889 + /**
  890 + * 秦皇岛区域定制:初诊选择预约住院分娩医院同时,修改档案的预约住院分娩医院
  891 + * @Author: 武涛涛
  892 + * @Date: 2021/4/21 15:56
  893 + */
  894 + Organization og = organizationService.getOrganization(Integer.valueOf(hospitalId));
902 895  
  896 + //秦皇岛区域
  897 + if (og != null && "2".equals(og.getCityId()) && StringUtils.isNotEmpty(excAddRequest.getYyzyfmHospitalId()) && StringUtils.isNotEmpty(antExChuModel.getParentId())) {
  898 + Patients patients1 = new Patients();
  899 + patients1.setId(antExChuModel.getParentId());
  900 + patients1.setYyzyfmHospitalId(excAddRequest.getYyzyfmHospitalId());
  901 + patientsService.updatePatient(patients1);
  902 + }
903 903 //处理数据自动流转
904 904 updateChuAutoData(antExChuModel, excAddRequest, hospitalId, userId);
905 905  
... ... @@ -2568,7 +2568,7 @@
2568 2568  
2569 2569 private void sortList(List listDate) {
2570 2570 //按照数据排序
2571   - Collections.sort(listDate, new Comparator<SortIn>() {
  2571 + Collections.sort(listDate, new Comparator <SortIn>() {
2572 2572 @Override
2573 2573 public int compare(SortIn o1, SortIn o2) {
2574 2574 if (o1.getDate() != null && null != o2.getDate() && o1.getDate().after(o2.getDate())) {
2575 2575  
2576 2576  
... ... @@ -2660,11 +2660,11 @@
2660 2660 StringBuffer stringBuffer = new StringBuffer();
2661 2661 if (StringUtils.isNotEmpty(string)) {
2662 2662 // string = string.replace("\\n", "");
2663   - string = string.replace("\\n", "").replace("\\", "") ;
  2663 + string = string.replace("\\n", "").replace("\\", "");
2664 2664 // List <Map> recordChoiceStrlist = com.alibaba.fastjson.JSONObject.parseArray(string, Map.class);
2665   - com.alibaba.fastjson.JSONObject parse = (com.alibaba.fastjson.JSONObject)com.alibaba.fastjson.JSONObject.parse(string);
  2665 + com.alibaba.fastjson.JSONObject parse = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.parse(string);
2666 2666 HashMap hashMap = JSON.parseObject(string, HashMap.class);
2667   - if(parse != null){
  2667 + if (parse != null) {
2668 2668 Object finding = parse.get("finding");
2669 2669 Object diagnosis = parse.get("diagnosis");
2670 2670 String str = finding + "\r\n" + diagnosis + "\r\n";
... ... @@ -2672,7 +2672,6 @@
2672 2672 }
2673 2673  
2674 2674  
2675   -
2676 2675 // String strs = "";
2677 2676 /*
2678 2677 HashMap hashMap = JSON.parseObject(str, HashMap.class);
2679 2678  
2680 2679  
2681 2680  
... ... @@ -2819,22 +2818,23 @@
2819 2818  
2820 2819 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
2821 2820 }
2822   - public BaseObjectResponse saveRisData(List<RisInfoModelRequest> models) {
2823   - System.out.println("----------1-----------"+models.size());
2824   - if(CollectionUtils.isNotEmpty(models)){
  2821 +
  2822 + public BaseObjectResponse saveRisData(List <RisInfoModelRequest> models) {
  2823 + System.out.println("----------1-----------" + models.size());
  2824 + if (CollectionUtils.isNotEmpty(models)) {
2825 2825 for (RisInfoModelRequest risInfoModelRequest : models) {
2826   - if(StringUtils.isNotEmpty(risInfoModelRequest.getHospitalId())){
  2826 + if (StringUtils.isNotEmpty(risInfoModelRequest.getHospitalId())) {
2827 2827 PatientsQuery patientsQuery1 = new PatientsQuery();
2828 2828 patientsQuery1.setYn(YnEnums.YES.getId());
2829 2829 patientsQuery1.setHospitalId(risInfoModelRequest.getHospitalId());
2830 2830 patientsQuery1.setVcCardNo(risInfoModelRequest.getVCCARDNO());
2831 2831 patientsQuery1.setPhone(risInfoModelRequest.getPHONE());
2832   - System.out.println("----------2-----------"+patientsQuery1.convertToQuery().convertToMongoQuery());
2833   - List<Patients> patientses = patientsService.queryPatient(patientsQuery1);
2834   - if(CollectionUtils.isNotEmpty(patientses)){
  2832 + System.out.println("----------2-----------" + patientsQuery1.convertToQuery().convertToMongoQuery());
  2833 + List <Patients> patientses = patientsService.queryPatient(patientsQuery1);
  2834 + if (CollectionUtils.isNotEmpty(patientses)) {
2835 2835 Patients patients = patientses.get(0);
2836   - saveRisDataCz(risInfoModelRequest,patients.getId());
2837   - saveRisDataFz(risInfoModelRequest,patients.getId());
  2836 + saveRisDataCz(risInfoModelRequest, patients.getId());
  2837 + saveRisDataFz(risInfoModelRequest, patients.getId());
2838 2838 }
2839 2839 }
2840 2840  
2841 2841  
... ... @@ -2842,11 +2842,10 @@
2842 2842 }
2843 2843  
2844 2844  
2845   -
2846   -
2847 2845 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
2848 2846 }
2849   - private void saveRisDataCz(RisInfoModelRequest risInfoModelRequest,String parentId) {
  2847 +
  2848 + private void saveRisDataCz(RisInfoModelRequest risInfoModelRequest, String parentId) {
2850 2849 AntExChuQuery antExChuQuery = new AntExChuQuery();
2851 2850 antExChuQuery.setHospitalId(risInfoModelRequest.getHospitalId());//2100001296
2852 2851 antExChuQuery.setYn(YnEnums.YES.getId());
2853 2852  
2854 2853  
2855 2854  
... ... @@ -2858,14 +2857,15 @@
2858 2857 if (CollectionUtils.isNotEmpty(antExChu)) {
2859 2858 AntExChuModel antExChuModel1 = antExChu.get(0);
2860 2859 if (StringUtils.isEmpty(antExChuModel1.getbChao())) {
2861   - antExChuModel1.setbChao(risInfoModelRequest.getITEM_FINDING()+ "\r\n" + risInfoModelRequest.getITEM_DIAGNOSIS()+ "\r\n");
  2860 + antExChuModel1.setbChao(risInfoModelRequest.getITEM_FINDING() + "\r\n" + risInfoModelRequest.getITEM_DIAGNOSIS() + "\r\n");
2862 2861 System.out.println("-----------cc2--------antExChuModel1--" + antExChuModel1.toString());
2863 2862 iAntExChuDao.updateOneAntEx(antExChuModel1, antExChuModel1.getId());
2864   - }
  2863 + }
2865 2864 }
2866 2865 }
2867   - private void saveRisDataFz(RisInfoModelRequest risInfoModelRequest,String parentId) {
2868 2866  
  2867 + private void saveRisDataFz(RisInfoModelRequest risInfoModelRequest, String parentId) {
  2868 +
2869 2869 AntExQuery antExQuery = new AntExQuery();
2870 2870 antExQuery.setHospitalId(risInfoModelRequest.getHospitalId());//2100001296
2871 2871 antExQuery.setYn(YnEnums.YES.getId());
... ... @@ -2875,7 +2875,7 @@
2875 2875 if (CollectionUtils.isNotEmpty(antExFu)) {
2876 2876 AntenatalExaminationModel antenatalExaminationModel1 = antExFu.get(0);
2877 2877 if (StringUtils.isEmpty(antenatalExaminationModel1.getbChao())) {
2878   - antenatalExaminationModel1.setbChao(risInfoModelRequest.getITEM_FINDING()+ "\r\n" + risInfoModelRequest.getITEM_DIAGNOSIS()+ "\r\n");
  2878 + antenatalExaminationModel1.setbChao(risInfoModelRequest.getITEM_FINDING() + "\r\n" + risInfoModelRequest.getITEM_DIAGNOSIS() + "\r\n");
2879 2879 System.out.println("-----------ff2--------antenatalExaminationModel1--" + antenatalExaminationModel1.toString());
2880 2880 antExService.updateOneAnt(antenatalExaminationModel1, antenatalExaminationModel1.getId());
2881 2881 }
... ... @@ -3641,8 +3641,7 @@
3641 3641  
3642 3642  
3643 3643 //衡水区域并且不是衡水市第六人民医院
3644   - if("12".equals(og.getCityId()) && !"2100002324".equals(hospitalId))
3645   - {
  3644 + if ("12".equals(og.getCityId()) && !"2100002324".equals(hospitalId)) {
3646 3645 currentGroupHospital.remove("2100002324");//衡水市第六人民医院
3647 3646 }
3648 3647  
3649 3648  
... ... @@ -4021,9 +4020,9 @@
4021 4020 list.addAll(checkList);
4022 4021 }*/
4023 4022 if (CollectionUtils.isNotEmpty(checkList)) {
4024   - if(highRisk.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6") && (StringUtils.isEmpty(oRisk) || "{}".equals(oRisk) || "[]".equals(oRisk)) ){
  4023 + if (highRisk.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6") && (StringUtils.isEmpty(oRisk) || "{}".equals(oRisk) || "[]".equals(oRisk))) {
4025 4024 list.addAll(checkList);
4026   - }else if(!highRisk.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")){
  4025 + } else if (!highRisk.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) {
4027 4026 list.addAll(checkList);
4028 4027 }
4029 4028 }
... ... @@ -4435,9 +4434,7 @@
4435 4434 }
4436 4435 data.add(map);
4437 4436 }
4438   - }
4439   - else
4440   - {
  4437 + } else {
4441 4438 Map <String, Object> map = new HashMap <>();
4442 4439 map.put("name", i);
4443 4440 data.add(map);