ErpCommonController.java
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.skua.modules.erp.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.core.context.BaseContextHandler;
import com.skua.core.query.QueryGenerator;
import com.skua.modules.equipment.service.IEquipmentSparepartService;
import com.skua.modules.erp.entity.ApproveRecord;
import com.skua.modules.supplies.entity.EquipmentSparepartSupplies;
import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesService;
import com.skua.modules.system.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* @auther kangwei
* @create ${year}-09-20-10:18
*/
@Slf4j
@Api(tags="ert通用方法")
@RestController("rrpCommonController")
@RequestMapping("/web/erp/common")
public class ErpCommonController {
@Autowired
private IEquipmentSparepartSuppliesService sparepartSuppliesService;//物料serivce
@AutoLog(value = "ERP-物料列表")
@ApiOperation(value = "ERP-物料列表", notes = "ERP-物料列表")
@RequestMapping(value = "/sparepartList", method = RequestMethod.GET)
public Result<IPage<EquipmentSparepartSupplies>> departUserList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
Result<IPage<EquipmentSparepartSupplies>> result = new Result<IPage<EquipmentSparepartSupplies>>();
Page<EquipmentSparepartSupplies> page = new Page<EquipmentSparepartSupplies>(pageNo, pageSize);
String depId = BaseContextHandler.getRealDepartId();//临时参数
// String username = req.getParameter("username");
IPage<EquipmentSparepartSupplies> pageList = sparepartSuppliesService.queryPageByOut(page, depId);
result.setSuccess(true);
result.setResult(pageList);
return result;
}
}