Kaynağa Gözat

[账单][修改][不再计算乘100和除100]

release_toaliyun_real
gongbiao 7 yıl önce
ebeveyn
işleme
0fb36a0a79
10 değiştirilmiş dosya ile 151 ekleme ve 25 silme
  1. +23
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java
  2. +26
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  3. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  4. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java
  5. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java
  6. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  7. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  8. +38
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  9. +6
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  10. +43
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

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

@@ -91,6 +91,29 @@ public class WxBillDeposit implements Serializable {
/*更新时间**/ /*更新时间**/
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime; private Date updatetime;

@io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime")
private Date starttime;

@io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime")
private Date endtime;

public Date getStarttime() {
return starttime;
}

public void setStarttime(Date starttime) {
this.starttime = starttime;
}

public Date getEndtime() {
return endtime;
}

public void setEndtime(Date endtime) {
this.endtime = endtime;
}

public Long getRentContractId() { public Long getRentContractId() {
return rentContractId; return rentContractId;
} }


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

@@ -8,6 +8,9 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;


/**
* @author gongbiao
*/
@Table(name = "wx_bill_rent") @Table(name = "wx_bill_rent")
public class WxBillRent implements Serializable { public class WxBillRent implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -90,6 +93,29 @@ public class WxBillRent implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
private Date updatetime; private Date updatetime;



@io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime")
private Date starttime;

@io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime")
private Date endtime;

public Date getStarttime() {
return starttime;
}

public void setStarttime(Date starttime) {
this.starttime = starttime;
}

public Date getEndtime() {
return endtime;
}

public void setEndtime(Date endtime) {
this.endtime = endtime;
}

public String getMerchantName() { public String getMerchantName() {
return merchantName; return merchantName;
} }


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

@@ -131,9 +131,9 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND);
} }
wxBillDaily.setPayDate(record.getPayDate()); wxBillDaily.setPayDate(record.getPayDate());
wxBillDaily.setPay(record.getPay() * 100);
wxBillDaily.setReceivePay(record.getReceivePay() * 100);
wxBillDaily.setOwe(record.getOwe() * 100);
wxBillDaily.setPay(record.getPay());
wxBillDaily.setReceivePay(record.getReceivePay());
wxBillDaily.setOwe(record.getOwe());
wxBillDaily.setStatus(record.getPay().equals(record.getReceivePay()) ? EnumBillDailyStatus.PAID.getCode() : wxBillDaily.getStatus()); wxBillDaily.setStatus(record.getPay().equals(record.getReceivePay()) ? EnumBillDailyStatus.PAID.getCode() : wxBillDaily.getStatus());
wxBillDaily.setUpdatetime(new Date()); wxBillDaily.setUpdatetime(new Date());
try { try {


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

@@ -114,9 +114,9 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND);
} }
wxBillDeposit.setPayDate(record.getPayDate()); wxBillDeposit.setPayDate(record.getPayDate());
wxBillDeposit.setPay(record.getPay()*100);
wxBillDeposit.setReceivePay(record.getReceivePay()*100);
wxBillDeposit.setOwe(record.getOwe()*100);
wxBillDeposit.setPay(record.getPay());
wxBillDeposit.setReceivePay(record.getReceivePay());
wxBillDeposit.setOwe(record.getOwe());
wxBillDeposit.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus()); wxBillDeposit.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus());
wxBillDeposit.setUpdatetime(new Date()); wxBillDeposit.setUpdatetime(new Date());
try { try {


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

@@ -115,9 +115,9 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe
return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND);
} }
wxBillDeposit.setPayDate(record.getPayDate()); wxBillDeposit.setPayDate(record.getPayDate());
wxBillDeposit.setPay(record.getPay()*100);
wxBillDeposit.setReceivePay(record.getReceivePay()*100);
wxBillDeposit.setOwe(record.getOwe()*100);
wxBillDeposit.setPay(record.getPay());
wxBillDeposit.setReceivePay(record.getReceivePay());
wxBillDeposit.setOwe(record.getOwe());
wxBillDeposit.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus()); wxBillDeposit.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus());
wxBillDeposit.setUpdatetime(new Date()); wxBillDeposit.setUpdatetime(new Date());
try { try {


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

@@ -112,9 +112,9 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND);
} }
property.setPayDate(record.getPayDate()); property.setPayDate(record.getPayDate());
property.setPay(record.getPay()*100);
property.setReceivePay(record.getReceivePay()*100);
property.setOwe(record.getOwe()*100);
property.setPay(record.getPay());
property.setReceivePay(record.getReceivePay());
property.setOwe(record.getOwe());
property.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():property.getStatus()); property.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():property.getStatus());
property.setUpdatetime(new Date()); property.setUpdatetime(new Date());
try { try {


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

@@ -113,9 +113,9 @@ public class WxBillRentServiceImpl implements WxBillRentService {
return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND);
} }
wxBillRent.setPayDate(record.getPayDate()); wxBillRent.setPayDate(record.getPayDate());
wxBillRent.setPay(record.getPay()*100);
wxBillRent.setReceivePay(record.getReceivePay()*100);
wxBillRent.setOwe(record.getOwe()*100);
wxBillRent.setPay(record.getPay());
wxBillRent.setReceivePay(record.getReceivePay());
wxBillRent.setOwe(record.getOwe());
wxBillRent.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillRent.getStatus()); wxBillRent.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillRent.getStatus());
wxBillRent.setUpdatetime(new Date()); wxBillRent.setUpdatetime(new Date());
try { try {


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

@@ -312,13 +312,12 @@ public class WxMerchantServiceImpl implements WxMerchantService {
receiver.setReceiverType(wxMerchant.getAccountTypeValue()); receiver.setReceiverType(wxMerchant.getAccountTypeValue());
receiver.setTrueName(wxMerchant.getAccountName()); receiver.setTrueName(wxMerchant.getAccountName());
return wxProfitSharingReceiverService.updateReceiver(wxMerchant, receiver); return wxProfitSharingReceiverService.updateReceiver(wxMerchant, receiver);
} else {
return wxProfitSharingReceiverService.delReceiver(wxMerchant);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("db failed: 账户操作失败, e:" + e.getMessage()); logger.error("db failed: 账户操作失败, e:" + e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());
} }
return new ResultData(Result.SUCCESS,"操作成功");


} }


@@ -592,6 +591,18 @@ public class WxMerchantServiceImpl implements WxMerchantService {
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
Date time = instance.getTime(); Date time = instance.getTime();
wxBillDeposit.setReceiveDate(time); wxBillDeposit.setReceiveDate(time);

//账单开始时间
instance.clear();
instance.setTime(wxBillDeposit.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
wxBillDeposit.setStarttime(instance.getTime());
//账单结束时间
instance.clear();
instance.setTime(wxBillDeposit.getReceiveDate());
instance.add(Calendar.MONTH, wxRentContract.getLease());
wxBillDeposit.setEndtime(instance.getTime());

//截止收租日在当前时间之前 //截止收租日在当前时间之前
if (wxBillDeposit.getReceiveDate().before(date)) { if (wxBillDeposit.getReceiveDate().before(date)) {
long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000); long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);
@@ -660,6 +671,31 @@ public class WxMerchantServiceImpl implements WxMerchantService {
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
Date time = instance.getTime(); Date time = instance.getTime();
wxBillRent.setReceiveDate(time); wxBillRent.setReceiveDate(time);

//账单开始时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
wxBillRent.setStarttime(instance.getTime());
//账单结束时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.MONTH, receivePeriod);
wxBillRent.setEndtime(instance.getTime());

if(extracount>0){
//账单开始时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
wxBillRent.setStarttime(instance.getTime());
//账单结束时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.MONTH, extralease);
wxBillRent.setEndtime(instance.getTime());
}

//截止收租日在当前时间之前 //截止收租日在当前时间之前
if (wxBillRent.getReceiveDate().before(date)) { if (wxBillRent.getReceiveDate().before(date)) {
long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000); long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);


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

@@ -71,8 +71,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
if(wxPropertyContract==null){ if(wxPropertyContract==null){
return new ResultData(ErrorCode.PROPERTY_CONTRACT_IS_NOT_FOUND); return new ResultData(ErrorCode.PROPERTY_CONTRACT_IS_NOT_FOUND);
} }
wxPropertyContract.setPrice(wxPropertyContract.getPrice() != null ? wxPropertyContract.getPrice() / 100 : 0);
wxPropertyContract.setDeposit(wxPropertyContract.getDeposit() != null ? wxPropertyContract.getDeposit() / 100 : 0);
wxPropertyContract.setPrice(wxPropertyContract.getPrice() != null ? wxPropertyContract.getPrice(): 0);
wxPropertyContract.setDeposit(wxPropertyContract.getDeposit() != null ? wxPropertyContract.getDeposit() : 0);


result.put("wxPropertyContract", wxPropertyContract); result.put("wxPropertyContract", wxPropertyContract);
//关联的商户 //关联的商户
@@ -126,8 +126,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
instance.add(Calendar.MONTH, record.getLease()); instance.add(Calendar.MONTH, record.getLease());
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
record.setRentalEndDate(instance.getTime()); record.setRentalEndDate(instance.getTime());
record.setPrice(record.getPrice() != null ? record.getPrice() * 100 : 0);
record.setDeposit(record.getDeposit() != null ? record.getDeposit() * 100 : 0);
record.setPrice(record.getPrice() != null ? record.getPrice(): 0);
record.setDeposit(record.getDeposit() != null ? record.getDeposit(): 0);
record.setUpdatetime(new Date()); record.setUpdatetime(new Date());
if(record.getPrice()==0 || record.getDeposit()==0){ if(record.getPrice()==0 || record.getDeposit()==0){
record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
@@ -253,6 +253,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
Date time = instance.getTime(); Date time = instance.getTime();
wxBillRent.setReceiveDate(time); wxBillRent.setReceiveDate(time);


//截止收租日在当前时间之前 //截止收租日在当前时间之前
if (wxBillRent.getReceiveDate().before(date)) { if (wxBillRent.getReceiveDate().before(date)) {
long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000); long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);


+ 43
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Dosyayı Görüntüle

@@ -74,8 +74,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND); return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND);
} }


wxRentContract.setPrice(wxRentContract.getPrice() != null ? wxRentContract.getPrice() / 100 : 0);
wxRentContract.setDeposit(wxRentContract.getDeposit() != null ? wxRentContract.getDeposit() / 100 : 0);
wxRentContract.setPrice(wxRentContract.getPrice() != null ? wxRentContract.getPrice(): 0);
wxRentContract.setDeposit(wxRentContract.getDeposit() != null ? wxRentContract.getDeposit(): 0);


result.put("wxRentContract", wxRentContract); result.put("wxRentContract", wxRentContract);
//关联的商户 //关联的商户
@@ -129,8 +129,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
instance.add(Calendar.MONTH, record.getLease()); instance.add(Calendar.MONTH, record.getLease());
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
record.setRentalEndDate(instance.getTime()); record.setRentalEndDate(instance.getTime());
record.setPrice(record.getPrice() != null ? record.getPrice() * 100 : 0);
record.setDeposit(record.getDeposit() != null ? record.getDeposit() * 100 : 0);
record.setPrice(record.getPrice() != null ? record.getPrice(): 0);
record.setDeposit(record.getDeposit() != null ? record.getDeposit(): 0);
record.setUpdatetime(new Date()); record.setUpdatetime(new Date());
if(record.getPrice()==0 || record.getDeposit()==0){ if(record.getPrice()==0 || record.getDeposit()==0){
record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
@@ -188,6 +188,18 @@ public class WxRentContractServiceImpl implements WxRentContractService {
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
Date time = instance.getTime(); Date time = instance.getTime();
wxBillDeposit.setReceiveDate(time); wxBillDeposit.setReceiveDate(time);

//账单开始时间
instance.clear();
instance.setTime(wxBillDeposit.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
wxBillDeposit.setStarttime(instance.getTime());
//账单结束时间
instance.clear();
instance.setTime(wxBillDeposit.getReceiveDate());
instance.add(Calendar.MONTH, wxRentContract.getLease());
wxBillDeposit.setEndtime(instance.getTime());

//截止收租日在当前时间之前 //截止收租日在当前时间之前
if (wxBillDeposit.getReceiveDate().before(date)) { if (wxBillDeposit.getReceiveDate().before(date)) {
long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000); long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);
@@ -256,6 +268,33 @@ public class WxRentContractServiceImpl implements WxRentContractService {
instance.add(Calendar.DAY_OF_MONTH, -1); instance.add(Calendar.DAY_OF_MONTH, -1);
Date time = instance.getTime(); Date time = instance.getTime();
wxBillRent.setReceiveDate(time); wxBillRent.setReceiveDate(time);

//账单开始时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
wxBillRent.setStarttime(instance.getTime());
//账单结束时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
instance.add(Calendar.MONTH, receivePeriod);
wxBillRent.setEndtime(instance.getTime());

if(extracount>0){
//账单开始时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
wxBillRent.setStarttime(instance.getTime());
//账单结束时间
instance.clear();
instance.setTime(wxBillRent.getReceiveDate());
instance.add(Calendar.DAY_OF_MONTH, 1);
instance.add(Calendar.MONTH, extralease);
wxBillRent.setEndtime(instance.getTime());
}

//截止收租日在当前时间之前 //截止收租日在当前时间之前
if (wxBillRent.getReceiveDate().before(date)) { if (wxBillRent.getReceiveDate().before(date)) {
long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000); long day = (time.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);


Yükleniyor…
İptal
Kaydet