Commit 7a9dcf0854d6a6af4d40ded866b9ad0f4e0361b6
Merge branch 'lggj' of http://61.169.120.202:8888/panzhaov5/bsth_control into lggj
Showing
2 changed files
with
21 additions
and
41 deletions
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| 1 | package com.bsth.service.impl; | 1 | package com.bsth.service.impl; |
| 2 | 2 | ||
| 3 | -import java.io.File; | ||
| 4 | -import java.math.BigDecimal; | ||
| 5 | -import java.math.RoundingMode; | ||
| 6 | -import java.sql.ResultSet; | ||
| 7 | -import java.sql.SQLException; | ||
| 8 | -import java.text.DecimalFormat; | ||
| 9 | -import java.text.ParseException; | ||
| 10 | -import java.text.SimpleDateFormat; | ||
| 11 | -import java.util.ArrayList; | ||
| 12 | -import java.util.Calendar; | ||
| 13 | -import java.util.Collections; | ||
| 14 | -import java.util.Comparator; | ||
| 15 | -import java.util.Date; | ||
| 16 | -import java.util.GregorianCalendar; | ||
| 17 | -import java.util.HashMap; | ||
| 18 | -import java.util.HashSet; | ||
| 19 | -import java.util.Iterator; | ||
| 20 | -import java.util.List; | ||
| 21 | -import java.util.Map; | ||
| 22 | -import java.util.Set; | ||
| 23 | - | ||
| 24 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 25 | -import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 26 | -import org.springframework.jdbc.core.JdbcTemplate; | ||
| 27 | -import org.springframework.jdbc.core.RowMapper; | ||
| 28 | -import org.springframework.stereotype.Service; | ||
| 29 | - | ||
| 30 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 31 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 32 | import com.bsth.data.BasicData; | 5 | import com.bsth.data.BasicData; |
| @@ -49,13 +22,23 @@ import com.bsth.service.LineService; | @@ -49,13 +22,23 @@ import com.bsth.service.LineService; | ||
| 49 | import com.bsth.service.report.CulateMileageService; | 22 | import com.bsth.service.report.CulateMileageService; |
| 50 | import com.bsth.service.sys.DictionaryService; | 23 | import com.bsth.service.sys.DictionaryService; |
| 51 | import com.bsth.service.sys.DutyEmployeeService; | 24 | import com.bsth.service.sys.DutyEmployeeService; |
| 52 | -import com.bsth.util.Arith; | ||
| 53 | -import com.bsth.util.ComparableChild; | ||
| 54 | -import com.bsth.util.ComparableReal; | ||
| 55 | -import com.bsth.util.ReportRelatedUtils; | ||
| 56 | -import com.bsth.util.ReportUtils; | ||
| 57 | -import com.bsth.util.TimeUtils; | 25 | +import com.bsth.util.*; |
| 58 | import com.google.gson.Gson; | 26 | import com.google.gson.Gson; |
| 27 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 28 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 29 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 30 | +import org.springframework.jdbc.core.RowMapper; | ||
| 31 | +import org.springframework.stereotype.Service; | ||
| 32 | + | ||
| 33 | +import java.io.File; | ||
| 34 | +import java.math.BigDecimal; | ||
| 35 | +import java.math.RoundingMode; | ||
| 36 | +import java.sql.ResultSet; | ||
| 37 | +import java.sql.SQLException; | ||
| 38 | +import java.text.DecimalFormat; | ||
| 39 | +import java.text.ParseException; | ||
| 40 | +import java.text.SimpleDateFormat; | ||
| 41 | +import java.util.*; | ||
| 59 | 42 | ||
| 60 | 43 | ||
| 61 | @Service | 44 | @Service |
| @@ -2883,7 +2866,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2883,7 +2866,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2883 | Map.put("remMileage_yy", remmap.get("remMileage_yy")); //营运烂班公里 | 2866 | Map.put("remMileage_yy", remmap.get("remMileage_yy")); //营运烂班公里 |
| 2884 | Map.put("remMileage_ks", remmap.get("remMileage_ks")); //空驶烂班公里 | 2867 | Map.put("remMileage_ks", remmap.get("remMileage_ks")); //空驶烂班公里 |
| 2885 | Map<String,Double> ljmap = culateService.culateLjgl_yy_ks(lists); | 2868 | Map<String,Double> ljmap = culateService.culateLjgl_yy_ks(lists); |
| 2886 | - Map.put("addMileage_yy", ljmap.get("addMileage_yy")); //临加烂班公里 | 2869 | + Map.put("addMileage_yy", ljmap.get("addMileage_yy")); //临加营运公里 |
| 2887 | Map.put("addMileage_ks", ljmap.get("addMileage_ks")); //临加烂班公里 | 2870 | Map.put("addMileage_ks", ljmap.get("addMileage_ks")); //临加烂班公里 |
| 2888 | double yygl=Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)); | 2871 | double yygl=Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)); |
| 2889 | Map.put("yygl", yygl); | 2872 | Map.put("yygl", yygl); |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -13,12 +13,9 @@ import com.bsth.util.ComparableJob; | @@ -13,12 +13,9 @@ import com.bsth.util.ComparableJob; | ||
| 13 | import org.apache.commons.lang.StringUtils; | 13 | import org.apache.commons.lang.StringUtils; |
| 14 | import org.springframework.beans.factory.annotation.Autowired; | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| 15 | import org.springframework.jdbc.core.JdbcTemplate; | 15 | import org.springframework.jdbc.core.JdbcTemplate; |
| 16 | -import org.springframework.jdbc.core.RowMapper; | ||
| 17 | import org.springframework.stereotype.Service; | 16 | import org.springframework.stereotype.Service; |
| 18 | 17 | ||
| 19 | import java.math.BigDecimal; | 18 | import java.math.BigDecimal; |
| 20 | -import java.sql.ResultSet; | ||
| 21 | -import java.sql.SQLException; | ||
| 22 | import java.text.DecimalFormat; | 19 | import java.text.DecimalFormat; |
| 23 | import java.text.ParseException; | 20 | import java.text.ParseException; |
| 24 | import java.text.SimpleDateFormat; | 21 | import java.text.SimpleDateFormat; |
| @@ -548,7 +545,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -548,7 +545,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 548 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | 545 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); |
| 549 | if(childTaskPlans.isEmpty()){ | 546 | if(childTaskPlans.isEmpty()){ |
| 550 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") | 547 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") |
| 551 | - || scheduleRealInfo.getBcType().equals("venting") || scheduleRealInfo.getBcType().equals("ldks")){ | 548 | + || scheduleRealInfo.getBcType().equals("ldks")){ |
| 552 | addMileage_ks=Arith.add(addMileage_ks,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc()); | 549 | addMileage_ks=Arith.add(addMileage_ks,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc()); |
| 553 | }else { | 550 | }else { |
| 554 | addMileage_yy=Arith.add(addMileage_yy,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc()); | 551 | addMileage_yy=Arith.add(addMileage_yy,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc()); |
| @@ -561,7 +558,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -561,7 +558,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 561 | if (!childTaskPlan.isDestroy()) { | 558 | if (!childTaskPlan.isDestroy()) { |
| 562 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 559 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 563 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") | 560 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") |
| 564 | - || scheduleRealInfo.getBcType().equals("venting") || scheduleRealInfo.getBcType().equals("ldks")){ | 561 | + || scheduleRealInfo.getBcType().equals("ldks")){ |
| 565 | addMileage_ks=Arith.add(addMileage_ks,jhgl); | 562 | addMileage_ks=Arith.add(addMileage_ks,jhgl); |
| 566 | }else { | 563 | }else { |
| 567 | addMileage_yy=Arith.add(addMileage_yy,jhgl); | 564 | addMileage_yy=Arith.add(addMileage_yy,jhgl); |
| @@ -578,7 +575,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -578,7 +575,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 578 | double zjlc=Arith.sub(jhlc, jhlcOrig); | 575 | double zjlc=Arith.sub(jhlc, jhlcOrig); |
| 579 | if(zjlc>0){ | 576 | if(zjlc>0){ |
| 580 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") | 577 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") |
| 581 | - || scheduleRealInfo.getBcType().equals("venting") || scheduleRealInfo.getBcType().equals("ldks")){ | 578 | + || scheduleRealInfo.getBcType().equals("ldks")){ |
| 582 | addMileage_ks=Arith.add(addMileage_ks,ljgl); | 579 | addMileage_ks=Arith.add(addMileage_ks,ljgl); |
| 583 | }else { | 580 | }else { |
| 584 | addMileage_yy=Arith.add(addMileage_yy,ljgl); | 581 | addMileage_yy=Arith.add(addMileage_yy,ljgl); |
| @@ -593,7 +590,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -593,7 +590,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 593 | if (!childTaskPlan.isDestroy()) { | 590 | if (!childTaskPlan.isDestroy()) { |
| 594 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 591 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 595 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") | 592 | if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") |
| 596 | - || scheduleRealInfo.getBcType().equals("venting") || scheduleRealInfo.getBcType().equals("ldks")){ | 593 | + || scheduleRealInfo.getBcType().equals("ldks")){ |
| 597 | addMileage_ks=Arith.add(addMileage_ks,jhgl); | 594 | addMileage_ks=Arith.add(addMileage_ks,jhgl); |
| 598 | }else { | 595 | }else { |
| 599 | addMileage_yy=Arith.add(addMileage_yy,jhgl); | 596 | addMileage_yy=Arith.add(addMileage_yy,jhgl); |