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 12892887
authored
Jun 03, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改审计数据脚本
1 parent
7f7ff004
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
21 deletions
2023差异记载.txt
calc_dj_income_2021.py
handle_unmatch_delivery_device.py
loadExcelData.py
test01.py
2023差异记载.txt
0 → 100644
View file @
1289288
2023-01~04 gps
联通租赁集团有限公司 商务表未设置安装费 ( 财务GPS安装服务费 属于服务,商务数据未计)
2023-01 GPS
云南隆创尚通汽车销售服务有限公司 财务表只有安装费 没有硬件
2023-04 GPS
云南隆创尚通汽车销售服务有限公司 (财务GPS安装服务费 属于服务,商务数据未计)
2023-01~04 GPS
零售/电商客户 产品类型 都是服务
2023-01~04 记录仪
东台宝通汽车服务有限责任公司 财务有安装费用 商务没有安装费用
2023-01~04 记录仪
广汇汽车服务有限责任公司东台分公司 财务有安装费用 商务没有安装费用
2023-03 记录仪
恒信汽车集团股份有限公司 商务的服务单价分摊在硬件上面时 服务单价分配错误
退换货的时候报错:
遵义市千汇汽车销售服务有限公司 只有退货 没有出货
明细和财务的差别:
恒信汽车集团股份有限公司 2023-02 记录仪 历史累计设备不能满足2023-02退货设备数量 (-28380.540242004397)
恒信汽车集团股份有限公司 2023-03 记录仪 商务的服务单价分摊在硬件上面时 服务单价分配错误
遵义市千汇汽车销售服务有限公司 2023-02 GPS 只有退货 没有出货 (财务收入 -12654.87)
calc_dj_income_2021.py
View file @
1289288
...
...
@@ -1037,10 +1037,10 @@ def query_supplychain_delivery_device(startTime, endTime, devType=8):
def
textToNumber
(
text
):
if
text
==
""
or
text
==
"-"
or
text
is
None
:
if
text
==
""
or
text
==
"-"
or
text
is
None
or
text
==
" - "
or
text
.
strip
()
==
'-'
:
return
0
else
:
return
int
(
float
(
text
))
return
int
(
float
(
text
.
strip
()
))
def
calc_direct_device_active_time
(
deliveryTime
,
activeMonth
):
...
...
@@ -1123,8 +1123,8 @@ def active_direct_merchant_device():
settMerDict
=
{}
query_settlement_merchant
(
bizConn
,
settMerDict
)
sql
=
(
"select customer,active_202
101,active_202102,active_202103,active_202104,active_202105,active_2021
06,"
"active_202
107,active_202108,active_202109,active_202110,active_202111,active_202112 from dj_2022_direct_cus_active_0212
"
"select customer,active_202
201,active_202202,active_202203,active_202204,active_202205,active_2022
06,"
"active_202
207,active_202208,active_202209,active_202210,active_202211,active_202212 from dj_2023_direct_cus_active_20230603
"
)
if
not
bizConn
.
query
(
sql
):
...
...
@@ -1203,9 +1203,10 @@ def active_direct_merchant_device():
if
activeTotal
!=
len
(
res
):
logger
.
error
(
"active_direct_merchant_device settlemer=
%
s month=
%
s need=
%
d found=
%
d"
,
"active_direct_merchant_device settlemer=
%
s month=
%
s ne
xtMonth=
%
s ne
ed=
%
d found=
%
d"
,
settleMer
,
activeMonth
,
nextMonth
,
activeTotal
,
len
(
res
),
)
...
...
@@ -1625,7 +1626,7 @@ def active_direct_record_device():
sencond
,
)
if
activeTime
>=
"2023-0
4
-01 00:00:00"
:
if
activeTime
>=
"2023-0
5
-01 00:00:00"
:
# updateSql = f"update {tblName} set active_time=null,active_merchant='' where id=%d" % (
# idx)
continue
...
...
@@ -1991,7 +1992,7 @@ if __name__ == "__main__":
# handle_return_device('渠道', data=2021, devType=6)
# 记录仪渠道激活
active_direct_record_device
()
#
active_direct_record_device()
# 追踪器渠道测算激活
active_direct_merchant_device
()
...
...
handle_unmatch_delivery_device.py
View file @
1289288
...
...
@@ -775,13 +775,13 @@ def update_device_alloc(deviceType, startTime, endTime):
'''回滚'''
bizConn
=
MySQL
(
g_pro_biz_dbcfg
)
if
deviceType
==
8
:
detailTable
=
"dj_202
2
_settle_details"
detailTable
=
"dj_202
3
_settle_details"
deliveryTable
=
"dj_2021_delivery_device"
else
:
detailTable
=
"dj_202
2
_settle_details_record"
detailTable
=
"dj_202
3
_settle_details_record"
deliveryTable
=
"dj_2021_delivery_device_record"
sql
=
f
"SELECT sn FROM {detailTable} where settle_time >= '{startTime}' and settle_time < '{endTime}' and is_virtual = 0"
sql
=
f
"SELECT sn FROM {detailTable} where settle_time >= '{startTime}' and settle_time < '{endTime}' and is_virtual = 0"
if
not
bizConn
.
query
(
sql
):
return
res
=
bizConn
.
fetchAllRows
()
...
...
@@ -806,19 +806,19 @@ def update_device_alloc(deviceType, startTime, endTime):
if
__name__
==
"__main__"
:
''''''
startTime
=
'2023-01-01'
endTime
=
'2023-
03
-31'
endTime
=
'2023-
12
-31'
#追踪器设备
#
match_gen_sn_settlement_delivery_order(startTime, devType=8, prefix='19')
match_gen_sn_settlement_delivery_order
(
startTime
,
devType
=
8
,
prefix
=
'19'
)
# #记录仪设备
#
match_gen_sn_settlement_delivery_order(startTime, devType=6, prefix='SH23G')
match_gen_sn_settlement_delivery_order
(
startTime
,
devType
=
6
,
prefix
=
'SH23G'
)
# #'SH26H', 'SH23G', 'SH24G'
# #车充设备
#
match_gen_sn_settlement_delivery_order(startTime, devType=12501, prefix='864')
match_gen_sn_settlement_delivery_order
(
startTime
,
devType
=
12501
,
prefix
=
'864'
)
#回滚分配的设备
#
update_device_alloc(8, startTime, endTime)
#
update_device_alloc(6, startTime, endTime)
update_device_alloc
(
8
,
startTime
,
endTime
)
update_device_alloc
(
6
,
startTime
,
endTime
)
...
...
loadExcelData.py
View file @
1289288
...
...
@@ -101,12 +101,27 @@ def loadDjExcelToMysql(fileName, sheetName):
pkPrice
=
newData
.
loc
[
idx
,
'服务(不含税)'
]
pkPriceRate
=
newData
.
loc
[
idx
,
'服务税率'
]
client
=
newData
.
loc
[
idx
,
'客户'
]
.
strip
()
value
=
(
newData
.
loc
[
idx
,
'单据类型'
],
newData
.
loc
[
idx
,
'单据编号'
],
newData
.
loc
[
idx
,
'业务日期'
],
client
,
newData
.
loc
[
idx
,
'渠道'
],
newData
.
loc
[
idx
,
'物料编码'
],
newData
.
loc
[
idx
,
'物料名称'
],
newData
.
loc
[
idx
,
'产品类型'
],
newData
.
loc
[
idx
,
'设备类型'
],
newData
.
loc
[
idx
,
'计价数量'
],
hwPriceTax
,
hwPrice
,
pkPrice
,
pkPriceRate
,
value
=
(
newData
.
loc
[
idx
,
'单据类型'
],
newData
.
loc
[
idx
,
'单据编号'
],
newData
.
loc
[
idx
,
'业务日期'
],
client
,
newData
.
loc
[
idx
,
'渠道'
],
newData
.
loc
[
idx
,
'物料编码'
],
newData
.
loc
[
idx
,
'物料名称'
],
newData
.
loc
[
idx
,
'产品类型'
],
newData
.
loc
[
idx
,
'设备类型'
],
newData
.
loc
[
idx
,
'计价数量'
],
hwPriceTax
,
hwPrice
,
pkPrice
,
pkPriceRate
,
newData
.
loc
[
idx
,
'服务套餐'
],
newData
.
loc
[
idx
,
'收入'
],
newData
.
loc
[
idx
,
'业务类型'
],
newData
.
loc
[
idx
,
'分摊期限'
],
newData
.
loc
[
idx
,
'分摊期限'
],
newData
.
loc
[
idx
,
'安装'
],
newData
.
loc
[
idx
,
'安装税率'
])
newData
.
loc
[
idx
,
'收入'
],
newData
.
loc
[
idx
,
'业务类型'
],
newData
.
loc
[
idx
,
'分摊期限'
],
newData
.
loc
[
idx
,
'分摊期限'
],
newData
.
loc
[
idx
,
'安装'
],
newData
.
loc
[
idx
,
'安装税率'
])
print
(
value
)
valueArr
.
append
(
value
)
...
...
test01.py
0 → 100644
View file @
1289288
if
__name__
==
"__main__"
:
if
' - '
==
'-'
:
print
(
'true'
)
# end main
\ No newline at end of file
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