Commit 17aac347227e236f9076f7cb062d34014acac49a
1 parent
d405ce3f02
Exists in
master
and in
1 other branch
页面初始化数据
Showing 3 changed files with 81 additions and 6 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
17aac34
| ... | ... | @@ -2,18 +2,30 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.annotation.TokenRequired; |
| 4 | 4 | import com.lyms.platform.common.base.BaseController; |
| 5 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 6 | +import com.lyms.platform.common.enums.ConfirmedEnums; | |
| 7 | +import com.lyms.platform.common.enums.HearingDiagnosisEnums; | |
| 8 | +import com.lyms.platform.common.enums.HighRiskEnum; | |
| 5 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 10 | +import com.lyms.platform.common.result.BaseResponse; | |
| 11 | +import com.lyms.platform.operate.web.result.InitFollowUp; | |
| 12 | +import com.lyms.platform.operate.web.result.InitHearingDiagnose; | |
| 6 | 13 | import com.lyms.platform.permission.model.BabyPatientExtendEar; |
| 7 | 14 | import com.lyms.platform.permission.model.BabyPatientExtendEarBirth; |
| 8 | 15 | import com.lyms.platform.permission.model.BabyPatientExtendEarFamily; |
| 9 | 16 | import com.lyms.platform.permission.model.BabyPatientExtendEarMother; |
| 10 | 17 | import com.lyms.platform.permission.service.BabyPatientExtendEarService; |
| 11 | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 19 | +import org.springframework.stereotype.Controller; | |
| 12 | 20 | import org.springframework.web.bind.annotation.RequestMapping; |
| 13 | 21 | import org.springframework.web.bind.annotation.RequestMethod; |
| 14 | 22 | import org.springframework.web.bind.annotation.ResponseBody; |
| 15 | 23 | |
| 16 | 24 | import javax.servlet.http.HttpServletRequest; |
| 25 | +import java.util.ArrayList; | |
| 26 | +import java.util.HashMap; | |
| 27 | +import java.util.List; | |
| 28 | +import java.util.Map; | |
| 17 | 29 | |
| 18 | 30 | /** |
| 19 | 31 | * 儿童建档相关逻辑 |
| 20 | 32 | |
| ... | ... | @@ -21,12 +33,73 @@ |
| 21 | 33 | * @Date: 2017/5/10 0010 18:25 |
| 22 | 34 | * @Version: V1.0 |
| 23 | 35 | */ |
| 24 | -//@RequestMapping("/ear") | |
| 25 | -//@Controller | |
| 36 | +@RequestMapping("/ear") | |
| 37 | +@Controller | |
| 26 | 38 | public class EarController extends BaseController { |
| 27 | 39 | |
| 28 | 40 | @Autowired |
| 29 | 41 | private BabyPatientExtendEarService babyPatientExtendEarService; |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 获取随访页面初始数据 | |
| 45 | + * | |
| 46 | + * @return | |
| 47 | + */ | |
| 48 | + @RequestMapping(method = RequestMethod.GET, value = "/initFollowUp") | |
| 49 | + @ResponseBody | |
| 50 | + public BaseResponse initFollowUp() { | |
| 51 | + //根据条件查询基础配置信息表 | |
| 52 | + InitFollowUp initHearingDiagnose = new InitFollowUp(); | |
| 53 | + ConfirmedEnums[] confirEnums = ConfirmedEnums.values(); | |
| 54 | + List<Map<Integer, String>> confirmResult = new ArrayList<>(); | |
| 55 | + for (ConfirmedEnums cn : confirEnums) { | |
| 56 | + Map<Integer, String> map = new HashMap<>(); | |
| 57 | + map.put(cn.getId(), cn.getName()); | |
| 58 | + confirmResult.add(map); | |
| 59 | + } | |
| 60 | + initHearingDiagnose.setConfirmResult(confirmResult); | |
| 61 | + return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 获取听力诊断页面初始数据 | |
| 66 | + * | |
| 67 | + * @return | |
| 68 | + */ | |
| 69 | + @RequestMapping(method = RequestMethod.GET, value = "/initHearingDiagnose") | |
| 70 | + @ResponseBody | |
| 71 | + public BaseResponse initHearingDiagnose() { | |
| 72 | + //根据条件查询基础配置信息表 | |
| 73 | + InitHearingDiagnose initHearingDiagnose = new InitHearingDiagnose(); | |
| 74 | + ConfirmedEnums[] confirEnums = ConfirmedEnums.values(); | |
| 75 | + List<Map<Integer, String>> confirmResult = new ArrayList<>(); | |
| 76 | + for (ConfirmedEnums cn : confirEnums) { | |
| 77 | + Map<Integer, String> map = new HashMap<>(); | |
| 78 | + map.put(cn.getId(), cn.getName()); | |
| 79 | + confirmResult.add(map); | |
| 80 | + } | |
| 81 | + initHearingDiagnose.setConfirmResult(confirmResult); | |
| 82 | + | |
| 83 | + HearingDiagnosisEnums[] hdEnums = HearingDiagnosisEnums.values(); | |
| 84 | + List<Map<Integer, String>> hdList = new ArrayList<>(); | |
| 85 | + for (HearingDiagnosisEnums cn : hdEnums) { | |
| 86 | + Map<Integer, String> map = new HashMap<>(); | |
| 87 | + map.put(cn.getId(), cn.getName()); | |
| 88 | + hdList.add(map); | |
| 89 | + } | |
| 90 | + initHearingDiagnose.setHearingDiagnosis(hdList); | |
| 91 | + | |
| 92 | + HighRiskEnum[] hrEnums = HighRiskEnum.values(); | |
| 93 | + List<Map<Integer, String>> hrList = new ArrayList<>(); | |
| 94 | + for (HighRiskEnum cn : hrEnums) { | |
| 95 | + Map<Integer, String> map = new HashMap<>(); | |
| 96 | + map.put(cn.getId(), cn.getName()); | |
| 97 | + hrList.add(map); | |
| 98 | + } | |
| 99 | + initHearingDiagnose.setHighRiskConfirms(hrList); | |
| 100 | + | |
| 101 | + return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
| 102 | + } | |
| 30 | 103 | |
| 31 | 104 | /** |
| 32 | 105 | * 添加儿童建档 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
17aac34
| ... | ... | @@ -18,6 +18,7 @@ |
| 18 | 18 | import com.lyms.platform.pojo.BabyModel; |
| 19 | 19 | import org.apache.commons.lang.StringUtils; |
| 20 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | +import org.springframework.stereotype.Controller; | |
| 21 | 22 | import org.springframework.web.bind.annotation.RequestMapping; |
| 22 | 23 | import org.springframework.web.bind.annotation.RequestMethod; |
| 23 | 24 | import org.springframework.web.bind.annotation.ResponseBody; |
| ... | ... | @@ -30,7 +31,7 @@ |
| 30 | 31 | * @createTime 2017年05月09日 16时54分 |
| 31 | 32 | * @discription 跟踪相关接口 |
| 32 | 33 | */ |
| 33 | -//@Controller | |
| 34 | +@Controller | |
| 34 | 35 | public class FollowUpController extends BaseController { |
| 35 | 36 | @Autowired |
| 36 | 37 | private BabyPatientExtendEarFollowUpService babyPatientExtendEarFollowUpService; |
| ... | ... | @@ -76,7 +77,7 @@ |
| 76 | 77 | * @param fuId 随访记录id |
| 77 | 78 | * @return |
| 78 | 79 | */ |
| 79 | - @RequestMapping(method = RequestMethod.POST, value = "/queryBabyPatientExtendEarFollowUpList") | |
| 80 | + @RequestMapping(method = RequestMethod.POST, value = "/queryBabyPatientExtendEarFollowUpOne") | |
| 80 | 81 | @ResponseBody |
| 81 | 82 | public BaseResponse queryBabyPatientExtendEarFollowUpOne(String fuId) { |
| 82 | 83 | BabyPatientExtendEarFollowUp followUp = babyPatientExtendEarFollowUpService.getBabyPatientExtendEarFollowUp(fuId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
17aac34
| ... | ... | @@ -18,6 +18,7 @@ |
| 18 | 18 | import com.lyms.platform.query.BasicConfigQuery; |
| 19 | 19 | import org.apache.commons.lang.StringUtils; |
| 20 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | +import org.springframework.stereotype.Controller; | |
| 21 | 22 | import org.springframework.web.bind.annotation.RequestMapping; |
| 22 | 23 | import org.springframework.web.bind.annotation.RequestMethod; |
| 23 | 24 | import org.springframework.web.bind.annotation.ResponseBody; |
| ... | ... | @@ -31,7 +32,7 @@ |
| 31 | 32 | * @createTime 2017年05月09日 16时54分 |
| 32 | 33 | * @discription 跟踪相关接口 |
| 33 | 34 | */ |
| 34 | -//@Controller | |
| 35 | +@Controller | |
| 35 | 36 | public class HearingDiagnoseController extends BaseController { |
| 36 | 37 | @Autowired |
| 37 | 38 | private BabyPatientExtendEarHearingDiagnoseService hearingDiagnoseService; |
| ... | ... | @@ -48,7 +49,7 @@ |
| 48 | 49 | * @param hdId 听力诊断记录id |
| 49 | 50 | * @return |
| 50 | 51 | */ |
| 51 | - @RequestMapping(method = RequestMethod.GET, value = "/queryHearingDiagnoseList") | |
| 52 | + @RequestMapping(method = RequestMethod.GET, value = "/queryHearingDiagnoseOne") | |
| 52 | 53 | @ResponseBody |
| 53 | 54 | public BaseResponse queryHearingDiagnoseOne(String hdId ){ |
| 54 | 55 | BabyPatientExtendEarHearingDiagnose behd = hearingDiagnoseService.getBabyPatientExtendEarHearingDiagnose(hdId); |