Commit 140929e083079db1ac14eb840575fedbc0ff75ba

Authored by yangfei
1 parent db7c77a013

服务价格同步

Showing 3 changed files with 40 additions and 3 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/PatientSerEnums.java View file @ 140929e
... ... @@ -20,8 +20,8 @@
20 20 xy(4, "血压管理"),
21 21 zjzx(5, "专家咨询"),
22 22 tw(7, "体温管理"),
23   - babyjzzz(10,"精准医疗指导"),
24   - babyBzfw(11,"标准服务");
  23 + babyjzzz(10, "精准医疗指导"),
  24 + babyBzfw(11, "标准服务");
25 25 private Integer id;
26 26 private String title;
27 27  
28 28  
... ... @@ -111,11 +111,28 @@
111 111 return list;
112 112 }
113 113  
  114 + //全部服务类型
  115 + public static List getSerTypeAll() {
  116 + List<Object> list = new ArrayList<>();
  117 + for (SerTypeEnums enums : SerTypeEnums.values()) {
  118 + Map<String, Object> resultMap = new HashMap<>();
  119 + resultMap.put("id", enums.getId());
  120 + if (enums.getId() < 10) {
  121 + resultMap.put("name", "(孕妇)"+enums.getTitle());
  122 + }else{
  123 + resultMap.put("name", "(儿童)"+enums.getTitle());
  124 + }
  125 +
  126 + list.add(resultMap);
  127 + }
  128 + return list;
  129 + }
  130 +
114 131 //孕妇服务类型
115 132 public static List getSerType() {
116 133 List<Object> list = new ArrayList<>();
117 134 for (SerTypeEnums enums : SerTypeEnums.values()) {
118   - if(enums.getId()<10){
  135 + if (enums.getId() < 10) {
119 136 Map<String, Object> resultMap = new HashMap<>();
120 137 resultMap.put("id", enums.getId());
121 138 resultMap.put("name", enums.getTitle());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java View file @ 140929e
... ... @@ -41,6 +41,16 @@
41 41  
42 42 return patientServiceFacade.patientServiceInit(loginState.getId());
43 43 }
  44 + /**
  45 + * 初始化接口
  46 + *
  47 + * @return
  48 + */
  49 + @ResponseBody
  50 + @RequestMapping(value = "/serInfo/init", method = RequestMethod.GET)
  51 + public BaseResponse configServiceInit( HttpServletRequest request) {
  52 + return patientServiceFacade.configServiceInit();
  53 + }
44 54  
45 55 /**
46 56 * 初始化接口
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java View file @ 140929e
... ... @@ -70,6 +70,16 @@
70 70 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
71 71 }
72 72  
  73 +
  74 + public BaseResponse configServiceInit() {
  75 + Map map = new HashMap();
  76 + //服务类型
  77 + map.put("serTypes", PatientSerEnums.getSerTypeAll());
  78 + //服务状态
  79 + map.put("serStatus", PatientSerEnums.getSerStatus());
  80 + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
  81 + }
  82 +
73 83 public BaseResponse patientServiceInit(Integer id) {
74 84 //根据用户id获取医院ID
75 85 String hospitalId = autoMatchFacade.getHospitalId(id);