Commit 43a50a1464b2a876eece16b50259f79ff8eb5368

Authored by litao@lymsh.com
1 parent 532fbbab59

改bug

Showing 2 changed files with 21 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java View file @ 43a50a1
... ... @@ -33,12 +33,28 @@
33 33 @Autowired
34 34 private AntenatalExaminationFacade antenatalExaminationFacade;
35 35  
  36 +
36 37 /**
37   - * 获取是否打印过 如果没打印 就把改id存下来 返回false 打印过 直接返回true
  38 + * 获取初诊复诊是否打印过
  39 + * type = 1 初诊
  40 + * type = 2 复诊
38 41 */
39   - @RequestMapping(value = "/prient/{id}", method = RequestMethod.GET)
  42 + @RequestMapping(value = "/get/prient", method = RequestMethod.GET)
40 43 @ResponseBody
41   - public BaseObjectResponse prient(@PathVariable String id) {
  44 + @TokenRequired
  45 + public BaseObjectResponse getIsPrient(@RequestParam String id, @RequestParam Integer type) {
  46 + return viewFacade.getIsPrient(id);
  47 + }
  48 +
  49 + /**
  50 + * 初诊复诊打印后回调controller
  51 + * type = 1 初诊
  52 + * type = 2 复诊
  53 + */
  54 + @RequestMapping(value = "/prient", method = RequestMethod.GET)
  55 + @ResponseBody
  56 + @TokenRequired
  57 + public BaseObjectResponse prient(@RequestParam String id) {
42 58 return viewFacade.prient(id);
43 59 }
44 60  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 43a50a1
... ... @@ -3707,7 +3707,7 @@
3707 3707  
3708 3708 public BaseObjectResponse prient(String id) {
3709 3709 if(mongoTemplate.exists(Query.query(Criteria.where("value").is(id).and("type").is(SequenceConstant.PRIENT_TYPE)), PlantformConfigModel.class)) {
3710   - return RespBuilder.buildSuccess(true);
  3710 + return RespBuilder.buildSuccess("已经打印过了");
3711 3711 }
3712 3712 PlantformConfigModel plantformConfigModel = new PlantformConfigModel();
3713 3713 plantformConfigModel.setType(SequenceConstant.PRIENT_TYPE);
... ... @@ -3715,7 +3715,7 @@
3715 3715 plantformConfigModel.setCreateDate(new Date());
3716 3716 plantformConfigModel.setValue(id);
3717 3717 mongoTemplate.save(plantformConfigModel);
3718   - return RespBuilder.buildSuccess(false);
  3718 + return RespBuilder.buildSuccess();
3719 3719 }
3720 3720 }