Commit 2f95b04c by 杨林龙

新E盾 1.30 版本开发 修改油耗统计

1 parent 950aa19b
...@@ -63,4 +63,12 @@ public class OilController { ...@@ -63,4 +63,12 @@ public class OilController {
EasyExcelUtils.writeExcel(response, oilPageList, fileName, "Sheet1", OilReportExport.class); EasyExcelUtils.writeExcel(response, oilPageList, fileName, "Sheet1", OilReportExport.class);
log.info("油耗统计报表导出===end"); log.info("油耗统计报表导出===end");
} }
@GetMapping(value = "/years")
@SysLog(module = "油耗统计", value = "获取油耗有数据的年份", action = OperateType.QUERY, saveLog = false)
@ApiOperation(value = "获取油耗有数据的年份")
public R getYearWithData() {
List<String> yearList = oilService.getYearWithData();
return R.ok().data(yearList);
}
} }
...@@ -16,4 +16,6 @@ public interface ElectricOilMileageMapper extends CommonBaseMapper<ElectricOilMi ...@@ -16,4 +16,6 @@ public interface ElectricOilMileageMapper extends CommonBaseMapper<ElectricOilMi
List<OilReportExport> getAllTestDrive(OilSearch search); List<OilReportExport> getAllTestDrive(OilSearch search);
List<OilReportExport> getStatisticalData(OilSearch search); List<OilReportExport> getStatisticalData(OilSearch search);
List<String> getYearWithData();
} }
...@@ -200,5 +200,9 @@ public class OilService { ...@@ -200,5 +200,9 @@ public class OilService {
private Integer replaceDayCount(Integer dayCount) { private Integer replaceDayCount(Integer dayCount) {
return dayCount == null ? 0 : dayCount; return dayCount == null ? 0 : dayCount;
} }
public List<String> getYearWithData() {
return electricOilMileageMapper.getYearWithData();
}
} }
...@@ -79,4 +79,8 @@ ...@@ -79,4 +79,8 @@
group by tv.vin, left(teom.begin_time,10) group by tv.vin, left(teom.begin_time,10)
</select> </select>
<select id="getYearWithData" resultType="java.lang.String">
select distinct left (begin_time, 4)
from t_electric_oil_mileage
</select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!