无关风月
2024-12-20 67593f1dc3c4cd78de6ad911e870a2a5b1d5411d
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
50
51
52
53
54
55
package com.jilongda.manage.controller;
 
 
import com.jilongda.common.basic.ApiResult;
import com.jilongda.common.basic.PageInfo;
import com.jilongda.manage.query.TFrameGoodsQuery;
import com.jilongda.manage.query.TInventoryQuery;
import com.jilongda.manage.service.TInventoryFrameDetailService;
import com.jilongda.manage.service.TInventoryLensDetailService;
import com.jilongda.manage.service.TInventoryService;
import com.jilongda.manage.utils.LoginInfoUtil;
import com.jilongda.manage.vo.TFrameGoodsVO;
import com.jilongda.manage.vo.TInventoryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.util.StringUtils;
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.annotation.Resource;
 
/**
 * <p>
 * 盘点表 前端控制器
 * </p>
 *
 * @author 无关风月
 * @since 2024-12-09
 */
@RestController
@Api(tags = "盘点管理")
@RequestMapping("/t-inventory")
public class TInventoryController {
 
    @Resource
    private TInventoryService inventoryService;
    @Resource
    private TInventoryFrameDetailService inventoryFrameDetailService;
    @Resource
    private TInventoryLensDetailService inventoryLensDetailService;
    @Resource
    private LoginInfoUtil loginInfoUtil;
    @ApiOperation(value = "盘点分页列表")
    @PostMapping(value = "/pageList")
    public ApiResult<PageInfo<TInventoryVO>> pageList(@RequestBody TInventoryQuery query) {
        if (StringUtils.hasLength(query.getStartTime())){
            query.setStartTime(query.getStartTime()+" 00:00:00");
            query.setEndTime(query.getEndTime()+" 23:59:59");
        }
        return ApiResult.success(inventoryService.pageList(query));
    }
}