Commit 1bed29433f3d08cb762d14747b1b30a58a9bceef
1 parent
3b5d111e31
Exists in
master
and in
8 other branches
platform permission
fix bug
Showing 8 changed files with 427 additions and 58 deletions
- platform-common/src/main/java/com/lyms/platform/common/enums/PatientsTypeEnum.java
- platform-common/src/main/java/com/lyms/platform/common/enums/SampleTypeEnum.java
- platform-common/src/main/java/com/lyms/platform/common/enums/SexEnum.java
- platform-dal/src/main/java/com/lyms/platform/pojo/ReferValue.java
- platform-dal/src/main/java/com/lyms/platform/query/ReferConfigQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EnumsController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReferConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
platform-common/src/main/java/com/lyms/platform/common/enums/PatientsTypeEnum.java
View file @
1bed294
| 1 | +package com.lyms.platform.common.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 病人类型 | |
| 5 | + * Created by Zhang.Rui on 2016/4/7. | |
| 6 | + */ | |
| 7 | +public enum PatientsTypeEnum { | |
| 8 | + CR(1,"成人"),CRNAN(2,"成人男"),CRNV(3, "成人女") | |
| 9 | + ,XSR(4,"新生儿"),YINGR(5,"婴儿"),YOUR(6,"幼儿"),ET(7,"儿童"); | |
| 10 | + | |
| 11 | + private Integer id; | |
| 12 | + private String text; | |
| 13 | + | |
| 14 | + | |
| 15 | + PatientsTypeEnum(int id, String text) { | |
| 16 | + this.id=id; | |
| 17 | + this.text = text; | |
| 18 | + } | |
| 19 | + | |
| 20 | + | |
| 21 | + public Integer getId() { | |
| 22 | + return id; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setId(Integer id) { | |
| 26 | + this.id = id; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getText() { | |
| 30 | + return text; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setText(String text) { | |
| 34 | + this.text = text; | |
| 35 | + } | |
| 36 | +} |
platform-common/src/main/java/com/lyms/platform/common/enums/SampleTypeEnum.java
View file @
1bed294
| 1 | +package com.lyms.platform.common.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 样本类型 | |
| 5 | + * Created by Zhang.Rui on 2016/4/7. | |
| 6 | + */ | |
| 7 | +public enum SampleTypeEnum { | |
| 8 | + XY(1,"血液"), NY(2,"尿液"),FB(3,"粪便"), | |
| 9 | + TY(4, "痰液"), NJY(5,"脑脊液"),JMQY(6,"浆膜腔液"), | |
| 10 | + GJY(7,"关节液"), GS(8,"骨髓"),JY(9,"精液"), | |
| 11 | + QLXY(10,"前列腺液"),YDFMW(11,"阴道分泌物"),RZ(12,"乳汁"), | |
| 12 | + QT(13,"其他"); | |
| 13 | + | |
| 14 | + private Integer id; | |
| 15 | + | |
| 16 | + public Integer getId() { | |
| 17 | + return id; | |
| 18 | + } | |
| 19 | + | |
| 20 | + public void setId(Integer id) { | |
| 21 | + this.id = id; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public String getText() { | |
| 25 | + return text; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void setText(String text) { | |
| 29 | + this.text = text; | |
| 30 | + } | |
| 31 | + | |
| 32 | + private String text; | |
| 33 | + | |
| 34 | + | |
| 35 | + SampleTypeEnum(int id, String text) { | |
| 36 | + this.id=id; | |
| 37 | + this.text = text; | |
| 38 | + } | |
| 39 | + | |
| 40 | +} |
platform-common/src/main/java/com/lyms/platform/common/enums/SexEnum.java
View file @
1bed294
| 1 | +package com.lyms.platform.common.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 性别 | |
| 5 | + * Created by Zhang.Rui on 2016/4/7. | |
| 6 | + */ | |
| 7 | +public enum SexEnum { | |
| 8 | + MAN(1,"男"), WOMAN(0,"女"); | |
| 9 | + | |
| 10 | + private Integer id; | |
| 11 | + private String text; | |
| 12 | + | |
| 13 | + | |
| 14 | + SexEnum(int id, String text) { | |
| 15 | + this.id=id; | |
| 16 | + this.text = text; | |
| 17 | + } | |
| 18 | + | |
| 19 | + public Integer getId() { | |
| 20 | + return id; | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void setId(Integer id) { | |
| 24 | + this.id = id; | |
| 25 | + } | |
| 26 | + | |
| 27 | + public String getText() { | |
| 28 | + return text; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setText(String text) { | |
| 32 | + this.text = text; | |
| 33 | + } | |
| 34 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/ReferValue.java
View file @
1bed294
| ... | ... | @@ -32,28 +32,73 @@ |
| 32 | 32 | private String code; |
| 33 | 33 | private String sample; //样本 |
| 34 | 34 | private String sampleDesc; //样本说明 |
| 35 | - private int sex; | |
| 35 | + private String sex; | |
| 36 | 36 | private String feature; //病人特征 |
| 37 | - private int ageDepartment; //年龄单位 | |
| 38 | - private int beginAge; | |
| 39 | - private int endAge; | |
| 37 | + private String ageDepartment; //年龄单位 | |
| 38 | + private String beginAge; | |
| 39 | + private String endAge; | |
| 40 | 40 | private String unit; //项目单位 |
| 41 | 41 | private String charRefer; //字符参考 |
| 42 | 42 | private String min; //下限 |
| 43 | 43 | private String max; //上限 |
| 44 | 44 | |
| 45 | - private String emergencyMin;//危机下限 | |
| 46 | - private String emergencyMax;//危机上限 | |
| 45 | + | |
| 47 | 46 | private String emergencyChar; //危机字符 |
| 48 | 47 | |
| 49 | - private String deal; //处理 | |
| 50 | - private String serviceContent;//服务内容 | |
| 51 | - private int department; //科室 | |
| 52 | - private int assayConfigId; //化验项ID | |
| 48 | + private String emergencyMin;//危机下限 | |
| 49 | + private String emergencyMinDeal; //危机下限处理 | |
| 50 | + private String emergencyMinServiceContent;//危机下限服务内容 | |
| 51 | + | |
| 52 | + private String emergencyMax;//危机上限 | |
| 53 | + private String emergencyMaxDeal; //危机上限限处理 | |
| 54 | + private String emergencyMaxServiceContent;//危机上限服务内容 | |
| 55 | + private String department; //科室 | |
| 56 | + private String assayConfigId; //化验项ID | |
| 53 | 57 | private String standardCode;//标准代码 |
| 54 | 58 | |
| 55 | 59 | private Integer yn; |
| 56 | 60 | |
| 61 | + | |
| 62 | + public String getSex() { | |
| 63 | + return sex; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setSex(String sex) { | |
| 67 | + this.sex = sex; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public String getAgeDepartment() { | |
| 71 | + return ageDepartment; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setAgeDepartment(String ageDepartment) { | |
| 75 | + this.ageDepartment = ageDepartment; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public String getBeginAge() { | |
| 79 | + return beginAge; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void setBeginAge(String beginAge) { | |
| 83 | + this.beginAge = beginAge; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public String getEndAge() { | |
| 87 | + return endAge; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void setEndAge(String endAge) { | |
| 91 | + this.endAge = endAge; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public String getDepartment() { | |
| 95 | + return department; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public void setDepartment(String department) { | |
| 99 | + this.department = department; | |
| 100 | + } | |
| 101 | + | |
| 57 | 102 | public Integer getYn() { |
| 58 | 103 | return yn; |
| 59 | 104 | } |
| 60 | 105 | |
| ... | ... | @@ -78,11 +123,11 @@ |
| 78 | 123 | this.standardCode = standardCode; |
| 79 | 124 | } |
| 80 | 125 | |
| 81 | - public int getAssayConfigId() { | |
| 126 | + public String getAssayConfigId() { | |
| 82 | 127 | return assayConfigId; |
| 83 | 128 | } |
| 84 | 129 | |
| 85 | - public void setAssayConfigId(int assayConfigId) { | |
| 130 | + public void setAssayConfigId(String assayConfigId) { | |
| 86 | 131 | this.assayConfigId = assayConfigId; |
| 87 | 132 | } |
| 88 | 133 | |
| ... | ... | @@ -126,14 +171,6 @@ |
| 126 | 171 | this.sampleDesc = sampleDesc; |
| 127 | 172 | } |
| 128 | 173 | |
| 129 | - public int getSex() { | |
| 130 | - return sex; | |
| 131 | - } | |
| 132 | - | |
| 133 | - public void setSex(int sex) { | |
| 134 | - this.sex = sex; | |
| 135 | - } | |
| 136 | - | |
| 137 | 174 | public String getFeature() { |
| 138 | 175 | return feature; |
| 139 | 176 | } |
| 140 | 177 | |
| 141 | 178 | |
| 142 | 179 | |
| ... | ... | @@ -142,30 +179,9 @@ |
| 142 | 179 | this.feature = feature; |
| 143 | 180 | } |
| 144 | 181 | |
| 145 | - public int getAgeDepartment() { | |
| 146 | - return ageDepartment; | |
| 147 | - } | |
| 148 | 182 | |
| 149 | - public void setAgeDepartment(int ageDepartment) { | |
| 150 | - this.ageDepartment = ageDepartment; | |
| 151 | - } | |
| 152 | 183 | |
| 153 | - public int getBeginAge() { | |
| 154 | - return beginAge; | |
| 155 | - } | |
| 156 | 184 | |
| 157 | - public void setBeginAge(int beginAge) { | |
| 158 | - this.beginAge = beginAge; | |
| 159 | - } | |
| 160 | - | |
| 161 | - public int getEndAge() { | |
| 162 | - return endAge; | |
| 163 | - } | |
| 164 | - | |
| 165 | - public void setEndAge(int endAge) { | |
| 166 | - this.endAge = endAge; | |
| 167 | - } | |
| 168 | - | |
| 169 | 185 | public String getUnit() { |
| 170 | 186 | return unit; |
| 171 | 187 | } |
| 172 | 188 | |
| 173 | 189 | |
| 174 | 190 | |
| 175 | 191 | |
| 176 | 192 | |
| 177 | 193 | |
| ... | ... | @@ -222,28 +238,41 @@ |
| 222 | 238 | this.emergencyChar = emergencyChar; |
| 223 | 239 | } |
| 224 | 240 | |
| 225 | - public String getDeal() { | |
| 226 | - return deal; | |
| 241 | + public static long getSerialVersionUID() { | |
| 242 | + return serialVersionUID; | |
| 227 | 243 | } |
| 228 | 244 | |
| 229 | - public void setDeal(String deal) { | |
| 230 | - this.deal = deal; | |
| 245 | + public String getEmergencyMinDeal() { | |
| 246 | + return emergencyMinDeal; | |
| 231 | 247 | } |
| 232 | 248 | |
| 233 | - public String getServiceContent() { | |
| 234 | - return serviceContent; | |
| 249 | + public void setEmergencyMinDeal(String emergencyMinDeal) { | |
| 250 | + this.emergencyMinDeal = emergencyMinDeal; | |
| 235 | 251 | } |
| 236 | 252 | |
| 237 | - public void setServiceContent(String serviceContent) { | |
| 238 | - this.serviceContent = serviceContent; | |
| 253 | + public String getEmergencyMinServiceContent() { | |
| 254 | + return emergencyMinServiceContent; | |
| 239 | 255 | } |
| 240 | 256 | |
| 241 | - public int getDepartment() { | |
| 242 | - return department; | |
| 257 | + public void setEmergencyMinServiceContent(String emergencyMinServiceContent) { | |
| 258 | + this.emergencyMinServiceContent = emergencyMinServiceContent; | |
| 243 | 259 | } |
| 244 | 260 | |
| 245 | - public void setDepartment(int department) { | |
| 246 | - this.department = department; | |
| 261 | + public String getEmergencyMaxDeal() { | |
| 262 | + return emergencyMaxDeal; | |
| 247 | 263 | } |
| 264 | + | |
| 265 | + public void setEmergencyMaxDeal(String emergencyMaxDeal) { | |
| 266 | + this.emergencyMaxDeal = emergencyMaxDeal; | |
| 267 | + } | |
| 268 | + | |
| 269 | + public String getEmergencyMaxServiceContent() { | |
| 270 | + return emergencyMaxServiceContent; | |
| 271 | + } | |
| 272 | + | |
| 273 | + public void setEmergencyMaxServiceContent(String emergencyMaxServiceContent) { | |
| 274 | + this.emergencyMaxServiceContent = emergencyMaxServiceContent; | |
| 275 | + } | |
| 276 | + | |
| 248 | 277 | } |
platform-dal/src/main/java/com/lyms/platform/query/ReferConfigQuery.java
View file @
1bed294
| ... | ... | @@ -15,13 +15,18 @@ |
| 15 | 15 | public class ReferConfigQuery extends BaseQuery { |
| 16 | 16 | @NotNull(message = "医院ID不能为空") |
| 17 | 17 | private Integer hospitalId; |
| 18 | + private String id; | |
| 18 | 19 | private Integer codeType;//1:项目代码2:标准代码 3:项目名称 |
| 19 | 20 | private String keyword; |
| 20 | 21 | private Integer referVal;//1已设置2未设置3全部 |
| 21 | 22 | private Integer emergencyVal;//1已设置2未设置3全部 |
| 23 | + private Integer yn; | |
| 22 | 24 | |
| 25 | + | |
| 26 | + | |
| 23 | 27 | public MongoQuery convertToQuery() { |
| 24 | 28 | MongoCondition condition = MongoCondition.newInstance(); |
| 29 | + | |
| 25 | 30 | if (null != hospitalId) { |
| 26 | 31 | condition.and("hospitalId", hospitalId, MongoOper.IS); |
| 27 | 32 | } |
| 28 | 33 | |
| ... | ... | @@ -48,7 +53,31 @@ |
| 48 | 53 | condition.and("emergencyChar", null, MongoOper.IS); |
| 49 | 54 | } |
| 50 | 55 | } |
| 56 | + | |
| 57 | + if(null != yn) { | |
| 58 | + condition.and("yn", yn, MongoOper.IS); | |
| 59 | + } | |
| 60 | + if(null != id) { | |
| 61 | + condition.and("id", id, MongoOper.IS); | |
| 62 | + } | |
| 63 | + | |
| 51 | 64 | return condition.toMongoQuery(); |
| 65 | + } | |
| 66 | + | |
| 67 | + public String getId() { | |
| 68 | + return id; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setId(String id) { | |
| 72 | + this.id = id; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public Integer getYn() { | |
| 76 | + return yn; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setYn(Integer yn) { | |
| 80 | + this.yn = yn; | |
| 52 | 81 | } |
| 53 | 82 | |
| 54 | 83 | public Integer getHospitalId() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EnumsController.java
View file @
1bed294
| 1 | +package com.lyms.platform.operate.web.controller; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.enums.AgeUnitEnums; | |
| 4 | +import com.lyms.platform.common.enums.PatientsTypeEnum; | |
| 5 | +import com.lyms.platform.common.enums.SampleTypeEnum; | |
| 6 | +import com.lyms.platform.common.enums.SexEnum; | |
| 7 | +import org.springframework.stereotype.Controller; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 9 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 10 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 11 | + | |
| 12 | +import java.util.ArrayList; | |
| 13 | +import java.util.HashMap; | |
| 14 | +import java.util.List; | |
| 15 | +import java.util.Map; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * Created by Zhang.Rui on 2016/4/7. | |
| 19 | + */ | |
| 20 | +@Controller | |
| 21 | +public class EnumsController { | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 获取性别枚举 | |
| 25 | + */ | |
| 26 | + @RequestMapping(value = "/sexEnum", method = RequestMethod.GET) | |
| 27 | + @ResponseBody | |
| 28 | + public List getSexEnum() { | |
| 29 | + List<Object> list = new ArrayList<>(); | |
| 30 | + Map<String, String> m = null; | |
| 31 | + for (SexEnum e : SexEnum.values()) { | |
| 32 | + m = new HashMap<>(); | |
| 33 | + m.put("id", String.valueOf(e.getId())); | |
| 34 | + m.put("text", e.getText()); | |
| 35 | + list.add(m); | |
| 36 | + } | |
| 37 | + return list; | |
| 38 | + } | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 获取病人类型枚举 | |
| 42 | + */ | |
| 43 | + @RequestMapping(value = "/sampleTypeEnum", method = RequestMethod.GET) | |
| 44 | + @ResponseBody | |
| 45 | + public List getSampleTypeEnum() { | |
| 46 | + List<Object> list = new ArrayList<>(); | |
| 47 | + Map<String, String> m = null; | |
| 48 | + for (SampleTypeEnum e : SampleTypeEnum.values()) { | |
| 49 | + m = new HashMap<>(); | |
| 50 | + m.put("id", String.valueOf(e.getId())); | |
| 51 | + m.put("text", e.getText()); | |
| 52 | + list.add(m); | |
| 53 | + } | |
| 54 | + return list; | |
| 55 | + } | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 获取样本类型枚举 | |
| 59 | + */ | |
| 60 | + @RequestMapping(value = "/patientsTypeEnum", method = RequestMethod.GET) | |
| 61 | + @ResponseBody | |
| 62 | + public List getPatientsTypeEnum() { | |
| 63 | + List<Object> list = new ArrayList<>(); | |
| 64 | + Map<String, String> m = null; | |
| 65 | + for (PatientsTypeEnum e : PatientsTypeEnum.values()) { | |
| 66 | + m = new HashMap<>(); | |
| 67 | + m.put("id", String.valueOf(e.getId())); | |
| 68 | + m.put("text", e.getText()); | |
| 69 | + list.add(m); | |
| 70 | + } | |
| 71 | + return list; | |
| 72 | + } | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * 获取年龄单位 | |
| 76 | + */ | |
| 77 | + @RequestMapping(value = "/ageUnitEnum", method = RequestMethod.GET) | |
| 78 | + @ResponseBody | |
| 79 | + public List getAgeUnitEnum() { | |
| 80 | + List<Object> list = new ArrayList<>(); | |
| 81 | + Map<String, String> m = null; | |
| 82 | + for (AgeUnitEnums e : AgeUnitEnums.values()) { | |
| 83 | + m = new HashMap<>(); | |
| 84 | + m.put("id", String.valueOf(e.getId())); | |
| 85 | + m.put("text", e.getTitle()); | |
| 86 | + list.add(m); | |
| 87 | + } | |
| 88 | + return list; | |
| 89 | + } | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + public static void main(String a[]) { | |
| 94 | + | |
| 95 | + for (PatientsTypeEnum e : PatientsTypeEnum.values()) { | |
| 96 | + | |
| 97 | + System.out.println(e.getText()); | |
| 98 | + } | |
| 99 | + } | |
| 100 | + | |
| 101 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReferConfigController.java
View file @
1bed294
| ... | ... | @@ -4,6 +4,8 @@ |
| 4 | 4 | |
| 5 | 5 | import javax.validation.Valid; |
| 6 | 6 | |
| 7 | +import com.lyms.platform.common.enums.YnEnums; | |
| 8 | +import com.lyms.platform.pojo.AssayConfig; | |
| 7 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | 10 | import org.springframework.stereotype.Controller; |
| 9 | 11 | import org.springframework.web.bind.annotation.PathVariable; |
| 10 | 12 | |
| 11 | 13 | |
| 12 | 14 | |
| 13 | 15 | |
| ... | ... | @@ -31,26 +33,33 @@ |
| 31 | 33 | @Autowired |
| 32 | 34 | AssayConfigService assayConfigService; |
| 33 | 35 | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 34 | 39 | @ResponseBody |
| 35 | - @RequestMapping(value = "referConfig",method = RequestMethod.GET) | |
| 36 | - public BaseListResponse queryRefer(@RequestBody @Valid ReferConfigQuery referConfigQuery) { | |
| 40 | + @RequestMapping(value = "/referConfig",method = RequestMethod.GET) | |
| 41 | + public BaseListResponse queryRefer( @Valid ReferConfigQuery referConfigQuery) { | |
| 42 | + referConfigQuery.setYn(YnEnums.YES.getId()); | |
| 37 | 43 | List<ReferValue> referValueList = referConfigService.queryRefer(referConfigQuery); |
| 38 | 44 | BaseListResponse baseListResponse = new BaseListResponse(); |
| 39 | 45 | baseListResponse.setData(referValueList).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
| 40 | 46 | return baseListResponse; |
| 41 | 47 | } |
| 42 | 48 | |
| 43 | - @RequestMapping(value = "referConfig",method = RequestMethod.POST) | |
| 49 | + @RequestMapping(value = "/referConfig",method = RequestMethod.POST) | |
| 44 | 50 | @ResponseBody |
| 45 | 51 | public BaseResponse addRefer(@RequestBody @Valid ReferValue referValue) { |
| 46 | 52 | //添加前先设置项目代码, 标准代码 |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 47 | 56 | referConfigService.addRefer(referValue); |
| 48 | 57 | return new BaseResponse() |
| 49 | 58 | .setErrorcode(ErrorCodeConstants.SUCCESS) |
| 50 | 59 | .setErrormsg("添加成功!"); |
| 51 | 60 | } |
| 52 | 61 | |
| 53 | - @RequestMapping(value = "referConfig/{id}",method = RequestMethod.DELETE) | |
| 62 | + @RequestMapping(value = "/referConfig/{id}",method = RequestMethod.DELETE) | |
| 54 | 63 | @ResponseBody |
| 55 | 64 | public BaseResponse delRefer(@PathVariable String id) { |
| 56 | 65 | ReferValue referValue = new ReferValue(); |
| ... | ... | @@ -61,7 +70,7 @@ |
| 61 | 70 | .setErrormsg("删除成功!"); |
| 62 | 71 | } |
| 63 | 72 | |
| 64 | - @RequestMapping(value = "referConfig/{id}",method = RequestMethod.PUT) | |
| 73 | + @RequestMapping(value = "/referConfig/{id}",method = RequestMethod.PUT) | |
| 65 | 74 | @ResponseBody |
| 66 | 75 | public BaseResponse updateRefer(@RequestBody @Valid ReferValue referValue, @PathVariable String id) { |
| 67 | 76 | //更新前先设置项目代码, 标准代码 |
| ... | ... | @@ -71,6 +80,8 @@ |
| 71 | 80 | .setErrorcode(ErrorCodeConstants.SUCCESS) |
| 72 | 81 | .setErrormsg("更新成功!"); |
| 73 | 82 | } |
| 83 | + | |
| 84 | + | |
| 74 | 85 | |
| 75 | 86 | |
| 76 | 87 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
1bed294
| 1 | +package com.lyms.platform.operate.web.controller; | |
| 2 | + | |
| 3 | +import org.springframework.stereotype.Controller; | |
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 5 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 6 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 7 | + | |
| 8 | +import java.util.ArrayList; | |
| 9 | +import java.util.HashMap; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Map; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * Created by Zhang.Rui on 2016/4/8. | |
| 15 | + * 测试数据, 假数据 | |
| 16 | + */ | |
| 17 | +@Controller | |
| 18 | +public class TestController { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 获取科室 | |
| 22 | + */ | |
| 23 | + @RequestMapping(value = "/hospitalDepartmentTest", method = RequestMethod.GET) | |
| 24 | + @ResponseBody | |
| 25 | + public List getDepartment() { | |
| 26 | + List<Object> list = new ArrayList<>(); | |
| 27 | + Map<String, String> m = new HashMap<>(); | |
| 28 | + | |
| 29 | + m = new HashMap<>(); | |
| 30 | + m.put("id", String.valueOf(1)); | |
| 31 | + m.put("name", "妇产科"); | |
| 32 | + list.add(m); | |
| 33 | + | |
| 34 | + m = new HashMap<>(); | |
| 35 | + m.put("id", String.valueOf(2)); | |
| 36 | + m.put("name", "眼科"); | |
| 37 | + list.add(m); | |
| 38 | + | |
| 39 | + m = new HashMap<>(); | |
| 40 | + m.put("id", String.valueOf(3)); | |
| 41 | + m.put("name", "五官科"); | |
| 42 | + list.add(m); | |
| 43 | + | |
| 44 | + m = new HashMap<>(); | |
| 45 | + m.put("id", String.valueOf(4)); | |
| 46 | + m.put("name", "胸腔科"); | |
| 47 | + list.add(m); | |
| 48 | + | |
| 49 | + return list; | |
| 50 | + } | |
| 51 | + | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 获取医院 | |
| 55 | + */ | |
| 56 | + @RequestMapping(value = "/hospitalsTest", method = RequestMethod.GET) | |
| 57 | + @ResponseBody | |
| 58 | + public List getSampleTypeEnum() { | |
| 59 | + List<Object> list = new ArrayList<>(); | |
| 60 | + Map<String, String> m = new HashMap<>(); | |
| 61 | + | |
| 62 | + m = new HashMap<>(); | |
| 63 | + m.put("id", String.valueOf(1)); | |
| 64 | + m.put("name", "秦皇岛安琪儿医院"); | |
| 65 | + list.add(m); | |
| 66 | + | |
| 67 | + m = new HashMap<>(); | |
| 68 | + m.put("id", String.valueOf(2)); | |
| 69 | + m.put("name", "成都市妇幼保健医院"); | |
| 70 | + list.add(m); | |
| 71 | + | |
| 72 | + m = new HashMap<>(); | |
| 73 | + m.put("id", String.valueOf(3)); | |
| 74 | + m.put("name", "成都市九龙医院"); | |
| 75 | + list.add(m); | |
| 76 | + | |
| 77 | + m = new HashMap<>(); | |
| 78 | + m.put("id", String.valueOf(4)); | |
| 79 | + m.put("name", "成都人民医院"); | |
| 80 | + list.add(m); | |
| 81 | + | |
| 82 | + m = new HashMap<>(); | |
| 83 | + m.put("id", String.valueOf(10)); | |
| 84 | + m.put("name", "成都脑瘤医院"); | |
| 85 | + list.add(m); | |
| 86 | + | |
| 87 | + return list; | |
| 88 | + } | |
| 89 | +} |