Kaynağa Gözat

[修改][手续费][开发]

release_toaliyun_real
luozukai 6 yıl önce
ebeveyn
işleme
e144ce669e
13 değiştirilmiş dosya ile 176 ekleme ve 124 silme
  1. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java
  2. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java
  3. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java
  4. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java
  5. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java
  6. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  7. +27
    -21
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  8. +2
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java
  9. +27
    -21
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  10. +29
    -22
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  11. +1
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java
  12. +32
    -24
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  13. +31
    -24
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java Dosyayı Görüntüle

@@ -115,4 +115,9 @@ public class WxBillDaily extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false) @TableField(exist = false)
private Long realReceivePay; private Long realReceivePay;

@TableField(exist = false)
private String serviceChargePayBefore;
@TableField(exist = false)
private String serviceChargePayUpdate;
} }

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java Dosyayı Görüntüle

@@ -83,4 +83,9 @@ public class WxBillDeposit extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false) @TableField(exist = false)
private Long realReceivePay; private Long realReceivePay;

@TableField(exist = false)
private String serviceChargePayBefore;
@TableField(exist = false)
private String serviceChargePayUpdate;
} }

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java Dosyayı Görüntüle

@@ -137,4 +137,9 @@ public class WxBillOther extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false) @TableField(exist = false)
private Long realReceivePay; private Long realReceivePay;

@TableField(exist = false)
private String serviceChargePayBefore;
@TableField(exist = false)
private String serviceChargePayUpdate;
} }

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java Dosyayı Görüntüle

@@ -146,4 +146,9 @@ public class WxBillOtherDeposit extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false) @TableField(exist = false)
private Long realReceivePay; private Long realReceivePay;

@TableField(exist = false)
private String serviceChargePayBefore;
@TableField(exist = false)
private String serviceChargePayUpdate;
} }

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java Dosyayı Görüntüle

@@ -81,4 +81,9 @@ public class WxBillPropertyDeposit extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false) @TableField(exist = false)
private Long realReceivePay; private Long realReceivePay;

@TableField(exist = false)
private String serviceChargePayBefore;
@TableField(exist = false)
private String serviceChargePayUpdate;
} }

+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java Dosyayı Görüntüle

@@ -210,4 +210,6 @@ public class WxBillRent extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
@TableField(exist = false) @TableField(exist = false)
private Long realReceivePay; private Long realReceivePay;


} }

+ 27
- 21
mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java Dosyayı Görüntüle

@@ -180,26 +180,34 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
if(wxBillDaily==null){ if(wxBillDaily==null){
return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND);
} }
Long addpay = wxBillDaily.getPay();
wxBillDaily.setPayDate(record.getPayDate());
wxBillDaily.setPay(record.getPay());
wxBillDaily.setReceivePay(record.getReceivePay());
wxBillDaily.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillDaily.getReceiveDate();
wxBillDaily.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillDaily.setExpiredDay((long) expiredDay);

String price = "";
String message = "";
if(record.getServiceChargePayUpdate() != null){
wxBillDaily.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100);
}else{
Long addpay = wxBillDaily.getPay();
wxBillDaily.setPayDate(record.getPayDate());
wxBillDaily.setPay(record.getPay());
wxBillDaily.setReceivePay(record.getReceivePay());
wxBillDaily.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillDaily.getReceiveDate();
wxBillDaily.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillDaily.setExpiredDay((long) expiredDay);
}
} }
wxBillDaily.setPayDate(record.getPayDate());
wxBillDaily.setUpdatetime(date);
wxBillDaily.setPayWay(record.getPayWay());
wxBillDaily.setPriceDetail(record.getPriceDetail());
message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
} }
wxBillDaily.setPayDate(record.getPayDate());
wxBillDaily.setUpdatetime(date);
wxBillDaily.setPayWay(record.getPayWay());
wxBillDaily.setPriceDetail(record.getPriceDetail());
wxBillDaily.setServiceChargePay(record.getServiceChargePay());
try { try {
wxBillDailyMapper.updateById(wxBillDaily); wxBillDailyMapper.updateById(wxBillDaily);
} catch (Exception e) { } catch (Exception e) {
@@ -209,10 +217,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
//日志 //日志
WxBillAction wxBillAction = new WxBillAction(); WxBillAction wxBillAction = new WxBillAction();
wxBillAction.setBillId(wxBillDaily.getId()); wxBillAction.setBillId(wxBillDaily.getId());
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
wxBillAction.setDetails(message + price + "元"); wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
if(record.getServiceChargePayUpdate() != null){
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{ }else{
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());


+ 2
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java Dosyayı Görüntüle

@@ -164,7 +164,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
wxBillDeposit.setPayDate(date); wxBillDeposit.setPayDate(date);
wxBillDeposit.setUpdatetime(date); wxBillDeposit.setUpdatetime(date);
wxBillDeposit.setPayWay(record.getPayWay()); wxBillDeposit.setPayWay(record.getPayWay());
wxBillDeposit.setServiceChargePay(record.getServiceChargePay());
//wxBillDeposit.setServiceChargePay(record.getServiceChargePay());
try { try {
wxBillDepositMapper.updateById(wxBillDeposit); wxBillDepositMapper.updateById(wxBillDeposit);
} catch (Exception e) { } catch (Exception e) {
@@ -177,11 +177,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
wxBillAction.setDetails(message + price + "元"); wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());
}
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());
wxBillAction.setUserId(user.getId()); wxBillAction.setUserId(user.getId());
wxBillAction.setUserName(user.getName()); wxBillAction.setUserName(user.getName());
wxBillAction.setPhone(user.getPhone()); wxBillAction.setPhone(user.getPhone());


+ 27
- 21
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java Dosyayı Görüntüle

@@ -176,26 +176,34 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService
if (wxBillOtherDeposit == null) { if (wxBillOtherDeposit == null) {
return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND);
} }
Long addpay = wxBillOtherDeposit.getPay();
wxBillOtherDeposit.setPayDate(record.getPayDate());
wxBillOtherDeposit.setPay(record.getPay());
wxBillOtherDeposit.setReceivePay(record.getReceivePay());
wxBillOtherDeposit.setOwe(record.getReceivePay() - record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillOtherDeposit.getReceiveDate();
wxBillOtherDeposit.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillOtherDeposit.setExpiredDay((long) expiredDay);
String message = "";
String price = "";
if(record.getServiceChargePayUpdate() != null){
wxBillOtherDeposit.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100);
}else{
Long addpay = wxBillOtherDeposit.getPay();
wxBillOtherDeposit.setPayDate(record.getPayDate());
wxBillOtherDeposit.setPay(record.getPay());
wxBillOtherDeposit.setReceivePay(record.getReceivePay());
wxBillOtherDeposit.setOwe(record.getReceivePay() - record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillOtherDeposit.getReceiveDate();
wxBillOtherDeposit.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillOtherDeposit.setExpiredDay((long) expiredDay);
}
} }
wxBillOtherDeposit.setPayDate(record.getPayDate());
wxBillOtherDeposit.setUpdatetime(date);
wxBillOtherDeposit.setPayWay(record.getPayWay());
wxBillOtherDeposit.setComments(record.getComments());
message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
} }
wxBillOtherDeposit.setPayDate(record.getPayDate());
wxBillOtherDeposit.setUpdatetime(date);
wxBillOtherDeposit.setPayWay(record.getPayWay());
wxBillOtherDeposit.setComments(record.getComments());
wxBillOtherDeposit.setServiceChargePay(record.getServiceChargePay());

try { try {
wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); wxBillOtherDepositMapper.updateById(wxBillOtherDeposit);
} catch (Exception e) { } catch (Exception e) {
@@ -205,10 +213,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService
//日志 //日志
WxBillAction wxBillAction = new WxBillAction(); WxBillAction wxBillAction = new WxBillAction();
wxBillAction.setBillId(wxBillOtherDeposit.getId()); wxBillAction.setBillId(wxBillOtherDeposit.getId());
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
wxBillAction.setDetails(message + price + "元"); wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
if(record.getServiceChargePayUpdate() != null){
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{ }else{
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());


+ 29
- 22
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java Dosyayı Görüntüle

@@ -176,27 +176,36 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
if(wxBillOther==null){ if(wxBillOther==null){
return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND);
} }
Long addpay = wxBillOther.getPay();
wxBillOther.setPayDate(record.getPayDate());
wxBillOther.setPay(record.getPay());
wxBillOther.setReceivePay(record.getReceivePay());
wxBillOther.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillOther.getReceiveDate();
wxBillOther.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillOther.setExpiredDay((long) expiredDay);

String message = "";
String price = "";
if(record.getServiceChargePayUpdate() != null){
wxBillOther.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100);
}else{
Long addpay = wxBillOther.getPay();
wxBillOther.setPayDate(record.getPayDate());
wxBillOther.setPay(record.getPay());
wxBillOther.setReceivePay(record.getReceivePay());
wxBillOther.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillOther.getReceiveDate();
wxBillOther.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillOther.setExpiredDay((long) expiredDay);
}
} }
wxBillOther.setPayDate(record.getPayDate());
wxBillOther.setUpdatetime(date);
wxBillOther.setPayWay(record.getPayWay());
wxBillOther.setComments(record.getComments());
wxBillOther.setName(record.getName());
message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
} }
wxBillOther.setPayDate(record.getPayDate());
wxBillOther.setUpdatetime(date);
wxBillOther.setPayWay(record.getPayWay());
wxBillOther.setComments(record.getComments());
wxBillOther.setName(record.getName());
wxBillOther.setServiceChargePay(record.getServiceChargePay());

try { try {
wxBillOtherMapper.updateById(wxBillOther); wxBillOtherMapper.updateById(wxBillOther);
} catch (Exception e) { } catch (Exception e) {
@@ -206,10 +215,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
//日志 //日志
WxBillAction wxBillAction = new WxBillAction(); WxBillAction wxBillAction = new WxBillAction();
wxBillAction.setBillId(wxBillOther.getId()); wxBillAction.setBillId(wxBillOther.getId());
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
wxBillAction.setDetails(message + price + "元"); wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
if(record.getServiceChargePayUpdate() != null){
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{ }else{
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());


+ 1
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java Dosyayı Görüntüle

@@ -163,7 +163,6 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe
wxBillDeposit.setPayDate(date); wxBillDeposit.setPayDate(date);
wxBillDeposit.setUpdatetime(date); wxBillDeposit.setUpdatetime(date);
wxBillDeposit.setPayWay(record.getPayWay()); wxBillDeposit.setPayWay(record.getPayWay());
wxBillDeposit.setServiceChargePay(record.getServiceChargePay());
try { try {
wxBillPropertyDepositMapper.updateById(wxBillDeposit); wxBillPropertyDepositMapper.updateById(wxBillDeposit);
} catch (Exception e) { } catch (Exception e) {
@@ -176,11 +175,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
wxBillAction.setDetails(message + price + "元"); wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());
}
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());
wxBillAction.setUserId(user.getId()); wxBillAction.setUserId(user.getId());
wxBillAction.setUserName(user.getName()); wxBillAction.setUserName(user.getName());
wxBillAction.setPhone(user.getPhone()); wxBillAction.setPhone(user.getPhone());


+ 32
- 24
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java Dosyayı Görüntüle

@@ -157,29 +157,38 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
if(property==null){ if(property==null){
return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND);
} }
Long addpay = property.getPay();
property.setRevenue(record.getRevenue());
property.setLatePayRatio(record.getLatePayRatio());
property.setLatePayTime(record.getLatePayTime());
property.setLatePayStatus(record.getLatePayStatus());
property.setPayDate(record.getPayDate());
property.setPay(record.getPay());
property.setReceivePay(record.getReceivePay());
property.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
property.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = property.getReceiveDate();
property.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
property.setExpiredDay((long) expiredDay);

String message = "";
String price = "";
if(record.getServiceChargePayUpdate() != null){
property.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100);
}else{
Long addpay = property.getPay();
property.setRevenue(record.getRevenue());
property.setLatePayRatio(record.getLatePayRatio());
property.setLatePayTime(record.getLatePayTime());
property.setLatePayStatus(record.getLatePayStatus());
property.setPayDate(record.getPayDate());
property.setPay(record.getPay());
property.setReceivePay(record.getReceivePay());
property.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
property.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = property.getReceiveDate();
property.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
property.setExpiredDay((long) expiredDay);
}
} }
property.setPayDate(record.getPayDate());
property.setUpdatetime(date);
property.setPayWay(record.getPayWay());
message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
} }
property.setPayDate(record.getPayDate());
property.setUpdatetime(date);
property.setPayWay(record.getPayWay());
property.setServiceChargePay(record.getServiceChargePay());

try { try {
wxBillPropertyMapper.updateById(property); wxBillPropertyMapper.updateById(property);
} catch (Exception e) { } catch (Exception e) {
@@ -189,10 +198,9 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
//日志 //日志
WxBillAction wxBillAction = new WxBillAction(); WxBillAction wxBillAction = new WxBillAction();
wxBillAction.setBillId(property.getId()); wxBillAction.setBillId(property.getId());
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();

wxBillAction.setDetails(message + price + "元"); wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
if(record.getServiceChargePayUpdate() != null){
wxBillAction.setDetails(record.getServiceChargePayBefore()+"元变更为" +record.getServiceChargePayUpdate()+"元"); wxBillAction.setDetails(record.getServiceChargePayBefore()+"元变更为" +record.getServiceChargePayUpdate()+"元");
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{ }else{


+ 31
- 24
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java Dosyayı Görüntüle

@@ -161,28 +161,36 @@ public class WxBillRentServiceImpl implements WxBillRentService {
if(wxBillRent==null){ if(wxBillRent==null){
return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND);
} }
Long addpay = wxBillRent.getPay();
wxBillRent.setRevenue(record.getRevenue());
wxBillRent.setLatePayRatio(record.getLatePayRatio());
wxBillRent.setLatePayTime(record.getLatePayTime());
wxBillRent.setLatePayStatus(record.getLatePayStatus());
wxBillRent.setPay(record.getPay());
wxBillRent.setReceivePay(record.getReceivePay());
wxBillRent.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillRent.getReceiveDate();
wxBillRent.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillRent.setExpiredDay((long) expiredDay);

String price = "";
String message ="";
if(record.getServiceChargePayUpdate() != null){
wxBillRent.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100);
}else{
Long addpay = wxBillRent.getPay();
wxBillRent.setRevenue(record.getRevenue());
wxBillRent.setLatePayRatio(record.getLatePayRatio());
wxBillRent.setLatePayTime(record.getLatePayTime());
wxBillRent.setLatePayStatus(record.getLatePayStatus());
wxBillRent.setPay(record.getPay());
wxBillRent.setReceivePay(record.getReceivePay());
wxBillRent.setOwe(record.getReceivePay()-record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode());
Date payDate = record.getPayDate();
Date receiveDate = wxBillRent.getReceiveDate();
wxBillRent.setExpiredDay(0L);
if (payDate.after(receiveDate)) {
int expiredDay = DateUtils.daysBetween(receiveDate, payDate);
wxBillRent.setExpiredDay((long) expiredDay);
}
} }
wxBillRent.setPayDate(record.getPayDate());
wxBillRent.setUpdatetime(date);
wxBillRent.setPayWay(record.getPayWay());
price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
} }
wxBillRent.setPayDate(record.getPayDate());
wxBillRent.setUpdatetime(date);
wxBillRent.setPayWay(record.getPayWay());
wxBillRent.setServiceChargePay(record.getServiceChargePay());

try { try {
wxBillRentMapper.updateById(wxBillRent); wxBillRentMapper.updateById(wxBillRent);
} catch (Exception e) { } catch (Exception e) {
@@ -192,15 +200,14 @@ public class WxBillRentServiceImpl implements WxBillRentService {
//日志 //日志
WxBillAction wxBillAction = new WxBillAction(); WxBillAction wxBillAction = new WxBillAction();
wxBillAction.setBillId(wxBillRent.getId()); wxBillAction.setBillId(wxBillRent.getId());
String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString();
wxBillAction.setDetails(message + price + "元");
if(record.getServiceChargePay() != null){
if(record.getServiceChargePayUpdate() != null){
wxBillAction.setDetails(record.getServiceChargePayBefore()+"元变更为" +record.getServiceChargePayUpdate()+"元"); wxBillAction.setDetails(record.getServiceChargePayBefore()+"元变更为" +record.getServiceChargePayUpdate()+"元");
wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode());
}else{ }else{
wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode());
message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage();
} }
wxBillAction.setDetails(message + price + "元");
wxBillAction.setUserId(user.getId()); wxBillAction.setUserId(user.getId());
wxBillAction.setUserName(user.getName()); wxBillAction.setUserName(user.getName());
wxBillAction.setPhone(user.getPhone()); wxBillAction.setPhone(user.getPhone());


Yükleniyor…
İptal
Kaydet