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

[账单][修改][导入数据]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
efc1c4cb80
1 измененных файлов: 10 добавлений и 9 удалений
  1. +10
    -9
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java

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

@@ -978,7 +978,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
rent.setPayDate(bill.getPayDate());
rent.setReceiveDate(bill.getReceiveDate());
wxBillRentMapper.updateByPrimaryKey(rent);
addActionImport(rent.getId(), bill.getPayWay(), user);
addActionImport(rent.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
} else if (billType.equals(EnumBillExcelTemplate.SHOP_PROPERTY.getCode()) || billType.equals(EnumBillExcelTemplate.POINT_PROPERTY.getCode())) {
WxBillProperty propertyQuery = new WxBillProperty();
@@ -1003,7 +1003,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
property.setPayDate(bill.getPayDate());
property.setReceiveDate(bill.getReceiveDate());
wxBillPropertyMapper.updateByPrimaryKey(property);
addActionImport(property.getId(), bill.getPayWay(), user);
addActionImport(property.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
} else if (billType.equals(EnumBillExcelTemplate.DAILY.getCode())) {
WxBillDaily dailyQuery = new WxBillDaily();
@@ -1033,7 +1033,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
daily.setPayDate(bill.getPayDate());
daily.setReceiveDate(bill.getReceiveDate());
wxBillDailyMapper.updateByPrimaryKey(daily);
addActionImport(daily.getId(), bill.getPayWay(), user);
addActionImport(daily.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
} else {
WxMerchantShop wxMerchantShop = new WxMerchantShop();
@@ -1062,7 +1062,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
daily.setOwe(0L);
daily.setIsDel(EnumDelStatus.NOT_DEL.getCode());
wxBillDailyMapper.insertSelective(daily);
addActionImport(daily.getId(), bill.getPayWay(), user);
addActionImport(daily.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
}
} else if (billType.equals(EnumBillExcelTemplate.OTHER.getCode())) {
@@ -1085,7 +1085,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
other.setPayDate(bill.getPayDate());
other.setReceiveDate(bill.getReceiveDate());
wxBillOtherMapper.updateByPrimaryKey(other);
addActionImport(other.getId(), bill.getPayWay(), user);
addActionImport(other.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
} else {
WxMerchantShop wxMerchantShop = new WxMerchantShop();
@@ -1115,7 +1115,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
other.setOwe(0L);
other.setIsDel(EnumDelStatus.NOT_DEL.getCode());
wxBillOtherMapper.insertSelective(other);
addActionImport(other.getId(), bill.getPayWay(), user);
addActionImport(other.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
}
} else if (billType.equals(EnumBillExcelTemplate.OTHER_DEPOSIT.getCode())) {
@@ -1136,7 +1136,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
otherDeposit.setPayDate(bill.getPayDate());
otherDeposit.setReceiveDate(bill.getReceiveDate());
wxBillOtherDepositMapper.updateByPrimaryKey(otherDeposit);
addActionImport(otherDeposit.getId(), bill.getPayWay(), user);
addActionImport(otherDeposit.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
} else {
WxMerchantShop wxMerchantShop = new WxMerchantShop();
@@ -1167,7 +1167,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
otherDeposit.setOwe(0L);
otherDeposit.setIsDel(EnumDelStatus.NOT_DEL.getCode());
wxBillOtherDepositMapper.insertSelective(otherDeposit);
addActionImport(otherDeposit.getId(), bill.getPayWay(), user);
addActionImport(otherDeposit.getId(), bill.getPayWay(), bill.getPayDate(), user);
}
}
} else {
@@ -1178,12 +1178,13 @@ public class WxBillAllServiceImpl implements WxBillAllService {
stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS);
}

public void addActionImport(Long billId, String payWay, MallUserInfo user) {
public void addActionImport(Long billId, String payWay, Date payDate, MallUserInfo user) {
WxBillAction wxBillAction = new WxBillAction();
wxBillAction.setBillId(billId);
String details = StringUtils.isEmpty(payWay) ? "其他缴费" : payWay + "缴费";
wxBillAction.setDetails(details);
wxBillAction.setAction(EnumBillAction.IMPORT_PAY.getCode());
wxBillAction.setPayDate(payDate);
wxBillActionService.modifyBill(wxBillAction, user);
}



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