Commit 46c3e8b0320700a95efcbcd1cf95a830dfbb7a09
1 parent
9d08ef8b7b
Exists in
master
and in
6 other branches
update code
Showing 5 changed files with 281 additions and 3 deletions
- platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
- platform-dal/src/main/java/com/lyms/platform/pojo/TrackCountRecord.java
- platform-dal/src/main/java/com/lyms/platform/pojo/TrackDayConfig.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
View file @
46c3e8b
| ... | ... | @@ -26,7 +26,9 @@ |
| 26 | 26 | CheckItemOrder("CheckItemOrder", 97531500100L), |
| 27 | 27 | CheckItemActual("CheckItemActual", 97521500100L), |
| 28 | 28 | CheckItemConfig("CheckItemConfig", 97531320100L), |
| 29 | + TrackDayConfig("TrackDayConfig", 97531320170L), | |
| 29 | 30 | BCInventoryModel("BCInventoryModel", 97531000110L), |
| 31 | + TrackCountRecord("TrackCountRecord", 92231000110L), | |
| 30 | 32 | BCTransferInHistoryModel("BCTransferInHistoryModel", 97531000120L), |
| 31 | 33 | CommunityConfig("CommunityConfig", 97531000130L), |
| 32 | 34 | CommunityModel("CommunityModel", 97531000140L), |
platform-dal/src/main/java/com/lyms/platform/pojo/TrackCountRecord.java
View file @
46c3e8b
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 6 | + | |
| 7 | +import java.util.Date; | |
| 8 | + | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 处方报表基础项配置 | |
| 12 | + */ | |
| 13 | +@Document(collection="lyms_track_count_record") | |
| 14 | +public class TrackCountRecord extends BaseModel { | |
| 15 | + | |
| 16 | + private static final long serialVersionUID = SerialIdEnum.TrackCountRecord.getCid(); | |
| 17 | + | |
| 18 | + private String id; | |
| 19 | + private String hospitalId; | |
| 20 | + private String patientId; | |
| 21 | + //预约产检状态 | |
| 22 | + private Integer orderStatus; | |
| 23 | + //一级追访状态 | |
| 24 | + private Integer oneTrackStatus; | |
| 25 | + //二级追访状态 | |
| 26 | + private Integer twoTrackStatus; | |
| 27 | + //准时产检人数状态 | |
| 28 | + private Integer zsCheckStatus; | |
| 29 | + //及时产检人数状态 | |
| 30 | + private Integer jsCheckStatus; | |
| 31 | + //纳入失访人次 | |
| 32 | + private Integer loseStatus; | |
| 33 | + //实施追访人次 | |
| 34 | + private Integer trackStatus; | |
| 35 | + //召回状态 0 未参与召回 1参与召回 | |
| 36 | + private Integer backStatus; | |
| 37 | + private Date created; | |
| 38 | + private Date modified; | |
| 39 | + | |
| 40 | + public String getId() { | |
| 41 | + return id; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setId(String id) { | |
| 45 | + this.id = id; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public String getHospitalId() { | |
| 49 | + return hospitalId; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setHospitalId(String hospitalId) { | |
| 53 | + this.hospitalId = hospitalId; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public String getPatientId() { | |
| 57 | + return patientId; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setPatientId(String patientId) { | |
| 61 | + this.patientId = patientId; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public Integer getOrderStatus() { | |
| 65 | + return orderStatus; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setOrderStatus(Integer orderStatus) { | |
| 69 | + this.orderStatus = orderStatus; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public Integer getOneTrackStatus() { | |
| 73 | + return oneTrackStatus; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setOneTrackStatus(Integer oneTrackStatus) { | |
| 77 | + this.oneTrackStatus = oneTrackStatus; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public Integer getTwoTrackStatus() { | |
| 81 | + return twoTrackStatus; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setTwoTrackStatus(Integer twoTrackStatus) { | |
| 85 | + this.twoTrackStatus = twoTrackStatus; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public Integer getZsCheckStatus() { | |
| 89 | + return zsCheckStatus; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setZsCheckStatus(Integer zsCheckStatus) { | |
| 93 | + this.zsCheckStatus = zsCheckStatus; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public Integer getJsCheckStatus() { | |
| 97 | + return jsCheckStatus; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setJsCheckStatus(Integer jsCheckStatus) { | |
| 101 | + this.jsCheckStatus = jsCheckStatus; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public Integer getLoseStatus() { | |
| 105 | + return loseStatus; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setLoseStatus(Integer loseStatus) { | |
| 109 | + this.loseStatus = loseStatus; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public Integer getTrackStatus() { | |
| 113 | + return trackStatus; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setTrackStatus(Integer trackStatus) { | |
| 117 | + this.trackStatus = trackStatus; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public Integer getBackStatus() { | |
| 121 | + return backStatus; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setBackStatus(Integer backStatus) { | |
| 125 | + this.backStatus = backStatus; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public Date getCreated() { | |
| 129 | + return created; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setCreated(Date created) { | |
| 133 | + this.created = created; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public Date getModified() { | |
| 137 | + return modified; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setModified(Date modified) { | |
| 141 | + this.modified = modified; | |
| 142 | + } | |
| 143 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/TrackDayConfig.java
View file @
46c3e8b
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 6 | + | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.Map; | |
| 9 | + | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 追访天数配置 | |
| 13 | + */ | |
| 14 | +@Document(collection="lyms_track_day_config") | |
| 15 | +public class TrackDayConfig extends BaseModel { | |
| 16 | + | |
| 17 | + private static final long serialVersionUID = SerialIdEnum.TrackDayConfig.getCid(); | |
| 18 | + | |
| 19 | + private String id; | |
| 20 | + private String hospitalId; | |
| 21 | + private Map<String,String> confis; | |
| 22 | + private Date created; | |
| 23 | + private Date modified; | |
| 24 | + | |
| 25 | + public String getId() { | |
| 26 | + return id; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setId(String id) { | |
| 30 | + this.id = id; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public String getHospitalId() { | |
| 34 | + return hospitalId; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setHospitalId(String hospitalId) { | |
| 38 | + this.hospitalId = hospitalId; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public Map<String, String> getConfis() { | |
| 42 | + return confis; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setConfis(Map<String, String> confis) { | |
| 46 | + this.confis = confis; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public Date getCreated() { | |
| 50 | + return created; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setCreated(Date created) { | |
| 54 | + this.created = created; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public Date getModified() { | |
| 58 | + return modified; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setModified(Date modified) { | |
| 62 | + this.modified = modified; | |
| 63 | + } | |
| 64 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BasicConfigController.java
View file @
46c3e8b
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import com.lyms.platform.operate.web.request.BasicConfigUpdateRequest; |
| 13 | 13 | import com.lyms.platform.operate.web.result.FrontEndResult; |
| 14 | 14 | import com.lyms.platform.pojo.CheckItemConfig; |
| 15 | +import com.lyms.platform.pojo.TrackDayConfig; | |
| 15 | 16 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | 17 | import org.springframework.http.MediaType; |
| 17 | 18 | import org.springframework.stereotype.Controller; |
| ... | ... | @@ -226,6 +227,46 @@ |
| 226 | 227 | @TokenRequired |
| 227 | 228 | public BaseResponse addCheckItemConfig(@PathVariable String id,HttpServletRequest request) { |
| 228 | 229 | return basicConfigFacade.deleteCheckItemConfig(id); |
| 230 | + } | |
| 231 | + | |
| 232 | + | |
| 233 | + /** | |
| 234 | + * 添加或者修改追访天数配置 | |
| 235 | + * @param trackDayConfig | |
| 236 | + * @param request | |
| 237 | + * @return | |
| 238 | + */ | |
| 239 | + @RequestMapping(method = RequestMethod.POST, value = "/addOrUpTrackDayConfig", consumes = {MediaType.APPLICATION_JSON_VALUE}) | |
| 240 | + @ResponseBody | |
| 241 | + @TokenRequired | |
| 242 | + public BaseResponse addTrackDayConfig(@RequestBody TrackDayConfig trackDayConfig,HttpServletRequest request) { | |
| 243 | + return basicConfigFacade.addOrUpTrackDayConfig(trackDayConfig, getUserId(request)); | |
| 244 | + } | |
| 245 | + | |
| 246 | + /** | |
| 247 | + * 查询追访天数配置 | |
| 248 | + * @param request | |
| 249 | + * @return | |
| 250 | + */ | |
| 251 | + @RequestMapping(method = RequestMethod.GET, value = "/queryTrackDayConfig") | |
| 252 | + @ResponseBody | |
| 253 | + @TokenRequired | |
| 254 | + public BaseResponse queryTrackDayConfig( HttpServletRequest request) { | |
| 255 | + return basicConfigFacade.queryTrackDayConfig(getUserId(request)); | |
| 256 | + } | |
| 257 | + | |
| 258 | + | |
| 259 | + /** | |
| 260 | + * 删除追访天数配置 | |
| 261 | + * @param id | |
| 262 | + * @param request | |
| 263 | + * @return | |
| 264 | + */ | |
| 265 | + @RequestMapping(method = RequestMethod.DELETE, value = "/deleteTrackDayConfig/{id}") | |
| 266 | + @ResponseBody | |
| 267 | + @TokenRequired | |
| 268 | + public BaseResponse deleteTrackDayConfig(@PathVariable String id,HttpServletRequest request) { | |
| 269 | + return basicConfigFacade.deleteTrackDayConfig(id); | |
| 229 | 270 | } |
| 230 | 271 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
46c3e8b
| ... | ... | @@ -8,6 +8,8 @@ |
| 8 | 8 | import com.lyms.platform.common.result.BaseListResponse; |
| 9 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 10 | 10 | import com.lyms.platform.common.result.BaseResponse; |
| 11 | +import com.lyms.platform.common.utils.MongoConvertHelper; | |
| 12 | +import com.lyms.platform.common.utils.ReflectionUtils; | |
| 11 | 13 | import com.lyms.platform.common.utils.StringUtils; |
| 12 | 14 | import com.lyms.platform.common.utils.SystemConfig; |
| 13 | 15 | import com.lyms.platform.operate.web.request.BasicConfigAddRequest; |
| ... | ... | @@ -16,9 +18,7 @@ |
| 16 | 18 | import com.lyms.platform.operate.web.result.BasicConfigResult; |
| 17 | 19 | import com.lyms.platform.operate.web.result.TreeNode; |
| 18 | 20 | import com.lyms.platform.operate.web.utils.TreeHelper; |
| 19 | -import com.lyms.platform.pojo.BasicConfig; | |
| 20 | -import com.lyms.platform.pojo.CheckItemConfig; | |
| 21 | -import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 21 | +import com.lyms.platform.pojo.*; | |
| 22 | 22 | import com.lyms.platform.query.BasicConfigQuery; |
| 23 | 23 | import com.mongodb.Mongo; |
| 24 | 24 | import org.apache.commons.collections.CollectionUtils; |
| ... | ... | @@ -27,6 +27,7 @@ |
| 27 | 27 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 28 | 28 | import org.springframework.data.mongodb.core.query.Criteria; |
| 29 | 29 | import org.springframework.data.mongodb.core.query.Query; |
| 30 | +import org.springframework.data.mongodb.core.query.Update; | |
| 30 | 31 | import org.springframework.stereotype.Component; |
| 31 | 32 | |
| 32 | 33 | import java.util.*; |
| ... | ... | @@ -605,5 +606,32 @@ |
| 605 | 606 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 606 | 607 | } |
| 607 | 608 | |
| 609 | + public BaseResponse addOrUpTrackDayConfig(TrackDayConfig trackDayConfig, Integer userId) { | |
| 610 | + trackDayConfig.setModified(new Date()); | |
| 611 | + if (StringUtils.isNotEmpty(trackDayConfig.getId())) | |
| 612 | + { | |
| 613 | + Query query = Query.query(Criteria.where("_id").is(trackDayConfig.getId())); | |
| 614 | + Update update = MongoConvertHelper | |
| 615 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(trackDayConfig)); | |
| 616 | + mongoTemplate.updateFirst(query, update, TrackDayConfig.class); | |
| 617 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 618 | + } | |
| 619 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 620 | + trackDayConfig.setHospitalId(hospitalId); | |
| 621 | + trackDayConfig.setCreated(new Date()); | |
| 622 | + mongoTemplate.save(trackDayConfig); | |
| 623 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 624 | + } | |
| 625 | + | |
| 626 | + public BaseResponse queryTrackDayConfig(Integer userId) { | |
| 627 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 628 | + TrackDayConfig trackDayConfig = mongoTemplate.findOne(Query.query(Criteria.where("hospitalId").is(hospitalId)), TrackDayConfig.class); | |
| 629 | + return new BaseObjectResponse().setData(trackDayConfig).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 630 | + } | |
| 631 | + | |
| 632 | + public BaseResponse deleteTrackDayConfig(String id) { | |
| 633 | + mongoTemplate.remove(Query.query(Criteria.where("_id").is(id)), TrackDayConfig.class); | |
| 634 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 635 | + } | |
| 608 | 636 | } |