Commit 64ef4a696e147e43f9f05f76ca9deb1be7931f17

Authored by liquanyu
1 parent add9f1b50f

update

Showing 2 changed files with 28 additions and 8 deletions

platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml View file @ 64ef4a6
... ... @@ -271,7 +271,7 @@
271 271 </select>
272 272  
273 273 <update id="updateAppLisStatus" parameterType="java.util.List" >
274   - UPDATE LIS_REPORT_TBL STATUS = 1 WHERE ID IN
  274 + UPDATE LIS_REPORT_TBL SET STATUS = 1 WHERE ID IN
275 275 <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
276 276 #{item}
277 277 </foreach>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java View file @ 64ef4a6
... ... @@ -417,6 +417,20 @@
417 417 query.setHospitalId(patients.getHospitalId());
418 418  
419 419 List<LisReportModel> lises = lisService.queryLisDataByQuery(query);
  420 + if (CollectionUtils.isNotEmpty(lises))
  421 + {
  422 + for(LisReportModel lisReportModel : lises)
  423 + {
  424 + String json = lisReportModel.getItemJson();
  425 + if (StringUtils.isNotEmpty(json))
  426 + {
  427 + List<LisReportItemModel> items = JsonUtil.toList(json,LisReportItemModel.class);
  428 + lisReportModel.setItems(items);
  429 + lisReportModel.setItemJson(null);
  430 + }
  431 + }
  432 + }
  433 +
420 434 BaseObjectResponse objectResponse = new BaseObjectResponse();
421 435 objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
422 436 objectResponse.setData(lises);
423 437  
424 438  
... ... @@ -432,15 +446,21 @@
432 446 * @return
433 447 */
434 448 public BaseResponse updateAppLisStatus(String ids) {
435   - if (StringUtils.isNotEmpty(ids))
436   - {
437   - String[] arrs = ids.split(",");
438   - if (arrs != null && arrs.length > 0)
  449 + try {
  450 + if (StringUtils.isNotEmpty(ids))
439 451 {
440   - List<String> list = new ArrayList<>();
441   - CollectionUtils.addAll(list, arrs);
442   - lisService.updateAppLisStatus(list);
  452 + String[] arrs = ids.split(",");
  453 + if (arrs != null && arrs.length > 0)
  454 + {
  455 + List<String> list = new ArrayList<>();
  456 + CollectionUtils.addAll(list, arrs);
  457 + lisService.updateAppLisStatus(list);
  458 + }
443 459 }
  460 + }
  461 + catch (Exception e)
  462 + {
  463 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
444 464 }
445 465 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION);
446 466 }