|  |  |  | 
|---|
|  |  |  | package com.doumee.cloud.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.cloud.web.ApiController; | 
|---|
|  |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginNoRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | import com.doumee.core.exception.BusinessException; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageData; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Visits; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.LoginDTO; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.AccountLoginDTO; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.AuditApproveDTO; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.VisitMemberDTO; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.VisitRecordDTO; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.service.business.ApproveService; | 
|---|
|  |  |  | import com.doumee.service.business.MemberService; | 
|---|
|  |  |  | import com.doumee.service.business.VisitsService; | 
|---|
|  |  |  | import com.doumee.service.system.SystemLoginService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParam; | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.http.server.reactive.ServerHttpRequest; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import org.springframework.web.server.ServerWebExchange; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by IntelliJ IDEA. | 
|---|
|  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/member") | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | //@LoginNoRequired | 
|---|
|  |  |  | public class InternalWebController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | private ApproveService approveService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "内部人员首页", notes = "H5") | 
|---|
|  |  |  | @GetMapping("/internalHome") | 
|---|
|  |  |  | public ApiResponse<InternalHomeVO> internalHome(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功",approveService.getHomeData(getLoginUser(token).getMemberId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //    @ApiOperation(value = "内部人员首页", notes = "H5") | 
|---|
|  |  |  | //    @GetMapping("/internalHome") | 
|---|
|  |  |  | //    public ApiResponse<InternalHomeVO> internalHome(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | //        return ApiResponse.success("查询成功",approveService.getHomeData(getLoginUser(token).getMemberId())); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("任务中心") | 
|---|
|  |  |  | @PostMapping("/taskCenter") | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/createVisit") | 
|---|
|  |  |  | public ApiResponse createVisit(@RequestBody Visits visits,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | visits.setCreateMemberId(getLoginUser(token).getMemberId()); | 
|---|
|  |  |  | return ApiResponse.success("查询成功", visitsService.createFk(visits,false)); | 
|---|
|  |  |  | return ApiResponse.success("查询成功", visitsService.createFk(visits,false,Constants.ZERO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "审批流记录审批", notes = "内部人员") | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 2025-3-25 14:14:34  加入取消预约 待审批、审批中、已审批 | 
|---|
|  |  |  | * @param visitId | 
|---|
|  |  |  | * @param token | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("取消预约") | 
|---|
|  |  |  | @GetMapping("/visitsCancel") | 
|---|
|  |  |  | //    @CloudRequiredPermission("business:visits:cancel") | 
|---|
|  |  |  | public ApiResponse visitsCancel(@RequestParam Integer visitId,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | LoginUserInfo loginUserInfo = getLoginUser(token); | 
|---|
|  |  |  | visitsService.visitsCancel(visitId,loginUserInfo); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|