Commit 9f57281c by 杨林龙

优化激活逻辑代码

1 parent 00e3e46d
......@@ -1153,13 +1153,13 @@ def active_direct_merchant_device():
month4_active = textToNumber(v[4])
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)
month7_active = textToNumber(v[6])
monthActive.append(month7_active)
month8_active = textToNumber(v[7])
monthActive.append(month8_active)
month7_active = textToNumber(v[7])
monthActive.append(month7_active)
month8_active = textToNumber(v[8])
monthActive.append(month8_active)
month9_active = textToNumber(v[9])
......@@ -1510,6 +1510,7 @@ def handle_return_device(channel, data, devType, matchPrice=0):
tblName,
",".join(idsArr),
)
# logger.info("更新设备表sql=%s", updateSql)
if not bizConn.update(updateSql):
logger.error("handle_return_device fail, sql=%s", updateSql)
return
......@@ -1545,8 +1546,13 @@ def handle_return_device(channel, data, devType, matchPrice=0):
if not bizConn.update(updateSql):
logger.error("handle_return_device fail, sql=%s", updateSql)
return
# logger.info("match_direct_settlement_delivery_order cusName=%s month=%s need=%d find=%d",
# cusName, strFinDate, total, len(result))
logger.info(
"handle_return_device cusName=%s month=%s need=%d find=%d",
cusName,
strFinDate,
total,
len(result),
)
else:
logger.error(
"handle_return_device cusName=%s month=%s need=%d find=%d",
......
......@@ -334,7 +334,7 @@ def gen_device_by_delivery(
# arrValues.append(strValue)
if sn in dbSnList:
needAllocNum += 1
print("needAllocNum:", needAllocNum)
# print("needAllocNum:", needAllocNum)
else:
snList.append(sn)
......@@ -650,7 +650,7 @@ def match_gen_sn_settlement_delivery_order(startTime, devType, prefix):
)
continue
logger.info("matchCusName:" + str(matchCusName) + "total:" + str(total))
# logger.info("matchCusName:" + str(matchCusName) + "total:" + str(total))
hwPriceTax = v[5]
hwPrice = v[6]
pkPriceTax = v[7]
......
......@@ -89,7 +89,7 @@ def deal_data(startTime, endTime):
def active():
# 记录仪渠道激活
active_direct_record_device()
# active_direct_record_device()
# 追踪器渠道测算激活
active_direct_merchant_device()
......@@ -195,9 +195,9 @@ if __name__ == "__main__":
# 寻找差异
# 手动
# 处理数据
deal_data(startTime, endTime)
# deal_data(startTime, endTime)
# 激活数据
# active()
active()
# 回滚数据
# rollback(startTime, endTime)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!