Browse Source

fix: 解决车辆里程统计异常的问题(缺少授权字段)

zhongwei
liwen 4 months ago
parent
commit
a3771fc40f
  1. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml

@ -4,7 +4,7 @@
<select id="selectCarByYear" resultType="com.hnac.hzims.safeproduct.vo.CarMilesYearVO">
SELECT
DISTINCT t1.unit, t1.car_brand, t1.plate_number, t1.create_time
DISTINCT t1.unit, t1.car_brand, t1.plate_number, t1.create_time, t1.create_user, t1.create_dept
FROM
hzims_car t1
LEFT JOIN hzims_car_used_record t2 ON t1.id = t2.car_id
@ -22,7 +22,8 @@
<select id="selectMilesByCar" resultType="com.hnac.hzims.safeproduct.dto.CarMilesYearDTO">
SELECT
t1.unit, t1.car_brand, t1.plate_number, DATE_FORMAT(t2.end_time, '%m') as dateTime, sum(t2.miles) as miles
t1.unit, t1.car_brand, t1.plate_number, DATE_FORMAT(t2.end_time, '%m') as dateTime, sum(t2.miles) as miles,
t1.create_user, t1.create_dept
FROM
hzims_car t1
LEFT JOIN hzims_car_used_record t2 ON t1.id = t2.car_id

Loading…
Cancel
Save