Commit eb1a87a317ce8a1a503332a87d6df2f95a099d75

Authored by liquanyu
1 parent eecab34fe1

儿童 名字处理

Showing 1 changed file with 32 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ eb1a87a
... ... @@ -3968,6 +3968,38 @@
3968 3968 }
3969 3969  
3970 3970  
  3971 +
  3972 +
  3973 + @ResponseBody
  3974 + @RequestMapping(value = "/updateBabyName", method = RequestMethod.GET)
  3975 + public String updateBabyName(@RequestParam(required = false) String hospitalId,@RequestParam(required = false) Boolean exc) {
  3976 + BabyModelQuery babyQuery = new BabyModelQuery();
  3977 + List buildType = new ArrayList();
  3978 + babyQuery.setHospitalId("2100001295");
  3979 + babyQuery.setYn(YnEnums.YES.getId());
  3980 + babyQuery.setCreatedTimeStart(DateUtil.parseYMD("2018-09-13"));
  3981 + babyQuery.setCreatedTimeEnd(new Date());
  3982 +
  3983 + List<BabyModel> list = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  3984 + System.out.println(list.size()+"-------------------");
  3985 + if (exc)
  3986 + {
  3987 + for (BabyModel baby : list)
  3988 + {
  3989 + if (baby.getName().contains("之"))
  3990 + {
  3991 + continue;
  3992 + }
  3993 +
  3994 + String name = baby.getName() + (baby.getSex() == 0 ? "之女" : "之子");
  3995 + baby.setName(name);
  3996 + System.out.println(name);
  3997 + babyBookbuildingService.updateBabyBuild(baby,baby.getId());
  3998 + }
  3999 + }
  4000 + return "updateBabyName start......";
  4001 + }
  4002 +
3971 4003 @Autowired
3972 4004 private PatientWeightService patientWeightService;
3973 4005 }