Commit ca1a4e9193adcb573d98b93ce139e397ab8b5748
1 parent
d564acc195
Exists in
master
and in
6 other branches
update
Showing 7 changed files with 49 additions and 17 deletions
- platform-operate-api/src/main/java/com/lyms/hospitalapi/lcfy/LisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DefectiveChildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PreEugenicsBaseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/DefectiveChildService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IPreEugenicsService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/DefectiveChildServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PreEugebicsServiceImpl.java
platform-operate-api/src/main/java/com/lyms/hospitalapi/lcfy/LisService.java
View file @
ca1a4e9
1 | 1 | package com.lyms.hospitalapi.lcfy; |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.utils.DateUtil; |
4 | +import com.lyms.platform.common.utils.PingYinUtil; | |
4 | 5 | import com.lyms.platform.common.utils.SystemConfig; |
5 | 6 | import com.lyms.platform.pojo.PreEugenicsBaseModel; |
6 | 7 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
... | ... | @@ -58,7 +59,7 @@ |
58 | 59 | itemsMan.put("lyms013","梅毒螺旋体筛查"); |
59 | 60 | Connection conn = null; |
60 | 61 | String sql = "insert into TI_申请信息(v患者类别,v患者编号,v患者ID号,v患者姓名,v性别,v年龄,v年龄类型,v申请项目编码,v申请项目名称," + |
61 | - "v唯一标识号,iTag,v手机号,v身份证号,d申请时间,v申请日期,i项目数量) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
62 | + "v唯一标识号,iTag,v手机号,v身份证号,d申请时间,v申请日期,i项目数量,v拼音码) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
62 | 63 | PreparedStatement ps = null; |
63 | 64 | ResultSet rs = null; |
64 | 65 | try { |
65 | 66 | |
... | ... | @@ -82,8 +83,9 @@ |
82 | 83 | ps.setString(12,model.getWifePhone()); |
83 | 84 | ps.setString(13,model.getWifeCardNo()); |
84 | 85 | ps.setDate(14, new java.sql.Date(new Date().getTime())); |
85 | - ps.setString(15,DateUtil.getyyyy_MM_dd(new Date())); | |
86 | + ps.setString(15, DateUtil.getyyyy_MM_dd(new Date())); | |
86 | 87 | ps.setInt(16, 1); |
88 | + ps.setString(17, PingYinUtil.getFirstSpell(model.getWifeName()).toUpperCase()); | |
87 | 89 | int inCount = ps.executeUpdate(); |
88 | 90 | System.out.println("女性保存"+inCount); |
89 | 91 | } |
... | ... | @@ -107,6 +109,7 @@ |
107 | 109 | ps.setDate(14, new java.sql.Date(new Date().getTime())); |
108 | 110 | ps.setString(15, DateUtil.getyyyy_MM_dd(new Date())); |
109 | 111 | ps.setInt(16, 1); |
112 | + ps.setString(17, PingYinUtil.getFirstSpell(model.getHusbandName()).toUpperCase()); | |
110 | 113 | int inCount = ps.executeUpdate(); |
111 | 114 | System.out.println("男性性保存"+inCount); |
112 | 115 | } |
... | ... | @@ -177,7 +180,7 @@ |
177 | 180 | itemsMan.put("lymsh013","梅毒螺旋体筛查"); |
178 | 181 | Connection conn = null; |
179 | 182 | String sql = "insert into TI_申请信息(v患者类别,v患者编号,v患者ID号,v患者姓名,v性别,v年龄,v年龄类型,v申请项目编码,v申请项目名称," + |
180 | - "v唯一标识号,iTag,v手机号,v身份证号,d申请时间,v申请日期,i项目数量) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
183 | + "v唯一标识号,iTag,v手机号,v身份证号,d申请时间,v申请日期,i项目数量,v拼音码) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | |
181 | 184 | PreparedStatement ps = null; |
182 | 185 | ResultSet rs = null; |
183 | 186 | try { |
184 | 187 | |
... | ... | @@ -211,8 +214,9 @@ |
211 | 214 | ps.setString(12,residentsArchiveModel.getPhone()); |
212 | 215 | ps.setString(13,residentsArchiveModel.getCertificateNum()); |
213 | 216 | ps.setDate(14, new java.sql.Date(new Date().getTime())); |
214 | - ps.setString(15,DateUtil.getyyyy_MM_dd(new Date())); | |
217 | + ps.setString(15, DateUtil.getyyyy_MM_dd(new Date())); | |
215 | 218 | ps.setInt(16, 1); |
219 | + ps.setString(17, PingYinUtil.getFirstSpell(residentsArchiveModel.getUsername()).toUpperCase()); | |
216 | 220 | int inCount = ps.executeUpdate(); |
217 | 221 | System.out.println("女性保存"+inCount); |
218 | 222 | } |
... | ... | @@ -239,6 +243,7 @@ |
239 | 243 | ps.setDate(14, new java.sql.Date(new Date().getTime())); |
240 | 244 | ps.setString(15, DateUtil.getyyyy_MM_dd(new Date())); |
241 | 245 | ps.setInt(16, 1); |
246 | + ps.setString(17, PingYinUtil.getFirstSpell(residentsArchiveModel.getUsername()).toUpperCase()); | |
242 | 247 | int inCount = ps.executeUpdate(); |
243 | 248 | System.out.println("男性性保存"+inCount); |
244 | 249 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DefectiveChildController.java
View file @
ca1a4e9
... | ... | @@ -4,10 +4,7 @@ |
4 | 4 | |
5 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 6 | import org.springframework.stereotype.Controller; |
7 | -import org.springframework.web.bind.annotation.RequestBody; | |
8 | -import org.springframework.web.bind.annotation.RequestMapping; | |
9 | -import org.springframework.web.bind.annotation.RequestMethod; | |
10 | -import org.springframework.web.bind.annotation.ResponseBody; | |
7 | +import org.springframework.web.bind.annotation.*; | |
11 | 8 | |
12 | 9 | import com.fasterxml.jackson.annotation.JsonAlias; |
13 | 10 | import com.lyms.platform.common.annotation.TokenRequired; |
... | ... | @@ -57,7 +54,7 @@ |
57 | 54 | @TokenRequired |
58 | 55 | public BaseResponse add(@RequestBody DefectiveChildRequest param, HttpServletRequest request) { |
59 | 56 | param.setCreateUser(getUserId(request).toString()); |
60 | - return defectiveChildService.add(param,getUserId(request)); | |
57 | + return defectiveChildService.add(param, getUserId(request)); | |
61 | 58 | } |
62 | 59 | |
63 | 60 | /** |
... | ... | @@ -83,7 +80,7 @@ |
83 | 80 | @ResponseBody |
84 | 81 | @TokenRequired |
85 | 82 | public BaseListResponse listPage(@JsonAlias DefectiveChildListRequest param,HttpServletRequest request) { |
86 | - return defectiveChildService.listPage(param,getUserId(request)); | |
83 | + return defectiveChildService.listPage(param, getUserId(request)); | |
87 | 84 | } |
88 | 85 | |
89 | 86 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PreEugenicsBaseController.java
View file @
ca1a4e9
... | ... | @@ -147,5 +147,20 @@ |
147 | 147 | public BaseResponse delete(@PathVariable String id) { |
148 | 148 | return iPreEugenicsService.delete(id); |
149 | 149 | } |
150 | + | |
151 | + | |
152 | + | |
153 | + | |
154 | + /** | |
155 | + * 保存lis检查项到lis系统中 | |
156 | + * @param id | |
157 | + * @return | |
158 | + */ | |
159 | + @RequestMapping(value = "/setDefectiveChildCheckItem/{id}", method = RequestMethod.GET) | |
160 | + @ResponseBody | |
161 | + @TokenRequired | |
162 | + public BaseResponse setDefectiveChildCheckItem(@PathVariable("id")String id){ | |
163 | + return iPreEugenicsService.setPreEugenicsCheckItem(id); | |
164 | + } | |
150 | 165 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/DefectiveChildService.java
View file @
ca1a4e9
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IPreEugenicsService.java
View file @
ca1a4e9
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/DefectiveChildServiceImpl.java
View file @
ca1a4e9
... | ... | @@ -4,7 +4,11 @@ |
4 | 4 | import java.util.LinkedList; |
5 | 5 | import java.util.List; |
6 | 6 | |
7 | +import com.lyms.hospitalapi.lcfy.LisService; | |
8 | +import com.lyms.platform.common.enums.YnEnums; | |
7 | 9 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
10 | +import com.lyms.platform.pojo.ResidentsArchiveModel; | |
11 | +import com.lyms.platform.query.ResidentsArchiveQuery; | |
8 | 12 | import org.apache.commons.collections.CollectionUtils; |
9 | 13 | import org.springframework.beans.BeanUtils; |
10 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -58,6 +62,10 @@ |
58 | 62 | |
59 | 63 | @Autowired |
60 | 64 | private AutoMatchFacade autoMatchFacade; |
65 | + | |
66 | + | |
67 | + @Autowired | |
68 | + private LisService lcfyLisService; | |
61 | 69 | |
62 | 70 | |
63 | 71 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PreEugebicsServiceImpl.java
View file @
ca1a4e9
... | ... | @@ -3,10 +3,13 @@ |
3 | 3 | import java.util.*; |
4 | 4 | |
5 | 5 | import com.lyms.hospitalapi.lcfy.LisService; |
6 | +import com.lyms.platform.common.enums.YnEnums; | |
6 | 7 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
7 | 8 | import com.lyms.platform.operate.web.request.YqysParamRequest; |
8 | 9 | import com.lyms.platform.permission.service.UsersService; |
9 | 10 | import com.lyms.platform.pojo.BasicConfig; |
11 | +import com.lyms.platform.query.ResidentsArchiveQuery; | |
12 | +import org.apache.commons.collections.CollectionUtils; | |
10 | 13 | import org.springframework.beans.BeanUtils; |
11 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
12 | 15 | import org.springframework.data.domain.Sort; |
... | ... | @@ -166,12 +169,6 @@ |
166 | 169 | model.setHospitalId(hospitalId); |
167 | 170 | model.setCreated(new Date()); |
168 | 171 | mongoTemplate.insert(model); |
169 | - //陵城区妇幼保健院 | |
170 | - if ("2100002042".equals(hospitalId)) | |
171 | - { | |
172 | - saveLis(model); | |
173 | - } | |
174 | - | |
175 | 172 | return new BaseResponse(); |
176 | 173 | } |
177 | 174 | |
... | ... | @@ -462,6 +459,15 @@ |
462 | 459 | } |
463 | 460 | mongoTemplate.remove(Query.query(Criteria.where("id").is(id)), PreEugenicsBaseModel.class); |
464 | 461 | return new BaseResponse(); |
462 | + } | |
463 | + | |
464 | + @Override | |
465 | + public BaseResponse setPreEugenicsCheckItem(String id) { | |
466 | + PreEugenicsBaseModel model = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), PreEugenicsBaseModel.class); | |
467 | + if (model != null) { | |
468 | + lcfyLisService.save(model); | |
469 | + } | |
470 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
465 | 471 | } |
466 | 472 | } |