Commit ea98f444 authored by jiaorz's avatar jiaorz

Merge branch 'master-vehicle-count-bug' into dev

parents 6e1a25e3 f4a481f5
......@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
@Slf4j
......@@ -129,11 +130,15 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
}
Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType();
Query query = new Query(branchCompanyVehicleCountDTO);
Map<String, Object> param = query.getSuper();
param.remove("page");
param.remove("limit");
log.info("导出车辆统计信息:{}", param);
if (type == 1) {//按天
return mapper.getAllCountInfo(query.getSuper());
return mapper.getAllCountInfo(param);
}
if (type == 2) {//按周
List<BranchCompanyVehicleCountVo> pageDataVO = mapper.countByWeek(query.getSuper());
List<BranchCompanyVehicleCountVo> pageDataVO = mapper.countByWeek(param);
if (pageDataVO != null && pageDataVO.size() > 0) {
pageDataVO.parallelStream().forEach(result -> {
String weekStartDate = OrderDateUtils.getStartDayOfWeekNo(result.getCountYear(), result.getCountWeek());
......@@ -145,7 +150,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
return pageDataVO;
}
if (type == 3) {//按月
return mapper.countByMonth(query.getSuper());
return mapper.countByMonth(param);
}
return new ArrayList<>();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment