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));
|
}
|
}
|