zyg 1 vuosi sitten
vanhempi
commit
8be0b8f874

+ 5 - 3
hz-business/src/main/java/com/hz/business/service/impl/AnalysisReportServiceImpl.java

@@ -569,7 +569,9 @@ public class AnalysisReportServiceImpl extends ServiceImpl<AnalysisReportMapper,
             for (String sn : snss) {
                 //输入vin,则会根据vin获取到对应sn进行存储
                 if( StringUtils.isNotBlank(sn)){
-                    Battery one = batteryMapper.selectOne(new QueryWrapper<Battery>().eq("vin", sn.replace(" ","")).or().eq("sn",sn.replace(" ","")));
+                    Battery one = batteryMapper.selectOne(new QueryWrapper<Battery>()
+                            .eq("vin", sn.replace(" ",""))
+                            .or().eq("sn",sn.replace(" ","")));
                     if(one==null){
                         return null;
                     }else{
@@ -1420,10 +1422,10 @@ public class AnalysisReportServiceImpl extends ServiceImpl<AnalysisReportMapper,
         PreparedStatement psSelect = null;
         try {
             conn = PhoenixUtils.getConnection();
-            /*psSelect = conn.prepareStatement(" use " + database + " ");
+            psSelect = conn.prepareStatement(" use " + database + " ");
             psSelect.setFetchSize(1000);
             psSelect.execute();
-            psSelect.close();*/
+            psSelect.close();
             psSelect = conn.prepareStatement(sql);
             ResultSet resultSet = psSelect.executeQuery();
             mapList = ResultSetToJson.toListMap(resultSet, false);