diff --git a/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml b/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
index 2648be2..c8b149d 100644
--- a/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
+++ b/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
@@ -223,9 +223,7 @@ select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,foll
and next_time = #{nextTime,jdbcType=TIMESTAMP}
-
- and ifdel = #{ifdel,jdbcType=INTEGER}
-
+ and ifdel =0
and ifclose = #{ifclose,jdbcType=INTEGER}
@@ -286,6 +284,7 @@ select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,foll
and baby_id = #{babyId,jdbcType=VARCHAR}
+ and ifdel = 0
diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
index 7e2db59..aed68ea 100644
--- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
+++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
@@ -500,8 +500,8 @@ public class FollowUpController extends BaseController {
@TokenRequired
public BaseResponse addBabyPatientExtendEarFollowUp(@Valid BabyPatientExtendEarFollowUp obj,
HttpServletRequest request) {
- // BaseResponse basResp = validata(obj);
- // if (basResp.getErrorcode() != 0) return basResp;
+ BaseResponse basResp = validata(obj);
+ if (basResp.getErrorcode() != 0) return basResp;
//获取当前登录用户ID
LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
if (loginState == null) {
@@ -536,37 +536,37 @@ public class FollowUpController extends BaseController {
return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访时间");
}
- if (obj.getFollowAddr() == null) {//随访地址
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访地址");
- }
-
- if (obj.getMarkTime() == null) {//确诊时间
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊时间");
- }
- if (obj.getMarkResult() == null) {//确诊结果
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊结果");
- }
- if (obj.getMarkDetail() == null) {//确诊详情
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊详情");
- }
- if (obj.getFollowInfo() == null) {//随访记录
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访记录");
- }
- if (obj.getGuideOpinion() == null) {//指导意见
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入指导意见");
- }
- if (obj.getFollowDoctorName() == null) {//随访医生名称
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医生名称");
- }
+ // if (obj.getFollowAddr() == null) {//随访地址
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访地址");
+ // }
+ //
+ // if (obj.getMarkTime() == null) {//确诊时间
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊时间");
+ // }
+ // if (obj.getMarkResult() == null) {//确诊结果
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊结果");
+ // }
+ // if (obj.getMarkDetail() == null) {//确诊详情
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入确诊详情");
+ // }
+ // if (obj.getFollowInfo() == null) {//随访记录
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访记录");
+ // }
+ // if (obj.getGuideOpinion() == null) {//指导意见
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入指导意见");
+ // }
+ // if (obj.getFollowDoctorName() == null) {//随访医生名称
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医生名称");
+ // }
if (obj.getFollowDoctorId() == null) {//随访医生ID
return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入随访医生ID");
}
- if (obj.getNextTime() == null) {//预约复查时间
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入预约复查时间");
- }
- if (obj.getHospitalId() == null) {//医院ID
- return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医院ID");
- }
+ // if (obj.getNextTime() == null) {//预约复查时间
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入预约复查时间");
+ // }
+ // if (obj.getHospitalId() == null) {//医院ID
+ // return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入医院ID");
+ // }
return baseResp;
}
}
diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
index 5a7c295..d7760ba 100644
--- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
+++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
@@ -17,10 +17,7 @@ import com.lyms.platform.operate.web.request.HearDiaManageRequest;
import com.lyms.platform.operate.web.result.HearDiagnManageListResult;
import com.lyms.platform.operate.web.result.HearingDiagnoseListResult;
import com.lyms.platform.permission.model.*;
-import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService;
-import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService;
-import com.lyms.platform.permission.service.ChildrenPersonService;
-import com.lyms.platform.permission.service.UsersService;
+import com.lyms.platform.permission.service.*;
import com.lyms.platform.pojo.BabyModel;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
@@ -53,8 +50,84 @@ public class HearDiagnManageController extends BaseController {
private ChildrenPersonService childrenPersonService;
@Autowired
private BabyService babyService;
+ //儿童听诊记录
@Autowired
private BabyPatientExtendEarHearingDiagnoseService hearingDiagnoseService;
+ //儿童听力随访
+ @Autowired
+ private BabyPatientExtendEarFollowUpService babyPatientExtendEarFollowUpService;
+
+ /**
+ * 获取儿童听筛记录
+ *
+ * @return
+ */
+ @RequestMapping(method = RequestMethod.GET, value = "/getHistoryList")
+ @ResponseBody
+ @TokenRequired
+ public BaseResponse getHistoryList(String babyId, HttpServletRequest request) {
+ //获取当前登录用户ID
+ LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
+ if (loginState == null) {
+ return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录");
+ }
+//当前登录人医院Id
+ String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
+ BabyPatientExtendEarScreenQuery earScreenQuery = new BabyPatientExtendEarScreenQuery();
+ earScreenQuery.setBabyId(babyId);
+ //儿童听筛记录
+ List earScreenList = screenService.queryBabyPatientExtendEarScreen(earScreenQuery);
+ BabyPatientExtendEarHearingDiagnoseQuery hearingDiagnoseQuery = new BabyPatientExtendEarHearingDiagnoseQuery();
+ hearingDiagnoseQuery.setBabyId(babyId);
+ hearingDiagnoseQuery.setIfdel(0);
+ //儿童听力诊断记录
+ List hearingDiagnoseList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hearingDiagnoseQuery);
+ BabyPatientExtendEarFollowUpQuery earFollowUpQuery = new BabyPatientExtendEarFollowUpQuery();
+ earFollowUpQuery.setBabyId(babyId);
+ //儿童听力随访记录
+ List earFollowUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUpByBaby(earFollowUpQuery);
+
+ List