Commit 611257b6b89e8876cd614c9f4dc9f82f300011d6
1 parent
9711b84313
Exists in
master
and in
6 other branches
该需求
Showing 2 changed files with 15 additions and 4 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/PlantformConfigModel.java
View file @
611257b
... | ... | @@ -42,6 +42,8 @@ |
42 | 42 | private String serchKey; |
43 | 43 | |
44 | 44 | private String parentId; |
45 | + | |
46 | + private Integer userId; | |
45 | 47 | |
46 | 48 | /** |
47 | 49 | * 创建时间 |
... | ... | @@ -66,6 +68,14 @@ |
66 | 68 | * 用于记录每次自增之后的值 |
67 | 69 | */ |
68 | 70 | private Long incrementValue; |
71 | + | |
72 | + public Integer getUserId() { | |
73 | + return userId; | |
74 | + } | |
75 | + | |
76 | + public void setUserId(Integer userId) { | |
77 | + this.userId = userId; | |
78 | + } | |
69 | 79 | |
70 | 80 | public static long getSerialVersionUID() { |
71 | 81 | return serialVersionUID; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PlantformConfigServiceImpl.java
View file @
611257b
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | public BaseResponse listCustomType(String key, Integer page, Integer limit, Integer userId) { |
44 | 44 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
45 | 45 | Query query = new Query(); |
46 | - query.addCriteria(Criteria.where("yn").ne("0")); | |
46 | + query.addCriteria(Criteria.where("yn").ne("0").and("userId").is(userId)); | |
47 | 47 | if(StringUtils.isNotEmpty(key)) { |
48 | 48 | query.addCriteria(Criteria.where("value").regex(key)); |
49 | 49 | } |
... | ... | @@ -74,8 +74,7 @@ |
74 | 74 | @Override |
75 | 75 | public BaseResponse customTypeInit(Integer userId) { |
76 | 76 | List<Map<String, Object>> restList = new ArrayList<>(); |
77 | - String hospitalId = autoMatchFacade.getHospitalId(userId); | |
78 | - List<PlantformConfigModel> plantformConfigModels = mongoTemplate.find(Query.query(Criteria.where("key").is(hospitalId).and("type").is(SequenceConstant.CUSTOM_TYPE).and("yn").ne("0")), PlantformConfigModel.class); | |
77 | + List<PlantformConfigModel> plantformConfigModels = mongoTemplate.find(Query.query(Criteria.where("userId").is(userId).and("type").is(SequenceConstant.CUSTOM_TYPE).and("yn").ne("0")), PlantformConfigModel.class); | |
79 | 78 | for (PlantformConfigModel plantformConfigModel : plantformConfigModels) { |
80 | 79 | Map<String, Object> temp = new HashMap<>(); |
81 | 80 | temp.put("id", plantformConfigModel.getId().toString()); |
... | ... | @@ -94,6 +93,7 @@ |
94 | 93 | plantformConfigModel.setValue(name); |
95 | 94 | plantformConfigModel.setType(SequenceConstant.CUSTOM_TYPE); |
96 | 95 | plantformConfigModel.setYn("1"); |
96 | + plantformConfigModel.setUserId(userId); | |
97 | 97 | plantformConfigModel.setRemark("产检处理意见自定义类型"); |
98 | 98 | mongoTemplate.save(plantformConfigModel); |
99 | 99 | } else { |
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | public BaseResponse customContentList(String parentId, Date startDate, Date endDate, Integer page, Integer limit, Integer userId) { |
107 | 107 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
108 | 108 | Query query = new Query(); |
109 | - query.addCriteria(Criteria.where("yn").ne("0")); | |
109 | + query.addCriteria(Criteria.where("yn").ne("0").and("userId").is(userId)); | |
110 | 110 | if(StringUtils.isNotEmpty(parentId)) { |
111 | 111 | query.addCriteria(Criteria.where("parentId").is(parentId)); |
112 | 112 | } |
... | ... | @@ -144,6 +144,7 @@ |
144 | 144 | plantformConfigModel.setYn("1"); |
145 | 145 | plantformConfigModel.setType(SequenceConstant.CUSTOM_CONTENT); |
146 | 146 | plantformConfigModel.setRemark("产检处理意见自定义内容"); |
147 | + plantformConfigModel.setUserId(userId); | |
147 | 148 | mongoTemplate.save(plantformConfigModel); |
148 | 149 | } else { |
149 | 150 | plantformConfigModel.setCreateDate(new Date()); |