Commit e67cb08fe493d6902bb0f9b77586411432e5c784
1 parent
315223928d
Exists in
master
and in
1 other branch
增加权限
Showing 4 changed files with 19 additions and 21 deletions
- platform-common/src/main/java/com/lyms/platform/common/enums/VisitStatusEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyVisitAddRequest.java
platform-common/src/main/java/com/lyms/platform/common/enums/VisitStatusEnums.java
View file @
e67cb08
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
e67cb08
... | ... | @@ -281,21 +281,17 @@ |
281 | 281 | |
282 | 282 | return frontEndResult; |
283 | 283 | } |
284 | - private Map<String,Object> convert(Organization organization){ | |
285 | - Map<String,Object> map = new HashMap<>(); | |
286 | - map.put("id",organization.getId()); | |
287 | - map.put("name",organization.getName()); | |
288 | - map.put("areaId",organization.getAreaId()); | |
289 | - map.put("area",organization.getArea()); | |
290 | - map.put("city",organization.getCity()); | |
291 | - map.put("cityId",organization.getCityId()); | |
292 | - map.put("province",organization.getProvince()); | |
293 | - map.put("provinceId",organization.getProvinceId()); | |
294 | - return map; | |
295 | - } | |
296 | - @RequestMapping("/") | |
297 | - public void build(){ | |
298 | - | |
284 | + private Map<String,Object> convert(Organization organization) { | |
285 | + Map<String, Object> map = new HashMap<>(); | |
286 | + map.put("id", organization.getId()); | |
287 | + map.put("name", organization.getName()); | |
288 | + map.put("areaId", organization.getAreaId()); | |
289 | + map.put("area", organization.getArea()); | |
290 | + map.put("city", organization.getCity()); | |
291 | + map.put("cityId", organization.getCityId()); | |
292 | + map.put("province", organization.getProvince()); | |
293 | + map.put("provinceId", organization.getProvinceId()); | |
294 | + return map; | |
299 | 295 | } |
300 | 296 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java
View file @
e67cb08
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.*; |
4 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
5 | +import com.lyms.platform.common.enums.VisitStatusEnums; | |
5 | 6 | import com.lyms.platform.common.enums.YnEnums; |
6 | 7 | import com.lyms.platform.common.result.BaseObjectResponse; |
7 | 8 | import com.lyms.platform.common.result.BaseResponse; |
... | ... | @@ -164,7 +165,7 @@ |
164 | 165 | patients.setId(null); |
165 | 166 | patients.setCreated(new Date()); |
166 | 167 | patients.setModified(new Date()); |
167 | - patients.setIsVisit(0); | |
168 | + patients.setIsVisit(VisitStatusEnums.UNVISIT.getId()); | |
168 | 169 | parentId = patientsService.addPatient(patients).getId(); |
169 | 170 | } |
170 | 171 | |
... | ... | @@ -185,7 +186,7 @@ |
185 | 186 | } |
186 | 187 | Patients patients = new Patients(); |
187 | 188 | patients.setId(parentId); |
188 | - patients.setIsVisit(1); | |
189 | + patients.setIsVisit(VisitStatusEnums.VISITED.getId()); | |
189 | 190 | patients.setModified(new Date()); |
190 | 191 | patientsService.updatePatient(patients); |
191 | 192 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
... | ... | @@ -220,7 +221,7 @@ |
220 | 221 | if (CollectionUtils.isNotEmpty(patientses)) { |
221 | 222 | babyModel.setParentId(patientses.get(0).getId()); |
222 | 223 | } |
223 | - babyModel.setVisitstatus(0); | |
224 | + babyModel.setVisitstatus(VisitStatusEnums.UNVISIT.getId()); | |
224 | 225 | babyId = babyService.addOneBaby(babyModel).getId(); |
225 | 226 | } else { |
226 | 227 | //修改小孩基本信息 |
... | ... | @@ -237,7 +238,7 @@ |
237 | 238 | //添加成功后修改新生儿的访视状态 |
238 | 239 | BabyModel babyModel = new BabyModel(); |
239 | 240 | babyModel.setId(babyId); |
240 | - babyModel.setVisitstatus(1); | |
241 | + babyModel.setVisitstatus(VisitStatusEnums.VISITED.getId()); | |
241 | 242 | babyService.updateOneBaby(babyModel, babyId); |
242 | 243 | |
243 | 244 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyVisitAddRequest.java
View file @
e67cb08
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.base.IBasicRequestConvert; |
4 | 4 | import com.lyms.platform.common.core.annotation.form.Form; |
5 | +import com.lyms.platform.common.enums.YnEnums; | |
5 | 6 | import com.lyms.platform.common.utils.DateUtil; |
6 | 7 | import com.lyms.platform.common.utils.JsonUtil; |
7 | 8 | import com.lyms.platform.pojo.BabyModel; |
... | ... | @@ -759,7 +760,7 @@ |
759 | 760 | public BabyModel getBabyModel() { |
760 | 761 | BabyModel babyModel = new BabyModel(); |
761 | 762 | babyModel.setSex(sex); |
762 | - babyModel.setYn(1); | |
763 | + babyModel.setYn(YnEnums.YES.getId()); | |
763 | 764 | babyModel.setAddress(address); |
764 | 765 | babyModel.setName(name); |
765 | 766 | babyModel.setAreaId(areaId); |