Commit 24538974114278b81e92b92677de3ef0688b1afb
1 parent
435ff342cb
Exists in
master
and in
6 other branches
update
Showing 4 changed files with 77 additions and 5 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/controller/ViewController.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/facade/ViewFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
2453897
... | ... | @@ -2,7 +2,6 @@ |
2 | 2 | |
3 | 3 | |
4 | 4 | import com.aspose.words.*; |
5 | -import com.google.inject.spi.Toolable; | |
6 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
7 | 6 | import com.lyms.platform.common.base.BaseController; |
8 | 7 | import com.lyms.platform.common.base.LoginContext; |
... | ... | @@ -20,6 +19,7 @@ |
20 | 19 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
21 | 20 | import com.lyms.platform.permission.model.BabyDiagnoseQuery; |
22 | 21 | import com.lyms.platform.permission.service.CouponService; |
22 | +import com.lyms.platform.query.BabyModelQuery; | |
23 | 23 | import org.apache.log4j.Logger; |
24 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
25 | 25 | import org.springframework.data.mongodb.core.MongoTemplate; |
... | ... | @@ -75,7 +75,19 @@ |
75 | 75 | } |
76 | 76 | return babyBookbuildingFacade.addBabyBookbuilding(request, loginState.getId()); |
77 | 77 | } |
78 | - | |
78 | + | |
79 | + /** | |
80 | + * 根据儿童pid新增字段内容和修改字段内容 | |
81 | + * | |
82 | + * @param request | |
83 | + * @Author: 武涛涛 | |
84 | + * @Date: 2020/7/25 15:35 | |
85 | + */ | |
86 | + @RequestMapping(method = RequestMethod.POST, value = "/pidUpBabyBuild") | |
87 | + @ResponseBody | |
88 | + public BaseResponse pidUpBabyBuild(@RequestBody BabyModelQuery request) { | |
89 | + return babyBookbuildingFacade.pidUpBabyBuild(request); | |
90 | + } | |
79 | 91 | |
80 | 92 | /** |
81 | 93 | * 删除儿童建档 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
2453897
... | ... | @@ -8,12 +8,11 @@ |
8 | 8 | import com.lyms.platform.common.result.BaseListResponse; |
9 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
10 | 10 | import com.lyms.platform.common.result.BaseResponse; |
11 | -import com.lyms.platform.common.utils.DateUtil; | |
12 | 11 | import com.lyms.platform.common.utils.StringUtils; |
13 | 12 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
14 | 13 | import com.lyms.platform.operate.web.facade.MatdeliverFollowFacade; |
15 | 14 | import com.lyms.platform.operate.web.facade.ViewFacade; |
16 | -import com.lyms.platform.operate.web.utils.CommonsHelper; | |
15 | +import com.lyms.platform.query.BabyModelQuery; | |
17 | 16 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 17 | import org.springframework.stereotype.Controller; |
19 | 18 | import org.springframework.web.bind.annotation.*; |
20 | 19 | |
... | ... | @@ -24,8 +23,9 @@ |
24 | 23 | import java.awt.*; |
25 | 24 | import java.io.IOException; |
26 | 25 | import java.io.InputStream; |
27 | -import java.util.*; | |
26 | +import java.util.ArrayList; | |
28 | 27 | import java.util.List; |
28 | +import java.util.Map; | |
29 | 29 | |
30 | 30 | /** |
31 | 31 | * 所有查看页面接口 |
... | ... | @@ -819,6 +819,18 @@ |
819 | 819 | public BaseObjectResponse getBabyBuildInfo(@PathVariable("id") String id) { |
820 | 820 | return viewFacade.getBabyBuildInfo(id); |
821 | 821 | } |
822 | + /** | |
823 | + * 小程序通过pid获取儿童的建档信息 | |
824 | + * 社保卡,就诊卡,编码等 | |
825 | + * @param param 儿童建档pid | |
826 | + * @return | |
827 | + */ | |
828 | + @RequestMapping(method = RequestMethod.POST, value = "/getBabyBuildPidInfo") | |
829 | + @ResponseBody | |
830 | + public BaseObjectResponse getBabyBuildPidInfo(@RequestBody BabyModelQuery param) { | |
831 | + return viewFacade.getBabyBuildPidInfo(param.getPid()); | |
832 | + } | |
833 | + | |
822 | 834 | |
823 | 835 | /** |
824 | 836 | * 儿童检查查看页面 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
2453897
... | ... | @@ -504,6 +504,23 @@ |
504 | 504 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
505 | 505 | } |
506 | 506 | |
507 | + public BaseResponse pidUpBabyBuild(BabyModelQuery request) { | |
508 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
509 | + babyQuery.setYn(YnEnums.YES.getId()); | |
510 | + babyQuery.setPid(request.getPid()); | |
511 | + List<BabyModel> list = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
512 | + if (CollectionUtils.isNotEmpty(list)) { | |
513 | + BabyModel model = list.get(0); | |
514 | + model.setsINCard(request.getsINCard());//儿童社保卡 | |
515 | + model.setVcCardNo(request.getVcCardNo());//就诊卡号 | |
516 | + model.setModified(new Date()); | |
517 | + babyBookbuildingService.updateBabyBuild(model, model.getId()); | |
518 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
519 | + } | |
520 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("修改失败"); | |
521 | + | |
522 | + } | |
523 | + | |
507 | 524 | |
508 | 525 | private void updateCheckBirth(BabyModel babyModel) { |
509 | 526 | BabyCheckModel checkModel = new BabyCheckModel(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
2453897
... | ... | @@ -5086,6 +5086,37 @@ |
5086 | 5086 | objectResponse.setErrormsg("成功"); |
5087 | 5087 | return objectResponse; |
5088 | 5088 | } |
5089 | + /** | |
5090 | + * 通过pid获取儿童信息 | |
5091 | + * | |
5092 | + * @param pid | |
5093 | + * @Author: 武涛涛 | |
5094 | + * @Date: 2020/7/25 15:11 | |
5095 | + */ | |
5096 | + public BaseObjectResponse getBabyBuildPidInfo(String pid) { | |
5097 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
5098 | + babyQuery.setPid(pid); | |
5099 | + babyQuery.setYn(YnEnums.YES.getId()); | |
5100 | + BabyPageResult result = new BabyPageResult(); | |
5101 | + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
5102 | + if(CollectionUtils.isNotEmpty(models)){ | |
5103 | + BabyModel babyModel = models.get(0); | |
5104 | + if(babyModel !=null){ | |
5105 | + result.setId(babyModel.getId()); | |
5106 | + result.setPid(babyModel.getPid()); | |
5107 | + result.setBabyName(babyModel.getName()); | |
5108 | + result.setEncoded(babyModel.getEncoded()); | |
5109 | + result.setsINCard(babyModel.getsINCard()); | |
5110 | + result.setVcCardNo(babyModel.getVcCardNo()); | |
5111 | + } | |
5112 | + } | |
5113 | + | |
5114 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
5115 | + objectResponse.setData(result); | |
5116 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
5117 | + objectResponse.setErrormsg("成功"); | |
5118 | + return objectResponse; | |
5119 | + } | |
5089 | 5120 | |
5090 | 5121 | public BaseObjectResponse getBabyCheckPageInfo(String id) { |
5091 | 5122 | BaseObjectResponse br = new BaseObjectResponse(); |