|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.controller.statistics; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.R; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountIn; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountOut; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountInMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountOutMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.annotation.CacheData; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.BaseParam; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.PageParam; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.controller.BaseController; | 
|---|
|  |  |  | import com.zy.asrs.wms.utils.ExcelUtil; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | 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 javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/api") | 
|---|
|  |  |  | public class ViewWorkCountOutController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ViewWorkCountOutMapper viewWorkCountOutMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") | 
|---|
|  |  |  | @PostMapping("/viewWorkCountOut/page") | 
|---|
|  |  |  | @CacheData(tableName = {"view_work_count_out", "man_task_log", "man_task_detl_log"}) | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<ViewWorkCountOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountOut.class); | 
|---|
|  |  |  | QueryWrapper<ViewWorkCountOut> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); | 
|---|
|  |  |  | PageParam<ViewWorkCountOut, BaseParam> page = viewWorkCountOutMapper.selectPage(pageParam, queryWrapper); | 
|---|
|  |  |  | return R.ok().add(page); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") | 
|---|
|  |  |  | @PostMapping("/viewWorkCountOut/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<ViewWorkCountOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountOut.class); | 
|---|
|  |  |  | QueryWrapper<ViewWorkCountOut> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(viewWorkCountOutMapper.selectList(queryWrapper), ViewWorkCountOut.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.controller.statistics; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.R; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountIn; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountOut; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountInMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountOutMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.annotation.CacheData; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.BaseParam; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.PageParam; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.controller.BaseController; | 
|---|
|  |  |  | import com.zy.asrs.wms.utils.ExcelUtil; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | 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 javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/api") | 
|---|
|  |  |  | public class ViewWorkCountOutController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ViewWorkCountOutMapper viewWorkCountOutMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") | 
|---|
|  |  |  | @PostMapping("/viewWorkCountOut/page") | 
|---|
|  |  |  | @CacheData(tableName = {"view_work_count_out", "man_task_log", "man_task_detl_log"}) | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<ViewWorkCountOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountOut.class); | 
|---|
|  |  |  | QueryWrapper<ViewWorkCountOut> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); | 
|---|
|  |  |  | PageParam<ViewWorkCountOut, BaseParam> page = viewWorkCountOutMapper.selectPage(pageParam, queryWrapper); | 
|---|
|  |  |  | return R.ok().add(page); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") | 
|---|
|  |  |  | @PostMapping("/viewWorkCountOut/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<ViewWorkCountOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountOut.class); | 
|---|
|  |  |  | QueryWrapper<ViewWorkCountOut> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(viewWorkCountOutMapper.selectList(queryWrapper), ViewWorkCountOut.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|