Commit d699dcb3de1a08ad6da6a1a426165a9ccb2c7305
1 parent
dabd2c896b
Exists in
master
and in
8 other branches
修改查询访视
Showing 3 changed files with 52 additions and 52 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/VisitController.java
View file @
d699dcb
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | import com.lyms.platform.common.result.BaseResponse; |
| 15 | 15 | import com.lyms.platform.operate.web.facade.VisitFacade; |
| 16 | 16 | import com.lyms.platform.operate.web.request.BabyVisitAddRequest; |
| 17 | -import com.lyms.platform.operate.web.request.PuerperaVisitQueryRequest; | |
| 17 | +import com.lyms.platform.operate.web.request.VisitQueryRequest; | |
| 18 | 18 | import com.lyms.platform.operate.web.request.VisitAddRequest; |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | |
| 22 | 22 | |
| 23 | 23 | |
| ... | ... | @@ -38,16 +38,16 @@ |
| 38 | 38 | @RequestMapping(value = "/visitpuerpera", method = RequestMethod.GET) |
| 39 | 39 | @ResponseBody |
| 40 | 40 | @TokenRequired |
| 41 | - public BaseObjectResponse findOneByCardNo(PuerperaVisitQueryRequest puerperaVisitQueryRequest) { | |
| 41 | + public BaseObjectResponse findOneByCardNo(VisitQueryRequest puerperaVisitQueryRequest) { | |
| 42 | 42 | // 身份证号不为空的情况 |
| 43 | - if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getCardNo())) { | |
| 43 | + if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getPhone())) { | |
| 44 | 44 | // 根据身份证号码去查询 |
| 45 | - return visitFacade.findOneByCardNo(puerperaVisitQueryRequest.getCardNo()); | |
| 45 | + return visitFacade.findOneByCardNo(puerperaVisitQueryRequest.getPhone()); | |
| 46 | 46 | } else if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getId())) { |
| 47 | 47 | // 根据产妇的id去查询 |
| 48 | 48 | return visitFacade.findOneById(puerperaVisitQueryRequest.getId()); |
| 49 | 49 | } |
| 50 | - return new BaseObjectResponse().setErrormsg("参数错误,cardno/id 不能都为空").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 50 | + return new BaseObjectResponse().setErrormsg("参数错误,phone/id 不能都为空").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | |
| 55 | 55 | |
| ... | ... | @@ -90,15 +90,15 @@ |
| 90 | 90 | @TokenRequired |
| 91 | 91 | @RequestMapping(value = "/visitbaby", method = RequestMethod.GET) |
| 92 | 92 | @ResponseBody |
| 93 | - public BaseObjectResponse findOneBabyByCardNo(PuerperaVisitQueryRequest puerperaVisitQueryRequest) { | |
| 93 | + public BaseObjectResponse findOneBabyByCardNo(VisitQueryRequest puerperaVisitQueryRequest) { | |
| 94 | 94 | // 根据产妇的身份证号码查询小孩的记录 |
| 95 | - if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getCardNo())) { | |
| 96 | - return visitFacade.findBabyVisitByMotherCardNo(puerperaVisitQueryRequest.getCardNo()); | |
| 95 | + if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getPhone())) { | |
| 96 | + return visitFacade.findBabyVisitByMotherCardNo(puerperaVisitQueryRequest.getPhone()); | |
| 97 | 97 | // 根据小孩的id去获取访视记录 |
| 98 | 98 | } else if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getId())) { |
| 99 | 99 | return visitFacade.findBabyVisitByBabyId(puerperaVisitQueryRequest.getId()); |
| 100 | 100 | } |
| 101 | - return new BaseObjectResponse().setErrormsg("参数错误,cardno/id 不能都为空").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 101 | + return new BaseObjectResponse().setErrormsg("参数错误,phone/id 不能都为空").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PuerperaVisitQueryRequest.java
View file @
d699dcb
| 1 | -package com.lyms.platform.operate.web.request; | |
| 2 | - | |
| 3 | -import com.lyms.platform.common.core.annotation.form.Form; | |
| 4 | -import com.lyms.platform.common.core.annotation.form.FormParam; | |
| 5 | - | |
| 6 | -/** | |
| 7 | - * 产妇访视查询对象 | |
| 8 | - * <p> | |
| 9 | - * 详细描述 | |
| 10 | - * <p> | |
| 11 | - * 示例代码 | |
| 12 | - * | |
| 13 | - * <pre> | |
| 14 | - * </pre> | |
| 15 | - * | |
| 16 | - * @author In_Home | |
| 17 | - * @version BME V100R001 2016-3-21 | |
| 18 | - * @since BME V100R001C40B104 | |
| 19 | - */ | |
| 20 | -@Form | |
| 21 | -public class PuerperaVisitQueryRequest { | |
| 22 | - | |
| 23 | - @FormParam("phone") | |
| 24 | - private String cardNo; | |
| 25 | - | |
| 26 | - private String id; | |
| 27 | - | |
| 28 | - public String getCardNo() { | |
| 29 | - return cardNo; | |
| 30 | - } | |
| 31 | - | |
| 32 | - public void setCardNo(String cardNo) { | |
| 33 | - this.cardNo = cardNo; | |
| 34 | - } | |
| 35 | - | |
| 36 | - public String getId() { | |
| 37 | - return id; | |
| 38 | - } | |
| 39 | - | |
| 40 | - public void setId(String id) { | |
| 41 | - this.id = id; | |
| 42 | - } | |
| 43 | -} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/VisitQueryRequest.java
View file @
d699dcb
| 1 | +package com.lyms.platform.operate.web.request; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.core.annotation.form.Form; | |
| 4 | +import com.lyms.platform.common.core.annotation.form.FormParam; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * 产妇访视查询对象 | |
| 8 | + * <p> | |
| 9 | + * 详细描述 | |
| 10 | + * <p> | |
| 11 | + * 示例代码 | |
| 12 | + * | |
| 13 | + * <pre> | |
| 14 | + * </pre> | |
| 15 | + * | |
| 16 | + * @author In_Home | |
| 17 | + * @version BME V100R001 2016-3-21 | |
| 18 | + * @since BME V100R001C40B104 | |
| 19 | + */ | |
| 20 | +@Form | |
| 21 | +public class VisitQueryRequest { | |
| 22 | + | |
| 23 | + @FormParam("phone") | |
| 24 | + private String phone; | |
| 25 | + @FormParam | |
| 26 | + private String id; | |
| 27 | + | |
| 28 | + public String getPhone() { | |
| 29 | + return phone; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setPhone(String phone) { | |
| 33 | + this.phone = phone; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public String getId() { | |
| 37 | + return id; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public void setId(String id) { | |
| 41 | + this.id = id; | |
| 42 | + } | |
| 43 | +} |