|
@ -74,7 +74,13 @@ public class MbpsService implements IMbpsService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public MbpsVo.SelMbpsByTime selMbpsByTime(MbpsDto.SelMbpsByTime param) { |
|
|
public MbpsVo.SelMbpsByTime selMbpsByTime(MbpsDto.SelMbpsByTime param) { |
|
|
String[] countArr = new String[param.getQueryOfDay()]; |
|
|
String[] countArr; |
|
|
|
|
|
if (ObjectUtil.isNotNull(param.getQueryOfDay())){ |
|
|
|
|
|
countArr = new String[param.getQueryOfDay()]; |
|
|
|
|
|
}else{ |
|
|
|
|
|
countArr = new String[10]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//查找当前时间
|
|
|
//查找当前时间
|
|
|
Date date = new Date(); |
|
|
Date date = new Date(); |
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
@ -82,13 +88,13 @@ public class MbpsService implements IMbpsService { |
|
|
|
|
|
|
|
|
MbpsVo.SelMbpsByTime selMbpsByTime = new MbpsVo.SelMbpsByTime(); |
|
|
MbpsVo.SelMbpsByTime selMbpsByTime = new MbpsVo.SelMbpsByTime(); |
|
|
//查询吞进量
|
|
|
//查询吞进量
|
|
|
List<MbpsVo.CarOfInByTime> carOfInByTimeList = carRecordDao.selCarOfInByTime(param.getQueryType(),param.getStartTime(),param.getEndTime(),countArr,nowDate); |
|
|
List<MbpsVo.CarOfInByTime> carOfInByTimeList = carRecordDao.selCarOfInByTime(param.getQueryType(),countArr,nowDate); |
|
|
selMbpsByTime.getCarOfInsByTime().addAll(carOfInByTimeList); |
|
|
selMbpsByTime.getCarOfInsByTime().addAll(carOfInByTimeList); |
|
|
//查询吐出量
|
|
|
//查询吐出量
|
|
|
List<MbpsVo.CarOfOutByTime> carOfOutByTimeList = carRecordDao.selCarOfOutByTime(param.getQueryType(),param.getStartTime(),param.getEndTime(),countArr,nowDate); |
|
|
List<MbpsVo.CarOfOutByTime> carOfOutByTimeList = carRecordDao.selCarOfOutByTime(param.getQueryType(),countArr,nowDate); |
|
|
selMbpsByTime.getCarOfOutsByTime().addAll(carOfOutByTimeList); |
|
|
selMbpsByTime.getCarOfOutsByTime().addAll(carOfOutByTimeList); |
|
|
//查询入库吨数
|
|
|
//查询入库吨数
|
|
|
List<MbpsVo.WeightOfInByTime> weightOfInByTimeList = carRecordDao.selWeightOfInByTime(param.getQueryType(),param.getStartTime(),param.getEndTime(),countArr,nowDate); |
|
|
List<MbpsVo.WeightOfInByTime> weightOfInByTimeList = carRecordDao.selWeightOfInByTime(param.getQueryType(),countArr,nowDate); |
|
|
for (MbpsVo.WeightOfInByTime weightOfInByTime : weightOfInByTimeList) { |
|
|
for (MbpsVo.WeightOfInByTime weightOfInByTime : weightOfInByTimeList) { |
|
|
if (ObjectUtil.isNull(weightOfInByTime.getWeightOfIn())){ |
|
|
if (ObjectUtil.isNull(weightOfInByTime.getWeightOfIn())){ |
|
|
weightOfInByTime.setWeightOfIn(0L); |
|
|
weightOfInByTime.setWeightOfIn(0L); |
|
@ -96,7 +102,7 @@ public class MbpsService implements IMbpsService { |
|
|
} |
|
|
} |
|
|
selMbpsByTime.getWeightOfInsByTime().addAll(weightOfInByTimeList); |
|
|
selMbpsByTime.getWeightOfInsByTime().addAll(weightOfInByTimeList); |
|
|
//查询出货吨数
|
|
|
//查询出货吨数
|
|
|
List<MbpsVo.WeightOfOutByTime> weightOfOutByTimeList =carRecordDao.selWeightOfOutByTime(param.getQueryType(),param.getStartTime(),param.getEndTime(),countArr,nowDate); |
|
|
List<MbpsVo.WeightOfOutByTime> weightOfOutByTimeList =carRecordDao.selWeightOfOutByTime(param.getQueryType(),countArr,nowDate); |
|
|
for (MbpsVo.WeightOfOutByTime weightOfOutByTime : weightOfOutByTimeList) { |
|
|
for (MbpsVo.WeightOfOutByTime weightOfOutByTime : weightOfOutByTimeList) { |
|
|
if (ObjectUtil.isNull(weightOfOutByTime.getWeightOfOut())){ |
|
|
if (ObjectUtil.isNull(weightOfOutByTime.getWeightOfOut())){ |
|
|
weightOfOutByTime.setWeightOfOut(0L); |
|
|
weightOfOutByTime.setWeightOfOut(0L); |
|
|