Commit abe3ab91161a0633b3ef878cf28ddce9ba26be6c
1 parent
8f6bc9ecd9
Exists in
master
and in
6 other branches
update
Showing 4 changed files with 184 additions and 2 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyHeartStandardModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
abe3ab9
... | ... | @@ -6939,7 +6939,57 @@ |
6939 | 6939 | e.printStackTrace(); |
6940 | 6940 | } |
6941 | 6941 | } |
6942 | + /* | |
6943 | + 儿心量表标准 | |
6944 | + */ | |
6945 | + public static void saveBabyHeartStandardModel(String fileName) { | |
6946 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
6947 | + MongoTemplate mongoTemplate | |
6948 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
6949 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
6950 | + File file = new File(fileName); | |
6951 | + Workbook wb = null; | |
6952 | + try { | |
6953 | + wb = Workbook.getWorkbook(file); | |
6942 | 6954 | |
6955 | + Sheet s = wb.getSheet(0); | |
6956 | + System.out.println(s.getName() + " : "); | |
6957 | + int rows = s.getRows(); | |
6958 | + if (rows > 0) { | |
6959 | + //遍历每行 | |
6960 | + for (int i = 1; i < rows; i++) { | |
6961 | + System.out.println("rows=" + i); | |
6962 | + BabyHeartStandardModel babyHeartStandardModel = new BabyHeartStandardModel(); | |
6963 | + babyHeartStandardModel.setYn(YnEnums.YES.getId()); | |
6964 | + babyHeartStandardModel.setType(1); | |
6965 | + Cell[] cells = s.getRow(i); | |
6966 | + if (cells.length > 0) { | |
6967 | + for (int j = 0; j < cells.length; j++) { | |
6968 | + String str = cells[j].getContents().trim(); | |
6969 | + switch (j) { | |
6970 | + case 0: | |
6971 | + babyHeartStandardModel.setProjectType(Integer.parseInt(str)); | |
6972 | + continue; | |
6973 | + case 1: | |
6974 | + babyHeartStandardModel.setFysLessThanContent(str); | |
6975 | + continue; | |
6976 | + case 2: | |
6977 | + babyHeartStandardModel.setFysGreaterThanContent(str); | |
6978 | + continue; | |
6979 | + case 3: | |
6980 | + babyHeartStandardModel.setMonth(str); | |
6981 | + continue; | |
6982 | + } | |
6983 | + } | |
6984 | + } | |
6985 | + mongoTemplate.save(babyHeartStandardModel); | |
6986 | + } | |
6987 | + } | |
6988 | + } catch (Exception e) { | |
6989 | + e.printStackTrace(); | |
6990 | + } | |
6991 | + } | |
6992 | + | |
6943 | 6993 | public static void main(String[] args) { |
6944 | 6994 | // getData(); |
6945 | 6995 | //weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); |
... | ... | @@ -6972,6 +7022,7 @@ |
6972 | 7022 | //saveEvaluationCriterionModel("D:\\user\\workspace\\产品中心\\区域平台\\需求资料\\儿童量表码表.xls"); |
6973 | 7023 | //saveEvaluationCriterionModel2("D:\\user\\workspace\\产品中心\\区域平台\\需求资料\\儿童智能等级.xls"); |
6974 | 7024 | // saveEvaluationCriterionModel3("D:\\user\\workspace\\产品中心\\区域平台\\需求资料\\儿童神经心理发育情况.xls"); |
7025 | +// saveEvaluationCriterionModel3("C:\\Users\\Administrator\\Desktop\\儿童神经心理发育量表222.xls"); | |
6975 | 7026 | //saveQhdWeight("F:\\text.xls"); |
6976 | 7027 | // saveQhdGaoWeiWeight("F:\\秦皇岛高危报告内容.xls"); |
6977 | 7028 | // saveQhdWeight("F:\\text.xls"); |
... | ... | @@ -6991,8 +7042,11 @@ |
6991 | 7042 | //saveBabyBone("F:\\技术文档\\骨密度\\儿童骨密度报告模板内容表.xls"); |
6992 | 7043 | // saveQhdDist("F:\\儿童营养报告\\秦皇岛市妇幼新版选择儿童膳食报告\\(泉渝)秦皇岛市妇幼儿童膳食报告20210129.xls"); |
6993 | 7044 | // saveQhdDist1("F:\\儿童营养报告\\秦皇岛市妇幼新版选择儿童膳食报告\\秦皇岛市妇幼儿童膳食报告0-11.xls"); |
6994 | - saveDdb("F:\\体重与营养管理\\低蛋白.xls"); | |
6995 | - saveDdb1("F:\\体重与营养管理\\低蛋白.xls"); | |
7045 | +// saveDdb("F:\\体重与营养管理\\低蛋白.xls"); | |
7046 | +// saveDdb1("F:\\体重与营养管理\\低蛋白.xls"); | |
7047 | + | |
7048 | +// saveBabyHeartStandardModel("C:\\Users\\Administrator\\Desktop\\儿心量表打印添加内容.xls");//儿心量表标准 | |
7049 | + | |
6996 | 7050 | } |
6997 | 7051 | |
6998 | 7052 |
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
View file @
abe3ab9
... | ... | @@ -125,6 +125,7 @@ |
125 | 125 | PelvicFloorInfoDetail("PelvicFloorInfoDetail",-2379119402788348620L), |
126 | 126 | PelvicFloorInfo("PelvicFloorInfo",1846836043097694859L), |
127 | 127 | BabyEvaluationCriterionModel("BabyEvaluationCriterionModel",8403770575902711593L), |
128 | + BabyHeartStandardModel("BabyHeartStandardModel",-7895459982539094630L), | |
128 | 129 | BabyNerveMovementModel("BabyNerveMovementModel", -6434664687867665381L), |
129 | 130 | BabyNeuroPsychologicalModel("BabyNeuroPsychologicalModel", -7902299259467567060L), |
130 | 131 | ExerciseAppraisalModel("ExerciseAppraisalModel", 993491777685035796L), |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyHeartStandardModel.java
View file @
abe3ab9
1 | +package com.lyms.platform.pojo; | |
2 | + | |
3 | +import com.lyms.platform.beans.SerialIdEnum; | |
4 | +import com.lyms.platform.common.result.BaseModel; | |
5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
6 | + | |
7 | +/** | |
8 | + * 儿心量表标准 | |
9 | + * @Author dongqin | |
10 | + * @Description | |
11 | + * @Date 14:39 2019/7/16 | |
12 | + */ | |
13 | +@Document(collection = "lyms_baby_heart_standard") | |
14 | +public class BabyHeartStandardModel extends BaseModel { | |
15 | + | |
16 | + private static final long serialVersionUID = SerialIdEnum.BabyHeartStandardModel.getCid(); | |
17 | + | |
18 | + private String id; | |
19 | + | |
20 | + /** | |
21 | + * 项目 类别 | |
22 | + * 1 大动作发育 | |
23 | + * 2 精细动作发育 | |
24 | + * 4 语言能力培养 | |
25 | + * 3 认知能力培养 | |
26 | + * 5 社交适应能力培养 | |
27 | + */ | |
28 | + private Integer projectType; | |
29 | + private Integer yn; | |
30 | + /* | |
31 | + 发育商<115具体操作 | |
32 | + */ | |
33 | + private String fysLessThanContent; | |
34 | + /* | |
35 | + 发育商≥115具体操作 | |
36 | + */ | |
37 | + private String fysGreaterThanContent; | |
38 | + /** | |
39 | + * 月龄 | |
40 | + * 注意这样结构,1315==13月—15月 | |
41 | + */ | |
42 | + private String month; | |
43 | + | |
44 | + /** | |
45 | + * 1 儿心量表标准 | |
46 | + */ | |
47 | + private Integer type; | |
48 | + | |
49 | + | |
50 | + public String getId() { | |
51 | + return id; | |
52 | + } | |
53 | + | |
54 | + public void setId(String id) { | |
55 | + this.id = id; | |
56 | + } | |
57 | + | |
58 | + public Integer getProjectType() { | |
59 | + return projectType; | |
60 | + } | |
61 | + | |
62 | + public void setProjectType(Integer projectType) { | |
63 | + this.projectType = projectType; | |
64 | + } | |
65 | + | |
66 | + public Integer getYn() { | |
67 | + return yn; | |
68 | + } | |
69 | + | |
70 | + public void setYn(Integer yn) { | |
71 | + this.yn = yn; | |
72 | + } | |
73 | + | |
74 | + public String getFysLessThanContent() { | |
75 | + return fysLessThanContent; | |
76 | + } | |
77 | + | |
78 | + public void setFysLessThanContent(String fysLessThanContent) { | |
79 | + this.fysLessThanContent = fysLessThanContent; | |
80 | + } | |
81 | + | |
82 | + public String getFysGreaterThanContent() { | |
83 | + return fysGreaterThanContent; | |
84 | + } | |
85 | + | |
86 | + public void setFysGreaterThanContent(String fysGreaterThanContent) { | |
87 | + this.fysGreaterThanContent = fysGreaterThanContent; | |
88 | + } | |
89 | + | |
90 | + public String getMonth() { | |
91 | + return month; | |
92 | + } | |
93 | + | |
94 | + public void setMonth(String month) { | |
95 | + this.month = month; | |
96 | + } | |
97 | + | |
98 | + public Integer getType() { | |
99 | + return type; | |
100 | + } | |
101 | + | |
102 | + public void setType(Integer type) { | |
103 | + this.type = type; | |
104 | + } | |
105 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
abe3ab9
... | ... | @@ -680,6 +680,27 @@ |
680 | 680 | // 智龄、报表 |
681 | 681 | objectMap.put("zlStr", zlStr); |
682 | 682 | objectMap.put("report", reportMap); |
683 | + | |
684 | + //增加根据月龄关联,儿心量表标准 | |
685 | + String monthStr = ""; | |
686 | + if(month >= 13 && month <= 15){ | |
687 | + monthStr = "1315"; | |
688 | + }else if(month >= 16 && month <= 18){ | |
689 | + monthStr = "1618"; | |
690 | + }else if(month >= 19 && month <= 21){ | |
691 | + monthStr = "1921"; | |
692 | + }else if(month >= 16 && month <= 18){ | |
693 | + monthStr = "2224"; | |
694 | + }else if(month >= 16 && month <= 18){ | |
695 | + monthStr = "2530"; | |
696 | + }else { | |
697 | + monthStr = month.toString(); | |
698 | + } | |
699 | + if(StringUtils.isNotEmpty(monthStr)){ | |
700 | + Criteria c = Criteria.where("month").is(monthStr); | |
701 | + List<BabyHeartStandardModel> babyHeartStandardModels =mongoTemplate.find(Query.query(c), BabyHeartStandardModel.class); | |
702 | + objectMap.put("babyHeartStandardModels", babyHeartStandardModels); | |
703 | + } | |
683 | 704 | objectList.add(objectMap); |
684 | 705 | } |
685 | 706 | } |
... | ... | @@ -689,6 +710,7 @@ |
689 | 710 | Map<String, Object> objectMap = (Map<String, Object>) getItemListByBabyIdCddz(babyId, checkMonth, null).getObject(); |
690 | 711 | objectMap.put("checkTimeStr", ""); |
691 | 712 | objectMap.put("checkMonth", checkMonthStr); |
713 | + | |
692 | 714 | |
693 | 715 | objectList.add(objectMap); |
694 | 716 | baseResponse.setObject(objectList); |