Commit b052331b9fcfb260a9b69a3f268540083e3e3c58

Authored by shiyang
1 parent 31b1fc9af1

update

Showing 1 changed file with 12 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ b052331
... ... @@ -179,7 +179,7 @@
179 179 settleCase(model.getBuildId());
180 180 } catch (Exception e) {
181 181 e.printStackTrace();
182   - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("结案失败");
  182 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("自动结案失败");
183 183 }
184 184 }
185 185 }
... ... @@ -187,9 +187,16 @@
187 187 if(CollectionUtils.isNotEmpty(babyCheckModels) && 1==request.getHighRisk()) {
188 188 //只判断最后一次检查(儿童档案增加高危结案状态1:未结案2:已结案)
189 189 if(babyCheckModels.get(0).getId().equals(request.getId())){
190   - BabyModel bm = new BabyModel();
191   - bm.setSettleType(1);
192   - babyBookbuildingService.updateBabyBuild(bm,request.getBuildId());
  190 + try {
  191 + Query query3 = Query.query(Criteria.where("_id").is(request.getBuildId()));
  192 + Update update = new Update();
  193 + update.set("settleTime", null);
  194 + update.set("settleType", 1);
  195 + mongoTemplate.updateFirst(query3, update, BabyModel.class);
  196 + } catch (Exception e) {
  197 + e.printStackTrace();
  198 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("自动结案失败");
  199 + }
193 200 }
194 201 }
195 202 }
... ... @@ -839,7 +846,7 @@
839 846 settleCase(model.getBuildId());
840 847 } catch (Exception e) {
841 848 e.printStackTrace();
842   - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("结案失败");
  849 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("自动结案失败");
843 850 }
844 851 }
845 852 }