Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
audit_2021
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 9f57281c
authored
Jun 26, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化激活逻辑代码
1 parent
00e3e46d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
calc_dj_income_2021.py
handle_unmatch_delivery_device.py
main.py
calc_dj_income_2021.py
View file @
9f57281
...
@@ -1153,13 +1153,13 @@ def active_direct_merchant_device():
...
@@ -1153,13 +1153,13 @@ def active_direct_merchant_device():
month4_active
=
textToNumber
(
v
[
4
])
month4_active
=
textToNumber
(
v
[
4
])
monthActive
.
append
(
month4_active
)
monthActive
.
append
(
month4_active
)
month6_active
=
textToNumber
(
v
[
5
])
month5_active
=
textToNumber
(
v
[
5
])
monthActive
.
append
(
month5_active
)
month6_active
=
textToNumber
(
v
[
6
])
monthActive
.
append
(
month6_active
)
monthActive
.
append
(
month6_active
)
month7_active
=
textToNumber
(
v
[
6
])
monthActive
.
append
(
month7_active
)
month
8
_active
=
textToNumber
(
v
[
7
])
month
7
_active
=
textToNumber
(
v
[
7
])
monthActive
.
append
(
month
8
_active
)
monthActive
.
append
(
month
7
_active
)
month8_active
=
textToNumber
(
v
[
8
])
month8_active
=
textToNumber
(
v
[
8
])
monthActive
.
append
(
month8_active
)
monthActive
.
append
(
month8_active
)
month9_active
=
textToNumber
(
v
[
9
])
month9_active
=
textToNumber
(
v
[
9
])
...
@@ -1510,6 +1510,7 @@ def handle_return_device(channel, data, devType, matchPrice=0):
...
@@ -1510,6 +1510,7 @@ def handle_return_device(channel, data, devType, matchPrice=0):
tblName
,
tblName
,
","
.
join
(
idsArr
),
","
.
join
(
idsArr
),
)
)
# logger.info("更新设备表sql=%s", updateSql)
if
not
bizConn
.
update
(
updateSql
):
if
not
bizConn
.
update
(
updateSql
):
logger
.
error
(
"handle_return_device fail, sql=
%
s"
,
updateSql
)
logger
.
error
(
"handle_return_device fail, sql=
%
s"
,
updateSql
)
return
return
...
@@ -1545,8 +1546,13 @@ def handle_return_device(channel, data, devType, matchPrice=0):
...
@@ -1545,8 +1546,13 @@ def handle_return_device(channel, data, devType, matchPrice=0):
if
not
bizConn
.
update
(
updateSql
):
if
not
bizConn
.
update
(
updateSql
):
logger
.
error
(
"handle_return_device fail, sql=
%
s"
,
updateSql
)
logger
.
error
(
"handle_return_device fail, sql=
%
s"
,
updateSql
)
return
return
# logger.info("match_direct_settlement_delivery_order cusName=%s month=%s need=%d find=%d",
logger
.
info
(
# cusName, strFinDate, total, len(result))
"handle_return_device cusName=
%
s month=
%
s need=
%
d find=
%
d"
,
cusName
,
strFinDate
,
total
,
len
(
result
),
)
else
:
else
:
logger
.
error
(
logger
.
error
(
"handle_return_device cusName=
%
s month=
%
s need=
%
d find=
%
d"
,
"handle_return_device cusName=
%
s month=
%
s need=
%
d find=
%
d"
,
...
...
handle_unmatch_delivery_device.py
View file @
9f57281
...
@@ -334,7 +334,7 @@ def gen_device_by_delivery(
...
@@ -334,7 +334,7 @@ def gen_device_by_delivery(
# arrValues.append(strValue)
# arrValues.append(strValue)
if
sn
in
dbSnList
:
if
sn
in
dbSnList
:
needAllocNum
+=
1
needAllocNum
+=
1
print
(
"needAllocNum:"
,
needAllocNum
)
#
print("needAllocNum:", needAllocNum)
else
:
else
:
snList
.
append
(
sn
)
snList
.
append
(
sn
)
...
@@ -650,7 +650,7 @@ def match_gen_sn_settlement_delivery_order(startTime, devType, prefix):
...
@@ -650,7 +650,7 @@ def match_gen_sn_settlement_delivery_order(startTime, devType, prefix):
)
)
continue
continue
logger
.
info
(
"matchCusName:"
+
str
(
matchCusName
)
+
"total:"
+
str
(
total
))
#
logger.info("matchCusName:" + str(matchCusName) + "total:" + str(total))
hwPriceTax
=
v
[
5
]
hwPriceTax
=
v
[
5
]
hwPrice
=
v
[
6
]
hwPrice
=
v
[
6
]
pkPriceTax
=
v
[
7
]
pkPriceTax
=
v
[
7
]
...
...
main.py
View file @
9f57281
...
@@ -89,7 +89,7 @@ def deal_data(startTime, endTime):
...
@@ -89,7 +89,7 @@ def deal_data(startTime, endTime):
def
active
():
def
active
():
# 记录仪渠道激活
# 记录仪渠道激活
active_direct_record_device
()
#
active_direct_record_device()
# 追踪器渠道测算激活
# 追踪器渠道测算激活
active_direct_merchant_device
()
active_direct_merchant_device
()
...
@@ -195,9 +195,9 @@ if __name__ == "__main__":
...
@@ -195,9 +195,9 @@ if __name__ == "__main__":
# 寻找差异
# 寻找差异
# 手动
# 手动
# 处理数据
# 处理数据
deal_data
(
startTime
,
endTime
)
#
deal_data(startTime, endTime)
# 激活数据
# 激活数据
#
active()
active
()
# 回滚数据
# 回滚数据
# rollback(startTime, endTime)
# rollback(startTime, endTime)
...
...
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