退货统计
This commit is contained in:
parent
32a2685203
commit
9939ef3c0d
|
|
@ -41,4 +41,9 @@ public class ProductStockFlowParam implements Serializable {
|
|||
*/
|
||||
@JSONField(serialize = false)
|
||||
private Long shopId;
|
||||
/**
|
||||
* 是否大于0
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private Integer isGreaterZero;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,6 +612,11 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
param.setShopId(shopId);
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
if(InOutItemEnum.ORDER_IN.value().equals(param.getInOutItem())){
|
||||
param.setInOutType(InOutTypeEnum.OUT.value());
|
||||
param.setInOutType(InOutItemEnum.ORDER_OUT.value());
|
||||
param.setIsGreaterZero(YesNoEnum.YES.value());
|
||||
}
|
||||
return PageUtil.convert(new PageInfo<>(productStockFlowMapper.getProductStockFlowList(param)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
SELECT
|
||||
sum( CASE WHEN t1.in_out_type = 'in' then t1.in_out_number end) AS inSumTotal,
|
||||
sum( CASE WHEN t1.in_out_item = 'win-in' THEN t1.in_out_number END ) AS winInNum,
|
||||
sum( CASE WHEN t1.in_out_item = 'order-in' THEN t1.in_out_number END ) AS refundInNum,
|
||||
sum( CASE WHEN t1.in_out_item = 'order-out' and t1.in_out_number > 0 THEN t1.in_out_number END ) AS refundInNum,
|
||||
sum( CASE WHEN t1.in_out_type = 'out' then abs(t1.in_out_number) end) AS outSumTotal,
|
||||
sum( CASE WHEN t1.in_out_item = 'loss-out' THEN abs(t1.in_out_number) END ) AS lossOutNum,
|
||||
abs(sum( CASE WHEN t1.in_out_item = 'order-out' THEN t1.in_out_number END )) AS salesNum,
|
||||
|
|
@ -45,6 +45,9 @@
|
|||
<if test="inOutItem != null and inOutItem != ''">
|
||||
and t1.in_out_item = #{inOutItem}
|
||||
</if>
|
||||
<if test="isGreaterZero != null">
|
||||
and t1.in_out_number > 0
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
and t1.product_id = #{productId}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue