Commit 05120ebf authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十一脚本编写

parent 5da405d9
......@@ -403,24 +403,25 @@ def pick_execute():
udi_code = 'udi_code'
print('udi_code', udi_code)
if purMode == 10:
targetAreaCode=pickScan2(BH_ID, udi_code, 1) # 低值
targetAreaCode,sourceId=pickScan2(BH_ID, udi_code, 1) # 低值
elif purMode == 20:
targetAreaCode=pickScan2(BH_ID, udi_code, 2) # 高值
targetAreaCode,sourceId=pickScan2(BH_ID, udi_code, 2) # 高值
elif purMode == 60:
targetAreaCode= pickScan2(BH_ID, udi_code, 3) # 试剂
targetAreaCode,sourceId= pickScan2(BH_ID, udi_code, 3) # 试剂
else:
targetAreaCode='targetAreaCode'
sourceId='sourceId'
# 提交领用出库单
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_out_use_submit_url")
url = url + BH_ID
print('提交拣货执行单=================', url)
if purMode == 10:
request_body = commonFuc().get_business_data(module, "payload51_1_1", targetAreaCode)
request_body = commonFuc().get_business_data(module, "payload51_1_1", targetAreaCode,sourceId)
elif purMode == 20:
request_body = commonFuc().get_business_data(module, "payload51_1_2", targetAreaCode)
request_body = commonFuc().get_business_data(module, "payload51_1_2", targetAreaCode,sourceId)
elif purMode == 60:
request_body = commonFuc().get_business_data(module, "payload51_1_3", targetAreaCode)
request_body = commonFuc().get_business_data(module, "payload51_1_3", targetAreaCode,sourceId)
print('提交拣货执行单', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
......
......@@ -2483,7 +2483,7 @@ def pickScan2(PICK_ID, udi_code, type=1): # 二级库出库拣货扫码
batchCode, expdtDate, productDate, pkgCode, pkgCodeSee, ssccCode,
tbStatus, purBillId, distrBillId,
inStockTime, distrDetailId, purMode, price, goodsMfrsName,
goodsSpec, unit, goodsName, pkgDefName, made,
goodsSpec, unit, goodsName, made,
unitName, hosGoodsCode, purModeText, PICK_ID, pickerId,
stockName)
elif type == 3:
......@@ -2501,7 +2501,7 @@ def pickScan2(PICK_ID, udi_code, type=1): # 二级库出库拣货扫码
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
return areaCode
return areaCode,PICK_ID
def get_branch_name():
......
企业信息:
e_id: CR202405310038
cname: 国药集团公司MRA4P
e_id: CR202406030038
cname: 国药集团公司mvYxk
医院信息:
h_id: 湖南省人民医院DXn!1
h_name: 湖南省人民医院DXn!1
h_id: 湖南省人民医院#vYfi
h_name: 湖南省人民医院#vYfi
产品审核信息:
MSPid: MSP2405310011_1
MSPid: MSP2406030011_1
hosId: h0347
hosGoodsId: h034700003924
provGoodsid: provGood-99221102
goodsAuditBillId: MSP2405310011
targetId: MSP2405310011_1
hosGoodsId: h034700003967
provGoodsid: provGood-99221148
goodsAuditBillId: MSP2406030011
targetId: MSP2406030011_1
......@@ -2,10 +2,10 @@
list_a:
- &id001
settleMonth: '202406'
pid: OBh0347202405310004
hosGoodsId: h034700003921
goodsCode: '00003921'
goodsName: 一次性注射器_低值ga1u3
pid: OBh0347202406030004
hosGoodsId: h034700003964
goodsCode: '00003964'
goodsName: 一次性注射器_低值qjUa2
goodsGg: G-31891
mfrsName: 德国歌德公司 Geuder AG
unit: 支
......@@ -20,13 +20,13 @@
normalContractId:
normalContract: '1'
detailList:
- pid: OBh0347202405310004
- pid: OBh0347202406030004
settleMonth: '202406'
hosGoodsId: h034700003921
hosGoodsId: h034700003964
batchCode: '333'
distrDetailId: '03837852'
distrId: PSh0347202405310005
distrOrderNo: PSh0347202405310005
distrDetailId: '03837924'
distrId: PSh0347202406030005
distrOrderNo: PSh0347202406030005
settlePrice: 99.9999
maxSettleQty: -100.0
maxSettleAmount: -9999.99
......@@ -35,11 +35,11 @@
leftSettleQty: -100.0
leftSettleAmount: -9999.99
hosId: h0347
provId: p1e25f
branchId: h0347-3643
balanceDetId: OBh0347202405310004-000001
provId: p1e267
branchId: h0347-3649
balanceDetId: OBh0347202406030004-000001
purMode: 10
barCode: 013643000003921010333112405311724120721UT240531000202
barCode: 013649000003964010333112406031724121021UT240603000202
batchId:
price:
maxQty:
......@@ -51,14 +51,15 @@
oneFcatName:
volumeFlag:
onlineKind:
viewId: 202406OBh0347202405310004h034700003921
- pid: OBh0347202405310004
invoicePrice: 99.9999
viewId: 202406OBh0347202406030004h034700003964
- pid: OBh0347202406030004
settleMonth: '202406'
hosGoodsId: h034700003921
hosGoodsId: h034700003964
batchCode: '333'
distrDetailId: '03837852'
distrId: PSh0347202405310005
distrOrderNo: PSh0347202405310005
distrDetailId: '03837924'
distrId: PSh0347202406030005
distrOrderNo: PSh0347202406030005
settlePrice: 99.9999
maxSettleQty: 100.0
maxSettleAmount: 9999.99
......@@ -67,11 +68,11 @@
leftSettleQty: 100.0
leftSettleAmount: 9999.99
hosId: h0347
provId: p1e25f
branchId: h0347-3643
balanceDetId: OBh0347202405310004-000002
provId: p1e267
branchId: h0347-3649
balanceDetId: OBh0347202406030004-000002
purMode: 10
barCode: 013643000003921010333112405311724120721UT240531000212
barCode: 013649000003964010333112406031724121021UT240603000288
batchId:
price:
maxQty:
......@@ -83,10 +84,11 @@
oneFcatName:
volumeFlag:
onlineKind:
viewId: 202406OBh0347202405310004h034700003921
unique: 202406OBh0347202405310004h034700003921
invoicePrice: 99.9999
viewId: 202406OBh0347202406030004h034700003964
unique: 202406OBh0347202406030004h034700003964
onlineKind: '10'
viewId: 202406OBh0347202405310004h034700003921
viewId: 202406OBh0347202406030004h034700003964
list_b:
- *id001
list_c:
......
院区新增:
branch_id: h0347-3643
branch_name: 东土城路院区UhFS2
branch_id: h0347-3649
branch_name: 东土城路院区kBIb2
科室信息:
dept2_id: 2400310b2a484a71a3d050da4ea37ad0
dept2_id: f8eb781292cd452eabd5ca99f8867aff
dept2_name: 二级检验科002
用户名信息:
username1: 自动化测试oO48w
username2: 自动化测试oO48w
username1: 自动化测试QBz5q
username2: 自动化测试QBz5q
一级科室信息:
dept1_id: 4d0db8a18c454c0f8887dc578e353d16
dept1_id: f6e2b5eb722b42e18bcc93ef29371337
dept1_name: 设备科001
部门和库区信息:
dept1_id: 4d0db8a18c454c0f8887dc578e353d16
stockAreaId: f4e67f11442248bc8549d13cba17a792
dept1_id: f6e2b5eb722b42e18bcc93ef29371337
stockAreaId: eb359aa3c32942f8a00e9c761312a853
所有科室id:
deptid1: 4d0db8a18c454c0f8887dc578e353d16
deptid2: 2400310b2a484a71a3d050da4ea37ad0
deptid3: 972e8e5b8f4b40e9a84572a92b707900
deptid4: 3ba6b6a6260d4cf1bba826e19cfc6397
deptid5: f71f3f896dad46c0af9403ad5cc0e8fc
deptid1: f6e2b5eb722b42e18bcc93ef29371337
deptid2: f8eb781292cd452eabd5ca99f8867aff
deptid3: fe1b462bb9ee4ce0b818977f2cd1ea76
deptid4: 3c2a3eb7fb0d437fb7b395ef8469246b
deptid5: 9252920c3ff247fbbe034564fc6e9270
所有科室name:
deptid1: 设备科001
deptid2: 二级检验科002
......
shelfinfo:
shelfid: f4e67f11442248bc8549d13cba17a792
shelfCode: areah03472143
shelfid: eb359aa3c32942f8a00e9c761312a853
shelfCode: areah03472181
areaName: 自动化测试
......@@ -148,9 +148,9 @@ json_headers2: {
"payload50_1_1": {"areaCode":"%s","areaName":"%s","hdiList":[{"id":"%s","lastModified":null,"version":null,"createTime":"%s","createUser":null,"lastModifiedUser":null,"snCode":"%s","hosId":"%s","branchId":null,"stockId":"%s","areaCode":"%s","areaName":"%s","shelfCode":"%s","codeType":"%s","tagType":0,"hosGoodsId":"%s","mdmGoodsCode":"%s","goodsCode":"%s","goodsDi":"%s","barName":"%s","batchCode":"%s","expdtDate":"%s","productDate":"%s","mfrCode":null,"mfrCodeSee":null,"pkgCode":"%s","pkgCodeSee":"%s","ssccCode":"%s","extInfo":null,"outId":null,"tbStatus":"%s","goodsCodeDi":null,"barcodeId":null,"ext":{"pkgDefId":"%s","pkgDefQty":100,"purBillId":"%s","pkgDefName":"%s","distrBillId":"%s","inStockTime":"%s","distrDetailId":"%s","certificateCode":""},"sourceDetailId":null,"purMode":"%s","purModes":null,"price":"%s","pid":null,"goodsMfrsName":"%s","mfrsName":null,"goodsSpec":"%s","unit":"%s","goodsName":"%s","pkgDefId":"%s","pkgDefQty":"%s","defaultPkgDefQty":null,"defaultQty":null,"defaultSurplusQty":null,"defaultPkgDefId":null,"purDetailId":null,"pkgDefName":"%s","printNum":0,"deptId":null,"deptName":null,"billId":null,"taskId":null,"made":"%s","provId":null,"provName":null,"subProvId":null,"subProvName":null,"provHosGoodsId":null,"sourceType":null,"taskDate":null,"sourceOrderNo":null,"taskType":null,"detailId":null,"branchGoodsPkgDefList":null,"unitName":"%s","areaCodeList":null,"diType":null,"mdmGoodsSpecCode":null,"hosGoodsCode":"%s","supplyId":null,"inSettlement":null,"spdGoodsCode":null,"codeKind":null,"brand":null,"miCode":"","transferRatio":1,"miDjmc":"","tbStatusList":null,"purModeText":"%s","stockName":null,"tbStatusText":null,"pkgType":null,"bottleId":null,"pkgStatus":null,"qty":1,"packUnit":null,"minSaleQty":null,"rfidFlag":null,"mfrCodeFlag":null,"scanStatus":null,"scanId":null,"multiChargeFlag":null,"useFrequency":null,"chargeUnit":null,"lockStatus":null,"remark":null,"hosBatchId":null,"settleFlag":null,"inStockTime":null}],"id":"%s","pickerId":"%s","version":0,"stockName":"%s"}
"payload51": "%s"
"payload51_1_1": {"targetAreaCode":"%s","billMode":16,"consumeType":0,"patientId":"","patientName":"","programType":"","sourceId":"PICKh03472405310056","sourceType":"CK_SL","sourceVersion":0,"targetAreaName":"","targetBranchId":"","targetDeptId":"","targetDeptName":"","targetStockId":""}
"payload51_1_2": {"targetAreaCode":"%s","billMode":20,"consumeType":0,"patientId":"","patientName":"","programType":"","sourceId":"PICKh03472405310056","sourceType":"CK_SL","sourceVersion":0,"targetAreaName":"","targetBranchId":"","targetDeptId":"","targetDeptName":"","targetStockId":""}
"payload51_1_3": {"targetAreaCode":"%s","billMode":66,"consumeType":0,"patientId":"","patientName":"","programType":"","sourceId":"PICKh03472405310056","sourceType":"CK_SL","sourceVersion":0,"targetAreaName":"","targetBranchId":"","targetDeptId":"","targetDeptName":"","targetStockId":""}
"payload51_1_1": {"targetAreaCode":"%s","billMode":16,"consumeType":0,"patientId":"","patientName":"","programType":"","sourceId":"%s","sourceType":"CK_SL","sourceVersion":0,"targetAreaName":"","targetBranchId":"","targetDeptId":"","targetDeptName":"","targetStockId":""}
"payload51_1_2": {"targetAreaCode":"%s","billMode":20,"consumeType":0,"patientId":"","patientName":"","programType":"","sourceId":"%s","sourceType":"CK_SL","sourceVersion":0,"targetAreaName":"","targetBranchId":"","targetDeptId":"","targetDeptName":"","targetStockId":""}
"payload51_1_3": {"targetAreaCode":"%s","billMode":66,"consumeType":0,"patientId":"","patientName":"","programType":"","sourceId":"%s","sourceType":"CK_SL","sourceVersion":0,"targetAreaName":"","targetBranchId":"","targetDeptId":"","targetDeptName":"","targetStockId":""}
"payload52": {"batchList":[{"id":"%s","lastModified":null,"version":null,"createTime":"%s","createUser":null,"lastModifiedUser":null,"snCode":"%s","hosId":"%s","branchId":null,"stockId":"%s","areaCode":"%s","areaName":"%s","shelfCode":"%s","codeType":"%s","tagType":"%s","hosGoodsId":"%s","mdmGoodsCode":"%s","goodsCode":"%s","goodsDi":"%s","barName":"%s","batchCode":"%s","expdtDate":"%s","productDate":"%s","mfrCode":null,"mfrCodeSee":null,"pkgCode":"%s","pkgCodeSee":"%s","ssccCode":"%s","extInfo":null,"outId":null,"tbStatus":"%s","goodsCodeDi":null,"barcodeId":null,"ext":{"distrDetailId":"%s","distrBillId":"%s","certificateCode":"","purBillId":"%s","pkgDefQty":"%s","pkgDefId":"%s","pkgDefName":"%s"},"sourceDetailId":null,"purMode":"%s","purModes":null,"price":null,"pid":null,"goodsMfrsName":"%s","mfrsName":null,"goodsSpec":"%s","unit":"%s","goodsName":"%s","pkgDefId":"%s","pkgDefQty":"%s","purDetailId":null,"pkgDefName":"%s","printNum":0,"deptId":null,"deptName":null,"billId":null,"taskId":null,"made":"%s","provId":null,"provName":null,"subProvId":null,"subProvName":null,"provHosGoodsId":null,"sourceType":null,"taskDate":null,"sourceOrderNo":null,"taskType":null,"detailId":null,"branchGoodsPkgDefList":null,"unitName":null,"areaCodeList":null,"diType":null,"mdmGoodsSpecCode":null,"hosGoodsCode":"%s","supplyId":null,"inSettlement":null,"spdGoodsCode":null,"codeKind":null,"brand":null,"miCode":null,"transferRatio":1,"miDjmc":null,"tbStatusList":null,"purModeText":null,"stockName":null,"tbStatusText":null,"pkgType":null,"bottleId":null,"pkgStatus":null,"qty":null,"packUnit":null,"minSaleQty":null,"rfidFlag":null,"mfrCodeFlag":null,"scanStatus":null,"scanId":null,"multiChargeFlag":null,"useFrequency":null,"chargeUnit":null,"lockStatus":null,"remark":null}],"sourceId":"%s","sourceType":"KS","sourceVersion":"3","remark":"","reviewAll":0}
"payload50_2": {"areaCode":"%s","hdiList":[{"id":"%s","lastModified":null,"version":null,"createTime":"%s","createUser":null,"lastModifiedUser":null,"snCode":"%s","hosId":"%s","branchId":null,"stockId":"%s","areaCode":"%s","areaName":"%s","shelfCode":"%s","codeType":"%s","tagType":"%s","hosGoodsId":"%s","mdmGoodsCode":"%s","goodsCode":"%s","goodsDi":"%s","barName":"%s","batchCode":"%s","expdtDate":"%s","productDate":"%s","mfrCode":null,"mfrCodeSee":null,"pkgCode":"%s","pkgCodeSee":"%s","ssccCode":"%s","extInfo":null,"outId":null,"tbStatus":"%s","goodsCodeDi":null,"barcodeId":null,"ext":{"distrDetailId":"%s","distrBillId":"%s","certificateCode":"","purBillId":"%s","pkgDefQty":"%s","multiChargeFlag":0,"useFrequency":1},"sourceDetailId":null,"purMode":"%s","purModes":null,"price":null,"pid":null,"goodsMfrsName":"%s","mfrsName":null,"goodsSpec":"%s","unit":"%s","goodsName":"%s","pkgDefId":null,"pkgDefQty":null,"purDetailId":null,"pkgDefName":null,"printNum":"%s","deptId":null,"deptName":null,"billId":null,"taskId":null,"made":"%s","provId":null,"provName":null,"subProvId":null,"subProvName":null,"provHosGoodsId":null,"sourceType":null,"taskDate":null,"sourceOrderNo":null,"taskType":null,"detailId":null,"branchGoodsPkgDefList":null,"unitName":null,"areaCodeList":null,"diType":null,"mdmGoodsSpecCode":null,"hosGoodsCode":"%s","supplyId":null,"inSettlement":null,"spdGoodsCode":null,"codeKind":null,"brand":null,"miCode":null,"transferRatio":1,"miDjmc":null,"tbStatusList":null,"purModeText":null,"stockName":null,"tbStatusText":null,"pkgType":null,"bottleId":null,"pkgStatus":null,"qty":null,"packUnit":null,"minSaleQty":null,"rfidFlag":null,"mfrCodeFlag":null,"scanStatus":null,"scanId":null,"multiChargeFlag":null,"useFrequency":null,"chargeUnit":null,"lockStatus":null,"remark":null}],"id":"%s","areaName":"%s","stockName":"%s"}
......
供货关系申请2:
e_corpId: p1e25f
e_corpId: p1e267
h_corpId: h0347
e_username: 国药集团公司MRA4P
e_username: 国药集团公司mvYxk
h_name: test001
产品审核信息:
MSPid: MSP2405310007_1
MSPid: MSP2406030007_1
hosId: h0347
hosGoodsId: h034700003920
provGoodsid: provGood-99221098
goodsAuditBillId: MSP2405310007
targetId: MSP2405310007_1
hosGoodsId: h034700003963
provGoodsid: provGood-99221144
goodsAuditBillId: MSP2406030007
targetId: MSP2406030007_1
低值配送单号:
distrBillId1: PSh0347202405310011
distrBillId2: PSh0347202405310011
distrBillId1: PSh0347202406030034
distrBillId2: PSh0347202406030034
高值配送单号:
distrBillId1: PSh0347202405310012
distrBillId2: PSh0347202405310012
distrBillId1: PSh0347202406030035
distrBillId2: PSh0347202406030035
试剂配送单号:
distrBillId1: PSh0347202405310013
distrBillId2: PSh0347202405310013
高值跟台配送单号:
distrBillId1: PSh0347202405310014
distrBillId2: PSh0347202405310014
distrBillId1: PSh0347202406030036
distrBillId2: PSh0347202406030036
采购计划单号高值:
orderNo1: PLAN2024053124773
orderNo2: PLAN2024053124773
orderNo1: PLAN2024060325174
orderNo2: PLAN2024060325174
采购计划单号试剂:
orderNo1: PLAN2024053124774
orderNo2: PLAN2024053124774
orderNo1: PLAN2024060325172
orderNo2: PLAN2024060325172
......@@ -3,33 +3,34 @@
- &id001
- id:
hosId: h0347
branchId: h0347-3643
branchId: h0347-3649
deptId:
taskType: 1
sourceOrgId: p1e25f
sourceOrgName: 国药集团公司MRA4P
sourceOrderNo: PSh0347202405310014
billMode: '25'
sourceOrgId: p1e267
sourceOrgName: 国药集团公司mvYxk
sourceOrderNo: PSh0347202406030033
billMode: '66'
stockKind:
purMode:
sourceId: PSh0347202405310014
sourceId: PSh0347202406030033
sourceDetailId:
sourceType: PSD
sourceTypeName: 配送单
sourceVersion: 1
planOrderNo: SSSQ202405310281
purOrderNo: SSTZ202405310257
recOrgId: 2400310b2a484a71a3d050da4ea37ad0
planOrderNo: PLAN2024060325169
purOrderNo: CG2024060317545
recOrgId: f8eb781292cd452eabd5ca99f8867aff
recOrgName: 二级检验科002
billRelationJson: '{"operationApplyOrderNo":"SSSQ202405310281","operationNoticeBillId":"Nh034720240531000001","distrBillId":"PSh0347202405310014","operationNoticeOrderNo":"SSTZ202405310257","distrOrderNo":"PSh0347202405310014","operationApplyBillId":"Oh034720240531000001"}'
taskDate: '2024-05-31 07:23:53'
billRelationJson: '{"buyBillId":"Bh03472024060300021","planBillId":"Ph034720240603021814","planOrderNo":"PLAN2024060325169","buyOrderNo":"BUY2024060304540","purOrderNo":"CG2024060317545","purBillId":"Ch034720240603000109","purBillDate":"2024-06-03
11:11:57","distrBillId":"PSh0347202406030033","distrOrderNo":"PSh0347202406030033"}'
taskDate: '2024-06-03 11:12:14'
taskDateStart:
taskDateEnd:
billModeList:
viewIdList:
supplierFlag: false
supplierFlag: true
tbStatus: 20
remark:
remark: ''
list_b:
- *id001
list_c:
......
验收单详情信息:
list_a:
- &id001
- purMode: 20
unitName: 1
hosGoodsId: h034700003920
- purMode: 60
unitName: 100支/100
hosGoodsId: h034700003965
mdmGoodsCode:
spdGoodsCode: '11660857'
goodsCode: '00003920'
goodsName: 高值牙钻机olAYM
spdGoodsCode: '11660903'
goodsCode: '00003965'
goodsName: 新型冠状病毒检测试剂9jSFk
goodsGg: G-31891
mfrsId:
mfrsName: 德国歌德公司 Geuder AG
......@@ -16,27 +16,27 @@
goodsDi:
miCode:
miDjmc:
certificateCode:
certificateCode: ''
rfidFlag: 0
pkgDefId:
pkgDefName:
pkgDefQty: 1.0
batchCode: '2222'
expdtDate: '2024-12-07'
productDate: '2024-05-31'
provName: 国药集团公司MRA4P
pkgDefName: '100'
pkgDefQty: 100.0
batchCode: '4444'
expdtDate: '2024-12-10'
productDate: '2024-06-03'
provName: 国药集团公司mvYxk
provId:
viewId: '03837861'
viewId: '03837956'
verifyFlag: 0
hasSterilize: 0
id: '03837861'
id: '03837956'
detailRelationJson:
extInfo: '{"ygptCode":"","transCond":"","storageCond":"","erpCode":""}'
extInfo: '{"goodsGg":"G-31891","goodsCode":"00003965","purMode":60,"goodsName":"新型冠状病毒检测试剂9jSFk","ygptCode":"","transCond":"","storageCond":"","erpCode":"11660903","ybDefId":""}'
recTemperature: 20
recHumidity: 30
distrPrice: 99.9999
distrPkgQty: 1.0
distrQty: 1.0
distrQty: 100.0
price: 99.9999
checkQty: 0.0
checkPkgQty: 0
......@@ -44,7 +44,7 @@
initQty:
totalQty:
rowNum:
settlement: 3
settlement: 1
hdiBarcodeList:
detailId:
pkgCode:
......
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