Commit ea6c522ef80fc3de4b1abcfb27554e342ae2b630
1 parent
06b4ca452e
Exists in
master
and in
6 other branches
诸城初诊,复诊接口
Showing 1 changed file with 53 additions and 16 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/zcfy/ZcPrenatalService.java
View file @
ea6c522
... | ... | @@ -27,9 +27,7 @@ |
27 | 27 | import java.sql.PreparedStatement; |
28 | 28 | import java.sql.ResultSet; |
29 | 29 | import java.text.SimpleDateFormat; |
30 | -import java.util.Date; | |
31 | -import java.util.List; | |
32 | -import java.util.Map; | |
30 | +import java.util.*; | |
33 | 31 | |
34 | 32 | /** |
35 | 33 | * 诸城初诊复诊接口(GXK) |
... | ... | @@ -83,6 +81,7 @@ |
83 | 81 | //新增数据 |
84 | 82 | Map<String,Object> map = (Map)br.getData(); |
85 | 83 | List<Map<String,Object>> list = (List)map.get("placentas"); |
84 | + List<Map<String,Object>> list1 = new ArrayList(); | |
86 | 85 | String fetalPosition = null; |
87 | 86 | String heartRate = null; |
88 | 87 | String fetalPresentation = null; |
89 | 88 | |
... | ... | @@ -92,11 +91,20 @@ |
92 | 91 | |
93 | 92 | |
94 | 93 | if(list != null && list.size()>0){ |
95 | - fetalPosition = list.get(0).get("fetalPosition").toString();//胎方位 | |
96 | - heartRate = list.get(0).get("heartRate").toString();//心率 | |
97 | - fetalPresentation = list.get(0).get("fetalPresentation").toString();//胎先露 | |
98 | - join1 = list.get(0).get("join").toString();//衔接 | |
94 | + for (int i = 0;i>list.size();i++){ | |
95 | + Map<String,String> map1 = new HashMap<String,String>(); | |
96 | + fetalPosition = list.get(i).get("fetalPosition").toString();//胎方位 | |
97 | + heartRate = list.get(i).get("heartRate").toString();//心率 | |
98 | + fetalPresentation = list.get(i).get("fetalPresentation").toString();//胎先露 | |
99 | + join1 = list.get(i).get("join").toString();//衔接 | |
100 | + map1.put("fetalPosition",fetalPosition); | |
101 | + map.put("heartRate",heartRate); | |
102 | + map.put("heartRate",heartRate); | |
103 | + map.put("fetalPresentation",fetalPresentation); | |
104 | + list1.add(map); | |
105 | + } | |
99 | 106 | |
107 | + | |
100 | 108 | } |
101 | 109 | /*String inSql = "insert into lyms_zccscz(id,name,idcard,vccardno,\n" + |
102 | 110 | "phone,genRemark,gynRemark,treatmentOpinion3,\n" + |
103 | 111 | |
... | ... | @@ -157,10 +165,10 @@ |
157 | 165 | "yghxkt,xqjq,xnsd,hivkt,ydfmw,ydqjd,\n" + |
158 | 166 | "bChao,heartRate,fetalPosition,fetalPresentation,join1,checkDate,\n" + |
159 | 167 | "cDueWeek,checkDoctor,hospital,dirOpinion,infectDiseases,screenResult,highRisk,highriskDesc," + |
160 | - "sieveStatus,nextCheckTime,yinchan,gongwaiyun,syjg,diagnosis,diagnosisOther) " + | |
168 | + "sieveStatus,nextCheckTime,yinchan,gongwaiyun,syjg,diagnosis,diagnosisOther,score,placentas) " + | |
161 | 169 | "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + |
162 | 170 | "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + |
163 | - "?,?,?,?,?,?,?)"; | |
171 | + "?,?,?,?,?,?,?,?,?)"; | |
164 | 172 | |
165 | 173 | |
166 | 174 | |
... | ... | @@ -639,6 +647,16 @@ |
639 | 647 | }else{ |
640 | 648 | ps.setString(100,null); |
641 | 649 | } |
650 | + if(map.get("score") != null){ | |
651 | + ps.setString(101,map.get("score").toString()); | |
652 | + }else{ | |
653 | + ps.setString(101,null); | |
654 | + } | |
655 | + if(list1 != null && list1.size()>0){ | |
656 | + ps.setString(102,list1.toString()); | |
657 | + }else{ | |
658 | + ps.setString(102,null); | |
659 | + } | |
642 | 660 | |
643 | 661 | |
644 | 662 | int result = ps.executeUpdate(); |
... | ... | @@ -716,6 +734,7 @@ |
716 | 734 | |
717 | 735 | |
718 | 736 | //新增数据 |
737 | + List<Map<String,Object>> list1 = new ArrayList<>(); | |
719 | 738 | Map<String,Object> map = (Map)br.getData(); |
720 | 739 | List<Map<String,Object>> list = (List)map.get("tireData"); |
721 | 740 | String fetalPosition = null; |
... | ... | @@ -724,10 +743,18 @@ |
724 | 743 | String join1 = null; |
725 | 744 | |
726 | 745 | if(list != null && list.size()>0){ |
727 | - fetalPosition = list.get(0).get("fetalPosition").toString();//胎方位 | |
728 | - heartRate = list.get(0).get("heartRate").toString();//心率 | |
729 | - fetalPresentation = list.get(0).get("fetalPresentation").toString();//胎先露 | |
730 | - join1 = list.get(0).get("join").toString();//衔接 | |
746 | + for (int i = 0;i>list.size();i++){ | |
747 | + Map<String,String> map1 = new HashMap<String,String>(); | |
748 | + fetalPosition = list.get(i).get("fetalPosition").toString();//胎方位 | |
749 | + heartRate = list.get(i).get("heartRate").toString();//心率 | |
750 | + fetalPresentation = list.get(i).get("fetalPresentation").toString();//胎先露 | |
751 | + join1 = list.get(i).get("join").toString();//衔接 | |
752 | + map1.put("fetalPosition",fetalPosition); | |
753 | + map.put("heartRate",heartRate); | |
754 | + map.put("heartRate",heartRate); | |
755 | + map.put("fetalPresentation",fetalPresentation); | |
756 | + list1.add(map); | |
757 | + } | |
731 | 758 | |
732 | 759 | } |
733 | 760 | |
... | ... | @@ -758,8 +785,8 @@ |
758 | 785 | "hemoglobin,urineProtein,bloodSugar,bloodSugar2,\n" + |
759 | 786 | "bloodSugar3,bloodSugar4,bChao,diagnosis,\n" + |
760 | 787 | "diagnosisOther,treatmentOpinion,guide,screenResult,highRisk,highriskDesc,\n" + |
761 | - "resultSupple,sieveStatus,nextCheckTime,randomBloodSugar) " + | |
762 | - "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
788 | + "resultSupple,sieveStatus,nextCheckTime,randomBloodSugar,score,tireData) " + | |
789 | + "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
763 | 790 | |
764 | 791 | ps = conn.prepareStatement(innSql); |
765 | 792 | ps.setString(1,antenatalExaminationModel.getId()); |
... | ... | @@ -936,6 +963,16 @@ |
936 | 963 | }else{ |
937 | 964 | ps.setString(40,null); |
938 | 965 | } |
966 | + if(map.get("score") != null){ | |
967 | + ps.setString(41,map.get("score").toString()); | |
968 | + }else{ | |
969 | + ps.setString(41,null); | |
970 | + } | |
971 | + if(list1 != null && list1.size()>0){ | |
972 | + ps.setString(42,list1.toString()); | |
973 | + }else{ | |
974 | + ps.setString(42,null); | |
975 | + } | |
939 | 976 | |
940 | 977 | |
941 | 978 | |
... | ... | @@ -950,7 +987,7 @@ |
950 | 987 | |
951 | 988 | }catch (Exception e){ |
952 | 989 | |
953 | - ExceptionUtils.catchException(e,"saveAntexFu"); | |
990 | + ExceptionUtils.catchException(e, "saveAntexFu"); | |
954 | 991 | |
955 | 992 | }finally { |
956 | 993 | try{ |