diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
index ec4efa1a4..5b9c0b9cd 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
@@ -746,15 +746,14 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM");
SimpleDateFormat sdD = new SimpleDateFormat("d");
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
+ SimpleDateFormat sdMR = new SimpleDateFormat("MM-dd");
if(i == billTimeVoListSize - 1){//最后
- //判断是否满足整月
- int startInt = Integer.parseInt(sdD.format(startDate));
- int endInt = Integer.parseInt(sdD.format(DateUtils.getDaySet(endDate,Calendar.DATE,1)));
- if(startInt == endInt){
- int months = WxRentContractServiceImpl.getMonths(sdM.format(startDate)+"-01",sdM.format(DateUtils.getDaySet(endDate,Calendar.DATE,1))+"-01");
+ if(sdMR.format(startDate).equals(sdMR.format(wxRentContract.getStartDate())) && sdMR.format(endDate).equals(sdMR.format(wxRentContract.getEndDate())) ){
+ int months = WxRentContractServiceImpl.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01");
+ months++;
needpay = new Double(months * priceD).longValue();
- }else{
+ }else {
needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, startDate, endDate)).longValue();
}
}else if(i == 0){//第一期
diff --git a/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml b/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml
index 3f89e5f82..2fd12b8fb 100644
--- a/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml
@@ -88,7 +88,7 @@
select sum(fee) fee,c.create_time from (
select id,DATE_FORMAT(create_date,'%m/%d') create_time,CONVERT(JSON_EXTRACT(cmd_json,'$.fee'), Decimal(16,2)) fee
from wx_car_cmd_log where tenant_id = #{tenantId} and cmd_type=#{cmdType}
- and create_date BETWEEN #{startdate} and #{enddate}
+ and REPLACE (JSON_EXTRACT(cmd_json,'$.time'),'"','') BETWEEN #{startdate} and #{enddate}
) c group by c.create_time order by c.create_time
diff --git a/mallinkService/src/main/resources/mapper/WxCarPayRecordMapper.xml b/mallinkService/src/main/resources/mapper/WxCarPayRecordMapper.xml
index 233432a52..aa2323443 100644
--- a/mallinkService/src/main/resources/mapper/WxCarPayRecordMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxCarPayRecordMapper.xml
@@ -59,10 +59,10 @@
- and create_date >= #{startDate}
+ and fee_time >= #{startDate}
- and create_date <= #{endDate}
+ and fee_time <= #{endDate}
and fee is not null