Commit 8dc7f0ca10ea6e8a6bec2d0846962e05b57c166a
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 10 changed files
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyVisitModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BasicConfig.java
- platform-dal/src/main/java/com/lyms/platform/pojo/DataPermissionsModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PuerperaModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/VisitModel.java
- platform-data-api/src/main/java/com/lyms/platform/data/controller/TaskController.java
- platform-data-api/src/main/webapp/WEB-INF/vm/task/index.vm
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
View file @
8dc7f0c
... | ... | @@ -179,10 +179,6 @@ |
179 | 179 | this.week = week; |
180 | 180 | } |
181 | 181 | |
182 | - public void setYn(Integer yn) { | |
183 | - this.yn = yn; | |
184 | - } | |
185 | - | |
186 | 182 | /** |
187 | 183 | * 生日 |
188 | 184 | */ |
... | ... | @@ -212,7 +208,7 @@ |
212 | 208 | private Date mbirth; |
213 | 209 | // 助产结构名称 |
214 | 210 | private String org; |
215 | - private int week; | |
211 | + private Integer week; | |
216 | 212 | |
217 | 213 | private String cardNo; |
218 | 214 | |
219 | 215 | |
... | ... | @@ -235,12 +231,12 @@ |
235 | 231 | /** |
236 | 232 | * 性别 |
237 | 233 | */ |
238 | - private int sex; | |
234 | + private Integer sex; | |
239 | 235 | |
240 | 236 | /** |
241 | 237 | * 访视状态 |
242 | 238 | */ |
243 | - private int visitstatus=-1; | |
239 | + private Integer visitstatus=-1; | |
244 | 240 | /** |
245 | 241 | * 小孩名称 |
246 | 242 | */ |
247 | 243 | |
... | ... | @@ -249,11 +245,11 @@ |
249 | 245 | private Integer yn; |
250 | 246 | |
251 | 247 | |
252 | - public int getYn() { | |
248 | + public Integer getYn() { | |
253 | 249 | return yn; |
254 | 250 | } |
255 | 251 | |
256 | - public void setYn(int yn) { | |
252 | + public void setYn(Integer yn) { | |
257 | 253 | this.yn = yn; |
258 | 254 | } |
259 | 255 | |
260 | 256 | |
261 | 257 | |
262 | 258 | |
... | ... | @@ -290,19 +286,19 @@ |
290 | 286 | this.birth = birth; |
291 | 287 | } |
292 | 288 | |
293 | - public int getSex() { | |
289 | + public Integer getSex() { | |
294 | 290 | return sex; |
295 | 291 | } |
296 | 292 | |
297 | - public void setSex(int sex) { | |
293 | + public void setSex(Integer sex) { | |
298 | 294 | this.sex = sex; |
299 | 295 | } |
300 | 296 | |
301 | - public int getVisitstatus() { | |
297 | + public Integer getVisitstatus() { | |
302 | 298 | return visitstatus; |
303 | 299 | } |
304 | 300 | |
305 | - public void setVisitstatus(int visitstatus) { | |
301 | + public void setVisitstatus(Integer visitstatus) { | |
306 | 302 | this.visitstatus = visitstatus; |
307 | 303 | } |
308 | 304 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyVisitModel.java
View file @
8dc7f0c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | private String deformity; |
115 | 115 | |
116 | 116 | // 听力情况 |
117 | - private int hearing; | |
117 | + private Integer hearing; | |
118 | 118 | |
119 | 119 | // 疾病筛查 |
120 | 120 | private String disease; |
121 | 121 | |
122 | 122 | |
123 | 123 | |
124 | 124 | |
... | ... | @@ -129,22 +129,22 @@ |
129 | 129 | private double height; |
130 | 130 | |
131 | 131 | // 喂养方式 |
132 | - private int feedType; | |
132 | + private Integer feedType; | |
133 | 133 | |
134 | 134 | // 吃奶量 |
135 | - private int eatMilk; | |
135 | + private Integer eatMilk; | |
136 | 136 | |
137 | 137 | // 吃奶次数 |
138 | - private int eatTime; | |
138 | + private Integer eatTime; | |
139 | 139 | |
140 | 140 | // 呕吐 |
141 | - private int emesis; | |
141 | + private Integer emesis; | |
142 | 142 | |
143 | 143 | // 大便 |
144 | 144 | private String shit; |
145 | 145 | |
146 | 146 | // 大便次数 |
147 | - private int shitTimes; | |
147 | + private Integer shitTimes; | |
148 | 148 | |
149 | 149 | // 体温 |
150 | 150 | private double temperature; |
151 | 151 | |
... | ... | @@ -250,11 +250,11 @@ |
250 | 250 | this.deformity = deformity; |
251 | 251 | } |
252 | 252 | |
253 | - public int getHearing() { | |
253 | + public Integer getHearing() { | |
254 | 254 | return hearing; |
255 | 255 | } |
256 | 256 | |
257 | - public void setHearing(int hearing) { | |
257 | + public void setHearing(Integer hearing) { | |
258 | 258 | this.hearing = hearing; |
259 | 259 | } |
260 | 260 | |
261 | 261 | |
262 | 262 | |
263 | 263 | |
264 | 264 | |
265 | 265 | |
266 | 266 | |
267 | 267 | |
... | ... | @@ -290,35 +290,35 @@ |
290 | 290 | this.height = height; |
291 | 291 | } |
292 | 292 | |
293 | - public int getFeedType() { | |
293 | + public Integer getFeedType() { | |
294 | 294 | return feedType; |
295 | 295 | } |
296 | 296 | |
297 | - public void setFeedType(int feedType) { | |
297 | + public void setFeedType(Integer feedType) { | |
298 | 298 | this.feedType = feedType; |
299 | 299 | } |
300 | 300 | |
301 | - public int getEatMilk() { | |
301 | + public Integer getEatMilk() { | |
302 | 302 | return eatMilk; |
303 | 303 | } |
304 | 304 | |
305 | - public void setEatMilk(int eatMilk) { | |
305 | + public void setEatMilk(Integer eatMilk) { | |
306 | 306 | this.eatMilk = eatMilk; |
307 | 307 | } |
308 | 308 | |
309 | - public int getEatTime() { | |
309 | + public Integer getEatTime() { | |
310 | 310 | return eatTime; |
311 | 311 | } |
312 | 312 | |
313 | - public void setEatTime(int eatTime) { | |
313 | + public void setEatTime(Integer eatTime) { | |
314 | 314 | this.eatTime = eatTime; |
315 | 315 | } |
316 | 316 | |
317 | - public int getEmesis() { | |
317 | + public Integer getEmesis() { | |
318 | 318 | return emesis; |
319 | 319 | } |
320 | 320 | |
321 | - public void setEmesis(int emesis) { | |
321 | + public void setEmesis(Integer emesis) { | |
322 | 322 | this.emesis = emesis; |
323 | 323 | } |
324 | 324 | |
325 | 325 | |
... | ... | @@ -330,11 +330,11 @@ |
330 | 330 | this.shit = shit; |
331 | 331 | } |
332 | 332 | |
333 | - public int getShitTimes() { | |
333 | + public Integer getShitTimes() { | |
334 | 334 | return shitTimes; |
335 | 335 | } |
336 | 336 | |
337 | - public void setShitTimes(int shitTimes) { | |
337 | + public void setShitTimes(Integer shitTimes) { | |
338 | 338 | this.shitTimes = shitTimes; |
339 | 339 | } |
340 | 340 |
platform-dal/src/main/java/com/lyms/platform/pojo/BasicConfig.java
View file @
8dc7f0c
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | |
25 | 25 | private String name; |
26 | 26 | |
27 | - private int enable; | |
27 | + private Integer enable; | |
28 | 28 | |
29 | 29 | private String typeId; |
30 | 30 | |
31 | 31 | |
... | ... | @@ -36,11 +36,11 @@ |
36 | 36 | this.typeId = typeId; |
37 | 37 | } |
38 | 38 | |
39 | - public int getEnable() { | |
39 | + public Integer getEnable() { | |
40 | 40 | return enable; |
41 | 41 | } |
42 | 42 | |
43 | - public void setEnable(int enable) { | |
43 | + public void setEnable(Integer enable) { | |
44 | 44 | this.enable = enable; |
45 | 45 | } |
46 | 46 | |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | this.name = name; |
53 | 53 | } |
54 | 54 | |
55 | - private int yn; | |
55 | + private Integer yn; | |
56 | 56 | |
57 | 57 | public String getId() { |
58 | 58 | return id; |
59 | 59 | |
... | ... | @@ -78,11 +78,11 @@ |
78 | 78 | this.code = code; |
79 | 79 | } |
80 | 80 | |
81 | - public int getYn() { | |
81 | + public Integer getYn() { | |
82 | 82 | return yn; |
83 | 83 | } |
84 | 84 | |
85 | - public void setYn(int yn) { | |
85 | + public void setYn(Integer yn) { | |
86 | 86 | this.yn = yn; |
87 | 87 | } |
88 | 88 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/DataPermissionsModel.java
View file @
8dc7f0c
... | ... | @@ -57,13 +57,13 @@ |
57 | 57 | |
58 | 58 | public static class SimplePermission { |
59 | 59 | //1 自己 2 自己科室 3 全部科室 4 |
60 | - private int type=PermissionTypeEnums.ONLY_SELF.getId(); | |
60 | + private Integer type=PermissionTypeEnums.ONLY_SELF.getId(); | |
61 | 61 | |
62 | - public int getType() { | |
62 | + public Integer getType() { | |
63 | 63 | return type; |
64 | 64 | } |
65 | 65 | |
66 | - public void setType(int type) { | |
66 | + public void setType(Integer type) { | |
67 | 67 | this.type = type; |
68 | 68 | } |
69 | 69 | private List<String> deptid; |
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
8dc7f0c
... | ... | @@ -396,11 +396,11 @@ |
396 | 396 | this.dueType = dueType; |
397 | 397 | } |
398 | 398 | |
399 | - public int getIsVisit() { | |
399 | + public Integer getIsVisit() { | |
400 | 400 | return isVisit; |
401 | 401 | } |
402 | 402 | |
403 | - public void setIsVisit(int isVisit) { | |
403 | + public void setIsVisit(Integer isVisit) { | |
404 | 404 | this.isVisit = isVisit; |
405 | 405 | } |
406 | 406 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/PuerperaModel.java
View file @
8dc7f0c
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | /** |
48 | 48 | * 产妇年龄 |
49 | 49 | */ |
50 | - private int age; | |
50 | + private Integer age; | |
51 | 51 | /** |
52 | 52 | * 产妇手机号 |
53 | 53 | */ |
54 | 54 | |
... | ... | @@ -68,11 +68,11 @@ |
68 | 68 | /** |
69 | 69 | * 是否访视 |
70 | 70 | */ |
71 | - private int isVisit; | |
71 | + private Integer isVisit; | |
72 | 72 | /** |
73 | 73 | * 是否有效 |
74 | 74 | */ |
75 | - private int yn; | |
75 | + private Integer yn; | |
76 | 76 | |
77 | 77 | public String getCardNo() { |
78 | 78 | return cardNo; |
79 | 79 | |
... | ... | @@ -92,10 +92,10 @@ |
92 | 92 | public void setDueType(String dueType) { |
93 | 93 | this.dueType = dueType; |
94 | 94 | } |
95 | - public int getIsVisit() { | |
95 | + public Integer getIsVisit() { | |
96 | 96 | return isVisit; |
97 | 97 | } |
98 | - public void setIsVisit(int isVisit) { | |
98 | + public void setIsVisit(Integer isVisit) { | |
99 | 99 | this.isVisit = isVisit; |
100 | 100 | } |
101 | 101 | public String getId() { |
102 | 102 | |
... | ... | @@ -104,10 +104,10 @@ |
104 | 104 | public void setId(String id) { |
105 | 105 | this.id = id; |
106 | 106 | } |
107 | - public int getYn() { | |
107 | + public Integer getYn() { | |
108 | 108 | return yn; |
109 | 109 | } |
110 | - public void setYn(int yn) { | |
110 | + public void setYn(Integer yn) { | |
111 | 111 | this.yn = yn; |
112 | 112 | } |
113 | 113 | public String getName() { |
114 | 114 | |
... | ... | @@ -116,10 +116,10 @@ |
116 | 116 | public void setName(String name) { |
117 | 117 | this.name = name; |
118 | 118 | } |
119 | - public int getAge() { | |
119 | + public Integer getAge() { | |
120 | 120 | return age; |
121 | 121 | } |
122 | - public void setAge(int age) { | |
122 | + public void setAge(Integer age) { | |
123 | 123 | this.age = age; |
124 | 124 | } |
125 | 125 | public String getPhone() { |
platform-dal/src/main/java/com/lyms/platform/pojo/VisitModel.java
View file @
8dc7f0c
... | ... | @@ -35,11 +35,11 @@ |
35 | 35 | /** |
36 | 36 | * 住院分娩 |
37 | 37 | */ |
38 | - private int due; | |
38 | + private Integer due; | |
39 | 39 | /** |
40 | 40 | * 心法接生 |
41 | 41 | */ |
42 | - private int xinType; | |
42 | + private Integer xinType; | |
43 | 43 | |
44 | 44 | /** |
45 | 45 | * 乳房 |
46 | 46 | |
47 | 47 | |
48 | 48 | |
... | ... | @@ -261,19 +261,19 @@ |
261 | 261 | this.wound = wound; |
262 | 262 | } |
263 | 263 | |
264 | - public int getDue() { | |
264 | + public Integer getDue() { | |
265 | 265 | return due; |
266 | 266 | } |
267 | 267 | |
268 | - public void setDue(int due) { | |
268 | + public void setDue(Integer due) { | |
269 | 269 | this.due = due; |
270 | 270 | } |
271 | 271 | |
272 | - public int getXinType() { | |
272 | + public Integer getXinType() { | |
273 | 273 | return xinType; |
274 | 274 | } |
275 | 275 | |
276 | - public void setXinType(int xinType) { | |
276 | + public void setXinType(Integer xinType) { | |
277 | 277 | this.xinType = xinType; |
278 | 278 | } |
279 | 279 |
platform-data-api/src/main/java/com/lyms/platform/data/controller/TaskController.java
View file @
8dc7f0c
1 | 1 | package com.lyms.platform.data.controller; |
2 | 2 | |
3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
3 | 4 | import com.lyms.platform.data.service.DataImportTaskService; |
5 | +import com.lyms.platform.pojo.BasicConfig; | |
6 | +import com.lyms.platform.query.BasicConfigQuery; | |
7 | +import org.apache.commons.io.FileUtils; | |
8 | +import org.apache.commons.lang.StringUtils; | |
4 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
5 | 10 | import org.springframework.stereotype.Controller; |
6 | 11 | import org.springframework.web.bind.annotation.RequestMapping; |
7 | 12 | import org.springframework.web.servlet.ModelAndView; |
8 | 13 | |
9 | 14 | import javax.servlet.http.HttpServletResponse; |
15 | +import java.io.File; | |
16 | +import java.io.IOException; | |
17 | +import java.util.HashMap; | |
18 | +import java.util.List; | |
19 | +import java.util.Map; | |
10 | 20 | |
11 | 21 | /** |
12 | 22 | * Created by riecard on 15/10/26. |
13 | 23 | |
... | ... | @@ -18,7 +28,10 @@ |
18 | 28 | @Autowired |
19 | 29 | private DataImportTaskService dataImportTaskService; |
20 | 30 | |
31 | + @Autowired | |
32 | + private BasicConfigService basicConfigService; | |
21 | 33 | |
34 | + | |
22 | 35 | @RequestMapping(value = "/index") |
23 | 36 | public ModelAndView index() { |
24 | 37 | ModelAndView mv = new ModelAndView("task/index"); |
25 | 38 | |
... | ... | @@ -45,11 +58,49 @@ |
45 | 58 | } else if ("fullUpdateUsers".equals(sid)) { |
46 | 59 | dataImportTaskService.fullUpdateUsers(); |
47 | 60 | writeString(response, "success"); |
61 | + } else if ("codeinit".equals(sid)) { | |
62 | + try { | |
63 | + List<String> list = FileUtils.readLines(new File("d:/streets.csv")); | |
64 | + Map<String, String> codeMap = new HashMap<>(); | |
65 | + for (String line:list) { | |
66 | + line = line.replace("\"", ""); | |
67 | + String[] array = line.split(","); | |
68 | + if (array.length >= 3 && StringUtils.isNotBlank(array[1]) && StringUtils.isNotBlank(array[2])) { | |
69 | + codeMap.put(array[2], array[1]); | |
70 | + } | |
71 | + if (array.length >= 5 && StringUtils.isNotBlank(array[3]) && StringUtils.isNotBlank(array[4])) { | |
72 | + codeMap.put(array[4], array[3]); | |
73 | + } | |
74 | + if (array.length >= 7 && StringUtils.isNotBlank(array[5]) && StringUtils.isNotBlank(array[6])) { | |
75 | + codeMap.put(array[6], array[5]); | |
76 | + } | |
77 | + if (array.length >= 11 && StringUtils.isNotBlank(array[9]) && StringUtils.isNotBlank(array[10])) { | |
78 | + codeMap.put(array[10], array[9]); | |
79 | + } | |
80 | + } | |
81 | + List<BasicConfig> configList = basicConfigService.queryBasicConfig(new BasicConfigQuery()); | |
82 | + BasicConfig u = new BasicConfig(); | |
83 | + for (BasicConfig config:configList) { | |
84 | + String code = codeMap.get(config.getName()); | |
85 | + if (StringUtils.isNotBlank(code)) { | |
86 | + u.setId(config.getId()); | |
87 | + u.setCode(code); | |
88 | + basicConfigService.updateBasicConfig(u); | |
89 | + } | |
90 | + } | |
91 | + } catch (IOException e) { | |
92 | + e.printStackTrace(); | |
93 | + } | |
94 | + writeString(response, "success"); | |
48 | 95 | } |
49 | 96 | |
50 | 97 | else { |
51 | 98 | writeString(response, "nomethod"); |
52 | 99 | } |
100 | + | |
101 | + } | |
102 | + | |
103 | + public static void main(String[] args) { | |
53 | 104 | |
54 | 105 | } |
55 | 106 |
platform-data-api/src/main/webapp/WEB-INF/vm/task/index.vm
View file @
8dc7f0c
... | ... | @@ -33,6 +33,14 @@ |
33 | 33 | <button class="btn btn-sm btn-danger" onclick="execOne('fullUpdateUsers')">执行</button> |
34 | 34 | </td> |
35 | 35 | </tr> |
36 | + <tr> | |
37 | + <td>初始化省市区乡镇code</td> | |
38 | + <td></td> | |
39 | + <td>无</td> | |
40 | + <td> | |
41 | + <button class="btn btn-sm btn-danger" onclick="execOne('codeinit')">执行</button> | |
42 | + </td> | |
43 | + </tr> | |
36 | 44 | </table> |
37 | 45 | |
38 | 46 | <script> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
View file @
8dc7f0c