Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 21c093f

Browse files
committed
日报表 更改日期取值范围 例如 现在查询 0089 ['2022-01-09 00:00:00', '2022-01-10 00:00:00'] 抄表数据 来算1月9号的日报表了.
1 parent 7166fda commit 21c093f

File tree

5 files changed

+1570
-11
lines changed

5 files changed

+1570
-11
lines changed

‎com/lc/demo/pythonReportDemo/reportDailyKingDemo/python_report_daily_app_king3_OrgId_with_del.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
python_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号的日报表了
910
Version: 1.0
1011
Author: LC
1112
DateTime: 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
1415
LC博客url: http://oneplusone.top/index.html
1516
LC博客url: http://oneplusone.vip/index.html
@@ -202,7 +203,8 @@ def to_n_datetime_max_min_time(n, type, is_format):
202203
def 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

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /