TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthDrugMscUploadcircubillRequest req = new AlibabaAlihealthDrugMscUploadcircubillRequest();
req.setBillCode("msc_bc005");
req.setBillTime(StringUtils.parseDateTime("2024-10-10 16:57:15"));
req.setBillType(201L);
req.setRefUserId("320000000000127971");
req.setFromUserId("00000000000020671792");
req.setToUserId("d5f5f05c6af04e52ba7894d9bbf8e757");
req.setDestUserId("d5f5f05c6af04e52ba7894d9bbf8e757");
req.setOperIcCode("212000345");
req.setOperIcName("张三");
req.setFileContent("添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成");
req.setUploadFileName("单据文件00001.xml");
req.setClientType(2L);
req.setFromAddress("发货地址XXX");
req.setToAddress("收货地址XXX");
req.setFromBillCode("123456");
req.setOrderCode("123456");
req.setFromPerson("张某");
req.setToPerson("李某");
req.setDisRefEntId("5069452c34b94a778abaa26c2b40b305");
req.setDisEntId("5069452c34b94a778abaa26c2b40b305");
req.setQuReceivable(10L);
req.setXtIsCheck("未验证通过原因");
req.setXtCheckCode("0");
req.setXtCheckCodeDesc("未通过原因描述");
req.setDrugListJson("[{\"codeCount\":100,\"commDrugId\":\"testCommDrugId0\",\"exprieDate\":1571131734945,\"physicInfo\":\"test0\",\"pkgSpec\":\"test0\",\"prepnCount\":10,\"produceBatchNo\":\"test0\",\"produceDate\":1571131734945},{\"codeCount\":100,\"commDrugId\":\"testCommDrugId1\",\"exprieDate\":1571131734945,\"physicInfo\":\"test1\",\"pkgSpec\":\"test1\",\"prepnCount\":10,\"produceBatchNo\":\"test1\",\"produceDate\":1571131734945}]");
req.setAssRefEntId("5069452c34b94a778abaa26c2b40b305");
req.setAssEntId("5069452c34b94a778abaa26c2b40b305");
req.setIgnoreCheck("1");
AlibabaAlihealthDrugMscUploadcircubillResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAlihealthDrugMscUploadcircubillRequest req = new AlibabaAlihealthDrugMscUploadcircubillRequest();
req.BillCode = "msc_bc005";
req.BillTime = DateTime.Parse("2024-10-10 16:57:15");
req.BillType = 201L;
req.RefUserId = "320000000000127971";
req.FromUserId = "00000000000020671792";
req.ToUserId = "d5f5f05c6af04e52ba7894d9bbf8e757";
req.DestUserId = "d5f5f05c6af04e52ba7894d9bbf8e757";
req.OperIcCode = "212000345";
req.OperIcName = "张三";
req.FileContent = "添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成";
req.UploadFileName = "单据文件00001.xml";
req.ClientType = 2L;
req.FromAddress = "发货地址XXX";
req.ToAddress = "收货地址XXX";
req.FromBillCode = "123456";
req.OrderCode = "123456";
req.FromPerson = "张某";
req.ToPerson = "李某";
req.DisRefEntId = "5069452c34b94a778abaa26c2b40b305";
req.DisEntId = "5069452c34b94a778abaa26c2b40b305";
req.QuReceivable = 10L;
req.XtIsCheck = "未验证通过原因";
req.XtCheckCode = "0";
req.XtCheckCodeDesc = "未通过原因描述";
req.DrugListJson = "[{\"codeCount\":100,\"commDrugId\":\"testCommDrugId0\",\"exprieDate\":1571131734945,\"physicInfo\":\"test0\",\"pkgSpec\":\"test0\",\"prepnCount\":10,\"produceBatchNo\":\"test0\",\"produceDate\":1571131734945},{\"codeCount\":100,\"commDrugId\":\"testCommDrugId1\",\"exprieDate\":1571131734945,\"physicInfo\":\"test1\",\"pkgSpec\":\"test1\",\"prepnCount\":10,\"produceBatchNo\":\"test1\",\"produceDate\":1571131734945}]";
req.AssRefEntId = "5069452c34b94a778abaa26c2b40b305";
req.AssEntId = "5069452c34b94a778abaa26c2b40b305";
req.IgnoreCheck = "1";
AlibabaAlihealthDrugMscUploadcircubillResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAlihealthDrugMscUploadcircubillRequest;
$req->setBillCode("msc_bc005");
$req->setBillTime("2024-10-10 16:57:15");
$req->setBillType("201");
$req->setRefUserId("320000000000127971");
$req->setFromUserId("00000000000020671792");
$req->setToUserId("d5f5f05c6af04e52ba7894d9bbf8e757");
$req->setDestUserId("d5f5f05c6af04e52ba7894d9bbf8e757");
$req->setOperIcCode("212000345");
$req->setOperIcName("张三");
$req->setFileContent("添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成");
$req->setUploadFileName("单据文件00001.xml");
$req->setClientType("2");
$req->setFromAddress("发货地址XXX");
$req->setToAddress("收货地址XXX");
$req->setFromBillCode("123456");
$req->setOrderCode("123456");
$req->setFromPerson("张某");
$req->setToPerson("李某");
$req->setDisRefEntId("5069452c34b94a778abaa26c2b40b305");
$req->setDisEntId("5069452c34b94a778abaa26c2b40b305");
$req->setQuReceivable("10");
$req->setXtIsCheck("未验证通过原因");
$req->setXtCheckCode("0");
$req->setXtCheckCodeDesc("未通过原因描述");
$req->setDrugListJson("[{\"codeCount\":100,\"commDrugId\":\"testCommDrugId0\",\"exprieDate\":1571131734945,\"physicInfo\":\"test0\",\"pkgSpec\":\"test0\",\"prepnCount\":10,\"produceBatchNo\":\"test0\",\"produceDate\":1571131734945},{\"codeCount\":100,\"commDrugId\":\"testCommDrugId1\",\"exprieDate\":1571131734945,\"physicInfo\":\"test1\",\"pkgSpec\":\"test1\",\"prepnCount\":10,\"produceBatchNo\":\"test1\",\"produceDate\":1571131734945}]");
$req->setAssRefEntId("5069452c34b94a778abaa26c2b40b305");
$req->setAssEntId("5069452c34b94a778abaa26c2b40b305");
$req->setIgnoreCheck("1");
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.alihealth.drug.msc.uploadcircubill' \
-d 'partner_id=apidoc' \
-d 'sign=3898A9EEE40AF3DB2EF6DEF59E8EAB00' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-02+10%3A31%3A36' \
-d 'v=2.0' \
-d 'ass_ent_id=5069452c34b94a778abaa26c2b40b305' \
-d 'ass_ref_ent_id=5069452c34b94a778abaa26c2b40b305' \
-d 'bill_code=msc_bc005' \
-d 'bill_time=2024-10-10+16%3A57%3A15' \
-d 'bill_type=201' \
-d 'client_type=2' \
-d 'dest_user_id=d5f5f05c6af04e52ba7894d9bbf8e757' \
-d 'dis_ent_id=5069452c34b94a778abaa26c2b40b305' \
-d 'dis_ref_ent_id=5069452c34b94a778abaa26c2b40b305' \
-d 'drug_list_json=%7B%22codeCount%22%3A100%2C%22commDrugId%22%3A%22testCommDrugId0%22%2C%22exprieDate%22%3A1571131734945%2C%22physicInfo%22%3A%22test0%22%2C%22pkgSpec%22%3A%22test0%22%2C%22prepnCount%22%3A10%2C%22produceBatchNo%22%3A%22test0%22%2C%22produceDate%22%3A1571131734945%7D%2C%7B%22codeCount%22%3A100%2C%22commDrugId%22%3A%22testCommDrugId1%22%2C%22exprieDate%22%3A1571131734945%2C%22physicInfo%22%3A%22test1%22%2C%22pkgSpec%22%3A%22test1%22%2C%22prepnCount%22%3A10%2C%22produceBatchNo%22%3A%22test1%22%2C%22produceDate%22%3A1571131734945%7D' \
-d 'file_content=%E6%B7%BB%E5%86%99%E5%8D%95%E6%8D%AE%E6%96%87%E4%BB%B6xml%E7%9A%84%E5%8A%A0%E5%AF%86%E4%B8%B2%EF%BC%8C%E5%8A%A0%E5%AF%86%E8%BF%87%E7%A8%8B%E7%9C%8B%E6%96%87%E6%A1%A3%E3%80%82XmlUtil%E7%B1%BB%E7%9A%84createFileZipContent%E6%96%B9%E6%B3%95%E7%94%9F%E6%88%90' \
-d 'from_address=%E5%8F%91%E8%B4%A7%E5%9C%B0%E5%9D%80XXX' \
-d 'from_bill_code=123456' \
-d 'from_person=%E5%BC%A0%E6%9F%90' \
-d 'from_user_id=00000000000020671792' \
-d 'ignore_check=1' \
-d 'oper_ic_code=212000345' \
-d 'oper_ic_name=%E5%BC%A0%E4%B8%89' \
-d 'order_code=123456' \
-d 'qu_receivable=10' \
-d 'ref_user_id=320000000000127971' \
-d 'to_address=%E6%94%B6%E8%B4%A7%E5%9C%B0%E5%9D%80XXX' \
-d 'to_person=%E6%9D%8E%E6%9F%90' \
-d 'to_user_id=d5f5f05c6af04e52ba7894d9bbf8e757' \
-d 'upload_file_name=%E5%8D%95%E6%8D%AE%E6%96%87%E4%BB%B600001.xml' \
-d 'xt_check_code=0' \
-d 'xt_check_code_desc=%E6%9C%AA%E9%80%9A%E8%BF%87%E5%8E%9F%E5%9B%A0%E6%8F%8F%E8%BF%B0' \
-d 'xt_is_check=%E6%9C%AA%E9%AA%8C%E8%AF%81%E9%80%9A%E8%BF%87%E5%8E%9F%E5%9B%A0'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAlihealthDrugMscUploadcircubillRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.bill_code="msc_bc005"
req.bill_time="2024-10-10 16:57:15"
req.bill_type=201
req.ref_user_id="320000000000127971"
req.from_user_id="00000000000020671792"
req.to_user_id="d5f5f05c6af04e52ba7894d9bbf8e757"
req.dest_user_id="d5f5f05c6af04e52ba7894d9bbf8e757"
req.oper_ic_code="212000345"
req.oper_ic_name="张三"
req.file_content="添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成"
req.upload_file_name="单据文件00001.xml"
req.client_type=2
req.from_address="发货地址XXX"
req.to_address="收货地址XXX"
req.from_bill_code="123456"
req.order_code="123456"
req.from_person="张某"
req.to_person="李某"
req.dis_ref_ent_id="5069452c34b94a778abaa26c2b40b305"
req.dis_ent_id="5069452c34b94a778abaa26c2b40b305"
req.qu_receivable=10
req.xt_is_check="未验证通过原因"
req.xt_check_code="0"
req.xt_check_code_desc="未通过原因描述"
req.drug_list_json="[{\"codeCount\":100,\"commDrugId\":\"testCommDrugId0\",\"exprieDate\":1571131734945,\"physicInfo\":\"test0\",\"pkgSpec\":\"test0\",\"prepnCount\":10,\"produceBatchNo\":\"test0\",\"produceDate\":1571131734945},{\"codeCount\":100,\"commDrugId\":\"testCommDrugId1\",\"exprieDate\":1571131734945,\"physicInfo\":\"test1\",\"pkgSpec\":\"test1\",\"prepnCount\":10,\"produceBatchNo\":\"test1\",\"produceDate\":1571131734945}]"
req.ass_ref_ent_id="5069452c34b94a778abaa26c2b40b305"
req.ass_ent_id="5069452c34b94a778abaa26c2b40b305"
req.ignore_check="1"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.alihealth.drug.msc.uploadcircubill");
add_param(pRequest,"bill_code","msc_bc005");
add_param(pRequest,"bill_time","2024-10-10 16:57:15");
add_param(pRequest,"bill_type","201");
add_param(pRequest,"ref_user_id","320000000000127971");
add_param(pRequest,"from_user_id","00000000000020671792");
add_param(pRequest,"to_user_id","d5f5f05c6af04e52ba7894d9bbf8e757");
add_param(pRequest,"dest_user_id","d5f5f05c6af04e52ba7894d9bbf8e757");
add_param(pRequest,"oper_ic_code","212000345");
add_param(pRequest,"oper_ic_name","张三");
add_param(pRequest,"file_content","添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成");
add_param(pRequest,"upload_file_name","单据文件00001.xml");
add_param(pRequest,"client_type","2");
add_param(pRequest,"from_address","发货地址XXX");
add_param(pRequest,"to_address","收货地址XXX");
add_param(pRequest,"from_bill_code","123456");
add_param(pRequest,"order_code","123456");
add_param(pRequest,"from_person","张某");
add_param(pRequest,"to_person","李某");
add_param(pRequest,"dis_ref_ent_id","5069452c34b94a778abaa26c2b40b305");
add_param(pRequest,"dis_ent_id","5069452c34b94a778abaa26c2b40b305");
add_param(pRequest,"qu_receivable","10");
add_param(pRequest,"xt_is_check","未验证通过原因");
add_param(pRequest,"xt_check_code","0");
add_param(pRequest,"xt_check_code_desc","未通过原因描述");
add_param(pRequest,"drug_list_json","{"codeCount":100,"commDrugId":"testCommDrugId0","exprieDate":1571131734945,"physicInfo":"test0","pkgSpec":"test0","prepnCount":10,"produceBatchNo":"test0","produceDate":1571131734945},{"codeCount":100,"commDrugId":"testCommDrugId1","exprieDate":1571131734945,"physicInfo":"test1","pkgSpec":"test1","prepnCount":10,"produceBatchNo":"test1","produceDate":1571131734945}");
add_param(pRequest,"ass_ref_ent_id","5069452c34b94a778abaa26c2b40b305");
add_param(pRequest,"ass_ent_id","5069452c34b94a778abaa26c2b40b305");
add_param(pRequest,"ignore_check","1");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.alihealth.drug.msc.uploadcircubill', {
'bill_code':'msc_bc005',
'bill_time':'2024-10-10 16:57:15',
'bill_type':'201',
'ref_user_id':'320000000000127971',
'from_user_id':'00000000000020671792',
'to_user_id':'d5f5f05c6af04e52ba7894d9bbf8e757',
'dest_user_id':'d5f5f05c6af04e52ba7894d9bbf8e757',
'oper_ic_code':'212000345',
'oper_ic_name':'张三',
'file_content':'添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成',
'upload_file_name':'单据文件00001.xml',
'client_type':'2',
'from_address':'发货地址XXX',
'to_address':'收货地址XXX',
'from_bill_code':'123456',
'order_code':'123456',
'from_person':'张某',
'to_person':'李某',
'dis_ref_ent_id':'5069452c34b94a778abaa26c2b40b305',
'dis_ent_id':'5069452c34b94a778abaa26c2b40b305',
'qu_receivable':'10',
'xt_is_check':'未验证通过原因',
'xt_check_code':'0',
'xt_check_code_desc':'未通过原因描述',
'drug_list_json':'{"codeCount":100,"commDrugId":"testCommDrugId0","exprieDate":1571131734945,"physicInfo":"test0","pkgSpec":"test0","prepnCount":10,"produceBatchNo":"test0","produceDate":1571131734945},{"codeCount":100,"commDrugId":"testCommDrugId1","exprieDate":1571131734945,"physicInfo":"test1","pkgSpec":"test1","prepnCount":10,"produceBatchNo":"test1","produceDate":1571131734945}',
'ass_ref_ent_id':'5069452c34b94a778abaa26c2b40b305',
'ass_ent_id':'5069452c34b94a778abaa26c2b40b305',
'ignore_check':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})