66python_report_daily_app_king3_OrgId_with_del.py 跑之前先删除所有的相关数据 带机构号版本 加强版本2 封装了日报表对象类以及将取自动递增流水方法提取到工具db_utils文件中,集成监听所有的print到log日志的封装类
77日报表-计算写入数据库oracle的报表脚本
88版本说明:1:跑所有机构的日报表;2:逻辑变更-【周期内工况使用量(本期期末数-上期期末数)】【周期内标况使用量(本期期末数-上期期末数)】 3:整体脚本代码结构变更
9+ 4: 现在查询 0089 ['2022年01月09日 00:00:00', '2022年01月10日 00:00:00'] 抄表数据 来算1月9号的日报表了
910Version: 1.0
1011Author: LC
1112DateTime: 2019年3月7日14:16:04
12- UpdateTime: 2020年4月17日 15:02:50
13+ UpdateTime: 2022年1月10日10:13:26
1314一加壹博客最Top-一起共创1+1>2的力量!~LC
1415LC博客url: http://oneplusone.top/index.html
1516LC博客url: http://oneplusone.vip/index.html
@@ -202,7 +203,8 @@ def to_n_datetime_max_min_time(n, type, is_format):
202203def select_sfd_by_where (org_id , days ):
203204 sql = "select * from SCADA_FLMETER_DATA where SFD_ORG_ID= :orgid and INSTANT_TIME between :minTime AND :maxTime "
204205 yesterday_min = to_n_datetime_max_min_time (days , "min" , False )
205- yesterday_max = to_n_datetime_max_min_time (days , "max" , False )
206+ # 直接改这里了 达到line9所说
207+ yesterday_max = to_n_datetime_max_min_time (days + 1 , "min" , False )
206208 data = [{"orgid" : org_id , "minTime" : yesterday_min , "maxTime" : yesterday_max }]
207209 fc = db .select_by_where_many_params_dict (sql , data )
208210 print ("总共抄表数据:" , len (fc ))
@@ -770,4 +772,4 @@ def del_first_before_main(db, org_id, days):
770772 print ("程序运行开始time.clock():" , begin_time_clock )
771773 print ("程序运行结束time.clock():" , end_time_clock )
772774 print ("整个程序运行总时间time.clock()差:" , (end_time_clock - begin_time_clock ), "秒" )
773- print ("----------------------------------------------------------------------------------------" )
775+ print ("----------------------------------------------------------------------------------------" )
0 commit comments