Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
87ca6b8127
4 changed files with 7 additions and 25 deletions
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java
  2. +0
    -19
      mallinkService/src/main/java/com/iformall/service/impl/WxAllBillServiceImpl.java
  3. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java
  4. +1
    -1
      mallinkService/src/main/resources/mapper/WxAllBillMapper.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java View File

@@ -215,7 +215,7 @@ public class WxAllBill extends TenantEntity {
if (StringUtils.isBlank(returnPay)) {
returnPay = "0";
}
return new BigDecimal(getOwe()).subtract(new BigDecimal(returnPay)).toPlainString();
return new BigDecimal(pay).subtract(new BigDecimal(returnPay)).toPlainString();
}
@Excel(name = "备注", width = 20, orderNum = "9")


+ 0
- 19
mallinkService/src/main/java/com/iformall/service/impl/WxAllBillServiceImpl.java View File

@@ -405,25 +405,6 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setReturnPay(oldpay.add(new BigDecimal(dto.getPayToMerchant())).toPlainString());
//如果屎押金
boolean isDeposit = false;
for (EnumBillAllType dep : EnumBillAllType.getDepositTypes()) {
if (dbBill.getBillType().intValue() == dep.getCode().intValue()) {
isDeposit = true;
break;
}
}
if (isDeposit) {
String setoff = dbBill.getSetOff();
if (StringUtils.isBlank(setoff)) {
setoff = "0";
}
String pay = dbBill.getPay();
if (StringUtils.isBlank(pay)) {
pay = "0";
}
}
wxAllBillMapper.updateById(wxBillRent);
this.addBillAction(EnumBillAction.RETURN, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),null,wxBillRent.getPayDate(),dto.getPayWay(),dto.getPayWayName(),


+ 5
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java View File

@@ -922,16 +922,17 @@ public class WxFinanceServiceImpl implements WxFinanceService {
//有收款,就要更新账单的收款
//更新账单收款信息
String money = "";
BigDecimal oweDecimal = new BigDecimal(bill.getOwe());
BigDecimal oweDecimal = new BigDecimal(bill.getRemainReturnPrice());
//只有没有有欠款才会支付
if (oweDecimal.compareTo(b0) > 0 ) {
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"账单有欠缴,不能付款.");
//noNeedCreate = true;
//return noNeedCreate;
}
if (calcuteDto.getTotalRemainPay().add(oweDecimal).compareTo(b0) > 0 ) {
money = oweDecimal.multiply(new BigDecimal(-1)).toPlainString();
calcuteDto.setTotalRemainPay(calcuteDto.getTotalRemainPay().add(oweDecimal));
//如果金额能覆盖应付
if (calcuteDto.getTotalRemainPay().compareTo(oweDecimal) > 0 ) {
money = oweDecimal.toPlainString();
calcuteDto.setTotalRemainPay(calcuteDto.getTotalRemainPay().subtract(oweDecimal));
}else {
money = calcuteDto.getTotalRemainPay().toPlainString();
calcuteDto.setTotalRemainPay(new BigDecimal(0));


+ 1
- 1
mallinkService/src/main/resources/mapper/WxAllBillMapper.xml View File

@@ -111,7 +111,7 @@
and (
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') < 0 and bill_type not in (13,21,5))
or
( `pay` > 0 and bill_type in (13,21,5))
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') < 0 and bill_type in (13,21,5))
)
</if>
<if test=" 1 == notifyed ">


Loading…
Cancel
Save