|
|
@ -5,6 +5,7 @@ import com.epmet.commons.tools.annotation.RequirePermission; |
|
|
|
import com.epmet.commons.tools.enums.RequirePermissionEnum; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO; |
|
|
@ -15,14 +16,13 @@ import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.result.*; |
|
|
|
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; |
|
|
|
import com.epmet.dataaggre.excel.StaffPatrollExcel; |
|
|
|
import com.epmet.dataaggre.service.datastats.DataStatsService; |
|
|
|
import com.epmet.dataaggre.service.epmetuser.EpmetUserService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
@ -211,4 +211,13 @@ public class EpmetUserController { |
|
|
|
return new Result<UserEventLogoResultDTO>().ok(epmetUserService.mentionMeEvent(tokenDto.getUserId())); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("export/staffpatroll") |
|
|
|
public void export(@LoginUser TokenDto tokenDto, @RequestBody StaffListFormDTO formDTO, HttpServletResponse response) throws Exception { |
|
|
|
ValidatorUtils.validateEntity(formDTO, StaffListFormDTO.Staff.class); |
|
|
|
formDTO.setUserId(tokenDto.getUserId()); |
|
|
|
//formDTO.setUserId("73ae6280e46a6653a5605d51d5462725");
|
|
|
|
List<StaffListResultDTO> resultDTOS = epmetUserService.staffPatrolList(formDTO); |
|
|
|
ExcelUtils.exportExcelToTarget(response, null, resultDTOS, StaffPatrollExcel.class); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|