商品统计
This commit is contained in:
@@ -13,6 +13,7 @@ import com.czg.product.entity.ProductStockFlow;
|
||||
import com.czg.product.param.*;
|
||||
import com.czg.product.service.ProdConsRelationService;
|
||||
import com.czg.product.service.ProductService;
|
||||
import com.czg.product.vo.ProductStatisticsVo;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.utils.AssertUtil;
|
||||
@@ -232,11 +233,11 @@ public class ProductController {
|
||||
@GetMapping("statistics")
|
||||
@OperationLog("商品-统计")
|
||||
//@SaAdminCheckPermission("product:statistics")
|
||||
public CzgResult<Void> statistics(ProductInfoParam param) {
|
||||
public CzgResult<ProductStatisticsVo> statistics(ProductInfoParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
param.setShopId(shopId);
|
||||
productService.getProductStatistics(param);
|
||||
return CzgResult.success();
|
||||
ProductStatisticsVo data = productService.getProductStatistics(param);
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 商品统计
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2025-03-12 17:34
|
||||
*/
|
||||
@@ -45,4 +46,32 @@ public class ProductStatisticsVo implements Serializable {
|
||||
* 报损数量
|
||||
*/
|
||||
private BigDecimal damageNum = BigDecimal.ZERO;
|
||||
|
||||
public BigDecimal getInSumTotal() {
|
||||
return inSumTotal == null ? BigDecimal.ZERO : inSumTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getWinInNum() {
|
||||
return winInNum == null ? BigDecimal.ZERO : winInNum;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundInNum() {
|
||||
return refundInNum == null ? BigDecimal.ZERO : refundInNum;
|
||||
}
|
||||
|
||||
public BigDecimal getOutSumTotal() {
|
||||
return outSumTotal == null ? BigDecimal.ZERO : outSumTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getLossOutNum() {
|
||||
return lossOutNum == null ? BigDecimal.ZERO : lossOutNum;
|
||||
}
|
||||
|
||||
public BigDecimal getSalesNum() {
|
||||
return salesNum == null ? BigDecimal.ZERO : salesNum;
|
||||
}
|
||||
|
||||
public BigDecimal getDamageNum() {
|
||||
return damageNum == null ? BigDecimal.ZERO : damageNum;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user