Commit 7a5a1e9a4b7597ea00b664feb0fc1d03437f060b
1 parent
4d5e7aa3
update...
Showing
2 changed files
with
31 additions
and
25 deletions
src/main/java/com/bsth/service/realcontrol/impl/ChildTaskPlanServiceImpl.java
| 1 | 1 | package com.bsth.service.realcontrol.impl; |
| 2 | 2 | |
| 3 | -import com.alibaba.fastjson.JSON; | |
| 4 | 3 | import com.bsth.common.ResponseCode; |
| 5 | 4 | import com.bsth.data.BasicData; |
| 6 | 5 | import com.bsth.data.Station2ParkBuffer; |
| ... | ... | @@ -61,7 +60,24 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl<ChildTaskPlan, Lon |
| 61 | 60 | |
| 62 | 61 | //中途换车出场子任务,级联生成一个主任务,供报表和对外接口计算用 |
| 63 | 62 | if(StringUtils.isNotEmpty(t.getNbbm())){ |
| 64 | - ScheduleRealInfo ccServiceSch = JSON.parseObject(JSON.toJSONString(sch), ScheduleRealInfo.class); | |
| 63 | + ScheduleRealInfo ccServiceSch = new ScheduleRealInfo(); | |
| 64 | + ccServiceSch.setSflj(sch.isSflj()); | |
| 65 | + ccServiceSch.setjGh(sch.getjGh()); | |
| 66 | + ccServiceSch.setjName(sch.getjName()); | |
| 67 | + ccServiceSch.setsGh(sch.getsGh()); | |
| 68 | + ccServiceSch.setsName(sch.getsName()); | |
| 69 | + ccServiceSch.setGsBm(sch.getGsBm()); | |
| 70 | + ccServiceSch.setFgsBm(sch.getFgsBm()); | |
| 71 | + ccServiceSch.setGsName(sch.getGsName()); | |
| 72 | + ccServiceSch.setFgsName(sch.getFgsName()); | |
| 73 | + ccServiceSch.setLpName(sch.getLpName()); | |
| 74 | + ccServiceSch.setXlBm(sch.getXlBm()); | |
| 75 | + ccServiceSch.setXlName(sch.getXlName()); | |
| 76 | + ccServiceSch.setXlDir(sch.getXlDir()); | |
| 77 | + ccServiceSch.setScheduleDate(sch.getScheduleDate()); | |
| 78 | + ccServiceSch.setScheduleDateStr(sch.getScheduleDateStr()); | |
| 79 | + ccServiceSch.setRealExecDate(sch.getRealExecDate()); | |
| 80 | + | |
| 65 | 81 | ccServiceSch.setId(null); |
| 66 | 82 | ccServiceSch.setSpId(null); |
| 67 | 83 | ccServiceSch.setClZbh(t.getNbbm()); | ... | ... |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| 1 | 1 | package com.bsth.service.report.impl; |
| 2 | 2 | |
| 3 | -import java.sql.ResultSet; | |
| 4 | -import java.sql.SQLException; | |
| 5 | -import java.text.DecimalFormat; | |
| 6 | -import java.text.ParseException; | |
| 7 | -import java.text.SimpleDateFormat; | |
| 8 | -import java.util.ArrayList; | |
| 9 | -import java.util.Collections; | |
| 10 | -import java.util.HashMap; | |
| 11 | -import java.util.Iterator; | |
| 12 | -import java.util.List; | |
| 13 | -import java.util.Map; | |
| 14 | -import java.util.Set; | |
| 15 | - | |
| 16 | -import org.apache.commons.lang.StringUtils; | |
| 17 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 18 | -import org.springframework.jdbc.core.JdbcTemplate; | |
| 19 | -import org.springframework.jdbc.core.RowMapper; | |
| 20 | -import org.springframework.stereotype.Service; | |
| 21 | - | |
| 22 | -import com.bsth.data.BasicData; | |
| 23 | 3 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 24 | 4 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 25 | 5 | import com.bsth.entity.sys.Interval; |
| ... | ... | @@ -27,8 +7,18 @@ import com.bsth.service.report.CulateMileageService; |
| 27 | 7 | import com.bsth.util.Arith; |
| 28 | 8 | import com.bsth.util.ComparableChild; |
| 29 | 9 | import com.bsth.util.ComparableJob; |
| 30 | -import com.bsth.util.ReportUtils; | |
| 31 | -import com.google.common.util.concurrent.AbstractScheduledService.Scheduler; | |
| 10 | +import org.apache.commons.lang.StringUtils; | |
| 11 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 13 | +import org.springframework.jdbc.core.RowMapper; | |
| 14 | +import org.springframework.stereotype.Service; | |
| 15 | + | |
| 16 | +import java.sql.ResultSet; | |
| 17 | +import java.sql.SQLException; | |
| 18 | +import java.text.DecimalFormat; | |
| 19 | +import java.text.ParseException; | |
| 20 | +import java.text.SimpleDateFormat; | |
| 21 | +import java.util.*; | |
| 32 | 22 | |
| 33 | 23 | @Service |
| 34 | 24 | public class CulateMileageServiceImpl implements CulateMileageService{ |
| ... | ... | @@ -361,7 +351,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 361 | 351 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| 362 | 352 | while (it.hasNext()) { |
| 363 | 353 | ChildTaskPlan childTaskPlan = it.next(); |
| 364 | - if(childTaskPlan.getMileageType().equals("service")){ | |
| 354 | + if(childTaskPlan.getMileageType().equals("service") && childTaskPlan.getCcId()==null){ | |
| 365 | 355 | if (!childTaskPlan.isDestroy()) { |
| 366 | 356 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 367 | 357 | ljgl=Arith.add(ljgl,jhgl); | ... | ... |