# EndOfShiftWidgetController.java

    package cloud.wconnect.frontoffice.controller.endofshift;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.component.BeanMapper;
    import cloud.wconnect.commonlib.component.SessionContext;
    import cloud.wconnect.frontoffice.entity.endofshift.ShiftReportInfo;
    import cloud.wconnect.frontoffice.pojo.vo.endofshift.widget.WakeupCallVO;
    import cloud.wconnect.frontoffice.service.endofshift.IShiftReportInfoService;
    import cloud.wconnect.frontoffice.service.endofshift.IShiftWakeupCallService;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.PathVariable;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;

    import java.util.List;

    /**
     * 组件控制层
     *
     * @author lichen
     * @date 2023/12/8
     */
    @RestController
    @RequestMapping("/end-of-shift")
    public class EndOfShiftWidgetController {

        @Autowired
        private SessionContext sessionContext;
        @Autowired
        private IShiftWakeupCallService wakeupCallService;
        @Autowired
        private IShiftReportInfoService shiftReportInfoService;
        @Autowired
        private BeanMapper beanMapper;

        /**
         * 查询未完成的叫醒服务
         *
         * @param property     资产标识
         * @param endOfShiftId 排班id
         * @return java.util.List<cloud.wconnect.frontoffice.pojo.vo.endofshiftreport.widget.WakeupCallVO>
         * @author lichen
         * @date 2023/12/8
         */
        @ApiId(986)
        @GetMapping("/{endOfShiftId:\\d+}/widget/walk-up-call")
        public List<WakeupCallVO> listWakeupCall(String property, @PathVariable Integer endOfShiftId) {
            int propertyId = sessionContext.getPropertyId(property);
            //校验排班基础信息是否存在
            ShiftReportInfo shiftReportInfo = shiftReportInfoService.checkExist(endOfShiftId);
            //校验是否归属于当前资产
            shiftReportInfoService.checkBelong(propertyId, shiftReportInfo);
            //查询叫醒服务数据
            return beanMapper.mapList(wakeupCallService.listShiftIdAndStatus(shiftReportInfo.getId(), false), WakeupCallVO.class);
        }

    }