|
@ -2,8 +2,11 @@ package com.epmet.controller; |
|
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.constant.ActConstant; |
|
|
import com.epmet.constant.ActConstant; |
|
@ -11,6 +14,7 @@ import com.epmet.dto.form.work.*; |
|
|
import com.epmet.dto.result.work.*; |
|
|
import com.epmet.dto.result.work.*; |
|
|
import com.epmet.service.WorkActService; |
|
|
import com.epmet.service.WorkActService; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
@ -323,6 +327,10 @@ public class WorkActController { |
|
|
public Result<PageData<ActPageResDTO>> pageList(@LoginUser TokenDto tokenDto, @RequestBody ActPageFormDTO formDTO){ |
|
|
public Result<PageData<ActPageResDTO>> pageList(@LoginUser TokenDto tokenDto, @RequestBody ActPageFormDTO formDTO){ |
|
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
formDTO.setUserId(tokenDto.getUserId()); |
|
|
formDTO.setUserId(tokenDto.getUserId()); |
|
|
|
|
|
if(!StringUtils.hasText(formDTO.getAgencyId())) { |
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
|
|
|
|
|
formDTO.setAgencyId(staffInfoCacheResult.getAgencyId()); |
|
|
|
|
|
} |
|
|
PageData<ActPageResDTO> page = workActService.pageList(formDTO); |
|
|
PageData<ActPageResDTO> page = workActService.pageList(formDTO); |
|
|
return new Result<PageData<ActPageResDTO>>().ok(page); |
|
|
return new Result<PageData<ActPageResDTO>>().ok(page); |
|
|
} |
|
|
} |
|
|