Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
daw
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1899a49f
authored
Jul 20, 2026
by
江名洋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 默认日期范围截止至昨日并更新生产数据库配置
1 parent
f873b39a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
.env
app/services/__pycache__/analysis_service.cpython-313.pyc
app/templates/analysis.html
.env
View file @
1899a49
...
@@ -12,13 +12,24 @@ APP_PORT=9500
...
@@ -12,13 +12,24 @@ APP_PORT=9500
ROOT_PATH=/daw
ROOT_PATH=/daw
# ============================================================================
# ============================================================================
# 数据库 (MySQL)
# 数据库 (MySQL)
-- dev
# ============================================================================
# ============================================================================
DB_HOST=192.168.2.155
# DB_HOST=192.168.2.155
DB_PORT=3308
# DB_PORT=3308
# DB_USER=user_jiangmy
# DB_PASSWORD=PYuxMTB1
# DB_NAME=data_analyze
# ============================================================================
# 数据库 (MySQL) -- prod
# ============================================================================
DB_HOST=192.168.5.77
DB_PORT=3307
DB_USER=user_jiangmy
DB_USER=user_jiangmy
DB_PASSWORD=PYuxMTB1
DB_PASSWORD=VMziLJun
DB_NAME=data_analyze
DB_NAME=daw
# 源生产数据库 (Source DB)
# 源生产数据库 (Source DB)
SOURCE_DB_HOST=192.168.5.23
SOURCE_DB_HOST=192.168.5.23
...
...
app/services/__pycache__/analysis_service.cpython-313.pyc
View file @
1899a49
No preview for this file type
app/templates/analysis.html
View file @
1899a49
...
@@ -399,6 +399,9 @@
...
@@ -399,6 +399,9 @@
const
fmt
=
d
=>
`
${
d
.
getFullYear
()}
-
${
String
(
d
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
-
${
String
(
d
.
getDate
()).
padStart
(
2
,
'0'
)}
`
;
const
fmt
=
d
=>
`
${
d
.
getFullYear
()}
-
${
String
(
d
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
-
${
String
(
d
.
getDate
()).
padStart
(
2
,
'0'
)}
`
;
const
now
=
new
Date
();
const
now
=
new
Date
();
const
todayStr
=
fmt
(
now
);
const
todayStr
=
fmt
(
now
);
const
yesterday
=
new
Date
(
now
);
yesterday
.
setDate
(
yesterday
.
getDate
()
-
1
);
const
yesterdayStr
=
fmt
(
yesterday
);
const
lastMonth26
=
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
()
-
1
,
26
);
const
lastMonth26
=
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
()
-
1
,
26
);
const
startStr
=
fmt
(
lastMonth26
);
const
startStr
=
fmt
(
lastMonth26
);
const
firstOfMonth
=
fmt
(
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
1
));
const
firstOfMonth
=
fmt
(
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
1
));
...
@@ -407,11 +410,11 @@
...
@@ -407,11 +410,11 @@
const
ecoStart
=
document
.
getElementById
(
'ecology-start-date'
);
const
ecoStart
=
document
.
getElementById
(
'ecology-start-date'
);
const
ecoEnd
=
document
.
getElementById
(
'ecology-end-date'
);
const
ecoEnd
=
document
.
getElementById
(
'ecology-end-date'
);
if
(
ecoStart
&&
!
ecoStart
.
value
)
ecoStart
.
value
=
startStr
;
if
(
ecoStart
&&
!
ecoStart
.
value
)
ecoStart
.
value
=
startStr
;
if
(
ecoEnd
&&
!
ecoEnd
.
value
)
ecoEnd
.
value
=
to
dayStr
;
if
(
ecoEnd
&&
!
ecoEnd
.
value
)
ecoEnd
.
value
=
yester
dayStr
;
const
natStart
=
document
.
getElementById
(
'nature-start-date'
);
const
natStart
=
document
.
getElementById
(
'nature-start-date'
);
const
natEnd
=
document
.
getElementById
(
'nature-end-date'
);
const
natEnd
=
document
.
getElementById
(
'nature-end-date'
);
if
(
natStart
&&
!
natStart
.
value
)
natStart
.
value
=
firstOfMonth
;
if
(
natStart
&&
!
natStart
.
value
)
natStart
.
value
=
firstOfMonth
;
if
(
natEnd
&&
!
natEnd
.
value
)
natEnd
.
value
=
to
dayStr
;
if
(
natEnd
&&
!
natEnd
.
value
)
natEnd
.
value
=
yester
dayStr
;
// 加载历史批次下拉
// 加载历史批次下拉
loadBatchOptions
();
loadBatchOptions
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment