Commit 35b00ba79ac421f9f300b16a0b9cbd5e494efb51
1 parent
dc4eb22e97
Exists in
master
and in
6 other branches
两癌
Showing 4 changed files with 117 additions and 96 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/CancerExamineModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/CancerExamineRecordModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CancerScreeningController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CancerScreeningFacade.java
platform-dal/src/main/java/com/lyms/platform/pojo/CancerExamineModel.java
View file @
35b00ba
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | import org.springframework.data.mongodb.core.mapping.Document; |
5 | 5 | |
6 | 6 | import java.util.Date; |
7 | +import java.util.Map; | |
7 | 8 | |
8 | 9 | @Document(collection = "lyms_cancer_examine") |
9 | 10 | public class CancerExamineModel extends BaseModel { |
10 | 11 | |
11 | 12 | |
12 | 13 | |
13 | 14 | |
14 | 15 | |
15 | 16 | |
16 | 17 | |
17 | 18 | |
... | ... | @@ -12,26 +13,90 @@ |
12 | 13 | private String provinceId; |
13 | 14 | private String cityId; |
14 | 15 | private String areaId; |
16 | + private Integer yearQuarter; | |
15 | 17 | |
18 | + | |
16 | 19 | private Integer year; //上报年份 |
17 | 20 | private Integer quarter; //季度 |
18 | - | |
19 | - private Integer yearQuarter; | |
20 | - | |
21 | 21 | private String inHospital;//填报单位 |
22 | 22 | private String inUser;//填报人 |
23 | 23 | private Date inDate;//填报日期 |
24 | 24 | private String optHospital; //录入单位 |
25 | 25 | private String optUser; //录入用户 |
26 | 26 | private Date optDate; //录入时间 |
27 | - | |
28 | 27 | private Integer type;//1 宫颈癌 2 乳腺癌 |
28 | + private Map<String,String> data; | |
29 | 29 | |
30 | + private Integer yn; | |
31 | + | |
30 | 32 | private Date examineDate;//审核时间/驳回时间 |
31 | - private Integer position;//1 机构 2 县 3 市 | |
32 | - private Integer status; // 0 录入 1 审核中 2 审核通过 3 驳回 | |
33 | + private Integer position;// 审核级别 1 录入 2 县 3 市 4 省 5 国家 6 驳回待修改 7 驳回已修改 | |
33 | 34 | |
35 | + public Date getExamineDate() { | |
36 | + return examineDate; | |
37 | + } | |
34 | 38 | |
39 | + public void setExamineDate(Date examineDate) { | |
40 | + this.examineDate = examineDate; | |
41 | + } | |
42 | + | |
43 | + public Integer getPosition() { | |
44 | + return position; | |
45 | + } | |
46 | + | |
47 | + public void setPosition(Integer position) { | |
48 | + this.position = position; | |
49 | + } | |
50 | + | |
51 | + | |
52 | + public Integer getYn() { | |
53 | + return yn; | |
54 | + } | |
55 | + | |
56 | + public void setYn(Integer yn) { | |
57 | + this.yn = yn; | |
58 | + } | |
59 | + | |
60 | + public Integer getYearQuarter() { | |
61 | + return yearQuarter; | |
62 | + } | |
63 | + | |
64 | + public void setYearQuarter(Integer yearQuarter) { | |
65 | + this.yearQuarter = yearQuarter; | |
66 | + } | |
67 | + | |
68 | + public String getInHospital() { | |
69 | + return inHospital; | |
70 | + } | |
71 | + | |
72 | + public void setInHospital(String inHospital) { | |
73 | + this.inHospital = inHospital; | |
74 | + } | |
75 | + | |
76 | + public String getInUser() { | |
77 | + return inUser; | |
78 | + } | |
79 | + | |
80 | + public void setInUser(String inUser) { | |
81 | + this.inUser = inUser; | |
82 | + } | |
83 | + | |
84 | + public Date getInDate() { | |
85 | + return inDate; | |
86 | + } | |
87 | + | |
88 | + public void setInDate(Date inDate) { | |
89 | + this.inDate = inDate; | |
90 | + } | |
91 | + | |
92 | + public Map<String, String> getData() { | |
93 | + return data; | |
94 | + } | |
95 | + | |
96 | + public void setData(Map<String, String> data) { | |
97 | + this.data = data; | |
98 | + } | |
99 | + | |
35 | 100 | public String getId() { |
36 | 101 | return id; |
37 | 102 | } |
... | ... | @@ -110,30 +175,6 @@ |
110 | 175 | |
111 | 176 | public void setOptDate(Date optDate) { |
112 | 177 | this.optDate = optDate; |
113 | - } | |
114 | - | |
115 | - public Date getExamineDate() { | |
116 | - return examineDate; | |
117 | - } | |
118 | - | |
119 | - public void setExamineDate(Date examineDate) { | |
120 | - this.examineDate = examineDate; | |
121 | - } | |
122 | - | |
123 | - public Integer getPosition() { | |
124 | - return position; | |
125 | - } | |
126 | - | |
127 | - public void setPosition(Integer position) { | |
128 | - this.position = position; | |
129 | - } | |
130 | - | |
131 | - public Integer getStatus() { | |
132 | - return status; | |
133 | - } | |
134 | - | |
135 | - public void setStatus(Integer status) { | |
136 | - this.status = status; | |
137 | 178 | } |
138 | 179 | |
139 | 180 | public Integer getType() { |
platform-dal/src/main/java/com/lyms/platform/pojo/CancerExamineRecordModel.java
View file @
35b00ba
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | public class CancerExamineRecordModel extends BaseModel { |
10 | 10 | private String id; |
11 | 11 | private String parentId;//CancerExamineModel对象的id |
12 | - private Integer examineLevel;// 审核级别 2 县 3 市 | |
12 | + private Integer examineLevel;// 审核级别 2 县 3 市 4 省 5 国家 | |
13 | 13 | private String backReason; //驳回原因 |
14 | 14 | private Date examineDate;//审核时间/驳回时间 |
15 | 15 | private String hospitalId; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CancerScreeningController.java
View file @
35b00ba
... | ... | @@ -201,40 +201,37 @@ |
201 | 201 | return cancerScreenService.queryCancerScreeningCount(cancerScreeningRequest, loginState.getId()); |
202 | 202 | } |
203 | 203 | |
204 | + | |
204 | 205 | @ResponseBody |
205 | - @RequestMapping(method = RequestMethod.POST,value = "/addCancersConfig") | |
206 | + @RequestMapping(method = RequestMethod.POST,value = "/addCancerExamine") | |
206 | 207 | @TokenRequired |
207 | - public BaseResponse addCancersConfig(@RequestBody CancersConfig config, HttpServletRequest request) { | |
208 | + public BaseResponse addCancerExamine(@RequestBody CancerExamineModel config, HttpServletRequest request) { | |
208 | 209 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
209 | - return cancerScreenService.addCancersConfig(config, loginState.getId()); | |
210 | + return cancerScreenService.addCancerExamine(config, loginState.getId()); | |
210 | 211 | } |
211 | 212 | |
212 | 213 | @ResponseBody |
213 | - @RequestMapping(method = RequestMethod.GET,value = "/queryCancersConfigs") | |
214 | + @RequestMapping(method = RequestMethod.POST,value = "/editCancerExamine") | |
214 | 215 | @TokenRequired |
215 | - public BaseResponse queryCancersConfigs(HttpServletRequest request) { | |
216 | + public BaseResponse editCancerExamine(@RequestBody CancerExamineModel config, HttpServletRequest request) { | |
216 | 217 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
217 | - return cancerScreenService.queryCancersConfigs(loginState.getId()); | |
218 | + return cancerScreenService.editCancerExamine(config, loginState.getId()); | |
218 | 219 | } |
219 | 220 | |
220 | 221 | @ResponseBody |
221 | - @RequestMapping(method = RequestMethod.DELETE,value = "/delCancersConfig/{id}") | |
222 | + @RequestMapping(method = RequestMethod.DELETE,value = "/deleteCancerExamine/{id}") | |
222 | 223 | @TokenRequired |
223 | - public BaseResponse delCancersConfig(@PathVariable String id, HttpServletRequest request) { | |
224 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
225 | - return cancerScreenService.delCancersConfig(id, loginState.getId()); | |
224 | + public BaseResponse deleteCancerExamine(@PathVariable String id, HttpServletRequest request) { | |
225 | + return cancerScreenService.deleteCancerExamine(id); | |
226 | 226 | } |
227 | 227 | |
228 | - | |
229 | 228 | @ResponseBody |
230 | - @RequestMapping(method = RequestMethod.POST,value = "/addCancerExamine") | |
229 | + @RequestMapping(method = RequestMethod.GET,value = "/getCancerExamine/{id}") | |
231 | 230 | @TokenRequired |
232 | - public BaseResponse addCancerExamine(@RequestBody CancerExamineModel config, HttpServletRequest request) { | |
233 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
234 | - return cancerScreenService.addCancerExamine(config, loginState.getId()); | |
231 | + public BaseResponse getCancerExamine(@PathVariable String id, HttpServletRequest request) { | |
232 | + return cancerScreenService.getCancerExamine(id); | |
235 | 233 | } |
236 | 234 | |
237 | - | |
238 | 235 | @ResponseBody |
239 | 236 | @RequestMapping(method = RequestMethod.GET,value = "/queryCancerExamines") |
240 | 237 | @TokenRequired |
... | ... | @@ -244,6 +241,12 @@ |
244 | 241 | } |
245 | 242 | |
246 | 243 | |
244 | + /** | |
245 | + * 添加审核记录 | |
246 | + * @param config | |
247 | + * @param request | |
248 | + * @return | |
249 | + */ | |
247 | 250 | @ResponseBody |
248 | 251 | @RequestMapping(method = RequestMethod.POST,value = "/addCancerExamineRecord") |
249 | 252 | @TokenRequired |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CancerScreeningFacade.java
View file @
35b00ba
... | ... | @@ -997,52 +997,15 @@ |
997 | 997 | return new BaseObjectResponse().setData(result).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
998 | 998 | } |
999 | 999 | |
1000 | - public BaseResponse addCancersConfig(CancersConfig config, Integer id) { | |
1001 | - | |
1002 | - if (StringUtils.isNotEmpty(config.getId())) | |
1003 | - { | |
1004 | - Update update=MongoConvertHelper | |
1005 | - .convertToNativeUpdate(ReflectionUtils.getUpdateField(config)); | |
1006 | - mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(config.getId())), update, CancersConfig.class); | |
1007 | - } | |
1008 | - else | |
1009 | - { | |
1010 | - mongoTemplate.save(config); | |
1011 | - } | |
1000 | + public BaseResponse editCancerExamine(CancerExamineModel cancerExamineModel, Integer userId) { | |
1001 | + cancerExamineModel.setYearQuarter(cancerExamineModel.getYear()+cancerExamineModel.getQuarter()); | |
1002 | + Query query = Query.query(Criteria.where("id").is(cancerExamineModel.getId())); | |
1003 | + Update update = MongoConvertHelper | |
1004 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(cancerExamineModel)); | |
1005 | + mongoTemplate.updateFirst(query, update, CancerExamineModel.class); | |
1012 | 1006 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
1013 | 1007 | } |
1014 | 1008 | |
1015 | - public BaseResponse delCancersConfig(String id, Integer userId) { | |
1016 | - mongoTemplate.remove(Query.query(Criteria.where("id").is(id)),CancersConfig.class); | |
1017 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
1018 | - } | |
1019 | - | |
1020 | - public BaseResponse queryCancersConfigs(Integer id) { | |
1021 | - List<CancersConfig> list = mongoTemplate.find(Query.query(Criteria.where("id").exists(true)), CancersConfig.class); | |
1022 | - List<Map> datas = new ArrayList<>(); | |
1023 | - if (CollectionUtils.isNotEmpty(list)) | |
1024 | - { | |
1025 | - for (CancersConfig config : list) | |
1026 | - { | |
1027 | - Map data = new HashMap(); | |
1028 | - data.put("id",config.getId()); | |
1029 | - data.put("year",config.getYear()); | |
1030 | - data.put("num",config.getNum()); | |
1031 | - data.put("quarter",config.getQuarter()); | |
1032 | - data.put("type",config.getType()); | |
1033 | - data.put("areaName",basicConfigService.getOneBasicConfigById(config.getAreaId()).getName()); | |
1034 | - data.put("cityName",basicConfigService.getOneBasicConfigById(config.getCityId()).getName()); | |
1035 | - data.put("provinceName",basicConfigService.getOneBasicConfigById(config.getProvinceId()).getName()); | |
1036 | - data.put("areaId",config.getAreaId()); | |
1037 | - data.put("cityId",config.getCityId()); | |
1038 | - data.put("provinceId",config.getProvinceId()); | |
1039 | - datas.add(data); | |
1040 | - } | |
1041 | - } | |
1042 | - | |
1043 | - return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(datas); | |
1044 | - } | |
1045 | - | |
1046 | 1009 | public BaseResponse addCancerExamine(CancerExamineModel cancerExamineModel, Integer userId) { |
1047 | 1010 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
1048 | 1011 | Organization organization = organizationService.getOrganization(Integer.parseInt(hospitalId)); |
... | ... | @@ -1050,8 +1013,8 @@ |
1050 | 1013 | cancerExamineModel.setProvinceId(organization.getProvinceId()); |
1051 | 1014 | cancerExamineModel.setCityId(organization.getCityId()); |
1052 | 1015 | cancerExamineModel.setAreaId(organization.getAreaId()); |
1053 | - cancerExamineModel.setPosition(1); | |
1054 | - cancerExamineModel.setStatus(0); | |
1016 | + cancerExamineModel.setYearQuarter(cancerExamineModel.getYear()+cancerExamineModel.getQuarter()); | |
1017 | + cancerExamineModel.setYn(YnEnums.YES.getId()); | |
1055 | 1018 | mongoTemplate.save(cancerExamineModel); |
1056 | 1019 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
1057 | 1020 | } |
1058 | 1021 | |
... | ... | @@ -1120,9 +1083,10 @@ |
1120 | 1083 | query.addCriteria(c); |
1121 | 1084 | } |
1122 | 1085 | |
1123 | - | |
1124 | 1086 | Criteria c = Criteria.where("type").is(request.getType()); |
1125 | 1087 | query.addCriteria(c); |
1088 | + Criteria c1 = Criteria.where("yn").is(YnEnums.YES.getId()); | |
1089 | + query.addCriteria(c1); | |
1126 | 1090 | List<CancerExamineModel> list = mongoTemplate.find(query, CancerExamineModel.class); |
1127 | 1091 | List<Map> datas = new ArrayList<>(); |
1128 | 1092 | if (CollectionUtils.isNotEmpty(list)) |
... | ... | @@ -1144,7 +1108,6 @@ |
1144 | 1108 | data.put("cityId",cancer.getCityId()); |
1145 | 1109 | data.put("areaId",cancer.getAreaId()); |
1146 | 1110 | data.put("position",cancer.getPosition()); |
1147 | - data.put("status",cancer.getStatus()); | |
1148 | 1111 | datas.add(data); |
1149 | 1112 | } |
1150 | 1113 | } |
... | ... | @@ -1159,7 +1122,6 @@ |
1159 | 1122 | |
1160 | 1123 | CancerExamineModel cancerExamineModel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(recordModel.getParentId())), CancerExamineModel.class); |
1161 | 1124 | cancerExamineModel.setExamineDate(recordModel.getExamineDate()); |
1162 | - cancerExamineModel.setStatus(recordModel.getReasult()); | |
1163 | 1125 | cancerExamineModel.setPosition(recordModel.getExamineLevel()); |
1164 | 1126 | Update update=MongoConvertHelper |
1165 | 1127 | .convertToNativeUpdate(ReflectionUtils.getUpdateField(cancerExamineModel)); |
... | ... | @@ -1195,7 +1157,6 @@ |
1195 | 1157 | CancerExamineModel cancerExamineModel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), CancerExamineModel.class); |
1196 | 1158 | |
1197 | 1159 | cancerExamineModel.setPosition(position); |
1198 | - cancerExamineModel.setStatus(1); | |
1199 | 1160 | Update update=MongoConvertHelper |
1200 | 1161 | .convertToNativeUpdate(ReflectionUtils.getUpdateField(cancerExamineModel)); |
1201 | 1162 | mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(cancerExamineModel.getId())), update, CancerExamineModel.class); |
... | ... | @@ -1432,6 +1393,22 @@ |
1432 | 1393 | query.addCriteria(c); |
1433 | 1394 | mongoTemplate.remove(query, CancerScreeningModel.class); |
1434 | 1395 | return new BaseResponse("成功", ErrorCodeConstants.SUCCESS); |
1396 | + } | |
1397 | + | |
1398 | + public BaseResponse deleteCancerExamine(String id) { | |
1399 | + Query query = Query.query(Criteria.where("id").is(id)); | |
1400 | + CancerExamineModel cancerExamineModel = mongoTemplate.findOne(query,CancerExamineModel.class); | |
1401 | + cancerExamineModel.setYn(YnEnums.NO.getId()); | |
1402 | + Update update = MongoConvertHelper | |
1403 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(cancerExamineModel)); | |
1404 | + mongoTemplate.updateFirst(query, update, CancerExamineModel.class); | |
1405 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
1406 | + } | |
1407 | + | |
1408 | + public BaseResponse getCancerExamine(String id) { | |
1409 | + Query query = Query.query(Criteria.where("id").is(id)); | |
1410 | + CancerExamineModel cancerExamineModel = mongoTemplate.findOne(query,CancerExamineModel.class); | |
1411 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(cancerExamineModel); | |
1435 | 1412 | } |
1436 | 1413 | } |