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

[账单][修改]:release branch同步

release_toaliyun_real
Stormeye Wu 6 лет назад
Родитель
Сommit
2fe33901f5
3 измененных файлов: 28 добавлений и 11 удалений
  1. +6
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  2. +22
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  3. +0
    -7
      mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml

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

@@ -196,8 +196,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if(EnumBillType.SETTLE.getCode().equals(billType)){
Long id = (Long)map.get("id");
WxBillSettle settle = wxBillSettleService.getById(id,EnumFilterSettle.YES.getCode());
BigDecimal money = new BigDecimal(settle.getBalance()).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
map.put("owe",money);
map.put("owe",settle.getBalance());
settle = wxBillSettleService.getById(id,EnumFilterSettle.NO.getCode());
map.put("receivePay",settle.getBalance());
}
}
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(maps);
@@ -209,8 +210,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if(EnumBillType.SETTLE.getCode().equals(billType)){
Long id = (Long)map.get("id");
WxBillSettle settle = wxBillSettleService.getById(id,EnumFilterSettle.YES.getCode());
BigDecimal money = new BigDecimal(settle.getBalance()).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
map.put("owe",money);
map.put("owe",settle.getBalance());
settle = wxBillSettleService.getById(id,EnumFilterSettle.NO.getCode());
map.put("receivePay",settle.getBalance());
}
}
return new ResultData(maps);


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

@@ -169,6 +169,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillRent dbBill = wxBillRentMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getOwe() == null) dbBill.setOwe(0l);
wxBillRent.setPay(dbBill.getPay()+ dbBill.getOwe());
wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
@@ -186,6 +188,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillDeposit dbBill = wxBillDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l);
wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay() ); //押金是ReceivePay
wxBillRent.setPayDate(new Date());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
@@ -208,6 +212,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l);
wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay());
wxBillOtherDeposit.setPayDate(new Date());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
@@ -230,6 +236,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l);
propertyDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay());
propertyDeposit.setPayDate(new Date());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
@@ -253,6 +261,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillProperty dbBill = wxBillPropertyMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getOwe() == null) dbBill.setOwe(0l);
wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe());
wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
@@ -270,6 +280,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l);
propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay());
propertyDeposit.setPayDate(new Date());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
@@ -292,6 +304,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getOwe() == null) dbBill.setOwe(0l);
wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe());
wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
@@ -309,6 +323,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l);
wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay());
wxBillRent.setPayDate(new Date());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
@@ -339,6 +355,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l);
wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay());
wxBillRent.setPayDate(new Date());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
@@ -361,6 +379,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillDaily dbBill = wxBillDailyMapper.selectByPrimaryKey(wxBillDaily.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getOwe() == null) dbBill.setOwe(0l);
wxBillDaily.setPay(dbBill.getPay()+dbBill.getOwe());
wxBillDaily.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
@@ -378,6 +398,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) {
if(dbBill.getPay() == null) dbBill.setPay(0l);
if(dbBill.getOwe() == null) dbBill.setOwe(0l);
wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe());
wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());


+ 0
- 7
mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml Просмотреть файл

@@ -38,13 +38,6 @@
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

<select id="findList" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_bill_settle_bill
<include refid="dynamicWhereConditions"/>
</select>

<select id="findBySettleId" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select bill.starttime,bill.endtime,bl.bill_id,bl.bill_type,bill.bill_type billName,IFNULL(bill.owe,0) receivePay



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