Commit 31b53d07416fbad648c737bb0d2c2530aea043b4
1 parent
606a01bfb9
Exists in
master
and in
6 other branches
同步服务初步设计
Showing 4 changed files with 55 additions and 1 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SysBaseFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java
View file @
31b53d0
... | ... | @@ -8,11 +8,14 @@ |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | 9 | import com.lyms.platform.common.utils.StringUtils; |
10 | 10 | import com.lyms.platform.operate.web.facade.PatientServiceFacade; |
11 | +import com.lyms.platform.operate.web.facade.SysBaseFacade; | |
11 | 12 | import com.lyms.platform.operate.web.request.BasePageQueryRequest; |
12 | 13 | import com.lyms.platform.permission.model.PatientService; |
13 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
14 | 15 | import org.springframework.stereotype.Controller; |
15 | 16 | import org.springframework.web.bind.annotation.*; |
17 | +import org.springframework.web.context.ContextLoader; | |
18 | +import org.springframework.web.context.WebApplicationContext; | |
16 | 19 | |
17 | 20 | import javax.servlet.http.HttpServletRequest; |
18 | 21 | import java.util.Date; |
... | ... | @@ -27,6 +30,20 @@ |
27 | 30 | |
28 | 31 | @Autowired |
29 | 32 | private PatientServiceFacade patientServiceFacade; |
33 | + | |
34 | + /** | |
35 | + * 小程序同步数据接口 | |
36 | + * | |
37 | + * @return | |
38 | + */ | |
39 | + @ResponseBody | |
40 | + @RequestMapping(value = "/patSer/sysnPatientSer", method = RequestMethod.POST) | |
41 | + public BaseResponse sysnPatientSer(){ | |
42 | + String action = "patientServiceSysFacade"; | |
43 | + WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext(); | |
44 | + SysBaseFacade sysBaseFacade = (SysBaseFacade)webApplicationContext.getBean(action); | |
45 | + return sysBaseFacade.sysData(); | |
46 | + } | |
30 | 47 | |
31 | 48 | /** |
32 | 49 | * 初始化接口 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
31b53d0
... | ... | @@ -1303,7 +1303,11 @@ |
1303 | 1303 | doctorObj.put("name", "产科病房"); |
1304 | 1304 | } else { |
1305 | 1305 | Users users = usersService.getUsers(Integer.parseInt(model.getBuildDoctor())); |
1306 | - doctorObj.put("name", users.getName()); | |
1306 | + if(users!=null){ | |
1307 | + doctorObj.put("name", users.getName()); | |
1308 | + }else{ | |
1309 | + doctorObj.put("name", model.getBuildDoctor()); | |
1310 | + } | |
1307 | 1311 | } |
1308 | 1312 | result.setBuildDoctor(doctorObj); |
1309 | 1313 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
View file @
31b53d0
1 | +package com.lyms.platform.operate.web.facade; | |
2 | + | |
3 | +import com.lyms.platform.common.result.BaseResponse; | |
4 | +import org.springframework.stereotype.Component; | |
5 | + | |
6 | +/** | |
7 | + * @auther yangfei | |
8 | + * @createTime 2017年10月12日 17时09分 | |
9 | + * @discription | |
10 | + */ | |
11 | +@Component | |
12 | +public class PatientServiceSysFacade implements SysBaseFacade{ | |
13 | + @Override | |
14 | + public BaseResponse sysData() { | |
15 | + System.out.println("同步数据方法"); | |
16 | + BaseResponse baseResponse = new BaseResponse(); | |
17 | + baseResponse.setErrorcode(0); | |
18 | + baseResponse.setErrormsg("成功"); | |
19 | + return baseResponse; | |
20 | + } | |
21 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SysBaseFacade.java
View file @
31b53d0