WangHan
2025-04-02 a8ba678a3fe5a39da2c732014cebbb66e408e97c
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
package com.consum.base.controller;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.consum.base.BaseController;
import com.consum.base.core.utils.CommonUtil;
import com.consum.base.pojo.query.LWhGoodsStatisQry;
import com.consum.base.service.LWhGoodsStatisticsService;
import com.consum.model.po.FinSysTenantUser;
import com.iplatform.model.po.S_user_core;
import com.walker.web.ResponseValue;
 
 
 
/**
 * @ClassName LWhGoodsStatisticsController
 * @Author cy
 * @Date 2023/11/21
 * @Description 物品统计
 * @Version 1.0
 **/
// @Api(value = "物品统计", tags = "物品统计")
@RestController
@RequestMapping("/pc/warehouse/goodsStatistics")
public class LWhGoodsStatisticsController extends BaseController {
 
    @Resource
    private LWhGoodsStatisticsService lWhGoodsStatisticsService;
 
    @GetMapping("")
    public ResponseValue getWhGoodsStatisList() {
        S_user_core currentUser = this.getCurrentUser();
        if (currentUser == null) {
            return ResponseValue.error("登录用户信息不存在");
        }
        LWhGoodsStatisQry param = CommonUtil.getObjFromReq(LWhGoodsStatisQry.class);
        LWhGoodsStatisQry qry = new LWhGoodsStatisQry();
        CommonUtil.copyProperties(param, qry);
        param = qry;
        /*当前登录人只能看到自己机构下的列表*/
        FinSysTenantUser sysInfo = this.getSysInfo();
        String tenantId = sysInfo.getTenantId();
        Long paramAgencyId = param.getAgencyId();
        if (paramAgencyId == null || !paramAgencyId.toString().startsWith(tenantId)) {
            param.setAgencyId(Long.valueOf(tenantId));
        }
        return ResponseValue.success(lWhGoodsStatisticsService.getWhGoodsStatisList(param));
 
    }
}