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