Просмотр исходного кода

[账单导入][修改][其他押金]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
0655267340
2 измененных файлов: 30 добавлений и 19 удалений
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/mem/ImportTemplateTask.java
  2. +29
    -18
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/mem/ImportTemplateTask.java Просмотреть файл

@@ -203,7 +203,7 @@ public class ImportTemplateTask {
&& StringUtils.isNotEmpty(s.getBillAttr()) && null != s.getStarttime()
&& null != s.getEndtime() && StringUtils.isNotEmpty(s.getPayStr())
&& null != s.getPayDate() && null != s.getReceiveDate()
&& StringUtils.isNotEmpty(s.getReceivePayStr()) && Double.parseDouble(s.getPayStr()) > 0D) {
&& StringUtils.isNotEmpty(s.getReceivePayStr())) {
WxMerchant wxMerchant = merchantMap.get(s.getMerchantName());
if (wxMerchant != null) {
Long merchantId = wxMerchant.getId();


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

@@ -1050,7 +1050,12 @@ public class WxBillAllServiceImpl implements WxBillAllService {
}
daily.setReceivePay(receivePay);
daily.setPay(daily.getPay() + pay);
daily.setOwe(daily.getOwe() - pay);
daily.setPay(daily.getPay() + pay);
daily.setOwe(0L);
long owe = daily.getReceivePay() - daily.getPay();
if (owe > 0) {
daily.setOwe(owe);
}
daily.setPayDate(bill.getPayDate());
daily.setReceiveDate(bill.getReceiveDate());
wxBillDailyMapper.updateByPrimaryKey(daily);
@@ -1079,7 +1084,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
daily.setCreatetime(date);
daily.setUpdatetime(date);
daily.setExpiredDay(0L);
daily.setOwe(0L);
daily.setOwe(receivePay - pay);
daily.setIsDel(EnumDelStatus.NOT_DEL.getCode());
daily.setStarttime(bill.getStarttime());
daily.setEndtime(bill.getEndtime());
@@ -1088,12 +1093,12 @@ public class WxBillAllServiceImpl implements WxBillAllService {
} else {
Date payDate = daily.getPayDate();
Date receiveDate = daily.getReceiveDate();
if (payDate.before(receiveDate)) {
daily.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
} else {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
if (expiredDay > 0) {
daily.setStatus(EnumBillRentStatus.NOT_PAID.getCode());
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
daily.setExpiredDay((long) expiredDay);
} else {
daily.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
}
}
wxBillDailyMapper.insertSelective(daily);
@@ -1125,7 +1130,11 @@ public class WxBillAllServiceImpl implements WxBillAllService {
other.setName(bill.getBillAttr());
other.setComments(bill.getBillAttr());
other.setPay(other.getPay() + pay);
other.setOwe(other.getOwe() - pay);
other.setOwe(0L);
long owe = other.getReceivePay() - other.getPay();
if (owe > 0) {
other.setOwe(owe);
}
other.setPayDate(bill.getPayDate());
other.setReceiveDate(bill.getReceiveDate());
wxBillOtherMapper.updateByPrimaryKey(other);
@@ -1155,7 +1164,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
other.setCreatetime(date);
other.setUpdatetime(date);
other.setExpiredDay(0L);
other.setOwe(0L);
other.setOwe(receivePay - pay);
other.setIsDel(EnumDelStatus.NOT_DEL.getCode());
other.setStarttime(bill.getStarttime());
other.setEndtime(bill.getEndtime());
@@ -1164,12 +1173,12 @@ public class WxBillAllServiceImpl implements WxBillAllService {
} else {
Date payDate = other.getPayDate();
Date receiveDate = other.getReceiveDate();
if (payDate.before(receiveDate)) {
other.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
} else {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
if (expiredDay > 0) {
other.setStatus(EnumBillRentStatus.NOT_PAID.getCode());
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
other.setExpiredDay((long) expiredDay);
} else {
other.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
}
}
wxBillOtherMapper.insertSelective(other);
@@ -1199,7 +1208,11 @@ public class WxBillAllServiceImpl implements WxBillAllService {
}
otherDeposit.setReceivePay(receivePay);
otherDeposit.setPay(otherDeposit.getPay() + pay);
otherDeposit.setOwe(otherDeposit.getOwe() - pay);
otherDeposit.setOwe(0L);
long owe = otherDeposit.getReceivePay() - otherDeposit.getPay();
if (owe > 0) {
otherDeposit.setOwe(owe);
}
otherDeposit.setPayDate(bill.getPayDate());
otherDeposit.setReceiveDate(bill.getReceiveDate());
wxBillOtherDepositMapper.updateByPrimaryKey(otherDeposit);
@@ -1239,11 +1252,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
} else {
Date payDate = otherDeposit.getPayDate();
Date receiveDate = otherDeposit.getReceiveDate();
if (payDate.before(receiveDate)) {
otherDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
} else {
otherDeposit.setStatus(EnumBillRentStatus.NOT_PAID.getCode());
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
otherDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
if (expiredDay > 0) {
otherDeposit.setExpiredDay((long) expiredDay);
}
}


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