Преглед изворни кода

[账单][修改][修改滞纳金]

release_toaliyun_real
luozukai пре 6 година
родитељ
комит
58478326d0
3 измењених фајлова са 49 додато и 17 уклоњено
  1. +37
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumBillUpdateType.java
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  3. +10
    -15
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

+ 37
- 0
mallinkService/src/main/java/com/iformall/enums/EnumBillUpdateType.java Прегледај датотеку

@@ -0,0 +1,37 @@
package com.iformall.enums;

/**
* Created by Stormeye on 2018/08/09.
*/
public enum EnumBillUpdateType {


LATEPAY(2, "滞纳金"),
OTHER(1, "其他"),
;

public static EnumBillUpdateType getEnum(Integer code) {
for (EnumBillUpdateType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumBillUpdateType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Прегледај датотеку

@@ -784,7 +784,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if(oldLatePrice != null){
wxBillRent.setLatePayPrice(newLatePrice);
wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent);
addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY,id, oldPrice, newPrice, user);
addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY,id, oldLatePrice, newLatePrice, user);
}else{
//租赁账单更新
wxBillRent.setReceivePay(newPrice);
@@ -819,7 +819,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
if(oldLatePrice != null){
wxBillProperty.setLatePayPrice(newLatePrice);
wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillProperty);
addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY,id, oldPrice, newPrice, user);
addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY,id, oldLatePrice, newLatePrice, user);
}else{
wxBillProperty.setReceivePay(newPrice);
wxBillProperty.setOwe(newPrice - dbBill.getPay());


+ 10
- 15
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Прегледај датотеку

@@ -201,25 +201,20 @@ public class WxFlowServiceImpl implements WxFlowService {
//账单审批
Integer billType = (Integer) getVariableByKey(variables, "billType");
MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession");
String latePayMoneyBefore = (String) getVariableByKey(variables, "latePayMoneyBefore");
String latePayMoneyUpdate = (String) getVariableByKey(variables, "latePayMoneyUpdate");
if(StringUtils.isNotBlank(latePayMoneyBefore)){ //修改滞纳金
WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setId(businessId);
wxBillAll.setBillTypeValue(billType);
wxBillAll.setOldLatePrice(Long.parseLong(latePayMoneyBefore)*100);
wxBillAll.setNewLatePrice(Long.parseLong(latePayMoneyUpdate)*100);
wxBillAllService.updateReceivePay(wxBillAll, user);
Integer billUpdateType = (Integer) getVariableByKey(variables, "billUpdateType");
Long oldPrice = Long.parseLong(getVariableByKey(variables, "oldPrice").toString());
Long newPrice = Long.parseLong(getVariableByKey(variables, "newPrice").toString());
WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setId(businessId);
wxBillAll.setBillTypeValue(billType);
if(EnumBillUpdateType.LATEPAY.getCode().equals(billUpdateType)){ //修改滞纳金
wxBillAll.setOldLatePrice(oldPrice);
wxBillAll.setNewLatePrice(newPrice);
}else{
Long oldPrice = Long.parseLong(getVariableByKey(variables, "oldPrice").toString());
Long newPrice = Long.parseLong(getVariableByKey(variables, "newPrice").toString());
WxBillAll wxBillAll = new WxBillAll();
wxBillAll.setId(businessId);
wxBillAll.setBillTypeValue(billType);
wxBillAll.setOldPrice(oldPrice);
wxBillAll.setNewPrice(newPrice);
wxBillAllService.updateReceivePay(wxBillAll, user);
}
wxBillAllService.updateReceivePay(wxBillAll, user);
}
} else if (EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType)
|| EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)


Loading…
Откажи
Сачувај