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

流程二脚本提交

parent 098dc53b
......@@ -5,7 +5,7 @@ from air_case.public1.public1.public1 import updateUserLoginDefaultRange, get_li
get_branch_id, get_dept_buy_id, check_mcms_pur_plan_sql, get_hosid, get_id, \
get_stockAreaId_new_fromDb, get_login_user_uxid, get_expdt_date, get_create_time, get_process_list2, \
compare_text_index, check_mcms_pur_sql, check_source_id, get_mdm_goods_code1, get_goods_code1, get_supply_id, \
get_pkg_def_id, get_goods_gg, get_goods_name, get_login_user_uxid_bydb, process_tuple
get_pkg_def_id, get_goods_gg, get_goods_name, get_login_user_uxid_bydb, process_tuple, get_pkg_def_id2
from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command
......@@ -287,7 +287,7 @@ def check_mcms_mcms_pur_plan_detail(id, type, planOrderNo):
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
commonFuc().check_text_exist_result_text('error'+str(type)+'采购订单子表', 'succees')
# 检查采购订单
def check_mcms_purchase(type=16):
branch_id = get_branch_id()
......@@ -517,7 +517,7 @@ def check_mcms_purchase_detail(id, type, OrderNo):
mdm_goods_code = get_mdm_goods_code1(hos_goods_id)
goods_code = get_goods_code1(hos_goods_id)
supply_id = get_supply_id(hos_goods_id)
pkg_def_id = get_pkg_def_id(hos_goods_id)
pkg_def_id = get_pkg_def_id2(hos_goods_id)
planBillId = process_tuple(
get_id(
"select pid from mcms_pur_plan_detail where hos_goods_id='%s' order by create_time desc LIMIT 1;" % (
......@@ -627,5 +627,4 @@ def main():
try:
main()
except Exception as e:
# print('出现错误,请检查脚本或者数据')
print("发生异常:", str(e))
\ No newline at end of file
......@@ -277,7 +277,7 @@ def get_DN_no(branch_id, type):
return new_str1
def get_login_user_uxid_bydb(username):
db, cursor = get_sql_conn()
cursor.execute("select id from sys_user where user_code='%s'" % username)
cursor.execute("select id from sys_user where user_code='%s';" % username)
results = cursor.fetchone()
str1 = str(results)
new_str1 = str1.replace(',)', '')
......@@ -310,7 +310,7 @@ def process_tuple(tuple1):
def get_mdm_goods_code1(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select mdm_goods_code from mcms_goods_info where id='%s'" % hos_goods_id)
cursor.execute("select mdm_goods_code from mcms_goods_info where id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -326,7 +326,7 @@ def get_source_id(branch_id,hos_goods_id):
def get_goods_code1(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select hos_goods_code from mcms_goods_info where id='%s'" % hos_goods_id)
cursor.execute("select hos_goods_code from mcms_goods_info where id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -335,7 +335,7 @@ def get_goods_code1(hos_goods_id):
def get_goods_name(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select goods_name from mcms_goods_info where id='%s'" % hos_goods_id)
cursor.execute("select goods_name from mcms_goods_info where id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -344,7 +344,7 @@ def get_goods_name(hos_goods_id):
def get_goods_gg(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select goods_spec from mcms_goods_info where id='%s'" % hos_goods_id)
cursor.execute("select goods_spec from mcms_goods_info where id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -353,7 +353,7 @@ def get_goods_gg(hos_goods_id):
def get_supply_id(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select id from supply_prov_hos_goods where hos_goods_id='%s'" % hos_goods_id)
cursor.execute("select id from supply_prov_hos_goods where hos_goods_id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -367,11 +367,17 @@ def get_pkg_def_id(hos_goods_id):
cursor.close()
db.close()
return process_tuple(results)
def get_pkg_def_id2(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select pkg_def_id from mcms_dept_goods_info where hos_goods_id='%s' LIMIT 1 OFFSET 3;" % hos_goods_id)
results = cursor.fetchone()
cursor.close()
db.close()
return process_tuple(results)
def get_pkg_def_Name(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select pkg_def_name from mcms_pkg where hos_goods_id='%s'" % hos_goods_id)
cursor.execute("select pkg_def_name from mcms_pkg where hos_goods_id='%s';" % hos_goods_id)
results = cursor.fetchone()
cursor.close()
db.close()
......@@ -380,7 +386,7 @@ def get_pkg_def_Name(hos_goods_id):
def get_goods_name1(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select goods_name from mcms_goods_info where id='%s'" % hos_goods_id)
cursor.execute("select goods_name from mcms_goods_info where id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -398,7 +404,7 @@ def get_mdm_goods_code(sql):
def get_goods_mfrs_id(hos_goods_id):
db, cursor = get_sql_conn()
cursor.execute("select goods_mfrs_id from mcms_goods_info where id='%s'" % hos_goods_id)
cursor.execute("select goods_mfrs_id from mcms_goods_info where id='%s';" % hos_goods_id)
results = cursor.fetchall()
cursor.close()
db.close()
......@@ -407,7 +413,7 @@ def get_goods_mfrs_id(hos_goods_id):
def check_source_id(hos_goods_id, source_id):
db, cursor = get_sql_conn()
cursor.execute("select hos_goods_id from mcms_pur_plan_detail where id='%s'" % (source_id))
cursor.execute("select hos_goods_id from mcms_pur_plan_detail where id='%s';" % (source_id))
results1 = cursor.fetchall()
cursor.close()
db.close()
......@@ -420,7 +426,7 @@ def check_source_id(hos_goods_id, source_id):
def check_batch_id(source_batch_id):
db, cursor = get_sql_conn()
cursor.execute("select id from mcms_hos_batch where id='%s'" % (source_batch_id))
cursor.execute("select id from mcms_hos_batch where id='%s';" % (source_batch_id))
results1 = cursor.fetchall()
cursor.close()
db.close()
......@@ -432,7 +438,7 @@ def check_batch_id(source_batch_id):
def check_distr_detail_id(source_distr_detail_id):
db, cursor = get_sql_conn()
cursor.execute("select id from hdi_distr_detail where id='%s'" % (source_distr_detail_id))
cursor.execute("select id from hdi_distr_detail where id='%s';" % (source_distr_detail_id))
results1 = cursor.fetchall()
cursor.close()
db.close()
......@@ -443,7 +449,7 @@ def check_distr_detail_id(source_distr_detail_id):
return False
def check_barcode_id(barcode_id):
db, cursor = get_sql_conn()
cursor.execute("select id from hdi_barcode where id='%s'" % (barcode_id))
cursor.execute("select id from hdi_barcode where id='%s';" % (barcode_id))
results1 = cursor.fetchall()
cursor.close()
db.close()
......@@ -454,7 +460,7 @@ def check_barcode_id(barcode_id):
return False
def check_un_balance_id(un_balance_id):
db, cursor = get_sql_conn()
cursor.execute("select id from mcms_out_un_balance where id='%s'" % (un_balance_id))
cursor.execute("select id from mcms_out_un_balance where id='%s';" % (un_balance_id))
results1 = cursor.fetchall()
cursor.close()
db.close()
......
企业信息:
e_id: CR202411050131
cname: 国药集团公司ilX2W
e_id: CR202411070074
cname: 国药集团公司NHDet
医院信息:
h_id: 湖南省人民医院C4@WF
h_name: 湖南省人民医院C4@WF
h_id: 湖南省人民医院fwl2B
h_name: 湖南省人民医院fwl2B
产品审核信息:
MSPid: MSP2411050032_1
MSPid: MSP2411070021_1
hosId: h0347
hosGoodsId: h034700005860
provGoodsid: provGood-99223171
goodsAuditBillId: MSP2411050032
targetId: MSP2411050032_1
hosGoodsId: h034700005897
provGoodsid: provGood-99223209
goodsAuditBillId: MSP2411070021
targetId: MSP2411070021_1
......@@ -2,45 +2,45 @@
list_a:
- &id001
settleMonth: '202411'
pid: OBh0347202411010016
hosGoodsId: h034700005761
goodsCode: '00005761'
goodsName: 一次性注射器_低值d%*JM
pid: OBh0347202411070002
hosGoodsId: h034700005894
goodsCode: '00005894'
goodsName: 一次性注射器_低值muQJ*
goodsGg: G-31891
mfrsName: 德国歌德公司 Geuder AG
unit: 支
leftSettleAmount: -19999.98
leftSettleAmount: 19999.98
batchCode:
kindName:
factName:
cacheleftAmount: 19999.98
purMode: 10
waitInvoicingNum: -200.0
waitInvoicingNum: 200.0
invoicingPrice: 99.9999
normalContractId:
normalContract: '1'
detailList:
- pid: OBh0347202411010016
- pid: OBh0347202411070002
settleMonth: '202411'
accountDate: '2024-11-01'
hosGoodsId: h034700005761
accountDate: '2024-11-07'
hosGoodsId: h034700005894
batchCode: '333'
distrDetailId: '03843717'
distrId: PSh0347202411010028
distrOrderNo: PSh0347202411010028
distrDetailId: '03843889'
distrId: PSh0347202411070009
distrOrderNo: PSh0347202411070009
settlePrice: 99.9999
maxSettleQty: -100.0
maxSettleAmount: -9999.99
curSettleQty: -100.0
curSettleAmount: -9999.99
leftSettleQty: -100.0
leftSettleAmount: -9999.99
maxSettleQty: 100.0
maxSettleAmount: 9999.99
curSettleQty: 100.0
curSettleAmount: 9999.99
leftSettleQty: 100.0
leftSettleAmount: 9999.99
hosId: h0347
provId: p1e4bc
branchId: h0347-3753
balanceDetId: OBh0347202411010016-000001
provId: p1e509
branchId: h0347-3783
balanceDetId: OBh0347202411070002-000001
purMode: 10
barCode: 013753000005761011241101172505101033321UT241101000428
barCode: 013783000005894011241107172505161033321UT241107000206
batchId:
price:
maxQty:
......@@ -54,34 +54,34 @@
onlineKind: '10'
kindName:
normalContractId:
goodsCode: '00005761'
goodsName: 一次性注射器_低值d%*JM
goodsCode: '00005894'
goodsName: 一次性注射器_低值muQJ*
goodsGg: G-31891
mfrsName: 德国歌德公司 Geuder AG
unit: 支
invoicePrice: 99.9999
viewId: 202411OBh0347202411010016h034700005761
- pid: OBh0347202411010016
viewId: 202411OBh0347202411070002h034700005894
- pid: OBh0347202411070002
settleMonth: '202411'
accountDate: '2024-11-01'
hosGoodsId: h034700005761
accountDate: '2024-11-07'
hosGoodsId: h034700005894
batchCode: '333'
distrDetailId: '03843717'
distrId: PSh0347202411010028
distrOrderNo: PSh0347202411010028
distrDetailId: '03843889'
distrId: PSh0347202411070009
distrOrderNo: PSh0347202411070009
settlePrice: 99.9999
maxSettleQty: -100.0
maxSettleAmount: -9999.99
curSettleQty: -100.0
curSettleAmount: -9999.99
leftSettleQty: -100.0
leftSettleAmount: -9999.99
maxSettleQty: 100.0
maxSettleAmount: 9999.99
curSettleQty: 100.0
curSettleAmount: 9999.99
leftSettleQty: 100.0
leftSettleAmount: 9999.99
hosId: h0347
provId: p1e4bc
branchId: h0347-3753
balanceDetId: OBh0347202411010016-000002
provId: p1e509
branchId: h0347-3783
balanceDetId: OBh0347202411070002-000002
purMode: 10
barCode: 013753000005761011241101172505101033321UT241101000420
barCode: 013783000005894011241107172505161033321UT241107000297
batchId:
price:
maxQty:
......@@ -95,17 +95,17 @@
onlineKind: '10'
kindName:
normalContractId:
goodsCode: '00005761'
goodsName: 一次性注射器_低值d%*JM
goodsCode: '00005894'
goodsName: 一次性注射器_低值muQJ*
goodsGg: G-31891
mfrsName: 德国歌德公司 Geuder AG
unit: 支
invoicePrice: 99.9999
viewId: 202411OBh0347202411010016h034700005761
unique: 202411OBh0347202411010016h034700005761
viewId: 202411OBh0347202411070002h034700005894
unique: 202411OBh0347202411070002h034700005894
invoicePrice:
onlineKind: '10'
viewId: 202411OBh0347202411010016h034700005761
viewId: 202411OBh0347202411070002h034700005894
list_b:
- *id001
list_c:
......
院区新增:
branch_id: h0347-3776
branch_name: 东土城路院区fjGyN
branch_id: h0347-3783
branch_name: 东土城路院区#!H7P
科室信息:
dept2_id: a2c11b67a0fd481eac962e104cef2cac
dept2_id: de8825888c3d4eaebec0b8c82c94bdae
dept2_name: 二级检验科002
用户名信息:
username1: 自动化测试y9*o&
username2: 自动化测试y9*o&
username1: 自动化测试Mq4s&
username2: 自动化测试Mq4s&
一级科室信息:
dept1_id: 35c4f33335e44b5a8feb68461bce8bb3
dept1_id: 4cca3c17b3bf4caa9d6181f671798822
dept1_name: 设备科001
所有科室id:
deptid1: 35c4f33335e44b5a8feb68461bce8bb3
deptid2: a2c11b67a0fd481eac962e104cef2cac
deptid3: b726f9b3c22646b49a5e527dcfb42994
deptid4: 17826ef304c645a29881ac9f66296de8
deptid1: 4cca3c17b3bf4caa9d6181f671798822
deptid2: de8825888c3d4eaebec0b8c82c94bdae
deptid3: 66061777414746d19934f7325d78329c
deptid4: 7c5605f0177646478006c826510a71de
所有科室name:
deptid1: 设备科001
deptid2: 二级检验科002
......
shelfinfo:
shelfid: 59b387569c1448d6bb30a14a7411e358
shelfCode: areah03472702
shelfid: 3de0e007c1bc45b5abee30678d0cf436
shelfCode: areah03472733
areaName: 自动化测试
供货关系申请2:
e_corpId: p1e4f9
e_corpId: p1e509
h_corpId: h0347
e_username: 国药集团公司ilX2W
e_username: 国药集团公司NHDet
h_name: test_1
产品审核信息:
MSPid: MSP2411050028_1
MSPid: MSP2411070017_1
hosId: h0347
hosGoodsId: h034700005856
provGoodsid: provGood-99223167
goodsAuditBillId: MSP2411050028
targetId: MSP2411050028_1
hosGoodsId: h034700005893
provGoodsid: provGood-99223205
goodsAuditBillId: MSP2411070017
targetId: MSP2411070017_1
低值配送单号:
distrBillId1: PSh0347202411010051
distrBillId2: PSh0347202411010051
distrBillId1: PSh0347202411070009
distrBillId2: PSh0347202411070009
高值配送单号:
distrBillId1: PSh0347202411010052
distrBillId2: PSh0347202411010052
distrBillId1: PSh0347202411070010
distrBillId2: PSh0347202411070010
试剂配送单号:
distrBillId1: PSh0347202411010053
distrBillId2: PSh0347202411010053
高值跟台配送单号:
distrBillId1: PSh0347202411010076
distrBillId2: PSh0347202411010076
distrBillId1: PSh0347202411070011
distrBillId2: PSh0347202411070011
采购计划单号高值:
orderNo1: PLAN2024110532964
orderNo2: PLAN2024110532964
orderNo1: PLAN2024110734456
orderNo2: PLAN2024110734456
采购计划单号试剂:
orderNo1: PLAN2024110532965
orderNo2: PLAN2024110532965
orderNo1: PLAN2024110734457
orderNo2: PLAN2024110734457
......@@ -3,36 +3,37 @@
- &id001
- id:
hosId: h0347
branchId: h0347-3753
branchId: h0347-3783
deptId:
taskType: 1
sourceOrgId: p1e4bc
sourceOrgName: 国药集团公司M@n&X
sourceOrderNo: PSh0347202411010076
billMode: '25'
sourceOrgId: p1e509
sourceOrgName: 国药集团公司NHDet
sourceOrderNo: PSh0347202411070011
billMode: '66'
stockKind:
purMode:
sourceId: PSh0347202411010076
sourceId: PSh0347202411070011
sourceDetailId:
sourceType: PSD
sourceTypeName: 配送单
sourceVersion: 1
planOrderNo: SSSQ202411010374
purOrderNo: SSTZ202411010341
recOrgId: 4e47f180e69f4fb88a79fc4b2d211635
recOrgName: 二级检验科002
billRelationJson: '{"operationApplyOrderNo":"SSSQ202411010374","operationNoticeBillId":"Nh034720241101000005","distrBillId":"PSh0347202411010076","operationNoticeOrderNo":"SSTZ202411010341","distrOrderNo":"PSh0347202411010076","operationApplyBillId":"Oh034720241101000005"}'
taskDate: '2024-11-01 14:51:01'
planOrderNo: PLAN2024110734457
purOrderNo: CG2024110719709
recOrgId: 4cca3c17b3bf4caa9d6181f671798822
recOrgName: 设备科001
billRelationJson: '{"planBillId":"Ph034720241107031102","planOrderNo":"PLAN2024110734457","purOrderNo":"CG2024110719709","purBillId":"Ch034720241107000038","purBillDate":"2024-11-07
10:02:51","distrBillId":"PSh0347202411070011","distrOrderNo":"PSh0347202411070011"}'
taskDate: '2024-11-07 10:03:50'
taskDateStart:
taskDateEnd:
billModeList:
viewIdList:
supplierFlag: false
tbStatus: 20
remark:
remark: ''
pdaFlag:
areaCode:
areaCodeName:
areaCode: areah03472733
areaCodeName: 自动化测试
list_b:
- *id001
list_c:
......
验收单详情信息:
list_a:
- &id001
- purMode: 20
unitName: 1
hosGoodsId: h034700005760
- purMode: 60
unitName: 100支/100
hosGoodsId: h034700005895
mdmGoodsCode:
spdGoodsCode: '11662822'
goodsCode: '00005760'
goodsName: 高值牙钻机$5zt4
spdGoodsCode: '11662957'
goodsCode: '00005895'
goodsName: 新型冠状病毒检测试剂g#fPr
goodsGg: G-31891
mfrsId:
mfrsName: 德国歌德公司 Geuder AG
......@@ -16,22 +16,22 @@
goodsDi: '01123456789012'
miCode:
miDjmc:
certificateCode:
certificateCode: ''
rfidFlag: 0
pkgDefId:
pkgDefName:
pkgDefQty: 1.0
batchCode: '2222'
expdtDate: '2025-05-10'
productDate: '2024-11-01'
provName: 国药集团公司M@n&X
pkgDefName: '100'
pkgDefQty: 100.0
batchCode: '4444'
expdtDate: '2025-05-16'
productDate: '2024-11-07'
provName: 国药集团公司NHDet
provId:
viewId: '03843765'
viewId: '03843891'
verifyFlag: 0
hasSterilize: 0
id: '03843765'
id: '03843891'
detailRelationJson:
extInfo: '{"ygptCode":"","transCond":"","storageCond":"","erpCode":""}'
extInfo: '{"goodsGg":"G-31891","goodsCode":"00005895","purMode":60,"goodsName":"新型冠状病毒检测试剂g#fPr","ygptCode":"","transCond":"","storageCond":"","erpCode":"11662957","ybDefId":""}'
recTemperature: 20
recHumidity: 30
temperature:
......@@ -41,8 +41,8 @@
sterilizationDate:
sterilizationEndDate:
distrPrice: 99.9999
distrPkgQty: 1.0
distrQty: 1.0
distrPkgQty: 100.0
distrQty: 10000.0
price: 99.9999
checkQty: 0.0
checkPkgQty: 0
......@@ -50,7 +50,7 @@
initQty:
totalQty:
rowNum:
settlement: 3
settlement: 1
hdiBarcodeList:
detailId:
pkgCode:
......@@ -61,9 +61,9 @@
trustMrfsName:
multiChargeFlag: 0
useFrequency: 1
codingType: 0
codingType:
limitMessage:
autoUnpack: 0
autoUnpack:
orderNo:
expireType: 0
remark:
......
验收单号:
CHECK_NO1: CHECKh03472024110100072
CHECK_NO2: CHECKh03472024110100072
CHECK_NO1: CHECKh03472024110700005
CHECK_NO2: CHECKh03472024110700005
......@@ -5,34 +5,34 @@
lastModified:
version:
createTime:
createUser: h0347_UID-051410
createUser: h0347_UID-051440
lastModifiedUser:
billMode: '66'
billMode: '16'
recType:
stockKind:
purMode:
sourceId: DRh034720241101000139
sourceType: CK_TK
sourceVersion: 1
sourceId: CHECKh03472024110700003
sourceType: PSD
sourceVersion: 0
batchList:
billRelationJson:
hosId: h0347
deptId: e336188c385b4a06ab5faf019ace76d1
deptId: 4cca3c17b3bf4caa9d6181f671798822
deptName:
branchId: h0347-3753
branchId: h0347-3783
branchName:
taskType: 2
sourceOrgId: 4e47f180e69f4fb88a79fc4b2d211635
sourceOrgName: 二级检验科002
sourceOrderNo: DN20241101000139
taskSourceNo: DN20241101000139
areaCode:
areaName:
taskType: 1
sourceOrgId: p1e509
sourceOrgName: 国药集团公司NHDet
sourceOrderNo: YS241107003
taskSourceNo: PSh0347202411070009
areaCode: areah03472733
areaName: 自动化测试
goodsName:
goodsGg:
startDate:
endDate:
taskDate: '2024-11-01 12:04:46'
taskDate: '2024-11-07 10:05:40'
pkgTaskId:
pkgFlag:
remark: ''
......
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