Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
public interface ConsStockFlowMapper extends BaseMapper<ConsStockFlow> {
|
||||
ConsStatisticsVo getConsStatistics(ConsInfoParam param);
|
||||
|
||||
List<ShopVendorBillRecordVO> selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId);
|
||||
List<ShopVendorBillRecordVO> selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId, @Param("key") String key);
|
||||
|
||||
List<ConsStockFlow> selectUnPaid(@Param("shopId") Long shopId, @Param("vendorIds") @NotEmpty List<Long> vendorIds);
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ public interface ShopVendorMapper extends BaseMapper<ShopVendor> {
|
||||
ShopVendorSummaryVO summary(@Param("shopId") Long shopId);
|
||||
|
||||
|
||||
List<ShopVendorBillVO> bill(@Param("shopId") Long shopId);
|
||||
List<ShopVendorBillVO> bill(@Param("shopId") Long shopId, @Param("key") String key);
|
||||
}
|
||||
|
||||
@@ -122,15 +122,15 @@ public class ShopVendorServiceImpl extends ServiceImpl<ShopVendorMapper, ShopVen
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ShopVendorBillVO> billList(Long shopId) {
|
||||
public Page<ShopVendorBillVO> billList(Long shopId, String key) {
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
return PageUtil.convert(new PageInfo<>(mapper.bill(shopId)));
|
||||
return PageUtil.convert(new PageInfo<>(mapper.bill(shopId, key)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId) {
|
||||
public Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId, String key) {
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
return PageUtil.convert(new PageInfo<>(consStockFlowMapper.selectByVendorId(shopId, vendorId)));
|
||||
return PageUtil.convert(new PageInfo<>(consStockFlowMapper.selectByVendorId(shopId, vendorId, key)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,17 +37,20 @@
|
||||
</select>
|
||||
<select id="selectByVendorId" resultType="com.czg.product.vo.ShopVendorBillRecordVO">
|
||||
SELECT id,
|
||||
con_name,
|
||||
purchase_price,
|
||||
in_out_number,
|
||||
amount_payable,
|
||||
actual_payment_amount,
|
||||
remark,
|
||||
create_time,
|
||||
(amount_payable - actual_payment_amount) as unPaidAmount
|
||||
con_name,
|
||||
purchase_price,
|
||||
in_out_number,
|
||||
amount_payable,
|
||||
actual_payment_amount,
|
||||
remark,
|
||||
create_time,
|
||||
(amount_payable - actual_payment_amount) as unPaidAmount
|
||||
FROM tb_cons_stock_flow
|
||||
WHERE shop_id = #{shopId}
|
||||
and vendor_id = #{vendorId}
|
||||
and vendor_id = #{vendorId}
|
||||
<if test="key != null and key != ''">
|
||||
and `name` like concat('%', #{key}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectUnPaid" resultType="com.czg.product.entity.ConsStockFlow">
|
||||
|
||||
@@ -22,15 +22,18 @@
|
||||
WHERE shop_id = #{shopId}
|
||||
</select>
|
||||
<select id="bill" resultType="com.czg.product.vo.ShopVendorBillVO">
|
||||
select tb_cons_stock_flow.vendor_id as vendorId,
|
||||
tb_shop_vendor.`name`,
|
||||
sum(tb_cons_stock_flow.amount_payable) as amountPayable,
|
||||
sum(tb_cons_stock_flow.actual_payment_amount) as actualPaymentAmount,
|
||||
sum(tb_cons_stock_flow.amount_payable) - sum(tb_cons_stock_flow.actual_payment_amount) as unPaidAmount,
|
||||
tb_cons_stock_flow.remark
|
||||
select tb_cons_stock_flow.vendor_id as vendorId,
|
||||
tb_shop_vendor.`name`,
|
||||
sum(tb_cons_stock_flow.amount_payable) as amountPayable,
|
||||
sum(tb_cons_stock_flow.actual_payment_amount) as actualPaymentAmount,
|
||||
sum(tb_cons_stock_flow.amount_payable) - sum(tb_cons_stock_flow.actual_payment_amount) as unPaidAmount,
|
||||
tb_cons_stock_flow.remark
|
||||
from tb_cons_stock_flow
|
||||
left join tb_shop_vendor on tb_cons_stock_flow.vendor_id = tb_shop_vendor.id
|
||||
left join tb_shop_vendor on tb_cons_stock_flow.vendor_id = tb_shop_vendor.id
|
||||
where tb_cons_stock_flow.shop_id = #{shopId}
|
||||
<if test="key != null and key != ''">
|
||||
and tb_shop_vendor.`name` like concat('%', #{key}, '%')
|
||||
</if>
|
||||
GROUP BY tb_cons_stock_flow.vendor_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user