Commit 00062fa34c1d2be6bd0c2d7cef394a01811d9282
1 parent
d62435a6fd
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 253 additions and 3 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
View file @
00062fa
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | public BaseResponse saveLisData(final List<LisReportModel> lisList) { |
27 | 27 | |
28 | 28 | try { |
29 | - //final List<LisReportModel> lisList =JsonUtil.jkstr2List(lisData, new TypeReference<List<LisReportModel>>() {}); | |
29 | +// final List<LisReportModel> lisList =JsonUtil.jkstr2List(lisData, new TypeReference<List<LisReportModel>>() {}); | |
30 | 30 | System.out.println("saveLis data size = "+ lisList.size()); |
31 | 31 | |
32 | 32 | if (CollectionUtils.isNotEmpty(lisList)) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java
View file @
00062fa
... | ... | @@ -4,7 +4,9 @@ |
4 | 4 | import com.lyms.platform.common.base.BaseController; |
5 | 5 | import com.lyms.platform.common.base.LoginContext; |
6 | 6 | import com.lyms.platform.common.result.BaseResponse; |
7 | +import com.lyms.platform.common.utils.DateUtil; | |
7 | 8 | import com.lyms.platform.operate.web.facade.LisFacade; |
9 | +import com.lyms.platform.operate.web.request.LisReportModelRequest; | |
8 | 10 | import com.lyms.platform.permission.model.LisReportModel; |
9 | 11 | import com.lyms.platform.permission.service.LisService; |
10 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -12,6 +14,7 @@ |
12 | 14 | import org.springframework.web.bind.annotation.*; |
13 | 15 | |
14 | 16 | import javax.servlet.http.HttpServletRequest; |
17 | +import java.util.ArrayList; | |
15 | 18 | import java.util.List; |
16 | 19 | |
17 | 20 | /** |
18 | 21 | |
... | ... | @@ -35,9 +38,43 @@ |
35 | 38 | */ |
36 | 39 | @RequestMapping(method = RequestMethod.POST, value = "/saveLisData") |
37 | 40 | @ResponseBody |
38 | - public BaseResponse saveLisData(@RequestBody List<LisReportModel> models, | |
41 | + public BaseResponse saveLisData(@RequestBody List<LisReportModelRequest> models, | |
39 | 42 | HttpServletRequest httpServletRequest) { |
40 | - return lisService.saveLisData(models); | |
43 | + | |
44 | + | |
45 | + List<LisReportModel> list = new ArrayList<>(); | |
46 | + if (models != null && models.size() > 0) | |
47 | + { | |
48 | + for(LisReportModelRequest lisRequest : models) | |
49 | + { | |
50 | + LisReportModel model = new LisReportModel(); | |
51 | + model.setItems(lisRequest.getItems()); | |
52 | + model.setId(lisRequest.getId()); | |
53 | + model.setVcCardNo(lisRequest.getVcCardNo()); | |
54 | + model.setHospitalId(lisRequest.getHospitalId()); | |
55 | + model.setLisId(lisRequest.getLisId()); | |
56 | + model.setAge(lisRequest.getAge()); | |
57 | + model.setName(lisRequest.getName()); | |
58 | + model.setBhnum(lisRequest.getBhnum()); | |
59 | + model.setPhone(lisRequest.getPhone()); | |
60 | + model.setSex(lisRequest.getSex()); | |
61 | + model.setTitle(lisRequest.getTitle()); | |
62 | + model.setType(lisRequest.getType()); | |
63 | + model.setChecker(lisRequest.getChecker()); | |
64 | + model.setApplyDept(lisRequest.getApplyDept()); | |
65 | + model.setApplyDoctor(lisRequest.getApplyDoctor()); | |
66 | + model.setApplyTime(DateUtil.parseYMDHMS(lisRequest.getApplyTime())); | |
67 | + model.setPublishTime(DateUtil.parseYMDHMS(lisRequest.getPublishTime())); | |
68 | + model.setModified(DateUtil.parseYMDHMS(lisRequest.getModified())); | |
69 | + model.setCreated(DateUtil.parseYMDHMS(lisRequest.getCreated())); | |
70 | + model.setCheckTime(DateUtil.parseYMDHMS(lisRequest.getCheckTime())); | |
71 | + | |
72 | + list.add(model); | |
73 | + | |
74 | + } | |
75 | + } | |
76 | + | |
77 | + return lisService.saveLisData(list); | |
41 | 78 | } |
42 | 79 | |
43 | 80 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/LisReportModelRequest.java
View file @
00062fa
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +import com.lyms.platform.permission.model.LisReportItemModel; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * Created by Administrator on 2017-04-19. | |
9 | + */ | |
10 | +public class LisReportModelRequest { | |
11 | + | |
12 | + private Integer id; | |
13 | + // ๆฃ้ชๆฅๅID | |
14 | + private String lisId; | |
15 | + // ๆฃ้ชๆฅๅๅ็งฐ | |
16 | + private String title; | |
17 | + // ๆฃ้ชๆฅๅ็ฑปๅ | |
18 | + private String type; | |
19 | + // ๅฐฑ่ฏๅกๅท | |
20 | + private String vcCardNo; | |
21 | + // ๆฃ่ ๅงๅ | |
22 | + private String name; | |
23 | + // ไฝ้ขๅท | |
24 | + private String bhnum; | |
25 | + // ๆฃ่ ๅนด้พ | |
26 | + private String age; | |
27 | + // ๆฃ่ ๆงๅซ | |
28 | + private String sex; | |
29 | + // ้ๆฃๆฅๆ | |
30 | + private String applyTime; | |
31 | + // ๆฃ้ชๆถ้ด | |
32 | + private String checkTime; | |
33 | + // ๆฅๅๅๅธๆถ้ด | |
34 | + private String publishTime; | |
35 | + // ้ๆฃๅป็ | |
36 | + private String applyDoctor; | |
37 | + // ้ๆฃ็งๅฎค | |
38 | + private String applyDept; | |
39 | + // ๆฃ้ชๅ | |
40 | + private String checker; | |
41 | + // ๆๅไฟฎๆนๆถ้ด | |
42 | + private String modified; | |
43 | + // ๅๅปบๆถ้ด | |
44 | + private String created; | |
45 | + // ๅป้ขid | |
46 | + private String hospitalId; | |
47 | + | |
48 | + //่็ณปๆนๅผ | |
49 | + private String phone; | |
50 | + | |
51 | + //ๆฃ้ช้กน้ๅ | |
52 | + private List<LisReportItemModel> items; | |
53 | + | |
54 | + public Integer getId() { | |
55 | + return id; | |
56 | + } | |
57 | + | |
58 | + public void setId(Integer id) { | |
59 | + this.id = id; | |
60 | + } | |
61 | + | |
62 | + public String getLisId() { | |
63 | + return lisId; | |
64 | + } | |
65 | + | |
66 | + public void setLisId(String lisId) { | |
67 | + this.lisId = lisId; | |
68 | + } | |
69 | + | |
70 | + public String getTitle() { | |
71 | + return title; | |
72 | + } | |
73 | + | |
74 | + public void setTitle(String title) { | |
75 | + this.title = title; | |
76 | + } | |
77 | + | |
78 | + public String getType() { | |
79 | + return type; | |
80 | + } | |
81 | + | |
82 | + public void setType(String type) { | |
83 | + this.type = type; | |
84 | + } | |
85 | + | |
86 | + public String getVcCardNo() { | |
87 | + return vcCardNo; | |
88 | + } | |
89 | + | |
90 | + public void setVcCardNo(String vcCardNo) { | |
91 | + this.vcCardNo = vcCardNo; | |
92 | + } | |
93 | + | |
94 | + public String getName() { | |
95 | + return name; | |
96 | + } | |
97 | + | |
98 | + public void setName(String name) { | |
99 | + this.name = name; | |
100 | + } | |
101 | + | |
102 | + public String getBhnum() { | |
103 | + return bhnum; | |
104 | + } | |
105 | + | |
106 | + public void setBhnum(String bhnum) { | |
107 | + this.bhnum = bhnum; | |
108 | + } | |
109 | + | |
110 | + public String getAge() { | |
111 | + return age; | |
112 | + } | |
113 | + | |
114 | + public void setAge(String age) { | |
115 | + this.age = age; | |
116 | + } | |
117 | + | |
118 | + public String getSex() { | |
119 | + return sex; | |
120 | + } | |
121 | + | |
122 | + public void setSex(String sex) { | |
123 | + this.sex = sex; | |
124 | + } | |
125 | + | |
126 | + public String getApplyTime() { | |
127 | + return applyTime; | |
128 | + } | |
129 | + | |
130 | + public void setApplyTime(String applyTime) { | |
131 | + this.applyTime = applyTime; | |
132 | + } | |
133 | + | |
134 | + public String getCheckTime() { | |
135 | + return checkTime; | |
136 | + } | |
137 | + | |
138 | + public void setCheckTime(String checkTime) { | |
139 | + this.checkTime = checkTime; | |
140 | + } | |
141 | + | |
142 | + public String getPublishTime() { | |
143 | + return publishTime; | |
144 | + } | |
145 | + | |
146 | + public void setPublishTime(String publishTime) { | |
147 | + this.publishTime = publishTime; | |
148 | + } | |
149 | + | |
150 | + public String getApplyDoctor() { | |
151 | + return applyDoctor; | |
152 | + } | |
153 | + | |
154 | + public void setApplyDoctor(String applyDoctor) { | |
155 | + this.applyDoctor = applyDoctor; | |
156 | + } | |
157 | + | |
158 | + public String getApplyDept() { | |
159 | + return applyDept; | |
160 | + } | |
161 | + | |
162 | + public void setApplyDept(String applyDept) { | |
163 | + this.applyDept = applyDept; | |
164 | + } | |
165 | + | |
166 | + public String getChecker() { | |
167 | + return checker; | |
168 | + } | |
169 | + | |
170 | + public void setChecker(String checker) { | |
171 | + this.checker = checker; | |
172 | + } | |
173 | + | |
174 | + public String getModified() { | |
175 | + return modified; | |
176 | + } | |
177 | + | |
178 | + public void setModified(String modified) { | |
179 | + this.modified = modified; | |
180 | + } | |
181 | + | |
182 | + public String getCreated() { | |
183 | + return created; | |
184 | + } | |
185 | + | |
186 | + public void setCreated(String created) { | |
187 | + this.created = created; | |
188 | + } | |
189 | + | |
190 | + public String getHospitalId() { | |
191 | + return hospitalId; | |
192 | + } | |
193 | + | |
194 | + public void setHospitalId(String hospitalId) { | |
195 | + this.hospitalId = hospitalId; | |
196 | + } | |
197 | + | |
198 | + public String getPhone() { | |
199 | + return phone; | |
200 | + } | |
201 | + | |
202 | + public void setPhone(String phone) { | |
203 | + this.phone = phone; | |
204 | + } | |
205 | + | |
206 | + public List<LisReportItemModel> getItems() { | |
207 | + return items; | |
208 | + } | |
209 | + | |
210 | + public void setItems(List<LisReportItemModel> items) { | |
211 | + this.items = items; | |
212 | + } | |
213 | +} |