package com.ynxbd.common.action; import com.ynxbd.common.action.base.BaseAction; import com.ynxbd.common.result.Result; import com.ynxbd.common.result.ResultEnum; import com.ynxbd.wx.config.TZReserveConfig; import lombok.extern.slf4j.Slf4j; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; /** * @author 李进才 * @ClassName MeTechnologyReAction * @Description TODO * @date 2024/06/18 14:53:00 */ @Slf4j @Namespace("/meTechnologyRe") public class MeTechnologyReAction extends BaseAction { /** * 获取可预约的订单 * * @param patientId 患者ID * @param startDate 开始日期 * @param endDate 结束日期 * @return 结果 */ @Action("getCanBookOrders") public Result getCanBookOrders(String patientId, String startDate, String endDate) { log.info("[天助预约平台接口参数]获取可预约的订单 patientId={},startDate={},endDate={}", patientId, startDate, endDate); if (startDate == null || endDate == null || patientId == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } patientId = decodeReqString(patientId); return TZReserveConfig.getCanBookOrders(patientId, startDate, endDate); } /** * 获取号源统计信息 * * @param patientId 患者ID * @param startDate 开始日期 * @param endDate 结束日期 * @param docDetailedNo 详细单号 * @param intervalTimeType 时间间隔类型 * @return 结果 */ @Action("getNumberSourceStatistics") public Result getNumberSourceStatistics(String patientId, String startDate, String endDate, String docDetailedNo, String intervalTimeType) { log.info("[天助预约平台接口参数]获取号源统计信息 patientId={},startDate={},endDate={},docDetailedNo={},intervalTimeType={}", patientId, startDate, endDate, docDetailedNo, intervalTimeType); if (patientId == null || startDate == null || endDate == null || docDetailedNo == null || intervalTimeType == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } patientId = decodeReqString(patientId); return TZReserveConfig.getNumberSourceStatistics(patientId, startDate, endDate, docDetailedNo, intervalTimeType); } /** * 获取号源详细信息 * * @param examRoomOrQueue 检查队列 * @param startDate 开始日期 * @param endDate 结束日期 * @param appFromID 申请表ID * @return 结果 */ @Action("getNumberSourceDetails") public Result getNumberSourceDetails(String examRoomOrQueue, String startDate, String endDate, String appFromID) { log.info("[天助预约平台接口参数]获取号源详细信息 examRoomOrQueue={},startDate={},endDate={},appFromID={}", examRoomOrQueue, startDate, endDate, appFromID); if (examRoomOrQueue == null || startDate == null || endDate == null || appFromID == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } return TZReserveConfig.getNumberSourceDetails(examRoomOrQueue, startDate, endDate, appFromID); } /** * 锁定预约号 * * @param appFormID 申请表ID * @param examRoomOrQueue 检查队列 * @param beginDateTime 开始时间 * @param endDateTime 结束时间 * @param lockStatus 锁定状态 * @return 结果 */ @Action("lockedBookNo") public Result lockedBookNo(String appFormID, String examRoomOrQueue, String beginDateTime, String endDateTime, Boolean lockStatus) { log.info("[天助预约平台接口参数]锁定预约号 appFormID={},examRoomOrQueue={},beginDateTime={},endDateTime={},lockStatus={}", appFormID, examRoomOrQueue, beginDateTime, endDateTime, lockStatus); if (appFormID == null || examRoomOrQueue == null || beginDateTime == null || endDateTime == null || lockStatus == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } Boolean result = TZReserveConfig.lockedBookNo(appFormID, examRoomOrQueue, beginDateTime, endDateTime, lockStatus); return result ? Result.success() : Result.error(); } /** * 确定改约 * * @param appFormID 申请表ID * @param examRoomOrQueue 检查队列 * @param beginDateTime 开始时间 * @param endDateTime 结束时间 * @param patientId 患者ID * @param patientName 患者姓名 * @return 结果 */ @Action("getBookedDateTime") public Result getBookedDateTime(String appFormID, String examRoomOrQueue, String beginDateTime, String endDateTime, String patientId, String patientName) { log.info("[天助预约平台接口参数]确定改约 appFormId={},examRoomOrQueue={},beginDateTime={},endDateTime={},patientId={},patientName={}", appFormID, examRoomOrQueue, beginDateTime, endDateTime, patientId, patientName); if (appFormID == null || examRoomOrQueue == null || beginDateTime == null || endDateTime == null || patientId == null || patientName == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } patientId = decodeReqString(patientId); return TZReserveConfig.getBookedDateTime(appFormID, examRoomOrQueue, beginDateTime, endDateTime, patientId, patientName); } }