Commit 519dd109a3ff7724a098fa449b979454460af4cc

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 11 changed files

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AssayConfigService.java View file @ 519dd10
... ... @@ -21,14 +21,21 @@
21 21  
22 22 public List<AssayConfig> query(AssayConfigParam assayConfigRequest) {
23 23 MongoCondition mongoCondition = MongoCondition.newInstance();
24   - if(0 != assayConfigRequest.getType()) {
25   - mongoCondition.andCondition(new MongoCondition("type", assayConfigRequest.getType(), MongoOper.IS));
  24 +
  25 + if(1 == assayConfigRequest.getType()) {
  26 + mongoCondition=MongoCondition.newInstance("projectName", assayConfigRequest.getKeywords(), MongoOper.LIKE);
26 27 }
27   - if(null != assayConfigRequest.getKeywords()) {
28   - mongoCondition.andCondition(new MongoCondition("keywords", assayConfigRequest.getKeywords(), MongoOper.LIKE));
  28 + if(2 == assayConfigRequest.getType()) {
  29 + mongoCondition=MongoCondition.newInstance("projectCode", assayConfigRequest.getKeywords(), MongoOper.IS);
29 30 }
  31 + if(3 == assayConfigRequest.getType()) {
  32 + mongoCondition=MongoCondition.newInstance("standardCode", assayConfigRequest.getKeywords(), MongoOper.IS);
  33 + }
  34 +// if(null != assayConfigRequest.getKeywords()) {
  35 +// mongoCondition= mongoCondition.and("projectName", assayConfigRequest.getKeywords(), MongoOper.LIKE);
  36 +// }
30 37 if(null != assayConfigRequest.getHospitalId()) {
31   - mongoCondition.andCondition(new MongoCondition("hospitalId", assayConfigRequest.getHospitalId(), MongoOper.IS));
  38 + mongoCondition= mongoCondition.and("hospitalId", assayConfigRequest.getHospitalId(), MongoOper.IS);
32 39 }
33 40  
34 41 return assayConfigDao.query(mongoCondition.toMongoQuery().start(0).end(100));
platform-common/src/main/java/com/lyms/platform/common/enums/PatientsTypeEnum.java View file @ 519dd10
  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 @ 519dd10
  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 @ 519dd10
  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/AssayConfig.java View file @ 519dd10
... ... @@ -14,6 +14,66 @@
14 14  
15 15 private String print;
16 16  
  17 + private String hospitalId;
  18 + private String projectCode;
  19 + private String standardCode;
  20 + private String projectName;
  21 + private String classify; //检验分类
  22 + private String resultType; //结果类型
  23 +
  24 +
  25 + public static long getSerialVersionUID() {
  26 + return serialVersionUID;
  27 + }
  28 +
  29 + public String getHospitalId() {
  30 + return hospitalId;
  31 + }
  32 +
  33 + public void setHospitalId(String hospitalId) {
  34 + this.hospitalId = hospitalId;
  35 + }
  36 +
  37 + public String getProjectCode() {
  38 + return projectCode;
  39 + }
  40 +
  41 + public void setProjectCode(String projectCode) {
  42 + this.projectCode = projectCode;
  43 + }
  44 +
  45 + public String getStandardCode() {
  46 + return standardCode;
  47 + }
  48 +
  49 + public void setStandardCode(String standardCode) {
  50 + this.standardCode = standardCode;
  51 + }
  52 +
  53 + public String getProjectName() {
  54 + return projectName;
  55 + }
  56 +
  57 + public void setProjectName(String projectName) {
  58 + this.projectName = projectName;
  59 + }
  60 +
  61 + public String getClassify() {
  62 + return classify;
  63 + }
  64 +
  65 + public void setClassify(String classify) {
  66 + this.classify = classify;
  67 + }
  68 +
  69 + public String getResultType() {
  70 + return resultType;
  71 + }
  72 +
  73 + public void setResultType(String resultType) {
  74 + this.resultType = resultType;
  75 + }
  76 +
17 77 public String getPrint() {
18 78 return print;
19 79 }
platform-dal/src/main/java/com/lyms/platform/pojo/ReferValue.java View file @ 519dd10
... ... @@ -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 @ 519dd10
... ... @@ -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/AssayConfigController.java View file @ 519dd10
... ... @@ -2,14 +2,20 @@
2 2  
3 3  
4 4 import com.lyms.platform.biz.service.AssayConfigService;
  5 +import com.lyms.platform.common.annotation.TokenRequired;
5 6 import com.lyms.platform.common.constants.ErrorCodeConstants;
  7 +import com.lyms.platform.common.enums.YnEnums;
6 8 import com.lyms.platform.common.result.BaseListResponse;
  9 +import com.lyms.platform.common.utils.ResultUtils;
7 10 import com.lyms.platform.params.AssayConfigParam;
8 11 import com.lyms.platform.pojo.AssayConfig;
  12 +import org.jboss.netty.handler.codec.http.HttpResponse;
9 13 import org.springframework.beans.factory.annotation.Autowired;
10 14 import org.springframework.stereotype.Controller;
11 15 import org.springframework.web.bind.annotation.*;
12 16  
  17 +import javax.servlet.http.HttpServletRequest;
  18 +import javax.servlet.http.HttpServletResponse;
13 19 import java.util.List;
14 20  
15 21 //化验项配置
... ... @@ -21,6 +27,7 @@
21 27  
22 28 @RequestMapping(method = RequestMethod.GET, value = "/assayconfig")
23 29 @ResponseBody
  30 + @TokenRequired
24 31 public BaseListResponse assayConfig(AssayConfigParam assayConfigParam) {
25 32 List<AssayConfig> data = assayConfigService.query(assayConfigParam);
26 33 BaseListResponse baseListResponse = new BaseListResponse();
27 34  
... ... @@ -32,12 +39,31 @@
32 39  
33 40 @RequestMapping(method = RequestMethod.PUT, value = "/assayconfig")
34 41 @ResponseBody
  42 + @TokenRequired
35 43 public BaseListResponse assayConfig(@RequestBody List<AssayConfig> assayConfigs) {
36 44 assayConfigService.updateForList(assayConfigs);
37 45 BaseListResponse baseListResponse = new BaseListResponse();
38 46 baseListResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
39 47 baseListResponse.setErrormsg("成功");
40 48 return baseListResponse;
  49 + }
  50 +
  51 + @RequestMapping(method = RequestMethod.GET, value = "/assayconfig/test")
  52 + public void testData(HttpServletResponse response) {
  53 + for(int i=0;i<10;i++) {
  54 + AssayConfig assayConfig = new AssayConfig();
  55 + assayConfig.setHospitalId("2");
  56 + assayConfig.setYn(String.valueOf(YnEnums.YES.getId()));
  57 + assayConfig.setClassify("classify" + i);
  58 + assayConfig.setPrint("1");
  59 + assayConfig.setProjectCode("projectCode" + i);
  60 + assayConfig.setResultType("resulttype" + i);
  61 + assayConfig.setStandardCode("standardCode" + i);
  62 +
  63 + assayConfig.setProjectName("projectName" + i);
  64 + assayConfigService.save(assayConfig);
  65 + }
  66 + ResultUtils.buildSuccessResultAndWrite(response, "ok");
41 67 }
42 68  
43 69  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EnumsController.java View file @ 519dd10
  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 @ 519dd10
... ... @@ -4,6 +4,9 @@
4 4  
5 5 import javax.validation.Valid;
6 6  
  7 +import com.lyms.platform.common.annotation.TokenRequired;
  8 +import com.lyms.platform.common.enums.YnEnums;
  9 +import com.lyms.platform.pojo.AssayConfig;
7 10 import org.springframework.beans.factory.annotation.Autowired;
8 11 import org.springframework.stereotype.Controller;
9 12 import org.springframework.web.bind.annotation.PathVariable;
10 13  
11 14  
12 15  
13 16  
14 17  
15 18  
... ... @@ -31,27 +34,37 @@
31 34 @Autowired
32 35 AssayConfigService assayConfigService;
33 36  
  37 +
  38 +
  39 +
34 40 @ResponseBody
35   - @RequestMapping(value = "referConfig",method = RequestMethod.GET)
36   - public BaseListResponse queryRefer(@RequestBody @Valid ReferConfigQuery referConfigQuery) {
  41 + @TokenRequired
  42 + @RequestMapping(value = "/referConfig",method = RequestMethod.GET)
  43 + public BaseListResponse queryRefer( @Valid ReferConfigQuery referConfigQuery) {
  44 + referConfigQuery.setYn(YnEnums.YES.getId());
37 45 List<ReferValue> referValueList = referConfigService.queryRefer(referConfigQuery);
38 46 BaseListResponse baseListResponse = new BaseListResponse();
39 47 baseListResponse.setData(referValueList).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS);
40 48 return baseListResponse;
41 49 }
42 50  
43   - @RequestMapping(value = "referConfig",method = RequestMethod.POST)
  51 + @RequestMapping(value = "/referConfig",method = RequestMethod.POST)
44 52 @ResponseBody
  53 + @TokenRequired
45 54 public BaseResponse addRefer(@RequestBody @Valid ReferValue referValue) {
46 55 //添加前先设置项目代码, 标准代码
  56 +
  57 +
  58 +
47 59 referConfigService.addRefer(referValue);
48 60 return new BaseResponse()
49 61 .setErrorcode(ErrorCodeConstants.SUCCESS)
50 62 .setErrormsg("添加成功!");
51 63 }
52 64  
53   - @RequestMapping(value = "referConfig/{id}",method = RequestMethod.DELETE)
  65 + @RequestMapping(value = "/referConfig/{id}",method = RequestMethod.DELETE)
54 66 @ResponseBody
  67 + @TokenRequired
55 68 public BaseResponse delRefer(@PathVariable String id) {
56 69 ReferValue referValue = new ReferValue();
57 70 referValue.setId(id);
58 71  
... ... @@ -61,8 +74,9 @@
61 74 .setErrormsg("删除成功!");
62 75 }
63 76  
64   - @RequestMapping(value = "referConfig/{id}",method = RequestMethod.PUT)
  77 + @RequestMapping(value = "/referConfig/{id}",method = RequestMethod.PUT)
65 78 @ResponseBody
  79 + @TokenRequired
66 80 public BaseResponse updateRefer(@RequestBody @Valid ReferValue referValue, @PathVariable String id) {
67 81 //更新前先设置项目代码, 标准代码
68 82 referValue.setId(id);
... ... @@ -71,6 +85,8 @@
71 85 .setErrorcode(ErrorCodeConstants.SUCCESS)
72 86 .setErrormsg("更新成功!");
73 87 }
  88 +
  89 +
74 90  
75 91  
76 92 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 519dd10
  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 +}