wuxw
2024-11-25 35abc758bf497882462d50deda212af8a1666a9d
优化出售车辆时间问题
4个文件已修改
37 ■■■■■ 已修改文件
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/owner/EditOwnerCarCmd.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/owner/SaveOwnerCarCmd.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot/src/main/resources/application-debug.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -20,6 +20,7 @@
import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.ListUtil;
import com.java110.utils.util.StringUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
@@ -371,7 +372,7 @@
        if (count > 0) {
            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryOweFeeDetail(reportFeeMonthStatisticsDto);
            ReportFeeMonthStatisticsDto tmpReportFeeMonthStatisticsDto = reportFeeMonthStatisticsInnerServiceSMOImpl.queryOweFeeDetailMajor(reportFeeMonthStatisticsDto);
            if (reportFeeMonthStatisticsDtos != null && reportFeeMonthStatisticsDtos.size() > 0) {
            if (!ListUtil.isNull(reportFeeMonthStatisticsDtos)) {
                for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 : reportFeeMonthStatisticsDtos) {
//                    reportFeeMonthStatisticsDto1.setAllReceivableAmount(tmpReportFeeMonthStatisticsDto.getAllReceivableAmount());
//                    reportFeeMonthStatisticsDto1.setAllReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllReceivedAmount());
service-user/src/main/java/com/java110/user/cmd/owner/EditOwnerCarCmd.java
@@ -90,10 +90,10 @@
            reqJson.put("leaseType", OwnerCarDto.LEASE_TYPE_MONTH);
        }
        if (!OwnerCarDto.LEASE_TYPE_MONTH.equals(reqJson.getString("leaseType"))) {
            reqJson.put("startTime", DateUtil.getFormatTimeString(new Date(), DateUtil.DATE_FORMATE_STRING_B));
            reqJson.put("endTime", "2037-01-01");
        }
//        if (!OwnerCarDto.LEASE_TYPE_MONTH.equals(reqJson.getString("leaseType"))) {
//            reqJson.put("startTime", DateUtil.getFormatTimeString(new Date(), DateUtil.DATE_FORMATE_STRING_B));
//            reqJson.put("endTime", "2050-01-01");
//        }
        OwnerCarPo ownerCarPo = BeanConvertUtil.covertBean(reqJson, OwnerCarPo.class);
        int flag = ownerCarV1InnerServiceSMOImpl.updateOwnerCar(ownerCarPo);
service-user/src/main/java/com/java110/user/cmd/owner/SaveOwnerCarCmd.java
@@ -23,10 +23,7 @@
import com.java110.po.parking.ParkingSpacePo;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.StringUtil;
import com.java110.utils.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -72,6 +69,17 @@
            Assert.isDate(reqJson.getString("endTime"),DateUtil.DATE_FORMATE_STRING_B,"结束时间格式错误");
        }
        String startTime = reqJson.getString("startTime");
        String endTime = reqJson.getString("endTime");
        if(StringUtil.isEmpty(startTime)){
            startTime = DateUtil.getFormatTimeString(new Date(), DateUtil.DATE_FORMATE_STRING_B);
            reqJson.put("startTime",startTime);
        }
        if(StringUtil.isEmpty(endTime)){
            endTime = "2050-01-01";
            reqJson.put("endTime",endTime);
        }
        //检查车位是否是空闲状态
        ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
        parkingSpaceDto.setPsId(reqJson.getString("psId"));
@@ -79,7 +87,7 @@
        Assert.listOnlyOne(parkingSpaceDtos, "查询车位错误!");
        //获取车位状态
        String state = parkingSpaceDtos.get(0).getState();
        if (StringUtil.isEmpty(state) || !state.equals("F")) {
        if (StringUtil.isEmpty(state) || !ParkingSpaceDto.STATE_FREE.equals(state)) {
            throw new IllegalArgumentException("该车位不是空闲状态!");
        }
@@ -115,7 +123,7 @@
        carInoutDto.setCarNum(reqJson.getString("carNum"));
        carInoutDto.setStates(new String[]{CarInoutDto.STATE_PAY, CarInoutDto.STATE_IN, CarInoutDto.STATE_REPAY});
        List<CarInoutDto> carInoutDtos = carInoutInnerServiceSMOImpl.queryCarInouts(carInoutDto);
        if (carInoutDtos != null && carInoutDtos.size() > 0) {
        if (!ListUtil.isNull(carInoutDtos)) {
            throw new CmdException("车辆在场,请出场后再办理月租车");
        }
    }
@@ -127,10 +135,6 @@
            reqJson.put("leaseType", OwnerCarDto.LEASE_TYPE_MONTH);
        }
        if (!OwnerCarDto.LEASE_TYPE_MONTH.equals(reqJson.getString("leaseType"))) {
            reqJson.put("startTime", DateUtil.getFormatTimeString(new Date(), DateUtil.DATE_FORMATE_STRING_B));
            reqJson.put("endTime", "2050-01-01");
        }
        JSONObject businessOwnerCar = new JSONObject();
        businessOwnerCar.putAll(reqJson);
        businessOwnerCar.put("memberId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_carId));
springboot/src/main/resources/application-debug.yml
@@ -29,7 +29,7 @@
  activiti:
    database-schema-update: false
  datasource:
    url: jdbc:mysql://192.168.100.108:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
    url: jdbc:mysql://192.168.31.250:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
    username: TT
    password: hc12345678
    type: com.alibaba.druid.pool.DruidDataSource