Commit a953df41 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

新增期初录入脚本

parent 43d9b4fc
...@@ -96,8 +96,8 @@ def test1(): ...@@ -96,8 +96,8 @@ def test1():
pkgCodeSee = i['pkgCodeSee'] pkgCodeSee = i['pkgCodeSee']
break break
# # #获取日期 # # #获取日期
productDate = timeUtils().get_time_hms(4) productDate = timeUtils().get_time_hms(3)
expdtDate = timeUtils().get_time_hms(3) expdtDate = timeUtils().get_time_hms(4,365)
initStockId = QCID initStockId = QCID
# # 请求体 # # 请求体
hospitalId = commonFuc().get_business_data(module, "hospitalId") hospitalId = commonFuc().get_business_data(module, "hospitalId")
......
...@@ -6,7 +6,7 @@ from datetime import timedelta, date ...@@ -6,7 +6,7 @@ from datetime import timedelta, date
# 数据读入和写入文件 # 数据读入和写入文件
class timeUtils(object): class timeUtils(object):
def get_time_hms(self, type=1): def get_time_hms(self, type=1,days_number=1):
'''2023-05-06 09:39:30''' '''2023-05-06 09:39:30'''
import time import time
if type == 1: if type == 1:
...@@ -19,7 +19,10 @@ class timeUtils(object): ...@@ -19,7 +19,10 @@ class timeUtils(object):
t = time.strftime("%Y-%m-%dT00:00:00.906Z", time.localtime()) t = time.strftime("%Y-%m-%dT00:00:00.906Z", time.localtime())
return t return t
elif type == 4: elif type == 4:
one_day_in_seconds = 60 * 60 * 24 if days_number==1:
one_day_in_seconds = 60 * 60 * 24
else:
one_day_in_seconds = 60 * 60 * 24*days_number
tomorrow = time.localtime(time.time() + one_day_in_seconds) tomorrow = time.localtime(time.time() + one_day_in_seconds)
t = time.strftime("%Y-%m-%dT00:00:00.906Z", tomorrow) t = time.strftime("%Y-%m-%dT00:00:00.906Z", tomorrow)
return t return t
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/a_a9_期初录入_高值_暂存/log.html' target='_blank'>a_a9_期初录入_高值_暂存</a></td> <td class="details-col-elapsed"><a href='../log/a_a9_期初录入_高值_暂存/log.html' target='_blank'>a_a9_期初录入_高值_暂存</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">1.346</td> <td class="details-col-elapsed">1.174</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </tr>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment