diff --git a/op-modules/op-energy/src/main/resources/mapper/report/ReportPointWaterMapper.xml b/op-modules/op-energy/src/main/resources/mapper/report/ReportPointWaterMapper.xml index 9b22b75d..1cdab4a6 100644 --- a/op-modules/op-energy/src/main/resources/mapper/report/ReportPointWaterMapper.xml +++ b/op-modules/op-energy/src/main/resources/mapper/report/ReportPointWaterMapper.xml @@ -75,16 +75,16 @@ and price = #{price} and (report_point_water.monitor_id = #{monitorSubset} OR report_point_water.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0)) - and begin_time between #{params.beginBeginTime} and #{params.endBeginTime} + and CONVERT(VARCHAR(17), begin_time, 120) between #{params.beginBeginTime} and #{params.endBeginTime} - and begin_time between #{params.startTime} and #{params.endTime} + and CONVERT(VARCHAR(17), begin_time, 120) between #{params.startTime} and #{params.endTime} - and begin_time between #{params.beginCollectTime} and #{params.endCollectTime} + and CONVERT(VARCHAR(17), begin_time, 120) between #{params.beginCollectTime} and #{params.endCollectTime} and begin_time = #{beginTime} and end_time = #{endTime} @@ -116,9 +116,9 @@ where report_point_water.objid = #{objid} select ert.monitor_id, ert.monitor_name, ert.pointTime, sum(if(ert.expend is null, 0, ert.expend)) expend from ( - select rpd.monitor_id, m.monitor_name, left(rpd.begin_time, 10) pointTime, rpd.expend + select rpd.monitor_id, m.monitor_name, left(CONVERT(VARCHAR(17), rpd.begin_time, 120), 10) pointTime, rpd.expend from report_point_water rpd left join base_monitor_info m on m.monitor_id = rpd.monitor_id @@ -158,7 +158,7 @@ and rpd.begin_time between #{startTime} and #{endTime} - and left(rpd.begin_time, 10) between #{startDay} and #{endDay} + and left(CONVERT(VARCHAR(17), rpd.begin_time, 120), 10) between #{startDay} and #{endDay} ) ert @@ -168,21 +168,21 @@