Commit a3a988cdb63387bd6c333c4e5b7e1536060209b0
1 parent
0f522095b9
Exists in
master
and in
6 other branches
儿童建档
Showing 3 changed files with 149 additions and 0 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyAppBuildAddRequest.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
a3a988c
| ... | ... | @@ -837,5 +837,13 @@ |
| 837 | 837 | return babyBookbuildingFacade.getBabyAppBuildInfo(phone); |
| 838 | 838 | |
| 839 | 839 | } |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + @RequestMapping(method = RequestMethod.POST, value = "/addAppBabyInfo") | |
| 844 | + @ResponseBody | |
| 845 | + public BaseResponse addAppBabyInfo(@Valid @RequestBody BabyAppBuildAddRequest request, HttpServletRequest httpServletRequest) { | |
| 846 | + return babyBookbuildingFacade.addAppBabyInfo(request); | |
| 847 | + } | |
| 840 | 848 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
a3a988c
| ... | ... | @@ -5015,5 +5015,40 @@ |
| 5015 | 5015 | return new BaseObjectResponse() |
| 5016 | 5016 | .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(datas); |
| 5017 | 5017 | } |
| 5018 | + | |
| 5019 | + public BaseResponse addAppBabyInfo(BabyAppBuildAddRequest appRequest) { | |
| 5020 | + | |
| 5021 | + | |
| 5022 | + BabyModel babyModel = babyService.getOneBabyById(appRequest.getId()); | |
| 5023 | + | |
| 5024 | + BabyBookbuildingAddRequest request = new BabyBookbuildingAddRequest(); | |
| 5025 | + request.setDataStatus(1); | |
| 5026 | + request.setYn(0); | |
| 5027 | + request.setId(appRequest.getId()); | |
| 5028 | + request.setMommyName(appRequest.getMommyName()); | |
| 5029 | + request.setsINCard(appRequest.getsINCard()); | |
| 5030 | + request.setMommyPhone(appRequest.getPhone()); | |
| 5031 | + request.setSex(Integer.parseInt(appRequest.getSex())); | |
| 5032 | + request.setMommyCertificateNum(appRequest.getMommyCardNo()); | |
| 5033 | + request.setBabyBirthday(appRequest.getBirth()); | |
| 5034 | + request.setBabyName(appRequest.getBabyName()); | |
| 5035 | + request.setVcCardNo(appRequest.getVcCardNo()); | |
| 5036 | + request.setHospitalId(appRequest.getHospitalId()); | |
| 5037 | + request.setBuildDate(DateUtil.getyyyy_MM_dd(new Date())); | |
| 5038 | + request.setBuildDoctor("a9e5507f-e7da-4ec6-b8db-9a1e4d1b7c29"); | |
| 5039 | + request.setmHighRiskReason(babyModel.getmHighRiskReason()); | |
| 5040 | + request.setPid(babyModel.getPid()); | |
| 5041 | + | |
| 5042 | + UsersQuery usersQuery = new UsersQuery(); | |
| 5043 | + usersQuery.setYn(YnEnums.YES.getId()); | |
| 5044 | + usersQuery.setOrgId(Integer.parseInt(appRequest.getHospitalId())); | |
| 5045 | + List<Users> users = usersService.queryUsers(usersQuery); | |
| 5046 | + | |
| 5047 | + updateBabyBookbuilding(request, users.get(0).getId()); | |
| 5048 | + BabyModel babyModelDb = babyService.getOneBabyById(appRequest.getId()); | |
| 5049 | + | |
| 5050 | + return new BaseObjectResponse() | |
| 5051 | + .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(babyModelDb.getEncoded()); | |
| 5052 | + } | |
| 5018 | 5053 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyAppBuildAddRequest.java
View file @
a3a988c
| 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 | +import org.hibernate.validator.constraints.NotEmpty; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | +import java.util.Map; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * Created by lqy on 2016/6/15. | |
| 12 | + */ | |
| 13 | +@Form | |
| 14 | +public class BabyAppBuildAddRequest { | |
| 15 | + private String id; | |
| 16 | + private String sINCard; | |
| 17 | + | |
| 18 | + private String phone; | |
| 19 | + private String mommyCardNo; | |
| 20 | + private String sex; | |
| 21 | + private String birth; | |
| 22 | + private String babyName; | |
| 23 | + private String mommyName; | |
| 24 | + private String vcCardNo; | |
| 25 | + private String hospitalId; | |
| 26 | + | |
| 27 | + public String getId() { | |
| 28 | + return id; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setId(String id) { | |
| 32 | + this.id = id; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public String getsINCard() { | |
| 36 | + return sINCard; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public void setsINCard(String sINCard) { | |
| 40 | + this.sINCard = sINCard; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public String getPhone() { | |
| 44 | + return phone; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public void setPhone(String phone) { | |
| 48 | + this.phone = phone; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public String getMommyCardNo() { | |
| 52 | + return mommyCardNo; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public void setMommyCardNo(String mommyCardNo) { | |
| 56 | + this.mommyCardNo = mommyCardNo; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public String getSex() { | |
| 60 | + return sex; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void setSex(String sex) { | |
| 64 | + this.sex = sex; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public String getBirth() { | |
| 68 | + return birth; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setBirth(String birth) { | |
| 72 | + this.birth = birth; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public String getBabyName() { | |
| 76 | + return babyName; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setBabyName(String babyName) { | |
| 80 | + this.babyName = babyName; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public String getMommyName() { | |
| 84 | + return mommyName; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public void setMommyName(String mommyName) { | |
| 88 | + this.mommyName = mommyName; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public String getVcCardNo() { | |
| 92 | + return vcCardNo; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setVcCardNo(String vcCardNo) { | |
| 96 | + this.vcCardNo = vcCardNo; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public String getHospitalId() { | |
| 100 | + return hospitalId; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setHospitalId(String hospitalId) { | |
| 104 | + this.hospitalId = hospitalId; | |
| 105 | + } | |
| 106 | +} |