cy
2023-11-27 20c30d26f8bab22a4cb6b6459962fa92d6da490f
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
package com.consum.base.controller;
 
import cn.hutool.core.convert.Convert;
import com.consum.base.BaseController;
import com.consum.base.service.LWhGoodsService;
import com.consum.model.po.FinSysTenantUser;
import com.walker.web.ResponseValue;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
 
/**
 * @ClassName LWhHomeStatisticsController
 * @Author cy
 * @Date 2023/11/27
 * @Description
 * @Version 1.0
 **/
 
@RestController
@RequestMapping("/pc/warehouse/homeStatistics")
@Api(value = "首页统计", tags = "首页统计")
public class LWhHomeStatisticsController extends BaseController {
    @Resource
    private LWhGoodsService lWhGoodsService;
 
    /**
     * 物品数量金额统计
     *
     * @return
     */
    @GetMapping("getGoodsNumPrice")
    public ResponseValue goodsNumPrice() {
        /*当前登录人只能看到自己机构下的列表*/
        FinSysTenantUser sysInfo = this.getSysInfo();
        String tenantId = sysInfo.getTenantId();
        List<Map<String, Object>> goodsNumPrice = lWhGoodsService.getGoodsNumPrice(Convert.toLong(tenantId, 0l));
        return ResponseValue.success(goodsNumPrice.get(0));
    }
}