Blame view

src/main/java/com/zteits/oa/report/web/AsraOpController.java 2.08 KB
a68c5698   xiejianpeng   员工管理
1
  package com.zteits.oa.report.web;
159eaad1   王富生   集成swagger
2
  
2f6df64b   xiejianpeng   员工管理
3
  import com.alibaba.fastjson.JSONObject;
1b9e8898   王富生   提交
4
5
  import com.zteits.oa.api.base.bean.BizResult;
  import com.zteits.oa.api.base.bean.PageBean;
7deb21f3   xiejianpeng   员工管理
6
  import com.zteits.oa.api.base.constants.SessionEnum;
1b9e8898   王富生   提交
7
8
  import com.zteits.oa.api.dto.asraop.AsraOpDTO;
  import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq;
2f6df64b   xiejianpeng   员工管理
9
  import com.zteits.oa.api.service.report.query.AsraOpQueryService;
ece77815   xiejianpeng   工时填报管理
10
  import com.zteits.oa.report.web.vo.EasyUIDataGridVO;
159eaad1   王富生   集成swagger
11
  import io.swagger.annotations.Api;
2f6df64b   xiejianpeng   员工管理
12
13
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
a68c5698   xiejianpeng   员工管理
14
  import org.springframework.beans.factory.annotation.Autowired;
a68c5698   xiejianpeng   员工管理
15
16
17
18
19
20
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.RestController;
  
  import javax.servlet.http.HttpServletRequest;
159eaad1   王富生   集成swagger
21
  
a68c5698   xiejianpeng   员工管理
22
  @Api(value = "日报系统-员工管理", description = "日报系统-员工管理")
159eaad1   王富生   集成swagger
23
  @RestController
a68c5698   xiejianpeng   员工管理
24
  @RequestMapping("/asraOp")
ece77815   xiejianpeng   工时填报管理
25
  public class AsraOpController extends BizController {
a68c5698   xiejianpeng   员工管理
26
  
2f6df64b   xiejianpeng   员工管理
27
28
29
30
31
  	private static final Logger logger = LoggerFactory.getLogger(AsraOpController.class);
  
  	@Autowired
  	private AsraOpQueryService asraOpQueryService;
  
2f6df64b   xiejianpeng   员工管理
32
  
a68c5698   xiejianpeng   员工管理
33
  	@RequestMapping(value="/queryAsraOpPage",method = RequestMethod.POST)
ece77815   xiejianpeng   工时填报管理
34
  	public BizResult<EasyUIDataGridVO<AsraOpDTO>> queryAsraOpPage(@RequestBody AsraOpQueryReq asraOpQueryReq, HttpServletRequest request) throws IllegalAccessException, InstantiationException {
2f6df64b   xiejianpeng   员工管理
35
36
  		logger.info("日报系统-员工管理-根据登录人分页查询员工信息入参:{}", JSONObject.toJSON(asraOpQueryReq));
  		/**1.根据当前登录人查询登录人下面管理的员工-缓存中获取*/
7deb21f3   xiejianpeng   员工管理
37
  		AsraOpDTO asraOpDTO = (AsraOpDTO)request.getSession().getAttribute(SessionEnum.USER_INFO.key());
4b2bb18a   xiejianpeng   登录权限处理
38
  		asraOpQueryReq.setOpIdLists(asraOpDTO.getOpIds());
2f6df64b   xiejianpeng   员工管理
39
40
  		BizResult<PageBean<AsraOpDTO>>  result = asraOpQueryService.queryAsraOpForPage(asraOpQueryReq);
  		logger.info("日报系统-员工管理-根据登录人分页查询员工信息结果:{}", JSONObject.toJSON(result));
ece77815   xiejianpeng   工时填报管理
41
  		return returnJqGridData(result, AsraOpDTO.class);
159eaad1   王富生   集成swagger
42
43
44
  	}
  
  }