Commit 0f1d54d9d88eb8e3cf9abfbb01e6ca53d6c84ae1
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 6 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-dal/src/main/java/com/lyms/platform/pojo/WeightConfigModel.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MaternalDeliverResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
0f1d54d
| ... | ... | @@ -790,7 +790,8 @@ |
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | |
| 793 | - public static void weightMange(String fileName) | |
| 793 | + | |
| 794 | + public static void weightWeek(String fileName) | |
| 794 | 795 | { |
| 795 | 796 | |
| 796 | 797 | ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); |
| 797 | 798 | |
| ... | ... | @@ -802,13 +803,65 @@ |
| 802 | 803 | try { |
| 803 | 804 | wb = Workbook.getWorkbook(file); |
| 804 | 805 | Sheet s = wb.getSheet(0); |
| 806 | + System.out.println(s.getName() + " : "); | |
| 807 | + int rows = s.getRows(); | |
| 808 | + if(rows > 0){ | |
| 809 | + //遍历每行 | |
| 810 | + for(int i = 1 ;i < rows ; i++){ | |
| 811 | + | |
| 812 | + WeightConfigModel model = new WeightConfigModel(); | |
| 813 | + | |
| 814 | + Cell[] cells = s.getRow(i); | |
| 815 | + if(cells.length > 0){ | |
| 816 | + //遍历每行中的每列 | |
| 817 | + for (int j = 0 ; j < cells.length ; j ++) | |
| 818 | + { | |
| 819 | + String str = cells[j].getContents().trim(); | |
| 820 | + switch (j) | |
| 821 | + { | |
| 822 | + case 0: | |
| 823 | + model.setWeek(str); | |
| 824 | + continue; | |
| 825 | + case 1: | |
| 826 | + model.setWeekContent(str); | |
| 827 | + continue; | |
| 828 | + | |
| 829 | + } | |
| 830 | + } | |
| 831 | + | |
| 832 | + } | |
| 833 | + mongoTemplate.save(model); | |
| 834 | + } | |
| 835 | + } | |
| 836 | + } catch (IOException e) { | |
| 837 | + e.printStackTrace(); | |
| 838 | + } catch (BiffException e) { | |
| 839 | + e.printStackTrace(); | |
| 840 | + } | |
| 841 | + | |
| 842 | + } | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + public static void weightMange(String fileName) | |
| 847 | + { | |
| 848 | + | |
| 849 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
| 850 | + MongoTemplate mongoTemplate | |
| 851 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
| 852 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
| 853 | + File file = new File(fileName); | |
| 854 | + Workbook wb = null; | |
| 855 | + try { | |
| 856 | + wb = Workbook.getWorkbook(file); | |
| 857 | + Sheet s = wb.getSheet(1); | |
| 805 | 858 | System.out.println(s.getName() + " : "); |
| 806 | 859 | int rows = s.getRows(); |
| 807 | 860 | if(rows > 0){ |
| 808 | 861 | //遍历每行 |
| 809 | 862 | for(int i = 1 ;i < rows ; i++){ |
| 810 | 863 | |
| 811 | - WeightManageConfigModel model = new WeightManageConfigModel(); | |
| 864 | + WeightConfigModel model = new WeightConfigModel(); | |
| 812 | 865 | |
| 813 | 866 | Cell[] cells = s.getRow(i); |
| 814 | 867 | if(cells.length > 0){ |
| 815 | 868 | |
| 816 | 869 | |
| 817 | 870 | |
| 818 | 871 | |
| 819 | 872 | |
| 820 | 873 | |
| 821 | 874 | |
| 822 | 875 | |
| 823 | 876 | |
| 824 | 877 | |
| 825 | 878 | |
| ... | ... | @@ -819,38 +872,45 @@ |
| 819 | 872 | switch (j) |
| 820 | 873 | { |
| 821 | 874 | case 0: |
| 822 | - model.setWeek(str); | |
| 875 | + model.setKcal(Double.parseDouble(str)); | |
| 876 | + continue; | |
| 823 | 877 | case 1: |
| 824 | - model.setExample(str); | |
| 878 | + String[] arr = str.split("-"); | |
| 879 | + model.setKcalStart(Double.parseDouble(arr[0])); | |
| 880 | + model.setKcalEnd(Double.parseDouble(arr[1])); | |
| 881 | + continue; | |
| 825 | 882 | case 2: |
| 826 | 883 | model.setBreakfast(str); |
| 884 | + continue; | |
| 827 | 885 | case 3: |
| 828 | 886 | model.setBreakfastAdd(str); |
| 887 | + continue; | |
| 829 | 888 | case 4: |
| 830 | 889 | model.setLunch(str); |
| 890 | + continue; | |
| 831 | 891 | case 5: |
| 832 | 892 | model.setLunchAdd(str); |
| 893 | + continue; | |
| 833 | 894 | case 6: |
| 834 | 895 | model.setDinner(str); |
| 896 | + continue; | |
| 835 | 897 | case 7: |
| 836 | 898 | model.setDinnerAdd(str); |
| 899 | + continue; | |
| 837 | 900 | case 8: |
| 838 | - model.setWeightType(str); | |
| 901 | + model.setNorthSouth(str); | |
| 902 | + continue; | |
| 839 | 903 | case 9: |
| 840 | 904 | List<String> list1 = Arrays.asList(str.split("\n")); |
| 841 | 905 | model.setSuggests(list1); |
| 906 | + continue; | |
| 842 | 907 | } |
| 843 | 908 | } |
| 844 | 909 | |
| 845 | 910 | } |
| 846 | - System.out.println("week=" + model.getWeek()+";type="+model.getWeightType()); | |
| 847 | 911 | mongoTemplate.save(model); |
| 848 | 912 | } |
| 849 | 913 | } |
| 850 | - | |
| 851 | - | |
| 852 | - | |
| 853 | - | |
| 854 | 914 | } catch (IOException e) { |
| 855 | 915 | e.printStackTrace(); |
| 856 | 916 | } catch (BiffException e) { |
| 857 | 917 | |
| ... | ... | @@ -871,12 +931,12 @@ |
| 871 | 931 | = (MongoTemplate) applicationContext.getBean("mongoTemplate"); |
| 872 | 932 | mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); |
| 873 | 933 | |
| 874 | - Sheet s1 = wb.getSheet(1); | |
| 934 | + Sheet s1 = wb.getSheet(2); | |
| 875 | 935 | int rows1 = s1.getRows(); |
| 876 | 936 | if(rows1 > 0){ |
| 877 | 937 | //遍历每行 |
| 878 | 938 | for(int i = 1 ;i < rows1 ; i++){ |
| 879 | - WeightManageConfigModel.Cookbook cookbook = new WeightManageConfigModel.Cookbook(); | |
| 939 | + WeightConfigModel.Cookbook cookbook = new WeightConfigModel.Cookbook(); | |
| 880 | 940 | Cell[] cells = s1.getRow(i); |
| 881 | 941 | if(cells.length > 0){ |
| 882 | 942 | //遍历每行中的每列 |
| 883 | 943 | |
| 884 | 944 | |
| 885 | 945 | |
| 886 | 946 | |
| 887 | 947 | |
| 888 | 948 | |
| 889 | 949 | |
| 890 | 950 | |
| 891 | 951 | |
| ... | ... | @@ -887,39 +947,45 @@ |
| 887 | 947 | switch (j) |
| 888 | 948 | { |
| 889 | 949 | case 0: |
| 890 | - cookbook.setWeek(str); | |
| 950 | + cookbook.setKcal(Double.parseDouble(str)); | |
| 951 | + continue; | |
| 891 | 952 | case 1: |
| 892 | - cookbook.setVegetable(str); | |
| 953 | + String[] arr = str.split("-"); | |
| 954 | + cookbook.setKcalStart(Double.parseDouble(arr[0])); | |
| 955 | + cookbook.setKcalEnd(Double.parseDouble(arr[1])); | |
| 956 | + continue; | |
| 893 | 957 | case 2: |
| 894 | - cookbook.setFoodMaterial(str); | |
| 958 | + cookbook.setVegetable(str); | |
| 959 | + continue; | |
| 895 | 960 | case 3: |
| 961 | + cookbook.setFoodMaterial(str); | |
| 962 | + continue; | |
| 963 | + case 4: | |
| 896 | 964 | List<String> list1 = Arrays.asList(str.split("\n")); |
| 897 | 965 | cookbook.setMakeMethod(list1); |
| 898 | - case 4: | |
| 899 | - cookbook.setWeightType(str); | |
| 900 | - | |
| 966 | + continue; | |
| 901 | 967 | } |
| 902 | 968 | |
| 903 | 969 | |
| 904 | 970 | } |
| 905 | 971 | |
| 906 | - WeightManageConfigModel weightManageConfigModel = | |
| 907 | - mongoTemplate.findOne(Query.query(Criteria.where("week").is(cookbook.getWeek()).and("weightType").is(cookbook.getWeightType())), | |
| 908 | - WeightManageConfigModel.class); | |
| 972 | + WeightConfigModel weightConfigModel = | |
| 973 | + mongoTemplate.findOne(Query.query(Criteria.where("kcal").is(cookbook.getKcal())), | |
| 974 | + WeightConfigModel.class); | |
| 909 | 975 | |
| 910 | - List<WeightManageConfigModel.Cookbook> cookbooks = weightManageConfigModel.getCookbooks(); | |
| 976 | + List<WeightConfigModel.Cookbook> cookbooks = weightConfigModel.getCookbooks(); | |
| 911 | 977 | if (cookbooks == null) |
| 912 | 978 | { |
| 913 | 979 | cookbooks = new ArrayList<>(); |
| 914 | 980 | } |
| 915 | 981 | cookbooks.add(cookbook); |
| 916 | - weightManageConfigModel.setCookbooks(cookbooks); | |
| 982 | + weightConfigModel.setCookbooks(cookbooks); | |
| 917 | 983 | |
| 918 | 984 | Update update = MongoConvertHelper |
| 919 | - .convertToNativeUpdate(ReflectionUtils.getUpdateField(weightManageConfigModel)); | |
| 985 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(weightConfigModel)); | |
| 920 | 986 | |
| 921 | - mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(weightManageConfigModel.getId())),update, | |
| 922 | - WeightManageConfigModel.class); | |
| 987 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(weightConfigModel.getId())),update, | |
| 988 | + WeightConfigModel.class); | |
| 923 | 989 | |
| 924 | 990 | } |
| 925 | 991 | } |
| ... | ... | @@ -935,8 +1001,9 @@ |
| 935 | 1001 | |
| 936 | 1002 | |
| 937 | 1003 | public static void main(String[] args) { |
| 938 | - weightMange("F:\\体重与营养管理\\体重营养配置模板.xls"); | |
| 939 | - weightFood("F:\\体重与营养管理\\体重营养配置模板.xls"); | |
| 1004 | + weightWeek("F:\\体重与营养管理\\第三版体重配置模板.xls"); | |
| 1005 | + weightMange("F:\\体重与营养管理\\第三版体重配置模板.xls"); | |
| 1006 | + weightFood("F:\\体重与营养管理\\第三版体重配置模板.xls"); | |
| 940 | 1007 | } |
| 941 | 1008 | |
| 942 | 1009 | public static void addBaby(ApplicationContext applicationContext) { |
platform-dal/src/main/java/com/lyms/platform/pojo/WeightConfigModel.java
View file @
0f1d54d
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 4 | + | |
| 5 | +import java.io.Serializable; | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by Administrator on 2018-06-04. | |
| 10 | + */ | |
| 11 | +@Document(collection = "lyms_weight_config_test") | |
| 12 | +public class WeightConfigModel { | |
| 13 | + private String id; | |
| 14 | + private String week;//孕周 | |
| 15 | + private Double kcal; //整值卡路里 | |
| 16 | + private Double kcalStart; //整值卡路里区间值 | |
| 17 | + private Double kcalEnd; //整值卡路里区间值 | |
| 18 | + | |
| 19 | + private String weekContent;//当前孕周的营养指南 | |
| 20 | + | |
| 21 | + private String breakfast;//早餐 | |
| 22 | + private String breakfastAdd;//上午加餐 | |
| 23 | + private String lunch;//午餐 | |
| 24 | + private String lunchAdd;//下午加餐 | |
| 25 | + private String dinner;//晚餐 | |
| 26 | + private String dinnerAdd;//晚加餐 | |
| 27 | + | |
| 28 | + //菜谱 | |
| 29 | + private List<Cookbook> cookbooks; | |
| 30 | + | |
| 31 | + private String northSouth;//南北 | |
| 32 | + private List<String> suggests;//建议 | |
| 33 | + | |
| 34 | + public String getId() { | |
| 35 | + return id; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setId(String id) { | |
| 39 | + this.id = id; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public String getWeek() { | |
| 43 | + return week; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setWeek(String week) { | |
| 47 | + this.week = week; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public Double getKcal() { | |
| 51 | + return kcal; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setKcal(Double kcal) { | |
| 55 | + this.kcal = kcal; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public Double getKcalStart() { | |
| 59 | + return kcalStart; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setKcalStart(Double kcalStart) { | |
| 63 | + this.kcalStart = kcalStart; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public Double getKcalEnd() { | |
| 67 | + return kcalEnd; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setKcalEnd(Double kcalEnd) { | |
| 71 | + this.kcalEnd = kcalEnd; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public String getWeekContent() { | |
| 75 | + return weekContent; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void setWeekContent(String weekContent) { | |
| 79 | + this.weekContent = weekContent; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public String getBreakfast() { | |
| 83 | + return breakfast; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void setBreakfast(String breakfast) { | |
| 87 | + this.breakfast = breakfast; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public String getBreakfastAdd() { | |
| 91 | + return breakfastAdd; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public void setBreakfastAdd(String breakfastAdd) { | |
| 95 | + this.breakfastAdd = breakfastAdd; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public String getLunch() { | |
| 99 | + return lunch; | |
| 100 | + } | |
| 101 | + | |
| 102 | + public void setLunch(String lunch) { | |
| 103 | + this.lunch = lunch; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public String getLunchAdd() { | |
| 107 | + return lunchAdd; | |
| 108 | + } | |
| 109 | + | |
| 110 | + public void setLunchAdd(String lunchAdd) { | |
| 111 | + this.lunchAdd = lunchAdd; | |
| 112 | + } | |
| 113 | + | |
| 114 | + public String getDinner() { | |
| 115 | + return dinner; | |
| 116 | + } | |
| 117 | + | |
| 118 | + public void setDinner(String dinner) { | |
| 119 | + this.dinner = dinner; | |
| 120 | + } | |
| 121 | + | |
| 122 | + public String getDinnerAdd() { | |
| 123 | + return dinnerAdd; | |
| 124 | + } | |
| 125 | + | |
| 126 | + public void setDinnerAdd(String dinnerAdd) { | |
| 127 | + this.dinnerAdd = dinnerAdd; | |
| 128 | + } | |
| 129 | + | |
| 130 | + public List<Cookbook> getCookbooks() { | |
| 131 | + return cookbooks; | |
| 132 | + } | |
| 133 | + | |
| 134 | + public void setCookbooks(List<Cookbook> cookbooks) { | |
| 135 | + this.cookbooks = cookbooks; | |
| 136 | + } | |
| 137 | + | |
| 138 | + public String getNorthSouth() { | |
| 139 | + return northSouth; | |
| 140 | + } | |
| 141 | + | |
| 142 | + public void setNorthSouth(String northSouth) { | |
| 143 | + this.northSouth = northSouth; | |
| 144 | + } | |
| 145 | + | |
| 146 | + public List<String> getSuggests() { | |
| 147 | + return suggests; | |
| 148 | + } | |
| 149 | + | |
| 150 | + public void setSuggests(List<String> suggests) { | |
| 151 | + this.suggests = suggests; | |
| 152 | + } | |
| 153 | + | |
| 154 | + @Override | |
| 155 | + public String toString() { | |
| 156 | + return "WeightManageConfigModel{" + | |
| 157 | + "id='" + id + '\'' + | |
| 158 | + ", week='" + week + '\'' + | |
| 159 | + ", kcal=" + kcal + | |
| 160 | + ", kcalStart=" + kcalStart + | |
| 161 | + ", kcalEnd=" + kcalEnd + | |
| 162 | + ", weekContent='" + weekContent + '\'' + | |
| 163 | + ", breakfast='" + breakfast + '\'' + | |
| 164 | + ", breakfastAdd='" + breakfastAdd + '\'' + | |
| 165 | + ", lunch='" + lunch + '\'' + | |
| 166 | + ", lunchAdd='" + lunchAdd + '\'' + | |
| 167 | + ", dinner='" + dinner + '\'' + | |
| 168 | + ", dinnerAdd='" + dinnerAdd + '\'' + | |
| 169 | + ", cookbooks=" + cookbooks + | |
| 170 | + ", northSouth='" + northSouth + '\'' + | |
| 171 | + ", suggests=" + suggests + | |
| 172 | + '}'; | |
| 173 | + } | |
| 174 | + | |
| 175 | + public static class Cookbook implements Serializable { | |
| 176 | + private String vegetable;//菜名称 | |
| 177 | + private String foodMaterial; //食材 | |
| 178 | + private List<String> makeMethod;//制作方法 | |
| 179 | + private Double kcal; //整值卡路里 | |
| 180 | + private Double kcalStart; //整值卡路里区间值 | |
| 181 | + private Double kcalEnd; //整值卡路里区间值 | |
| 182 | + | |
| 183 | + public Double getKcal() { | |
| 184 | + return kcal; | |
| 185 | + } | |
| 186 | + | |
| 187 | + public void setKcal(Double kcal) { | |
| 188 | + this.kcal = kcal; | |
| 189 | + } | |
| 190 | + | |
| 191 | + public Double getKcalStart() { | |
| 192 | + return kcalStart; | |
| 193 | + } | |
| 194 | + | |
| 195 | + public void setKcalStart(Double kcalStart) { | |
| 196 | + this.kcalStart = kcalStart; | |
| 197 | + } | |
| 198 | + | |
| 199 | + public Double getKcalEnd() { | |
| 200 | + return kcalEnd; | |
| 201 | + } | |
| 202 | + | |
| 203 | + public void setKcalEnd(Double kcalEnd) { | |
| 204 | + this.kcalEnd = kcalEnd; | |
| 205 | + } | |
| 206 | + | |
| 207 | + public String getVegetable() { | |
| 208 | + return vegetable; | |
| 209 | + } | |
| 210 | + | |
| 211 | + public void setVegetable(String vegetable) { | |
| 212 | + this.vegetable = vegetable; | |
| 213 | + } | |
| 214 | + | |
| 215 | + public String getFoodMaterial() { | |
| 216 | + return foodMaterial; | |
| 217 | + } | |
| 218 | + | |
| 219 | + public void setFoodMaterial(String foodMaterial) { | |
| 220 | + this.foodMaterial = foodMaterial; | |
| 221 | + } | |
| 222 | + | |
| 223 | + public List<String> getMakeMethod() { | |
| 224 | + return makeMethod; | |
| 225 | + } | |
| 226 | + | |
| 227 | + public void setMakeMethod(List<String> makeMethod) { | |
| 228 | + this.makeMethod = makeMethod; | |
| 229 | + } | |
| 230 | + } | |
| 231 | +} |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java
View file @
0f1d54d
| ... | ... | @@ -928,483 +928,290 @@ |
| 928 | 928 | SimpleDateFormat fmt1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 929 | 929 | MaternalDeliverResult maternalDeliverResult = new MaternalDeliverResult(); |
| 930 | 930 | |
| 931 | + Connection conn = ConnTools.makeFmConnection(); | |
| 932 | + QueryRunner queryRunner = new QueryRunner(); | |
| 933 | + if(idCardNo != null){ | |
| 934 | + try{ | |
| 931 | 935 | |
| 936 | + FmPatInfo patInfo = null; | |
| 937 | + String sql = "SELECT syxh,hzxm as name,sfzh as cardNo,sex as sex,birth,lxrdh as phone, blh FROM THIS4_BASY WHERE sfzh = '"+idCardNo+"'"; | |
| 938 | + List<FmPatInfo> infoList = queryRunner.query(conn,sql,new BeanListHandler<FmPatInfo>(FmPatInfo.class)); | |
| 939 | + if(CollectionUtils.isNotEmpty(infoList)){ | |
| 940 | + patInfo = infoList.get(0); | |
| 932 | 941 | |
| 933 | - List<FmItem> itemList = new ArrayList<>(); | |
| 934 | - FmItem fmItem1 = new FmItem(); | |
| 935 | - fmItem1.setSyxh("10019988"); | |
| 936 | - fmItem1.setJlrq("2017011217:52:00"); | |
| 937 | - fmItem1.setSsj("2"); | |
| 938 | - fmItem1.setSsrq("20170112"); | |
| 939 | - fmItem1.setCsrq("2017011214:15:00"); | |
| 940 | - fmItem1.setSrks("产二科"); | |
| 941 | - fmItem1.setYexb("男"); | |
| 942 | - fmItem1.setRc("37"); | |
| 943 | - fmItem1.setDjt("1"); | |
| 944 | - fmItem1.setCjc("1"); | |
| 945 | - fmItem1.setJsz("王瑞华"); | |
| 946 | - fmItem1.setTz("2730"); | |
| 947 | - fmItem1.setSc("50"); | |
| 948 | - fmItem1.setYfz("9"); | |
| 949 | - fmItem1.setWfz("10"); | |
| 950 | - fmItem1.setSfz("10"); | |
| 951 | - fmItem1.setPfz("王瑞华"); | |
| 952 | - fmItem1.setCcqk("活产"); | |
| 953 | - fmItem1.setFmfs("剖宫产"); | |
| 954 | - fmItem1.setTpmcfs("自然产出"); | |
| 955 | - fmItem1.setYeqk("正常"); | |
| 956 | - fmItem1.setJx("无"); | |
| 942 | + String cloumns = " SYXH as syxh,\n" + | |
| 943 | + " YEXH as yexh,\n" + | |
| 944 | + " JLRQ as jlrq,\n" + | |
| 945 | + " CSRQ as csrq,\n" + | |
| 946 | + " SSRQ as ssrq,\n" + | |
| 947 | + "SSJ as ssj,\n" + | |
| 948 | + "yexb as yexb,\n" + | |
| 949 | + "RC as rc,\n" + | |
| 950 | + "JTS as jts,\n" + | |
| 951 | + "DJT as djt,\n" + | |
| 952 | + "CJC as cjc,\n" + | |
| 953 | + "ZX as zx,\n" + | |
| 954 | + "TZ as tz,\n" + | |
| 955 | + "SC as sc,\n" + | |
| 956 | + "SH as sh,\n" + | |
| 957 | + "JX as jx,\n" + | |
| 958 | + "YFZ as yfz,\n" + | |
| 959 | + "WFZ as wfz,\n" + | |
| 960 | + "SFZ as sfz,\n" + | |
| 961 | + "PFZ as pfz,\n" + | |
| 962 | + "CCQK as ccqk,\n" + | |
| 963 | + "FMFS as fmfs,\n" + | |
| 964 | + "TPMCFS as tpmcfs,\n" + | |
| 965 | + "YEQK as yeqk,\n" + | |
| 966 | + "SW as sw,\n" + | |
| 967 | + "SFFQ as sffq,\n" + | |
| 968 | + "FQYY as fqyy,\n" + | |
| 969 | + "HYQK as hyqk,\n" + | |
| 970 | + "HYQK1 as hyqk1,\n" + | |
| 971 | + "YC as yc,\n" + | |
| 972 | + "SFGW as sfgw,\n" + | |
| 973 | + "MCTPSLXL as mctpslxl,\n" + | |
| 974 | + "CHEXXSXL as chexxsxl,\n" + | |
| 975 | + " QJQK as qjqk,\n" + | |
| 976 | + " SRKS as srks,\n" + | |
| 977 | + " JSZ as jsz"; | |
| 957 | 978 | |
| 958 | - itemList.add(fmItem1); | |
| 979 | + String itemSql ="select "+cloumns+" from JHMK_FMJL_LYMS where " + | |
| 980 | + " and SYXH not in (select SYXH from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and CCQK is not null and CCQK <> '' " + | |
| 981 | + " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) and SYXH='"+patInfo.getSyxh()+"'"; | |
| 959 | 982 | |
| 983 | + List<FmItem> itemList = queryRunner.query(conn, itemSql, new BeanListHandler<FmItem>(FmItem.class)); | |
| 960 | 984 | |
| 985 | + //单胎 | |
| 986 | + if(CollectionUtils.isNotEmpty(itemList)){ | |
| 987 | + List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>(); | |
| 988 | + for(FmItem fmItem : itemList){ | |
| 989 | + System.out.println("单胎:"+fmItem); | |
| 990 | + try{ | |
| 961 | 991 | |
| 992 | + Map deliveryMode = new HashMap(); //分娩方式 | |
| 993 | + if (!("活产".equals(fmItem.getCcqk()) || "死胎".equals(fmItem.getCcqk()))) | |
| 994 | + { | |
| 995 | + continue; | |
| 996 | + } | |
| 962 | 997 | |
| 963 | - //单胎 | |
| 964 | - if(CollectionUtils.isNotEmpty(itemList)){ | |
| 965 | - List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>(); | |
| 966 | - for(FmItem fmItem : itemList){ | |
| 967 | - System.out.println("单胎:"+fmItem); | |
| 968 | - try{ | |
| 998 | + Date dueDate = fmt.parse(fmItem.getCsrq()); | |
| 999 | + String dutTime = fmt1.format(dueDate); | |
| 969 | 1000 | |
| 970 | - Map deliveryMode = new HashMap(); //分娩方式 | |
| 971 | - if (!("活产".equals(fmItem.getCcqk()) || "死胎".equals(fmItem.getCcqk()))) | |
| 972 | - { | |
| 973 | - continue; | |
| 974 | - } | |
| 1001 | + maternalDeliverResult.setDueDate(fmt2.format(dueDate)); | |
| 1002 | + maternalDeliverResult.setDueWeek(fmItem.getRc()); | |
| 1003 | + maternalDeliverResult.setTireNumber(Integer.parseInt(fmItem.getDjt())); | |
| 1004 | + //没有胎盘默认为1 | |
| 1005 | + maternalDeliverResult.setPlacenta("1"); | |
| 1006 | + String fmfs = ""; | |
| 1007 | + if (fmItem.getFmfs() != null && "剖宫产".equals(fmItem.getFmfs())) | |
| 1008 | + { | |
| 1009 | + fmfs = FmTypeEnums.O1.getId(); | |
| 1010 | + } | |
| 1011 | + else | |
| 1012 | + { | |
| 1013 | + fmfs = FmTypeEnums.O.getId(); | |
| 1014 | + } | |
| 1015 | + deliveryMode.put("fmfs",fmfs); | |
| 1016 | + maternalDeliverResult.setDeliveryMode(deliveryMode); | |
| 975 | 1017 | |
| 976 | - Date dueDate = fmt.parse(fmItem.getCsrq()); | |
| 977 | - String dutTime = fmt1.format(dueDate); | |
| 1018 | + if ("完好".equals(fmItem.getHyqk()) || "".equals(fmItem.getHyqk())) { | |
| 1019 | + maternalDeliverResult.setPerinealCondition("full"); | |
| 1020 | + } else if ("会阴切开".equals(fmItem.getHyqk()) || "侧切".equals(fmItem.getHyqk())) { | |
| 1021 | + maternalDeliverResult.setPerinealCondition("split"); | |
| 1022 | + } | |
| 1023 | + if ("一度裂伤".equals(fmItem.getHyqk())) { | |
| 1024 | + maternalDeliverResult.setSiLielevel(1); | |
| 1025 | + } else if ("二度裂伤".equals(fmItem.getHyqk())) { | |
| 1026 | + maternalDeliverResult.setSiLielevel(2); | |
| 1027 | + } else if ("三度裂伤".equals(fmItem.getHyqk())) { | |
| 1028 | + maternalDeliverResult.setSiLielevel(3); | |
| 1029 | + } | |
| 1030 | + if (StringUtils.isNotEmpty(fmItem.getChexxsxl())) { | |
| 1031 | + maternalDeliverResult.settHloseBloodL(Double.parseDouble(fmItem.getChexxsxl())); | |
| 1032 | + } | |
| 978 | 1033 | |
| 979 | - maternalDeliverResult.setDueDate(fmt2.format(dueDate)); | |
| 980 | - maternalDeliverResult.setDueWeek(fmItem.getRc()); | |
| 981 | - maternalDeliverResult.setTireNumber(Integer.parseInt(fmItem.getDjt())); | |
| 982 | - //没有胎盘默认为1 | |
| 983 | - maternalDeliverResult.setPlacenta("1"); | |
| 984 | - String fmfs = ""; | |
| 985 | - if (fmItem.getFmfs() != null && "剖宫产".equals(fmItem.getFmfs())) | |
| 986 | - { | |
| 987 | - fmfs = FmTypeEnums.O1.getId(); | |
| 1034 | + //儿童 | |
| 1035 | + MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby(); | |
| 1036 | + Map<String, String> as = new HashMap<>(); | |
| 1037 | + String pf1 = fmItem.getYfz(); | |
| 1038 | + String pf5 = fmItem.getWfz(); | |
| 1039 | + String pf10 = fmItem.getSfz(); | |
| 1040 | + if(pf1!=null){ | |
| 1041 | + as.put("pf1", pf1); | |
| 1042 | + } | |
| 1043 | + if(pf5!=null){ | |
| 1044 | + as.put("pf5", pf5); | |
| 1045 | + } | |
| 1046 | + if(pf10!=null){ | |
| 1047 | + as.put("pf10", pf10); | |
| 1048 | + } | |
| 1049 | + baby.setApgarScore(as); | |
| 1050 | + baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0"); | |
| 1051 | + String babyHeight = fmItem.getSc(); | |
| 1052 | + String babyWeight = fmItem.getTz(); | |
| 1053 | + String baby_Asphyxiam = fmItem.getZx(); | |
| 1054 | + if(babyHeight!=null){ | |
| 1055 | + baby.setBabyHeight(babyHeight);//新生儿生长 | |
| 1056 | + } | |
| 1057 | + if(babyWeight!=null){ | |
| 1058 | + baby.setBabyWeight(babyWeight);//新生儿重量 | |
| 1059 | + } | |
| 1060 | + if(baby_Asphyxiam!=null){ | |
| 1061 | + baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟 | |
| 1062 | + } | |
| 1063 | + //baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形 | |
| 1064 | + | |
| 1065 | + String baby_Pregnancy_Out = fmItem.getCcqk(); | |
| 1066 | + if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
| 1067 | + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局 | |
| 1068 | + } | |
| 1069 | + | |
| 1070 | + baby.setDueTime(dutTime);//分娩时间 | |
| 1071 | + babys.add(baby); | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + }catch (Exception e){ | |
| 1075 | + e.printStackTrace(); | |
| 1076 | + continue; | |
| 1077 | + } | |
| 1078 | + } | |
| 1079 | + maternalDeliverResult.setBabies(babys); | |
| 988 | 1080 | } |
| 1081 | + //多胎 | |
| 989 | 1082 | else |
| 990 | 1083 | { |
| 991 | - fmfs = FmTypeEnums.O.getId(); | |
| 992 | - } | |
| 993 | - deliveryMode.put("fmfs",fmfs); | |
| 994 | - maternalDeliverResult.setDeliveryMode(deliveryMode); | |
| 1084 | + String sql1="select "+cloumns+" from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and CCQK is not null and CCQK <> '' " + | |
| 1085 | + " and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ') and SYXH='"+patInfo.getSyxh()+"'"; | |
| 995 | 1086 | |
| 996 | - if ("完好".equals(fmItem.getHyqk()) || "".equals(fmItem.getHyqk())) { | |
| 997 | - maternalDeliverResult.setPerinealCondition("full"); | |
| 998 | - } else if ("会阴切开".equals(fmItem.getHyqk()) || "侧切".equals(fmItem.getHyqk())) { | |
| 999 | - maternalDeliverResult.setPerinealCondition("split"); | |
| 1000 | - } | |
| 1001 | - if ("一度裂伤".equals(fmItem.getHyqk())) { | |
| 1002 | - maternalDeliverResult.setSiLielevel(1); | |
| 1003 | - } else if ("二度裂伤".equals(fmItem.getHyqk())) { | |
| 1004 | - maternalDeliverResult.setSiLielevel(2); | |
| 1005 | - } else if ("三度裂伤".equals(fmItem.getHyqk())) { | |
| 1006 | - maternalDeliverResult.setSiLielevel(3); | |
| 1007 | - } | |
| 1008 | - if (StringUtils.isNotEmpty(fmItem.getChexxsxl())) { | |
| 1009 | - maternalDeliverResult.settHloseBloodL(Double.parseDouble(fmItem.getChexxsxl())); | |
| 1010 | - } | |
| 1087 | + List<FmItem> duoTaiList = queryRunner.query(conn,sql1 | |
| 1088 | + , new BeanListHandler<FmItem>(FmItem.class)); | |
| 1011 | 1089 | |
| 1012 | - //儿童 | |
| 1013 | - MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby(); | |
| 1014 | - Map<String, String> as = new HashMap<>(); | |
| 1015 | - String pf1 = fmItem.getYfz(); | |
| 1016 | - String pf5 = fmItem.getWfz(); | |
| 1017 | - String pf10 = fmItem.getSfz(); | |
| 1018 | - if(pf1!=null){ | |
| 1019 | - as.put("pf1", pf1); | |
| 1020 | - } | |
| 1021 | - if(pf5!=null){ | |
| 1022 | - as.put("pf5", pf5); | |
| 1023 | - } | |
| 1024 | - if(pf10!=null){ | |
| 1025 | - as.put("pf10", pf10); | |
| 1026 | - } | |
| 1027 | - baby.setApgarScore(as); | |
| 1028 | - baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0"); | |
| 1029 | - String babyHeight = fmItem.getSc(); | |
| 1030 | - String babyWeight = fmItem.getTz(); | |
| 1031 | - String baby_Asphyxiam = fmItem.getZx(); | |
| 1032 | - if(babyHeight!=null){ | |
| 1033 | - baby.setBabyHeight(babyHeight);//新生儿生长 | |
| 1034 | - } | |
| 1035 | - if(babyWeight!=null){ | |
| 1036 | - baby.setBabyWeight(babyWeight);//新生儿重量 | |
| 1037 | - } | |
| 1038 | - if(baby_Asphyxiam!=null){ | |
| 1039 | - baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟 | |
| 1040 | - } | |
| 1041 | - //baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形 | |
| 1090 | + if (CollectionUtils.isNotEmpty(duoTaiList)) { | |
| 1091 | + Map<String,List<FmItem>> maps = new HashMap<>(); | |
| 1092 | + for(FmItem item : duoTaiList) | |
| 1093 | + { | |
| 1094 | + if (maps.containsKey(item.getSyxh())) | |
| 1095 | + { | |
| 1096 | + maps.get(item.getSyxh()).add(item); | |
| 1097 | + } | |
| 1098 | + else | |
| 1099 | + { | |
| 1100 | + List items = new ArrayList<FmItem>(); | |
| 1101 | + items.add(item); | |
| 1102 | + maps.put(item.getSyxh(),items); | |
| 1103 | + } | |
| 1042 | 1104 | |
| 1043 | - String baby_Pregnancy_Out = fmItem.getCcqk(); | |
| 1044 | - if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
| 1045 | - baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局 | |
| 1046 | - } | |
| 1105 | + } | |
| 1106 | + if (maps.size() > 0) | |
| 1107 | + { | |
| 1108 | + for(String key : maps.keySet()) | |
| 1109 | + { | |
| 1110 | + List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>(); | |
| 1047 | 1111 | |
| 1048 | - baby.setDueTime(dutTime);//分娩时间 | |
| 1049 | - babys.add(baby); | |
| 1112 | + List<FmItem> items = maps.get(key); | |
| 1113 | + FmItem item = items.get(0); | |
| 1050 | 1114 | |
| 1051 | 1115 | |
| 1052 | - }catch (Exception e){ | |
| 1053 | - e.printStackTrace(); | |
| 1054 | - continue; | |
| 1055 | - } | |
| 1056 | - } | |
| 1057 | - maternalDeliverResult.setBabies(babys); | |
| 1058 | - } | |
| 1116 | + Map deliveryMode = new HashMap(); //分娩方式 | |
| 1117 | + if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk()))) | |
| 1118 | + { | |
| 1119 | + continue; | |
| 1120 | + } | |
| 1059 | 1121 | |
| 1122 | + Date dueDate = fmt.parse(item.getCsrq()); | |
| 1123 | + String dutTime = fmt1.format(dueDate); | |
| 1060 | 1124 | |
| 1125 | + maternalDeliverResult.setDueDate(fmt2.format(dueDate)); | |
| 1126 | + maternalDeliverResult.setDueWeek(item.getRc()); | |
| 1127 | + maternalDeliverResult.setTireNumber(Integer.parseInt(item.getDjt())); | |
| 1128 | + //没有胎盘默认为1 | |
| 1129 | + maternalDeliverResult.setPlacenta("1"); | |
| 1130 | + String fmfs = ""; | |
| 1131 | + if (item.getFmfs() != null && "剖宫产".equals(item.getFmfs())) | |
| 1132 | + { | |
| 1133 | + fmfs = FmTypeEnums.O1.getId(); | |
| 1134 | + } | |
| 1135 | + else | |
| 1136 | + { | |
| 1137 | + fmfs = FmTypeEnums.O.getId(); | |
| 1138 | + } | |
| 1139 | + deliveryMode.put("fmfs",fmfs); | |
| 1140 | + maternalDeliverResult.setDeliveryMode(deliveryMode); | |
| 1061 | 1141 | |
| 1142 | + if ("完好".equals(item.getHyqk()) || "".equals(item.getHyqk())) { | |
| 1143 | + maternalDeliverResult.setPerinealCondition("full"); | |
| 1144 | + } else if ("会阴切开".equals(item.getHyqk()) || "侧切".equals(item.getHyqk())) { | |
| 1145 | + maternalDeliverResult.setPerinealCondition("split"); | |
| 1146 | + } | |
| 1147 | + if ("一度裂伤".equals(item.getHyqk())) { | |
| 1148 | + maternalDeliverResult.setSiLielevel(1); | |
| 1149 | + } else if ("二度裂伤".equals(item.getHyqk())) { | |
| 1150 | + maternalDeliverResult.setSiLielevel(2); | |
| 1151 | + } else if ("三度裂伤".equals(item.getHyqk())) { | |
| 1152 | + maternalDeliverResult.setSiLielevel(3); | |
| 1153 | + } | |
| 1154 | + if (StringUtils.isNotEmpty(item.getChexxsxl())) { | |
| 1155 | + maternalDeliverResult.settHloseBloodL(Double.parseDouble(item.getChexxsxl())); | |
| 1156 | + } | |
| 1062 | 1157 | |
| 1158 | + for (FmItem fmItem : items) | |
| 1159 | + { | |
| 1160 | + System.out.println("多胎:"+fmItem); | |
| 1063 | 1161 | |
| 1162 | + //儿童 | |
| 1163 | + MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby(); | |
| 1164 | + Map<String, String> as = new HashMap<>(); | |
| 1165 | + String pf1 = fmItem.getYfz(); | |
| 1166 | + String pf5 = fmItem.getWfz(); | |
| 1167 | + String pf10 = fmItem.getSfz(); | |
| 1168 | + if(pf1!=null){ | |
| 1169 | + as.put("pf1", pf1); | |
| 1170 | + } | |
| 1171 | + if(pf5!=null){ | |
| 1172 | + as.put("pf5", pf5); | |
| 1173 | + } | |
| 1174 | + if(pf10!=null){ | |
| 1175 | + as.put("pf10", pf10); | |
| 1176 | + } | |
| 1177 | + baby.setApgarScore(as); | |
| 1178 | + baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0"); | |
| 1179 | + String babyHeight = fmItem.getSc(); | |
| 1180 | + String babyWeight = fmItem.getTz(); | |
| 1181 | + String baby_Asphyxiam = fmItem.getZx(); | |
| 1182 | + if(babyHeight!=null){ | |
| 1183 | + baby.setBabyHeight(babyHeight);//新生儿生长 | |
| 1184 | + } | |
| 1185 | + if(babyWeight!=null){ | |
| 1186 | + baby.setBabyWeight(babyWeight);//新生儿重量 | |
| 1187 | + } | |
| 1188 | + if(baby_Asphyxiam!=null){ | |
| 1189 | + baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟 | |
| 1190 | + } | |
| 1191 | + //baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形 | |
| 1064 | 1192 | |
| 1193 | + String baby_Pregnancy_Out = fmItem.getCcqk(); | |
| 1194 | + if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
| 1195 | + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局 | |
| 1196 | + } | |
| 1065 | 1197 | |
| 1198 | + baby.setDueTime(dutTime);//分娩时间 | |
| 1199 | + babys.add(baby); | |
| 1066 | 1200 | |
| 1201 | + } | |
| 1202 | + maternalDeliverResult.setBabies(babys); | |
| 1203 | + } | |
| 1204 | + } | |
| 1205 | + } | |
| 1206 | + } | |
| 1207 | + } | |
| 1208 | + }catch (Exception e){ | |
| 1209 | + e.printStackTrace(); | |
| 1210 | + }finally { | |
| 1211 | + DbUtils.closeQuietly(conn); | |
| 1212 | + } | |
| 1067 | 1213 | |
| 1068 | -// Connection conn = ConnTools.makeFmConnection(); | |
| 1069 | -// QueryRunner queryRunner = new QueryRunner(); | |
| 1070 | -// if(idCardNo != null){ | |
| 1071 | -// try{ | |
| 1072 | -// | |
| 1073 | -// FmPatInfo patInfo = null; | |
| 1074 | -// String sql = "SELECT syxh,hzxm as name,sfzh as cardNo,sex as sex,birth,lxrdh as phone, blh FROM THIS4_BASY WHERE sfzh = '"+idCardNo+"'"; | |
| 1075 | -// List<FmPatInfo> infoList = queryRunner.query(conn,sql,new BeanListHandler<FmPatInfo>(FmPatInfo.class)); | |
| 1076 | -// if(CollectionUtils.isNotEmpty(infoList)){ | |
| 1077 | -// patInfo = infoList.get(0); | |
| 1078 | -// | |
| 1079 | -// String cloumns = " SYXH as syxh,\n" + | |
| 1080 | -// " YEXH as yexh,\n" + | |
| 1081 | -// " JLRQ as jlrq,\n" + | |
| 1082 | -// " CSRQ as csrq,\n" + | |
| 1083 | -// " SSRQ as ssrq,\n" + | |
| 1084 | -// "SSJ as ssj,\n" + | |
| 1085 | -// "yexb as yexb,\n" + | |
| 1086 | -// "RC as rc,\n" + | |
| 1087 | -// "JTS as jts,\n" + | |
| 1088 | -// "DJT as djt,\n" + | |
| 1089 | -// "CJC as cjc,\n" + | |
| 1090 | -// "ZX as zx,\n" + | |
| 1091 | -// "TZ as tz,\n" + | |
| 1092 | -// "SC as sc,\n" + | |
| 1093 | -// "SH as sh,\n" + | |
| 1094 | -// "JX as jx,\n" + | |
| 1095 | -// "YFZ as yfz,\n" + | |
| 1096 | -// "WFZ as wfz,\n" + | |
| 1097 | -// "SFZ as sfz,\n" + | |
| 1098 | -// "PFZ as pfz,\n" + | |
| 1099 | -// "CCQK as ccqk,\n" + | |
| 1100 | -// "FMFS as fmfs,\n" + | |
| 1101 | -// "TPMCFS as tpmcfs,\n" + | |
| 1102 | -// "YEQK as yeqk,\n" + | |
| 1103 | -// "SW as sw,\n" + | |
| 1104 | -// "SFFQ as sffq,\n" + | |
| 1105 | -// "FQYY as fqyy,\n" + | |
| 1106 | -// "HYQK as hyqk,\n" + | |
| 1107 | -// "HYQK1 as hyqk1,\n" + | |
| 1108 | -// "YC as yc,\n" + | |
| 1109 | -// "SFGW as sfgw,\n" + | |
| 1110 | -// "MCTPSLXL as mctpslxl,\n" + | |
| 1111 | -// "CHEXXSXL as chexxsxl,\n" + | |
| 1112 | -// " QJQK as qjqk,\n" + | |
| 1113 | -// " SRKS as srks,\n" + | |
| 1114 | -// " JSZ as jsz"; | |
| 1115 | -// | |
| 1116 | -// String itemSql ="select "+cloumns+" from JHMK_FMJL_LYMS where " + | |
| 1117 | -// " and SYXH not in (select SYXH from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and CCQK is not null and CCQK <> '' " + | |
| 1118 | -// " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) and SYXH='"+patInfo.getSyxh()+"'"; | |
| 1119 | -// | |
| 1120 | -// List<FmItem> itemList = queryRunner.query(conn, itemSql, new BeanListHandler<FmItem>(FmItem.class)); | |
| 1121 | -// | |
| 1122 | -// //单胎 | |
| 1123 | -// if(CollectionUtils.isNotEmpty(itemList)){ | |
| 1124 | -// List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>(); | |
| 1125 | -// for(FmItem fmItem : itemList){ | |
| 1126 | -// System.out.println("单胎:"+fmItem); | |
| 1127 | -// try{ | |
| 1128 | -// | |
| 1129 | -// Map deliveryMode = new HashMap(); //分娩方式 | |
| 1130 | -// if (!("活产".equals(fmItem.getCcqk()) || "死胎".equals(fmItem.getCcqk()))) | |
| 1131 | -// { | |
| 1132 | -// continue; | |
| 1133 | -// } | |
| 1134 | -// | |
| 1135 | -// Date dueDate = fmt.parse(fmItem.getCsrq()); | |
| 1136 | -// String dutTime = fmt1.format(dueDate); | |
| 1137 | -// | |
| 1138 | -// maternalDeliverResult.setDueDate(fmt2.format(dueDate)); | |
| 1139 | -// maternalDeliverResult.setDueWeek(fmItem.getRc()); | |
| 1140 | -// maternalDeliverResult.setTireNumber(Integer.parseInt(fmItem.getDjt())); | |
| 1141 | -// //没有胎盘默认为1 | |
| 1142 | -// maternalDeliverResult.setPlacenta("1"); | |
| 1143 | -// String fmfs = ""; | |
| 1144 | -// if (fmItem.getFmfs() != null && "剖宫产".equals(fmItem.getFmfs())) | |
| 1145 | -// { | |
| 1146 | -// fmfs = FmTypeEnums.O1.getId(); | |
| 1147 | -// } | |
| 1148 | -// else | |
| 1149 | -// { | |
| 1150 | -// fmfs = FmTypeEnums.O.getId(); | |
| 1151 | -// } | |
| 1152 | -// deliveryMode.put("fmfs",fmfs); | |
| 1153 | -// maternalDeliverResult.setDeliveryMode(deliveryMode); | |
| 1154 | -// | |
| 1155 | -// if ("完好".equals(fmItem.getHyqk()) || "".equals(fmItem.getHyqk())) { | |
| 1156 | -// maternalDeliverResult.setPerinealCondition("full"); | |
| 1157 | -// } else if ("会阴切开".equals(fmItem.getHyqk()) || "侧切".equals(fmItem.getHyqk())) { | |
| 1158 | -// maternalDeliverResult.setPerinealCondition("split"); | |
| 1159 | -// } | |
| 1160 | -// if ("一度裂伤".equals(fmItem.getHyqk())) { | |
| 1161 | -// maternalDeliverResult.setSiLielevel(1); | |
| 1162 | -// } else if ("二度裂伤".equals(fmItem.getHyqk())) { | |
| 1163 | -// maternalDeliverResult.setSiLielevel(2); | |
| 1164 | -// } else if ("三度裂伤".equals(fmItem.getHyqk())) { | |
| 1165 | -// maternalDeliverResult.setSiLielevel(3); | |
| 1166 | -// } | |
| 1167 | -// if (StringUtils.isNotEmpty(fmItem.getChexxsxl())) { | |
| 1168 | -// maternalDeliverResult.settHloseBloodL(Double.parseDouble(fmItem.getChexxsxl())); | |
| 1169 | -// } | |
| 1170 | -// | |
| 1171 | -// //儿童 | |
| 1172 | -// MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby(); | |
| 1173 | -// Map<String, String> as = new HashMap<>(); | |
| 1174 | -// String pf1 = fmItem.getYfz(); | |
| 1175 | -// String pf5 = fmItem.getWfz(); | |
| 1176 | -// String pf10 = fmItem.getSfz(); | |
| 1177 | -// if(pf1!=null){ | |
| 1178 | -// as.put("pf1", pf1); | |
| 1179 | -// } | |
| 1180 | -// if(pf5!=null){ | |
| 1181 | -// as.put("pf5", pf5); | |
| 1182 | -// } | |
| 1183 | -// if(pf10!=null){ | |
| 1184 | -// as.put("pf10", pf10); | |
| 1185 | -// } | |
| 1186 | -// baby.setApgarScore(as); | |
| 1187 | -// baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0"); | |
| 1188 | -// String babyHeight = fmItem.getSc(); | |
| 1189 | -// String babyWeight = fmItem.getTz(); | |
| 1190 | -// String baby_Asphyxiam = fmItem.getZx(); | |
| 1191 | -// if(babyHeight!=null){ | |
| 1192 | -// baby.setBabyHeight(babyHeight);//新生儿生长 | |
| 1193 | -// } | |
| 1194 | -// if(babyWeight!=null){ | |
| 1195 | -// baby.setBabyWeight(babyWeight);//新生儿重量 | |
| 1196 | -// } | |
| 1197 | -// if(baby_Asphyxiam!=null){ | |
| 1198 | -// baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟 | |
| 1199 | -// } | |
| 1200 | -// //baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形 | |
| 1201 | -// | |
| 1202 | -// String baby_Pregnancy_Out = fmItem.getCcqk(); | |
| 1203 | -// if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
| 1204 | -// baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局 | |
| 1205 | -// } | |
| 1206 | -// | |
| 1207 | -// baby.setDueTime(dutTime);//分娩时间 | |
| 1208 | -// babys.add(baby); | |
| 1209 | -// | |
| 1210 | -// | |
| 1211 | -// }catch (Exception e){ | |
| 1212 | -// e.printStackTrace(); | |
| 1213 | -// continue; | |
| 1214 | -// } | |
| 1215 | -// } | |
| 1216 | -// maternalDeliverResult.setBabies(babys); | |
| 1217 | -// } | |
| 1218 | -// //多胎 | |
| 1219 | -// else | |
| 1220 | -// { | |
| 1221 | -// String sql1="select "+cloumns+" from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and CCQK is not null and CCQK <> '' " + | |
| 1222 | -// " and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ') and SYXH='"+patInfo.getSyxh()+"'"; | |
| 1223 | -// | |
| 1224 | -// List<FmItem> duoTaiList = queryRunner.query(conn,sql1 | |
| 1225 | -// , new BeanListHandler<FmItem>(FmItem.class)); | |
| 1226 | -// | |
| 1227 | -// | |
| 1228 | -//// List<FmItem> duoTaiList = new ArrayList<>(); | |
| 1229 | -//// | |
| 1230 | -//// FmItem fmItem1 = new FmItem(); | |
| 1231 | -//// fmItem1.setSyxh("10019988"); | |
| 1232 | -//// fmItem1.setJlrq("2017011217:52:00"); | |
| 1233 | -//// fmItem1.setSsj("2"); | |
| 1234 | -//// fmItem1.setSsrq("20170112"); | |
| 1235 | -//// fmItem1.setCsrq("2017011214:15:00"); | |
| 1236 | -//// fmItem1.setSrks("产二科"); | |
| 1237 | -//// fmItem1.setYexb("男"); | |
| 1238 | -//// fmItem1.setRc("37"); | |
| 1239 | -//// fmItem1.setDjt("2"); | |
| 1240 | -//// fmItem1.setCjc("2"); | |
| 1241 | -//// fmItem1.setJsz("王瑞华"); | |
| 1242 | -//// fmItem1.setTz("2730"); | |
| 1243 | -//// fmItem1.setSc("50"); | |
| 1244 | -//// fmItem1.setYfz("9"); | |
| 1245 | -//// fmItem1.setWfz("10"); | |
| 1246 | -//// fmItem1.setSfz("10"); | |
| 1247 | -//// fmItem1.setPfz("王瑞华"); | |
| 1248 | -//// fmItem1.setCcqk("活产"); | |
| 1249 | -//// fmItem1.setFmfs("剖宫产"); | |
| 1250 | -//// fmItem1.setTpmcfs("自然产出"); | |
| 1251 | -//// fmItem1.setYeqk("正常"); | |
| 1252 | -//// fmItem1.setJx("无"); | |
| 1253 | -//// | |
| 1254 | -//// duoTaiList.add(fmItem1); | |
| 1255 | -//// | |
| 1256 | -//// FmItem fmItem2 = new FmItem(); | |
| 1257 | -//// fmItem2.setJx("无"); | |
| 1258 | -//// fmItem2.setSyxh("10019988"); | |
| 1259 | -//// fmItem2.setJlrq("2017011217:52:00"); | |
| 1260 | -//// fmItem2.setSsj("2"); | |
| 1261 | -//// fmItem2.setSsrq("20170112"); | |
| 1262 | -//// fmItem2.setCsrq("2017011214:15:00"); | |
| 1263 | -//// fmItem2.setSrks("产二科"); | |
| 1264 | -//// fmItem2.setYexb("女"); | |
| 1265 | -//// fmItem2.setRc("37"); | |
| 1266 | -//// fmItem2.setDjt("2"); | |
| 1267 | -//// fmItem2.setCjc("2"); | |
| 1268 | -//// fmItem2.setJsz("王瑞华"); | |
| 1269 | -//// fmItem2.setTz("3400"); | |
| 1270 | -//// fmItem2.setSc("50"); | |
| 1271 | -//// fmItem2.setYfz("9"); | |
| 1272 | -//// fmItem2.setWfz("10"); | |
| 1273 | -//// fmItem2.setSfz("10"); | |
| 1274 | -//// fmItem2.setPfz("王瑞华"); | |
| 1275 | -//// fmItem2.setCcqk("活产"); | |
| 1276 | -//// fmItem2.setFmfs("剖宫产"); | |
| 1277 | -//// fmItem2.setTpmcfs("自然产出"); | |
| 1278 | -//// fmItem2.setYeqk("正常"); | |
| 1279 | -//// | |
| 1280 | -//// duoTaiList.add(fmItem2); | |
| 1281 | -// | |
| 1282 | -// | |
| 1283 | -// if (CollectionUtils.isNotEmpty(duoTaiList)) { | |
| 1284 | -// Map<String,List<FmItem>> maps = new HashMap<>(); | |
| 1285 | -// for(FmItem item : duoTaiList) | |
| 1286 | -// { | |
| 1287 | -// if (maps.containsKey(item.getSyxh())) | |
| 1288 | -// { | |
| 1289 | -// maps.get(item.getSyxh()).add(item); | |
| 1290 | -// } | |
| 1291 | -// else | |
| 1292 | -// { | |
| 1293 | -// List items = new ArrayList<FmItem>(); | |
| 1294 | -// items.add(item); | |
| 1295 | -// maps.put(item.getSyxh(),items); | |
| 1296 | -// } | |
| 1297 | -// | |
| 1298 | -// } | |
| 1299 | -// if (maps.size() > 0) | |
| 1300 | -// { | |
| 1301 | -// for(String key : maps.keySet()) | |
| 1302 | -// { | |
| 1303 | -// List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>(); | |
| 1304 | -// | |
| 1305 | -// List<FmItem> items = maps.get(key); | |
| 1306 | -// FmItem item = items.get(0); | |
| 1307 | -// | |
| 1308 | -// | |
| 1309 | -// Map deliveryMode = new HashMap(); //分娩方式 | |
| 1310 | -// if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk()))) | |
| 1311 | -// { | |
| 1312 | -// continue; | |
| 1313 | -// } | |
| 1314 | -// | |
| 1315 | -// Date dueDate = fmt.parse(item.getCsrq()); | |
| 1316 | -// String dutTime = fmt1.format(dueDate); | |
| 1317 | -// | |
| 1318 | -// maternalDeliverResult.setDueDate(fmt2.format(dueDate)); | |
| 1319 | -// maternalDeliverResult.setDueWeek(item.getRc()); | |
| 1320 | -// maternalDeliverResult.setTireNumber(Integer.parseInt(item.getDjt())); | |
| 1321 | -// //没有胎盘默认为1 | |
| 1322 | -// maternalDeliverResult.setPlacenta("1"); | |
| 1323 | -// String fmfs = ""; | |
| 1324 | -// if (item.getFmfs() != null && "剖宫产".equals(item.getFmfs())) | |
| 1325 | -// { | |
| 1326 | -// fmfs = FmTypeEnums.O1.getId(); | |
| 1327 | -// } | |
| 1328 | -// else | |
| 1329 | -// { | |
| 1330 | -// fmfs = FmTypeEnums.O.getId(); | |
| 1331 | -// } | |
| 1332 | -// deliveryMode.put("fmfs",fmfs); | |
| 1333 | -// maternalDeliverResult.setDeliveryMode(deliveryMode); | |
| 1334 | -// | |
| 1335 | -// if ("完好".equals(item.getHyqk()) || "".equals(item.getHyqk())) { | |
| 1336 | -// maternalDeliverResult.setPerinealCondition("full"); | |
| 1337 | -// } else if ("会阴切开".equals(item.getHyqk()) || "侧切".equals(item.getHyqk())) { | |
| 1338 | -// maternalDeliverResult.setPerinealCondition("split"); | |
| 1339 | -// } | |
| 1340 | -// if ("一度裂伤".equals(item.getHyqk())) { | |
| 1341 | -// maternalDeliverResult.setSiLielevel(1); | |
| 1342 | -// } else if ("二度裂伤".equals(item.getHyqk())) { | |
| 1343 | -// maternalDeliverResult.setSiLielevel(2); | |
| 1344 | -// } else if ("三度裂伤".equals(item.getHyqk())) { | |
| 1345 | -// maternalDeliverResult.setSiLielevel(3); | |
| 1346 | -// } | |
| 1347 | -// if (StringUtils.isNotEmpty(item.getChexxsxl())) { | |
| 1348 | -// maternalDeliverResult.settHloseBloodL(Double.parseDouble(item.getChexxsxl())); | |
| 1349 | -// } | |
| 1350 | -// | |
| 1351 | -// for (FmItem fmItem : items) | |
| 1352 | -// { | |
| 1353 | -// System.out.println("多胎:"+fmItem); | |
| 1354 | -// | |
| 1355 | -// //儿童 | |
| 1356 | -// MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby(); | |
| 1357 | -// Map<String, String> as = new HashMap<>(); | |
| 1358 | -// String pf1 = fmItem.getYfz(); | |
| 1359 | -// String pf5 = fmItem.getWfz(); | |
| 1360 | -// String pf10 = fmItem.getSfz(); | |
| 1361 | -// if(pf1!=null){ | |
| 1362 | -// as.put("pf1", pf1); | |
| 1363 | -// } | |
| 1364 | -// if(pf5!=null){ | |
| 1365 | -// as.put("pf5", pf5); | |
| 1366 | -// } | |
| 1367 | -// if(pf10!=null){ | |
| 1368 | -// as.put("pf10", pf10); | |
| 1369 | -// } | |
| 1370 | -// baby.setApgarScore(as); | |
| 1371 | -// baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0"); | |
| 1372 | -// String babyHeight = fmItem.getSc(); | |
| 1373 | -// String babyWeight = fmItem.getTz(); | |
| 1374 | -// String baby_Asphyxiam = fmItem.getZx(); | |
| 1375 | -// if(babyHeight!=null){ | |
| 1376 | -// baby.setBabyHeight(babyHeight);//新生儿生长 | |
| 1377 | -// } | |
| 1378 | -// if(babyWeight!=null){ | |
| 1379 | -// baby.setBabyWeight(babyWeight);//新生儿重量 | |
| 1380 | -// } | |
| 1381 | -// if(baby_Asphyxiam!=null){ | |
| 1382 | -// baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟 | |
| 1383 | -// } | |
| 1384 | -// //baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形 | |
| 1385 | -// | |
| 1386 | -// String baby_Pregnancy_Out = fmItem.getCcqk(); | |
| 1387 | -// if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
| 1388 | -// baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局 | |
| 1389 | -// } | |
| 1390 | -// | |
| 1391 | -// baby.setDueTime(dutTime);//分娩时间 | |
| 1392 | -// babys.add(baby); | |
| 1393 | -// | |
| 1394 | -// } | |
| 1395 | -// maternalDeliverResult.setBabies(babys); | |
| 1396 | -// } | |
| 1397 | -// } | |
| 1398 | -// } | |
| 1399 | -// } | |
| 1400 | -// } | |
| 1401 | -// }catch (Exception e){ | |
| 1402 | -// e.printStackTrace(); | |
| 1403 | -// }finally { | |
| 1404 | -// DbUtils.closeQuietly(conn); | |
| 1405 | -// } | |
| 1406 | -// | |
| 1407 | -// } | |
| 1214 | + } | |
| 1408 | 1215 | |
| 1409 | 1216 | return maternalDeliverResult; |
| 1410 | 1217 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
0f1d54d
| ... | ... | @@ -237,9 +237,9 @@ |
| 237 | 237 | userInfo.setModified(new Date()); |
| 238 | 238 | mysqlMeasureUserInfoService.updateMeasureUserInfo(userInfo); |
| 239 | 239 | |
| 240 | - MeasureDataInfoQuery measureDataInfoQuery = new MeasureDataInfoQuery(); | |
| 241 | - measureDataInfoQuery.setMeasureUserId(userInfo.getId()); | |
| 242 | - measureDataInfoQuery.setValueType(1); | |
| 240 | +// MeasureDataInfoQuery measureDataInfoQuery = new MeasureDataInfoQuery(); | |
| 241 | +// measureDataInfoQuery.setMeasureUserId(userInfo.getId()); | |
| 242 | +// measureDataInfoQuery.setValueType(1); | |
| 243 | 243 | // List<MeasureDataInfoModel> dataModels = mysqlMeasureDataInfoService.queryMeasureDataInfoList(measureDataInfoQuery); |
| 244 | 244 | // if (CollectionUtils.isNotEmpty(dataModels)) |
| 245 | 245 | // { |
| ... | ... | @@ -274,8 +274,8 @@ |
| 274 | 274 | List<AntExChuModel> chuModelList = antenatalExaminationService.queryAntExChu(antExChuQuery); |
| 275 | 275 | if (CollectionUtils.isNotEmpty(chuModelList)) { |
| 276 | 276 | AntExChuModel chuModel = chuModelList.get(0); |
| 277 | - String beforeHeight = chuModel.getHeight() == null ? "" : chuModel.getHeight(); | |
| 278 | - result.setHeight(beforeHeight); | |
| 277 | + String height = chuModel.getHeight() == null ? "" : chuModel.getHeight(); | |
| 278 | + result.setHeight(height); | |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | result.setHospitalId(patients.getHospitalId()); |
| ... | ... | @@ -799,7 +799,7 @@ |
| 799 | 799 | { |
| 800 | 800 | measureMap.put("weight",dataInfoModel.getValueOne()); |
| 801 | 801 | measureMap.put("height",dataInfoModel.getValueTwo()); |
| 802 | - measureMap.put("beforeWeight",""); | |
| 802 | + measureMap.put("beforeWeight",dataInfoModel.getRemarkValue() == null ? "" : dataInfoModel.getRemarkValue()); | |
| 803 | 803 | } |
| 804 | 804 | else if (dataInfoModel.getValueType() != null && dataInfoModel.getValueType() == 2) |
| 805 | 805 | { |
| ... | ... | @@ -1053,7 +1053,7 @@ |
| 1053 | 1053 | request.setValueType(1);//体重和身高 |
| 1054 | 1054 | request.setValueOne(currentWeight); |
| 1055 | 1055 | request.setValueTwo(nutritionInfoRequest.getBeforeHeight() == null ? patientWeights.get(0).getBeforeHeight() : nutritionInfoRequest.getBeforeHeight()); |
| 1056 | - request.setValueThree(nutritionInfoRequest.getBeforeWeight() == null ? patientWeights.get(0).getBeforeWeight() : nutritionInfoRequest.getBeforeWeight()); | |
| 1056 | + request.setRemarkValue(nutritionInfoRequest.getBeforeWeight() == null ? patientWeights.get(0).getBeforeWeight() : nutritionInfoRequest.getBeforeWeight()); | |
| 1057 | 1057 | |
| 1058 | 1058 | addToDataInfo(request); |
| 1059 | 1059 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MaternalDeliverResult.java
View file @
0f1d54d
| ... | ... | @@ -121,26 +121,26 @@ |
| 121 | 121 | setTireNumber(destModel.getTireNumber()); |
| 122 | 122 | setPlacenta(destModel.getPlacenta()); |
| 123 | 123 | setPlacentas(destModel.getPlacentas()); |
| 124 | - setDeliveryMode(JsonUtil.jkstr2Obj(destModel.getDeliveryMode(), Map.class)); | |
| 124 | + setDeliveryMode(destModel.getDeliveryMode() == null ? null : JsonUtil.jkstr2Obj(destModel.getDeliveryMode(), Map.class)); | |
| 125 | 125 | setOperationCause(destModel.getOperationCause()); |
| 126 | 126 | |
| 127 | 127 | setProdprocess(destModel.getProdprocess() == null ? null : JsonUtil.jkstr2Obj(destModel.getProdprocess(), Map.class)); |
| 128 | - setTotalprocess(JsonUtil.jkstr2Obj(destModel.getTotalprocess(), Map.class)); | |
| 128 | + setTotalprocess(destModel.getTotalprocess() == null ? null : JsonUtil.jkstr2Obj(destModel.getTotalprocess(), Map.class)); | |
| 129 | 129 | setPerinealCondition(destModel.getPerinealCondition()); |
| 130 | 130 | setSiLielevel(destModel.getSiLielevel()); |
| 131 | 131 | setNeedleNum(destModel.getNeedleNum()); |
| 132 | 132 | setMaternalInfo(destModel.getMaternalInfo()); |
| 133 | 133 | setDeathCause(destModel.getDeathCause()); |
| 134 | - setChBp(JsonUtil.str2Obj(destModel.getChBp(), Map.class)); | |
| 135 | - setCh2Bp(JsonUtil.str2Obj(destModel.getCh2Bp(), Map.class)); | |
| 134 | + setChBp(destModel.getChBp() == null ? null : JsonUtil.str2Obj(destModel.getChBp(), Map.class)); | |
| 135 | + setCh2Bp(destModel.getCh2Bp() == null ? null : JsonUtil.str2Obj(destModel.getCh2Bp(), Map.class)); | |
| 136 | 136 | setBreath(destModel.getBreath()); |
| 137 | 137 | setPulse(destModel.getPulse()); |
| 138 | 138 | setoHloseBloodL(destModel.getoHloseBloodL()); |
| 139 | 139 | settHloseBloodL(destModel.gettHloseBloodL()); |
| 140 | 140 | setrHloseBloodL(destModel.getrHloseBloodL()); |
| 141 | 141 | setsHloseBloodL(destModel.getsHloseBloodL()); |
| 142 | - setLoseBloodCause(JsonUtil.jkstr2Obj(destModel.getLoseBloodCause(), Map.class)); | |
| 143 | - setOcs(JsonUtil.str2Obj(destModel.getOcs(), Map.class)); | |
| 142 | + setLoseBloodCause(destModel.getLoseBloodCause() == null ? null : JsonUtil.jkstr2Obj(destModel.getLoseBloodCause(), Map.class)); | |
| 143 | + setOcs(destModel.getOcs() == null ? null : JsonUtil.str2Obj(destModel.getOcs(), Map.class)); | |
| 144 | 144 | setExtPlacentas(destModel.getExtPlacentas()); |
| 145 | 145 | |
| 146 | 146 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
0f1d54d
| ... | ... | @@ -334,10 +334,8 @@ |
| 334 | 334 | return dayWeights; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - public static void main(String[] args) { | |
| 338 | - System.out.println("2017-12-16".compareTo("2017-12-18")); | |
| 339 | - } | |
| 340 | 337 | |
| 338 | + | |
| 341 | 339 | @Override |
| 342 | 340 | public BaseResponse edit(String id) { |
| 343 | 341 | PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class); |
| 344 | 342 | |
| 345 | 343 | |
| 346 | 344 | |
| 347 | 345 | |
| 348 | 346 | |
| ... | ... | @@ -1227,31 +1225,35 @@ |
| 1227 | 1225 | |
| 1228 | 1226 | /** |
| 1229 | 1227 | * 孕妇期所需卡里计算 |
| 1230 | - * @param beforeWeight | |
| 1231 | - * @param currentWeight | |
| 1228 | + * @param bWeight 孕前体重 | |
| 1229 | + * @param cWeight 当前体重 | |
| 1232 | 1230 | * @return |
| 1233 | 1231 | */ |
| 1234 | - private Map<String,Double> getComputeKul(double beforeWeight,double currentWeight,int week,double bmi) | |
| 1232 | + private Map<String,Double> getComputeKul(double bWeight,double cWeight,int week,double bmi) | |
| 1235 | 1233 | { |
| 1236 | 1234 | Map<String,Double> map = new HashMap<>(); |
| 1237 | 1235 | |
| 1238 | 1236 | double kulStart = 0; |
| 1239 | 1237 | double kulEnd = 0; |
| 1240 | - double add = currentWeight - beforeWeight; | |
| 1238 | + | |
| 1239 | + BigDecimal currentWeight = new BigDecimal(cWeight); | |
| 1240 | + BigDecimal beforeWeight = new BigDecimal(bWeight); | |
| 1241 | + | |
| 1242 | + double add = currentWeight.subtract(beforeWeight).doubleValue(); | |
| 1241 | 1243 | //孕早期 |
| 1242 | 1244 | if (week <= 12) |
| 1243 | 1245 | { |
| 1244 | 1246 | if (add < 1 && (1 - add >= 0.5)) |
| 1245 | 1247 | { |
| 1246 | - kulStart = currentWeight*25+500; | |
| 1248 | + kulStart = currentWeight.multiply(new BigDecimal(25)).doubleValue()+500; | |
| 1247 | 1249 | } |
| 1248 | 1250 | else if (add > 1.5 && (add - 1.5 >= 0.5)) |
| 1249 | 1251 | { |
| 1250 | - kulStart = currentWeight*25-500; | |
| 1252 | + kulStart = currentWeight.multiply(new BigDecimal(25)).doubleValue()-500; | |
| 1251 | 1253 | } |
| 1252 | 1254 | else |
| 1253 | 1255 | { |
| 1254 | - kulStart = currentWeight*25; | |
| 1256 | + kulStart = currentWeight.multiply(new BigDecimal(25)).doubleValue(); | |
| 1255 | 1257 | kulEnd = kulStart; |
| 1256 | 1258 | } |
| 1257 | 1259 | } |
| 1258 | 1260 | |
| 1259 | 1261 | |
| ... | ... | @@ -1279,12 +1281,15 @@ |
| 1279 | 1281 | avge = 0.22; |
| 1280 | 1282 | } |
| 1281 | 1283 | |
| 1282 | - double addWeightStart = 1 + (week - 12) * avge; | |
| 1283 | - double addWeightEnd = 1.5 + (week - 12) * avge; | |
| 1284 | + BigDecimal bigavage = new BigDecimal(avge); | |
| 1285 | + BigDecimal rangeweek = new BigDecimal(week - 12); | |
| 1284 | 1286 | |
| 1285 | - double kstart = (currentWeight + addWeightStart) * 25 + basekul; | |
| 1286 | - double kend = (currentWeight + addWeightEnd) * 25 + basekul; | |
| 1287 | + double addWeightStart = 1 + rangeweek.multiply(bigavage).doubleValue(); | |
| 1288 | + double addWeightEnd = 1.5 + rangeweek.multiply(bigavage).doubleValue(); | |
| 1287 | 1289 | |
| 1290 | + double kstart = (currentWeight.add(new BigDecimal(addWeightStart)).doubleValue()) * 25 + basekul; | |
| 1291 | + double kend = (currentWeight.add(new BigDecimal(addWeightEnd)).doubleValue()) * 25 + basekul; | |
| 1292 | + | |
| 1288 | 1293 | if (addWeightEnd > add && (addWeightEnd - add) > 0.5) |
| 1289 | 1294 | { |
| 1290 | 1295 | kstart -= 500; |
| ... | ... | @@ -1303,5 +1308,13 @@ |
| 1303 | 1308 | map.put("kulEnd",kulEnd); |
| 1304 | 1309 | return map; |
| 1305 | 1310 | } |
| 1311 | + | |
| 1312 | +// | |
| 1313 | +// public static void main(String[] args) { | |
| 1314 | +// PatientWeightServiceImpl patientWeightService = new PatientWeightServiceImpl(); | |
| 1315 | +// String bmi = patientWeightService.getBmi("55", "162"); | |
| 1316 | +// Map<String,Double> map = patientWeightService.getComputeKul(55, 62, 20, Double.parseDouble(bmi)); | |
| 1317 | +// System.out.println(map); | |
| 1318 | +// } | |
| 1306 | 1319 | } |