Commit 1a83a8b3d798fdb1873eb312f6002dcc97d67512

Authored by 胡翰林
1 parent f1b74977

下载报表高损警情列表bug处理

@@ -195,6 +195,7 @@ public class StatisticsController extends BaseController { @@ -195,6 +195,7 @@ public class StatisticsController extends BaseController {
195 }); 195 });
196 196
197 197
  198 +
198 return JsonResult.ok(OptionStatus.OPT_SUCCESS.getName(), dataList); 199 return JsonResult.ok(OptionStatus.OPT_SUCCESS.getName(), dataList);
199 } catch (Exception ex) { 200 } catch (Exception ex) {
200 ex.printStackTrace(); 201 ex.printStackTrace();
@@ -717,7 +718,7 @@ public class StatisticsController extends BaseController { @@ -717,7 +718,7 @@ public class StatisticsController extends BaseController {
717 WiLossVo clv = new WiLossVo(); 718 WiLossVo clv = new WiLossVo();
718 clv.setCode(cd.getCode()); 719 clv.setCode(cd.getCode());
719 clv.setArea(cd.getAnalysis().getArea()); 720 clv.setArea(cd.getAnalysis().getArea());
720 - clv.setCounty(cd.getAnalysis().getCounty()); 721 + clv.setCounty(cd.getCounty());
721 clv.setAlarmSubType(cd.getAlarmSubType()); 722 clv.setAlarmSubType(cd.getAlarmSubType());
722 clv.setAmount(String.valueOf(cd.getAnalysis().getAmount())); 723 clv.setAmount(String.valueOf(cd.getAnalysis().getAmount()));
723 clv.setRainageMethod(cd.getAnalysis().getRainageMethod()); 724 clv.setRainageMethod(cd.getAnalysis().getRainageMethod());
@@ -6,7 +6,6 @@ import com.alibaba.excel.exception.ExcelDataConvertException; @@ -6,7 +6,6 @@ import com.alibaba.excel.exception.ExcelDataConvertException;
6 import com.alibaba.fastjson.JSONObject; 6 import com.alibaba.fastjson.JSONObject;
7 import com.ash.base.*; 7 import com.ash.base.*;
8 import com.ash.base.excelOpt.ExcelErrorMessage; 8 import com.ash.base.excelOpt.ExcelErrorMessage;
9 -import com.ash.entity.Case;  
10 import com.ash.entity.WarningInstance; 9 import com.ash.entity.WarningInstance;
11 import com.ash.entity.WarningInstanceAnalysis; 10 import com.ash.entity.WarningInstanceAnalysis;
12 import com.ash.entity.dao.WarningInstanceMapper; 11 import com.ash.entity.dao.WarningInstanceMapper;
@@ -202,7 +201,7 @@ public class WarningInstanceService { @@ -202,7 +201,7 @@ public class WarningInstanceService {
202 201
203 resultList.forEach(e -> { 202 resultList.forEach(e -> {
204 String value = e.getValue(); 203 String value = e.getValue();
205 - Integer iv = Integer.parseInt(value); 204 + int iv = Integer.parseInt(value);
206 e.setValue(String.format("%.2f", iv * 1.0 / total.get() * 100.0)); 205 e.setValue(String.format("%.2f", iv * 1.0 / total.get() * 100.0));
207 }); 206 });
208 } 207 }
@@ -292,7 +291,7 @@ public class WarningInstanceService { @@ -292,7 +291,7 @@ public class WarningInstanceService {
292 } 291 }
293 292
294 public List<BarChartVo> statisticsByDate(StatisticsParams params) { 293 public List<BarChartVo> statisticsByDate(StatisticsParams params) {
295 - MPJQueryWrapper<WarningInstance> mpjQueryWrapper = new MPJQueryWrapper<WarningInstance>(); 294 + MPJQueryWrapper<WarningInstance> mpjQueryWrapper = new MPJQueryWrapper<>();
296 mpjQueryWrapper.select("DATE_FORMAT(t.alarm_date, '%Y-%m-%d') as alarmDate,count(0) as field_count"); 295 mpjQueryWrapper.select("DATE_FORMAT(t.alarm_date, '%Y-%m-%d') as alarmDate,count(0) as field_count");
297 296
298 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 297 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -319,7 +318,7 @@ public class WarningInstanceService { @@ -319,7 +318,7 @@ public class WarningInstanceService {
319 318
320 319
321 public List<BarChartVo> statisticsSequentialByArea(StatisticsParams params) { 320 public List<BarChartVo> statisticsSequentialByArea(StatisticsParams params) {
322 - MPJQueryWrapper<WarningInstance> mpjQueryWrapper = new MPJQueryWrapper<WarningInstance>(); 321 + MPJQueryWrapper<WarningInstance> mpjQueryWrapper = new MPJQueryWrapper<>();
323 mpjQueryWrapper.select("wia.area,count(t.id) as field_count") 322 mpjQueryWrapper.select("wia.area,count(t.id) as field_count")
324 .leftJoin("t_ash_warning_instance_analysis wia on t.id=wia.wi_id"); 323 .leftJoin("t_ash_warning_instance_analysis wia on t.id=wia.wi_id");
325 324