rk
8 小时以前 da5df77bf60dcc9a67d5560a210fea96d225133f
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
@@ -44,6 +45,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.Date;
@@ -642,4 +644,48 @@
    }
    public void jdyPushCarUseBook(String dataInfo){
        JSONObject dataInfoJSON = JSONObject.parseObject(dataInfo);
        if(dataInfoJSON.isEmpty()){
            return;
        }
        JSONObject dataJSON = dataInfoJSON.getJSONObject("data");
        String id = dataJSON.getString("_id");
        if(StringUtils.isEmpty(id)){
            return;
        }
        String carCode = dataJSON.getString("car_no");
        String startDate = dataJSON.getString("start_date");
        String endDate = dataJSON.getString("end_date");
        Integer status = dataJSON.getInteger("flowState");
        String typeInfo =   dataJSON.getString("scope");
        String reason =   dataJSON.getString("reason");
        String addr =   dataJSON.getString("addr");
        JSONArray usersArray =   dataJSON.getJSONArray("users");
        JSONObject driverJSON = dataJSON.getJSONObject("driver");
        if(!(Constants.equalsInteger(status,Constants.ONE)||Constants.equalsInteger(status,Constants.TWO))){
        }
        CarUseBook carUseBook = carUseBookJoinMapper.selectOne(new QueryWrapper<CarUseBook>()
                .lambda().eq(CarUseBook::getJdyId,id).last("limit 1"));
        if(Objects.isNull(carUseBook)){
            carUseBook = new CarUseBook();
            carUseBook.setCreateDate(new Date());
            carUseBook.setCarCode(carCode);
            carUseBook.setCarId(null);
            carUseBook.setStartTime(DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",DateUtil.getDateStrOfUTCStr(startDate)));
            carUseBook.setEndTime(DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",DateUtil.getDateStrOfUTCStr(endDate)));
        }else{
        }
    }
}