winter 1 год назад
Родитель
Сommit
f4c936b3f4
5 измененных файлов: 8 добавлений и 23 удалений
  1. +1
    -2
      mallinkService/src/main/java/com/iformall/mapper/WxAllBillMapper.java
  2. +1
    -2
      mallinkService/src/main/java/com/iformall/service/WxAllBillService.java
  3. +2
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxAllBillServiceImpl.java
  4. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java
  5. +2
    -9
      mallinkService/src/main/resources/mapper/WxAllBillMapper.xml

+ 1
- 2
mallinkService/src/main/java/com/iformall/mapper/WxAllBillMapper.java Просмотреть файл

@@ -25,8 +25,7 @@ public interface WxAllBillMapper extends CommonMapper<WxAllBill, Long> {
List<Long> getShopIdList(WxAllBill record);
BigDecimal getMerchantAdvanceGroupSum(WxAllBill wxBillRent);
BigDecimal getMerchantDepositGroupSum(WxAllBill wxBillRent);
BigDecimal getRemainAdvanceSum(WxAllBill wxBillRent);
List<WxAllBill> getMerchantAdvanceGroupSumList(WxAllBill wxBillRent);
List<WxBillNotify> getBillNotifyList(WxAllBill record);


+ 1
- 2
mallinkService/src/main/java/com/iformall/service/WxAllBillService.java Просмотреть файл

@@ -57,8 +57,7 @@ public interface WxAllBillService {
void completeBill(EnumBillStatus status,WxShop wxShop,MallUserInfo user);
BigDecimal getBillSetoffSum(WxAllBill wxBillRent);
BigDecimal getBillDepositSum(WxAllBill wxBillRent);
BigDecimal getRemainAdvanceSum(WxAllBill wxBillRent);
List<WxAllBill> getMerchantAdvanceGroupSumList(WxAllBill wxBillRent);
List<WxAllBill> list(WxAllBill record);


+ 2
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxAllBillServiceImpl.java Просмотреть файл

@@ -545,17 +545,11 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill
}
@Override
public BigDecimal getBillSetoffSum(WxAllBill record) {
public BigDecimal getRemainAdvanceSum(WxAllBill record) {
updateQueryParam(record);
return wxAllBillMapper.getMerchantAdvanceGroupSum(record);
return wxAllBillMapper.getRemainAdvanceSum(record);
}
@Override
public BigDecimal getBillDepositSum(WxAllBill record) {
updateQueryParam(record);
return wxAllBillMapper.getMerchantDepositGroupSum(record);
}
@Override
public List<WxAllBill> getMerchantAdvanceGroupSumList(WxAllBill record) {
updateQueryParam(record);


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java Просмотреть файл

@@ -261,7 +261,7 @@ public class WxFinanceServiceImpl implements WxFinanceService {
abq.updateTenantInfo(record);
abq.setShopId(record.getId());
abq.setDepositHasMoney(EnumYesOrNo.YES.getCode());
BigDecimal total = wxAllBillService.getBillDepositSum(abq);
BigDecimal total = wxAllBillService.getRemainAdvanceSum(abq);
if (null == total) {
total = new BigDecimal(0);
}
@@ -277,7 +277,7 @@ public class WxFinanceServiceImpl implements WxFinanceService {
abq.setBillType(EnumBillAllType.ADVANCE.getCode());
abq.setShopId(record.getId());
abq.setAdvanceHasMoney(EnumYesOrNo.YES.getCode());
BigDecimal total = wxAllBillService.getBillSetoffSum(abq);
BigDecimal total = wxAllBillService.getRemainAdvanceSum(abq);
if (null == total) {
total = new BigDecimal(0);
}


+ 2
- 9
mallinkService/src/main/resources/mapper/WxAllBillMapper.xml Просмотреть файл

@@ -218,15 +218,8 @@
<include refid="dynamicWhereConditions"/>
</select>
<select id="getMerchantAdvanceGroupSum" parameterType="com.iformall.domain.po.WxAllBill" resultType="DECIMAL">
select sum(CAST(pay AS DECIMAL(20,2))) pay , sum(CAST(ifnull(use_money,'0') AS DECIMAL(20,2))) use_money
from wx_all_bill
<include refid="dynamicWhereConditions"/>
</select>
<select id="getMerchantDepositGroupSum" parameterType="com.iformall.domain.po.WxAllBill" resultType="DECIMAL">
select sum(CAST(pay AS DECIMAL(20,2))) pay , sum(CAST(ifnull(return_pay,'0') AS DECIMAL(20,2))) deposit_money
<select id="getRemainAdvanceSum" parameterType="com.iformall.domain.po.WxAllBill" resultType="DECIMAL">
select sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2)) - CAST(ifnull(return_pay,'0') AS DECIMAL(20,2)) - CAST(ifnull(use_money,'0') AS DECIMAL(20,2)))
from wx_all_bill
<include refid="dynamicWhereConditions"/>
</select>


Загрузка…
Отмена
Сохранить