|
@@ -24,7 +24,6 @@ import com.hz.business.req.*;
|
|
|
import com.hz.business.req.BatteryParam;
|
|
|
import com.hz.business.service.IBatteryService;
|
|
|
import com.hz.business.util.CustomerTitleHandler;
|
|
|
-import com.hz.business.util.LindormUtil;
|
|
|
import com.hz.business.util.PhoenixUtils;
|
|
|
import com.hz.business.util.StrUtils;
|
|
|
import com.hz.business.vo.*;
|
|
@@ -32,9 +31,7 @@ import com.hz.common.config.HzConfig;
|
|
|
import com.hz.common.constant.Constants;
|
|
|
import com.hz.common.core.domain.entity.SysDictData;
|
|
|
import com.hz.common.utils.*;
|
|
|
-import com.hz.common.utils.bean.BeanCopier;
|
|
|
import com.hz.system.mapper.SysDictDataMapper;
|
|
|
-import kotlin.collections.Grouping;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import com.hz.common.utils.bean.BeanUtils;
|
|
@@ -506,6 +503,7 @@ public class BatteryServiceImpl extends ServiceImpl<BatteryMapper, Battery> impl
|
|
|
.or().like("vin", param.getSn()));
|
|
|
wrapper.in(!packList.isEmpty(), "pack_model_code", packList);
|
|
|
wrapper.in(!cellList.isEmpty(), "cell_model_code", cellList);
|
|
|
+ wrapper.eq("is_delete", 0);
|
|
|
wrapper.eq(StringUtils.isNotBlank(param.getBatteryCoreType()), "battery_core_type", param.getBatteryCoreType());
|
|
|
wrapper.in(batteryIdSet.size() > 0, "id", batteryIdSet);
|
|
|
wrapper.in((param.getFaultStatus() != null && param.getFaultStatus() == 1 && snSet.size() > 0), "sn", snSet);
|
|
@@ -2348,7 +2346,7 @@ public class BatteryServiceImpl extends ServiceImpl<BatteryMapper, Battery> impl
|
|
|
|
|
|
// CellMaxVol,CellMinVol,CellMaxTemp,CellMinTemp,BmsCellVoltDiff,VehSpd
|
|
|
builder.append("select SN,Time,PackVoltage,PackCrnt,PackSoc,CellVoltage,CellTemp,InsulationRss,Info from ")
|
|
|
- .append(tableName).append(" where ");
|
|
|
+ .append(database+"."+tableName).append(" where ");
|
|
|
|
|
|
|
|
|
if (param.getStartTime() == null && param.getEndTime() == null) {
|
|
@@ -2380,10 +2378,10 @@ public class BatteryServiceImpl extends ServiceImpl<BatteryMapper, Battery> impl
|
|
|
PreparedStatement psSelect = null;
|
|
|
try {
|
|
|
conn = PhoenixUtils.getConnection();
|
|
|
- psSelect = conn.prepareStatement(" use " + database + " ");
|
|
|
- psSelect.setFetchSize(1000);
|
|
|
- psSelect.execute();
|
|
|
- psSelect.close();
|
|
|
+ //psSelect = conn.prepareStatement(" use " + database + " ");
|
|
|
+ //psSelect.setFetchSize(1000);
|
|
|
+ //psSelect.execute();
|
|
|
+ //psSelect.close();
|
|
|
psSelect = conn.prepareStatement(builder.toString());
|
|
|
ResultSet resultSet = psSelect.executeQuery();
|
|
|
flinkDataList = convertList(resultSet);
|
|
@@ -3791,16 +3789,12 @@ public class BatteryServiceImpl extends ServiceImpl<BatteryMapper, Battery> impl
|
|
|
String snKeyMin = snKey + "0";
|
|
|
String snKeyMax = snKey + "a";
|
|
|
|
|
|
- builder.append("select id,remain_odo from ").append(tableName);
|
|
|
+ builder.append("select id,remain_odo from ").append(database+"."+tableName);
|
|
|
builder.append(" where id > '").append(snKeyMin).append("' and id < '")
|
|
|
.append(snKeyMax).append("'");
|
|
|
builder.append(" order by id limit 1 ");
|
|
|
|
|
|
conn = PhoenixUtils.getConnection();
|
|
|
- psSelect = conn.prepareStatement(" use " + database + " ");
|
|
|
- psSelect.setFetchSize(1000);
|
|
|
- psSelect.execute();
|
|
|
- psSelect.close();
|
|
|
psSelect = conn.prepareStatement(builder.toString());
|
|
|
ResultSet resultSet = psSelect.executeQuery();
|
|
|
mapList = ResultSetToJson.toListMap(resultSet, false);
|