Commit 4e4631ca057837e1306d33cfa340bfb23482f79d
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing 16 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyCheckDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyCheckDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyCheckService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoCondition.java
- platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoOper.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyCheckDao.java
View file @
4e4631c
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyCheckDaoImpl.java
View file @
4e4631c
... | ... | @@ -69,6 +69,11 @@ |
69 | 69 | return (int) count(mongoQuery.convertToMongoQuery()); |
70 | 70 | } |
71 | 71 | |
72 | + @Override | |
73 | + public void updateBabyCheckByBuildId(BabyCheckModel checkModel, String buildId) { | |
74 | + this.mongoTemplate.updateMulti(new Query(Criteria.where("buildId").is(buildId)), Update.update("birth", checkModel.getBirth()), BabyCheckModel.class); | |
75 | + } | |
76 | + | |
72 | 77 | |
73 | 78 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyCheckService.java
View file @
4e4631c
... | ... | @@ -46,8 +46,13 @@ |
46 | 46 | babyCheckDao.updateBabyCheck(obj, id); |
47 | 47 | } |
48 | 48 | |
49 | - public List<BabyCheckModel> queryBabyCheckRecord(BabyCheckModelQuery query) { | |
50 | - return babyCheckDao.queryBabyCheckRecord(query.convertToQuery().addOrder(Sort.Direction.DESC,"modified")); | |
49 | + public List<BabyCheckModel> queryBabyCheckRecord(BabyCheckModelQuery babyQuery) { | |
50 | + MongoQuery query = babyQuery.convertToQuery(); | |
51 | + if (StringUtils.isNotEmpty(babyQuery.getNeed())) { | |
52 | + babyQuery.mysqlBuild(babyCheckDao.queryBabyCheckCount(babyQuery.convertToQuery())); | |
53 | + query.start(babyQuery.getOffset()).end(babyQuery.getLimit()); | |
54 | + } | |
55 | + return babyCheckDao.queryBabyCheckRecord(babyQuery.convertToQuery().addOrder(Sort.Direction.DESC,"created")); | |
51 | 56 | } |
52 | 57 | |
53 | 58 | public List<BabyCheckModel> queryBabyCheckRecord(BabyCheckModelQuery query,String sortkey,Sort.Direction sort) { |
... | ... | @@ -90,6 +95,10 @@ |
90 | 95 | public int queryBabyCheckCount(BabyCheckModelQuery babyQuery) { |
91 | 96 | |
92 | 97 | return babyCheckDao.queryBabyCheckCount(babyQuery.convertToQuery()); |
98 | + } | |
99 | + | |
100 | + public void updateBabyCheckByBuildId(BabyCheckModel checkModel, String buildId) { | |
101 | + babyCheckDao.updateBabyCheckByBuildId(checkModel,buildId); | |
93 | 102 | } |
94 | 103 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
4e4631c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | |
115 | 115 | public void updatePatientOneCol(String id,Object colValue) |
116 | 116 | { |
117 | - iPatientDao.updatePatientOneCol(id,colValue); | |
117 | + iPatientDao.updatePatientOneCol(id, colValue); | |
118 | 118 | } |
119 | 119 | |
120 | 120 | public void updatePatientLastCheckEmployeeIdOne(String id, String lastCheckEmployeeId) { |
... | ... | @@ -254,7 +254,7 @@ |
254 | 254 | PatientsQuery patientsQuery2=new PatientsQuery(); |
255 | 255 | patientsQuery2.setPid(patients.getPid()); |
256 | 256 | patientsQuery2.setEnable("0"); |
257 | - | |
257 | + patientsQuery2.setSource(patients.getId()); | |
258 | 258 | //查询出其他医院的隐藏建档 |
259 | 259 | List<Patients> patientses=queryPatient(patientsQuery2); |
260 | 260 | if(CollectionUtils.isNotEmpty(patientses)){ |
261 | 261 | |
... | ... | @@ -276,21 +276,23 @@ |
276 | 276 | AntExRecordQuery antExRecordQuery=new AntExRecordQuery(); |
277 | 277 | antExRecordQuery.setParentId(patients.getId()); |
278 | 278 | |
279 | - AntExRecordModel antExRecordModel=new AntExRecordModel(); | |
280 | - antExRecordModel.setLastMenses(patients.getLastMenses()); | |
281 | - antExRecordModel.setBuildTime(patients.getBookbuildingDate()); | |
282 | - antExRecordModel.setDueDate(patients.getDueDate()); | |
283 | - antExRecordModel.setName(patients.getUsername()); | |
284 | - antExRecordModel.setBrith(patients.getBirth()); | |
285 | - Patients dbPatients = findOnePatientById(patients.getId()); | |
286 | - if(dbPatients.getType()==1){ | |
287 | - antExRecordModel.setStatus(2); | |
288 | - }else { | |
289 | - antExRecordModel.setStatus(1); | |
290 | - } | |
291 | - antExRecordModel.setModified(new Date()); | |
279 | + if(iAntExRecordDao.count(antExRecordQuery.convertToQuery())>0){ | |
280 | + AntExRecordModel antExRecordModel=new AntExRecordModel(); | |
281 | + antExRecordModel.setLastMenses(patients.getLastMenses()); | |
282 | + antExRecordModel.setBuildTime(patients.getBookbuildingDate()); | |
283 | + antExRecordModel.setDueDate(patients.getDueDate()); | |
284 | + antExRecordModel.setName(patients.getUsername()); | |
285 | + antExRecordModel.setBrith(patients.getBirth()); | |
286 | + Patients dbPatients = findOnePatientById(patients.getId()); | |
287 | + if(dbPatients.getType()==1){ | |
288 | + antExRecordModel.setStatus(2); | |
289 | + }else { | |
290 | + antExRecordModel.setStatus(1); | |
291 | + } | |
292 | + antExRecordModel.setModified(new Date()); | |
292 | 293 | |
293 | - iAntExRecordDao.batchUpdateRecord(antExRecordModel, antExRecordQuery.convertToQuery()); | |
294 | + iAntExRecordDao.batchUpdateRecord(antExRecordModel, antExRecordQuery.convertToQuery()); | |
295 | + } | |
294 | 296 | } |
295 | 297 | /** |
296 | 298 | * 修改产筛数据 |
platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoCondition.java
View file @
4e4631c
... | ... | @@ -173,7 +173,11 @@ |
173 | 173 | private void set(MongoOper oper, Object obj, Criteria criteria) { |
174 | 174 | if (MongoOper.GT == oper) { |
175 | 175 | criteria.gt(obj); |
176 | - } else if (MongoOper.GTE == oper) { | |
176 | + }else | |
177 | + if (MongoOper.EXISTS == oper) { | |
178 | + criteria.exists(Boolean.valueOf(obj.toString())); | |
179 | + } | |
180 | + else if (MongoOper.GTE == oper) { | |
177 | 181 | criteria.gte(obj); |
178 | 182 | } else if (MongoOper.IS == oper) { |
179 | 183 | criteria.is(obj); |
platform-common/src/main/java/com/lyms/platform/common/dao/operator/MongoOper.java
View file @
4e4631c
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
4e4631c
... | ... | @@ -110,6 +110,8 @@ |
110 | 110 | |
111 | 111 | //0 隐藏 1 显示 |
112 | 112 | private String enable="1"; |
113 | + | |
114 | + private Boolean extEnable; | |
113 | 115 | //区域来源 |
114 | 116 | private String source; |
115 | 117 | |
116 | 118 | |
... | ... | @@ -129,7 +131,13 @@ |
129 | 131 | this.enable = enable; |
130 | 132 | } |
131 | 133 | |
134 | + public boolean isExtEnable() { | |
135 | + return extEnable; | |
136 | + } | |
132 | 137 | |
138 | + public void setExtEnable(boolean extEnable) { | |
139 | + this.extEnable = extEnable; | |
140 | + } | |
133 | 141 | |
134 | 142 | public String getProvinceRegisterId() { |
135 | 143 | return provinceRegisterId; |
... | ... | @@ -855,6 +863,9 @@ |
855 | 863 | MongoCondition condition1 = mongoCondition.and("enable", enable, MongoOper.IS); |
856 | 864 | MongoCondition condition2 = MongoCondition.newInstance("buildType", buildTypeList, MongoOper.IN); |
857 | 865 | condition = condition.orCondition(new MongoCondition[]{condition1, condition2}); |
866 | + } | |
867 | + if(null!=extEnable){ | |
868 | + condition.and("enable",extEnable,MongoOper.EXISTS); | |
858 | 869 | } |
859 | 870 | |
860 | 871 | if (buildTypeEq != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
4e4631c
... | ... | @@ -379,7 +379,7 @@ |
379 | 379 | @RequestMapping(method = RequestMethod.GET, value = "/getBabyGroupCount") |
380 | 380 | @ResponseBody |
381 | 381 | @TokenRequired |
382 | - public BaseResponse getBabyGroupCount(@Valid @RequestBody BabyManageRequest babyManageRequest, | |
382 | + public BaseResponse getBabyGroupCount(@Valid BabyManageRequest babyManageRequest, | |
383 | 383 | HttpServletRequest request) { |
384 | 384 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
385 | 385 | return babyBookbuildingFacade.getBabyGroupCount(babyManageRequest, loginState.getId()); |
386 | 386 | |
... | ... | @@ -393,9 +393,11 @@ |
393 | 393 | @RequestMapping(method = RequestMethod.GET, value = "/getBabyGroupRightCount") |
394 | 394 | @ResponseBody |
395 | 395 | @TokenRequired |
396 | - public BaseResponse getBabyGroupRightCount(@Valid @RequestBody BabyManageRequest babyManageRequest,HttpServletRequest request){ | |
396 | + public BaseResponse getBabyGroupRightCount(@Valid BabyManageRequest babyManageRequest,HttpServletRequest request, | |
397 | + @RequestParam("page") Integer page, | |
398 | + @RequestParam("limit") Integer limit){ | |
397 | 399 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
398 | - return babyBookbuildingFacade.getBabyGroupRightCount(babyManageRequest,loginState.getId()); | |
400 | + return babyBookbuildingFacade.getBabyGroupRightCount(babyManageRequest,loginState.getId(),page,limit); | |
399 | 401 | } |
400 | 402 | |
401 | 403 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
4e4631c
... | ... | @@ -148,11 +148,11 @@ |
148 | 148 | */ |
149 | 149 | @RequestMapping(value = "/residentsArchiveExport", method = RequestMethod.GET) |
150 | 150 | @ResponseBody |
151 | -// @TokenRequired | |
151 | + @TokenRequired | |
152 | 152 | public void residentsArchiveExport(@Valid ResidentsArchiveQueryRequest residentsArchiveQueryRequest,HttpServletResponse response, |
153 | 153 | HttpServletRequest request){ |
154 | -// LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
155 | - residentsArchiveFacade.residentsArchiveExport(residentsArchiveQueryRequest,856,response); | |
154 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
155 | + residentsArchiveFacade.residentsArchiveExport(residentsArchiveQueryRequest,loginState.getId(),response); | |
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
4e4631c
... | ... | @@ -13,8 +13,6 @@ |
13 | 13 | import com.lyms.platform.permission.service.OrganizationService; |
14 | 14 | import com.lyms.platform.pojo.*; |
15 | 15 | import com.lyms.platform.query.*; |
16 | -import javafx.scene.shape.LineTo; | |
17 | -import com.lyms.platform.pojo.*; | |
18 | 16 | import com.lyms.platform.query.AntExChuQuery; |
19 | 17 | import com.lyms.platform.query.AntExQuery; |
20 | 18 | import com.lyms.platform.query.MatDeliverQuery; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
4e4631c
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | patients.setType(1); |
100 | 100 | patients.setCreated(new Date()); |
101 | 101 | patients.setBookbuildingDoctor(userId + ""); |
102 | - patients.setEnable("0"); | |
102 | + patients.setEnable("2"); | |
103 | 103 | patients.setBookbuildingDate(new Date()); |
104 | 104 | patientsService.addPatient(patients); |
105 | 105 | return patients.getId(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
4e4631c
... | ... | @@ -108,6 +108,8 @@ |
108 | 108 | private AutoMatchFacade autoMatchFacade; |
109 | 109 | |
110 | 110 | |
111 | + | |
112 | + | |
111 | 113 | private static ExecutorService pool = Executors.newFixedThreadPool(10); |
112 | 114 | |
113 | 115 | |
... | ... | @@ -198,7 +200,7 @@ |
198 | 200 | * @param request |
199 | 201 | * @return |
200 | 202 | */ |
201 | - public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request,Integer userId) { | |
203 | + public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request, Integer userId) { | |
202 | 204 | BabyModel model = getBabyModel(request); |
203 | 205 | model.setModified(new Date()); |
204 | 206 | model.setOperator(userId); |
... | ... | @@ -280,6 +282,14 @@ |
280 | 282 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
281 | 283 | } |
282 | 284 | |
285 | + | |
286 | + private void updateCheckBirth(BabyModel babyModel) | |
287 | + { | |
288 | + BabyCheckModel checkModel = new BabyCheckModel(); | |
289 | + checkModel.setBirth(babyModel.getBirth()); | |
290 | + babyCheckService.updateBabyCheckByBuildId(checkModel, babyModel.getId()); | |
291 | + } | |
292 | + | |
283 | 293 | /** |
284 | 294 | * 添加儿童建档 |
285 | 295 | * |
... | ... | @@ -2179,7 +2189,7 @@ |
2179 | 2189 | * @param userId |
2180 | 2190 | * @return |
2181 | 2191 | */ |
2182 | - public BaseResponse getBabyGroupRightCount(BabyManageRequest request, Integer userId) { | |
2192 | + public BaseResponse getBabyGroupRightCount(BabyManageRequest request, Integer userId,Integer page,Integer limit) { | |
2183 | 2193 | String hospitalId = ""; |
2184 | 2194 | //得到当前登录的医院id |
2185 | 2195 | if (userId != null) { |
... | ... | @@ -2213,6 +2223,19 @@ |
2213 | 2223 | babyQuery.setCheckDateStart(end); |
2214 | 2224 | } |
2215 | 2225 | |
2226 | + babyQuery.setPage(page); | |
2227 | + babyQuery.setLimit(limit); | |
2228 | + babyQuery.setNeed("true"); | |
2229 | + | |
2230 | + if (StringUtils.isNotEmpty(request.getItemType()) && "1".equals(request.getItemType())) | |
2231 | + { | |
2232 | + babyQuery.setHeightEvaluate(request.getEvaluate()); | |
2233 | + } | |
2234 | + else if (StringUtils.isNotEmpty(request.getItemType()) && "2".equals(request.getItemType())) | |
2235 | + { | |
2236 | + babyQuery.setWeightEvaluate(request.getEvaluate()); | |
2237 | + } | |
2238 | + | |
2216 | 2239 | List<Map<String,String>> results = new ArrayList<>(); |
2217 | 2240 | |
2218 | 2241 | List<BabyCheckModel> babyCheckModels = babyCheckService.queryBabyCheckRecord(babyQuery); |
2219 | 2242 | |
... | ... | @@ -2239,12 +2262,12 @@ |
2239 | 2262 | { |
2240 | 2263 | BabyModel model = getBabyModelById(checkModel.getBuildId()); |
2241 | 2264 | Map<String,String> map = new HashMap<>(); |
2242 | - map.put("babyId",model.getId()); | |
2243 | - map.put("checkId",checkModel.getId()); | |
2265 | + map.put("babyId",model.getId()); //儿童主键 | |
2266 | + map.put("checkId",checkModel.getId()); //检查主键 | |
2244 | 2267 | map.put("sex", StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); //性别 |
2245 | 2268 | map.put("babyName", StringUtils.emptyDeal(model.getName())); //儿童名称 |
2246 | 2269 | map.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); //生日 |
2247 | - map.put("age",""); //当前月龄 | |
2270 | + map.put("age",StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), checkModel.getCheckDate()))); //检查月龄 | |
2248 | 2271 | map.put("height",checkModel.getHeight()); //身长 |
2249 | 2272 | map.put("weight", checkModel.getWeight()); //体重 |
2250 | 2273 | map.put("growthEvaluate",checkModel.getGrowthEvaluate()); //体格发育评价 |
... | ... | @@ -2280,7 +2303,8 @@ |
2280 | 2303 | } |
2281 | 2304 | } |
2282 | 2305 | |
2283 | - BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
2306 | + BaseListResponse objectResponse = new BaseListResponse(); | |
2307 | + objectResponse.setPageInfo(babyQuery.getPageInfo()); | |
2284 | 2308 | objectResponse.setData(results); |
2285 | 2309 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
2286 | 2310 | objectResponse.setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
4e4631c
... | ... | @@ -486,6 +486,9 @@ |
486 | 486 | PatientsQuery patientsQuery = new PatientsQuery(); |
487 | 487 | patientsQuery.setYn(YnEnums.YES.getId()); |
488 | 488 | patientsQuery.setBuildType(1); |
489 | + //查询主档案 | |
490 | + patientsQuery.setExtEnable(false); | |
491 | + | |
489 | 492 | //如果身份证号码不为空就以身份证号码查询 |
490 | 493 | if (!StringUtils.isEmpty(bookbuildingQueryRequest.getCardNo())) { |
491 | 494 | patientsQuery.setCardNo(bookbuildingQueryRequest.getCardNo()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java
View file @
4e4631c
... | ... | @@ -74,6 +74,28 @@ |
74 | 74 | |
75 | 75 | private String isArea; |
76 | 76 | |
77 | + //检查项类型 1身长 2 体重 | |
78 | + private String itemType; | |
79 | + | |
80 | + //评价 | |
81 | + private String evaluate; | |
82 | + | |
83 | + public String getItemType() { | |
84 | + return itemType; | |
85 | + } | |
86 | + | |
87 | + public void setItemType(String itemType) { | |
88 | + this.itemType = itemType; | |
89 | + } | |
90 | + | |
91 | + public String getEvaluate() { | |
92 | + return evaluate; | |
93 | + } | |
94 | + | |
95 | + public void setEvaluate(String evaluate) { | |
96 | + this.evaluate = evaluate; | |
97 | + } | |
98 | + | |
77 | 99 | public String getHospitalProvinceId() { |
78 | 100 | return hospitalProvinceId; |
79 | 101 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverListResult.java
View file @
4e4631c
... | ... | @@ -125,7 +125,7 @@ |
125 | 125 | |
126 | 126 | if (patients.getDueStatus() == 1) { |
127 | 127 | this.dueWeek = "终止妊娠"; |
128 | - } else if (null != patients.getFmDate()) { | |
128 | + } else if (null != patients.getFmDate()&&patients.getType()==3) { | |
129 | 129 | dueWeek = "已分娩"; |
130 | 130 | } else { |
131 | 131 | int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
View file @
4e4631c
... | ... | @@ -176,14 +176,17 @@ |
176 | 176 | Map temp = (Map)ma.getValue(); |
177 | 177 | Set<Map.Entry<String, Object>> data = temp.entrySet(); |
178 | 178 | Iterator<Map.Entry<String, Object>> it2 = data.iterator(); |
179 | - boolean b = false; | |
179 | + boolean a = false; | |
180 | + | |
180 | 181 | String proName = null; |
182 | + | |
181 | 183 | while (it2.hasNext()) { |
184 | + | |
182 | 185 | Map.Entry<String, Object> mm = it2.next(); |
183 | 186 | if ("checkBox".equals(mm.getKey())){ |
184 | 187 | boolean v = (Boolean)mm.getValue(); |
185 | 188 | if (v){ |
186 | - b = v; | |
189 | + a = v; | |
187 | 190 | continue; |
188 | 191 | }else { |
189 | 192 | break; |
190 | 193 | |
191 | 194 | |
192 | 195 | |
... | ... | @@ -191,15 +194,21 @@ |
191 | 194 | } |
192 | 195 | if ("proName".equals(mm.getKey())){ |
193 | 196 | proName = (String)mm.getValue(); |
194 | - sb.append(mm.getValue() + "").append("["); | |
197 | + sb.append(mm.getValue() + "").append("[").append("]"); | |
195 | 198 | } |
196 | - if ("selected".equals(mm.getKey()) && b){ | |
197 | 199 | |
200 | + if ("selected".equals(mm.getKey()) && a){ | |
201 | + | |
202 | + if (sb.toString().endsWith("]")){ | |
203 | + String ss = sb.substring(0, sb.length() - 1); | |
204 | + sb = new StringBuilder(ss); | |
205 | + } | |
206 | + | |
198 | 207 | if (proName!=null && "其他".equals(proName)){ |
199 | 208 | String v = (String)mm.getValue(); |
200 | 209 | sb.append(v).append("]"); |
201 | 210 | }else { |
202 | - List<String> ids = (List<String>)mm.getValue(); | |
211 | + List<String>ids = (List<String>)mm.getValue(); | |
203 | 212 | if (ids.size()!=0){ |
204 | 213 | for (String id : ids){ |
205 | 214 | BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); |
206 | 215 | |
... | ... | @@ -207,10 +216,12 @@ |
207 | 216 | sb.append(basicConfig.getName()).append(","); |
208 | 217 | } |
209 | 218 | } |
210 | - String ss = sb.substring(0, sb.length() - 1); | |
211 | - sb = new StringBuilder(ss); | |
212 | - sb.append("]"); | |
219 | + if (sb.toString().endsWith(",")) { | |
220 | + String ss = sb.substring(0, sb.length() - 1); | |
221 | + sb = new StringBuilder(ss); | |
222 | + } | |
213 | 223 | } |
224 | + sb.append("]"); | |
214 | 225 | } |
215 | 226 | } |
216 | 227 | } |