Commit 9f2ac4ed authored by 肖 和生's avatar 肖 和生
Browse files

Merge remote-tracking branch 'remotes/origin/master' into core_flow

# Conflicts:
#	data/b5_spd3_core_business_flow/message
#	data/b5_spd3_core_business_flow/message1
#	data/b5_spd3_core_business_flow/message2
parents de3bfd0e 7606b6ab
......@@ -188,11 +188,11 @@ def check_mcms_dept_buy(type=16):
actual = check_mcms_dept_buy_sql(sql)
print(actual)
# 获取主键id
sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS'order by create_time desc LIMIT 1;" % (
branch_id, type)
id1 = get_dept_buy_id(sql)
# 获取order_no
sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type)
order_no1 = get_dept_buy_id(sql1)
print(process_tuple(id1), process_tuple(order_no1))
......@@ -217,23 +217,24 @@ def check_mcms_dept_buy(type=16):
pkgDefId = commonFuc().analysis_json('pkgDefId', list_a)
pkgDefName = commonFuc().analysis_json('pkgDefName', list_a)
# 获取边仓id
target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id)
time.sleep(3)
target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s' order by create_time desc LIMIT 1;" % branch_id)
bill_expdt_date = get_expdt_date(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
rec_user = get_login_user_uxid()
# rec_addr='二级检验科002'
create_user = rec_user
create_time = get_create_time(
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
last_modified = get_create_time(
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
last_modified_user = rec_user
last_auditor = rec_user
last_audit_time = get_create_time(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
target_stock_name = '自动化测试12345'
# target_stock_name=get_branch_name()+'中心库房'
......@@ -282,16 +283,16 @@ def check_mcms_dept_buy(type=16):
def check_mcms_dept_buy_approval_after(type=16):
branch_id = get_branch_id()
sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;
sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;
""" % (branch_id, type)
actual = check_mcms_dept_buy_sql(sql)
print(actual)
# 获取主键id
sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type)
id1 = get_dept_buy_id(sql)
# 获取order_no
sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type)
order_no1 = get_dept_buy_id(sql1)
print(process_tuple(id1), process_tuple(order_no1))
......@@ -318,21 +319,21 @@ def check_mcms_dept_buy_approval_after(type=16):
# 获取边仓id
target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id)
bill_expdt_date = get_expdt_date(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
rec_user = get_login_user_uxid()
# rec_addr='二级检验科002'
create_user = rec_user
create_time = get_create_time(
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
last_modified = get_create_time(
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
last_modified_user = rec_user
last_auditor = rec_user
last_audit_time = get_create_time(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s'and buy_kind='KS' order by create_time desc LIMIT 1;" % (
branch_id, type))
target_stock_name = '自动化测试12345'
# target_stock_name = get_branch_name() + '中心库房'
......@@ -504,6 +505,7 @@ def main():
for i in range(6): # 三个单据共审批6次
approval_center()
# ==================上面暂时注释===================================
time.sleep(6)
list_data = ['16', '20', '66']
for i in list_data:
check_mcms_dept_buy_approval_after(int(i))
......
......@@ -525,7 +525,7 @@ class commonFuc(object):
def randomString(self, n):
import string
import random
s = "".join(random.sample(string.ascii_letters + string.digits + "!@#$%^&*()", n))
s = "".join(random.sample(string.ascii_letters + string.digits + "!@#$%^&*", n))
return s
def random_int(self):
import random
......
院区新增:
branch_id: h0347-3755
branch_name: 东土城路院区7R4&E
branch_id: h0347-3757
branch_name: 东土城路院区1Joce
科室信息:
dept2_id: b12c7c6ca56e4b46b418b319cbadbea5
dept2_id: c913da28183b4b34a3ad567a345f4df6
dept2_name: 二级检验科002
......@@ -3,27 +3,27 @@
- &id001
- id:
hosId: h0347
branchId: h0347-3738
branchId: h0347-3757
deptId:
taskType: 1
sourceOrgId: p1e35e
sourceOrgName: 国药集团公司S57ui
sourceOrderNo: PSh0347202408010065
sourceOrgId: p1e37a
sourceOrgName: 国药集团公司D1cRP
sourceOrderNo: PSh0347202408010093
billMode: '66'
stockKind:
purMode:
sourceId: PSh0347202408010065
sourceId: PSh0347202408010093
sourceDetailId:
sourceType: PSD
sourceTypeName: 配送单
sourceVersion: 1
planOrderNo: PLAN2024080134122
purOrderNo: CG2024080122381
recOrgId: 63c734f07fcc422ea80f49ca8e5bbd95
recOrgName: 设备科001
billRelationJson: '{"planBillId":"Ph034720240801030767","planOrderNo":"PLAN2024080134122","purOrderNo":"CG2024080122381","purBillId":"Ch034720240801000099","purBillDate":"2024-08-01
15:14:28","distrBillId":"PSh0347202408010065","distrOrderNo":"PSh0347202408010065"}'
taskDate: '2024-08-01 15:15:04'
planOrderNo: PLAN2024080134156
purOrderNo: CG2024080122414
recOrgId: c913da28183b4b34a3ad567a345f4df6
recOrgName: 二级检验科002
billRelationJson: '{"buyBillId":"Bh03472024080100038","planBillId":"Ph034720240801030801","planOrderNo":"PLAN2024080134156","buyOrderNo":"BUY2024080110209","purOrderNo":"CG2024080122414","purBillId":"Ch034720240801000132","purBillDate":"2024-08-01
16:50:33","distrBillId":"PSh0347202408010093","distrOrderNo":"PSh0347202408010093"}'
taskDate: '2024-08-01 16:51:04'
taskDateStart:
taskDateEnd:
billModeList:
......
验收单号:
CHECK_NO1: CHECKh03472024080100056
CHECK_NO2: CHECKh03472024080100056
CHECK_NO1: CHECKh03472024080100084
CHECK_NO2: CHECKh03472024080100084
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