Browse Source

[bug][修改][1001665]

release_toaliyun_real
luozukai 7 years ago
parent
commit
4042cfa1f4
2 changed files with 20 additions and 20 deletions
  1. +10
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  2. +10
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 10
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java View File

@@ -584,7 +584,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
long needpay;

//按日
if(wxPropertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode())){
if (wxPropertyContract.getPriceUnit().equals(EnumPriceUnit.D.getCode())){
double needpayD = WxRentContractServiceImpl.getNeedPay(0,price,wxBillProperty.getStarttime(),wxBillProperty.getEndtime());
needpay = new Double(needpayD).longValue();
}else{
@@ -675,16 +675,16 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
}

//按月计租
if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode())
||propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) {
// if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode())
// ||propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) {
result = buildRentMonth(wxMerchant, userId, propertyContract, receivePeriod, lease, rentalStartDate, price,isPreview);
} else {
//如果按日
List<Date> yearList = new ArrayList<>();
yearList.add(rentalStartDate);
Map<String, Object> resultMap = buildRent(receivePeriod,new long[]{price}, yearList, Calendar.DAY_OF_MONTH, propertyContract, userId, wxMerchant, 0, isPreview, null);
result = (List<WxBillProperty>)resultMap.get("billList");
}
// } else {
// //如果按日
// List<Date> yearList = new ArrayList<>();
// yearList.add(rentalStartDate);
// Map<String, Object> resultMap = buildRent(receivePeriod,new long[]{price}, yearList, Calendar.DAY_OF_MONTH, propertyContract, userId, wxMerchant, 0, isPreview, null);
// result = (List<WxBillProperty>)resultMap.get("billList");
// }
}
for (int i = 0; i < result.size(); i++) {
result.get(i).setPeriod(i+1);


+ 10
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -723,16 +723,16 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}

//按月计租
if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode())
||wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) {
// if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode())
// ||wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) {
rentList = buildRentMonth(wxMerchant, userId, wxRentContract, receivePeriod, lease, rentalStartDate, price,isPreview);
} else {
//如果按日
List<Date> yearList = new ArrayList<>();
yearList.add(rentalStartDate);
Map<String, Object> resultMap = buildRent(receivePeriod, new long[]{price}, yearList, Calendar.DAY_OF_MONTH, wxRentContract, userId, wxMerchant, 0, isPreview,null);
rentList = ( List<WxBillRent>)resultMap.get("billList");
}
// } else {
// //如果按日
// List<Date> yearList = new ArrayList<>();
// yearList.add(rentalStartDate);
// Map<String, Object> resultMap = buildRent(receivePeriod, new long[]{price}, yearList, Calendar.DAY_OF_MONTH, wxRentContract, userId, wxMerchant, 0, isPreview,null);
// rentList = ( List<WxBillRent>)resultMap.get("billList");
// }
}
for (int i = 0; i < rentList.size(); i++) {
rentList.get(i).setPeriod(i+1);
@@ -932,7 +932,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
long needpay;

//按日
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode())){
if (wxRentContract.getPriceUnit().equals(EnumPriceUnit.D.getCode())){
double needpayD = WxRentContractServiceImpl.getNeedPay(0,price,wxBillRent.getStarttime(),wxBillRent.getEndtime());
needpay = new Double(needpayD).longValue();
}else{


Loading…
Cancel
Save