Commit 9f57281c by 杨林龙

优化激活逻辑代码

1 parent 00e3e46d
...@@ -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)
month8_active = textToNumber(v[7]) month7_active = textToNumber(v[7])
monthActive.append(month8_active) monthActive.append(month7_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",
......
...@@ -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]
......
...@@ -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)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!