生产批发单据上传(非零售企业使用),包括101, "生产入库";102, "采购入库";103, "退货入库";104, "调拨入库";106, "零头入库";107, "供应入库";108, "召回入库";110,"赠品入库";111,"盘盈入库";112,"报废入库";113,"其他入库" 201, "销售出库";202, "退货出库";203, "调拨出库";204, "返工出库";205, "销毁出库";206, "抽检出库";207, "直调出库";208, "生产出库";209, "供应出库";211, "召回出库";212,"赠品出库";214,"盘亏出库";215,"损坏出库";216,"报废出库";217,"其他出库";237, "直调退货"。
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
bill_code | String | 必须 | bc001 | 单据编号【同一个企业不能上传相同单据号】 | |
bill_time | Date | 必须 | 2024-05-10 16:57:15 | 单据时间(扫码时间) | |
bill_type | Number | 必须 | 201 | 单据类型【102代表采购入库,201代表销售出库,其它单据类型详见文档】 | |
physic_type | Number | 必须 | 3 | 药品类型【3普药2特药】不再以该写字为标准,任意填写2或3即可。 | |
ref_user_id | String | 必须 | 320000000000127971 | 货主企业(单据的所有者,上传人)【注意:该入参是ref_ent_id,不是ent_id】 | |
agent_ref_user_id | String | 可选 | 320000000000127971 | 第三方物流代理企业【注意:该入参是ref_ent_id,不是ent_id】,该字段兼容之前接口逻辑,后期将不允许使用,不要填值。 | |
from_user_id | String | 必须 | 00000000000020671792 | 发货企业【注意:该入参是ent_id,并不是ref_ent_id】 | |
to_user_id | String | 必须 | d5f5f05c6af04e52ba7894d9bbf8e757 | 收货企业【注意:该入参是ent_id,并不是ref_ent_id】 | |
dest_user_id | String | 可选 | d5f5f05c6af04e52ba7894d9bbf8e757 | 直调企业【注意:该入参是ent_id,并不是ref_ent_id】 | |
oper_ic_code | String | 必须 | 212000345 | 操作人标识(写appkey编号) | |
oper_ic_name | String | 可选 | 张三 | 单据提交者姓名 | |
file_content | String | 必须 | 添写单据文件xml的加密串,加密过程看文档。XmlUtil类的createFileZipContent方法生成 | 单据文件体【bas64字符串】,看对接文档中的代码示例,示例中有相应说明。 | |
upload_file_name | String | 必须 | 单据文件00001.xml | 单据名称 | |
client_type | String | 必须 | 2 | 请求端类型【暂定都写2】 | |
from_address | String | 可选 | 发货地址XXX | 发货地址 | |
to_address | String | 可选 | 收货地址XXX | 收货地址 | |
from_bill_code | String | 可选 | 123456 | 发货单编号 | |
order_code | String | 可选 | 123456 | 订货单编号 | |
from_person | String | 可选 | 张某 | 发货人(特药出单据必填) | |
to_person | String | 可选 | 李某 | 收货人(特药入单据必填) | |
dis_ref_ent_id | String | 可选 | 5069452c34b94a778abaa26c2b40b305 | 药品配送企业refentid【出库单填写,与dis_ent_id入参选其一添加】 | |
dis_ent_id | String | 可选 | 5069452c34b94a778abaa26c2b40b305 | 药品配送企业entId【出库单填写】 | |
qu_receivable | Number | 可选 | 10 | 应收货总数量 | |
xt_is_check | String | 可选 | 0 | 是否验证,0:未通过验证,1:已验证 | |
xt_check_code | String | 可选 | 未验证通过原因 | 未验证通过原因【验证未通过时填写】 | |
xt_check_code_desc | String | 可选 | 未通过原因描述 | 未验证通过原因描述【验证未通过时填写】 | |
drug_list_json | String | 可选 | [{"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}] | 【可不填】药品列表Json:"codeCount": 药品数量 "commDrugId": 国家药品唯一标识 "exprieDate": 生产日期 "physicInfo": 药品信息 "pkgSpec": 包状规格 "prepnCount": 制剂数量 "produceBatchNo":生产批次 "produceDate": 生产日期 | |
ass_ref_ent_id | String | 可选 | 5069452c34b94a778abaa26c2b40b305 | 单据委托企业refEntId | |
ass_ent_id | String | 可选 | 5069452c34b94a778abaa26c2b40b305 | 单据委托企业entId |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
model | String | SUCCESS | 返回结果 |
msg_code | String | SUCCESS | 返回结果 |
msg_info | String | 调 用成功 | 返回结果 |
response_success | Boolean | true | 是否成功(true 成功 ,false失败) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaAlihealthDrugKytUploadcircubillRequest req = new AlibabaAlihealthDrugKytUploadcircubillRequest(); req.setBillCode( "bc001" ); req.setBillTime(StringUtils.parseDateTime( "2024-05-10 16:57:15" )); req.setBillType(201L); req.setPhysicType(3L); req.setRefUserId( "320000000000127971" ); req.setAgentRefUserId( "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(10L); req.setXtIsCheck( "0" ); req.setXtCheckCode( "未验证通过原因" ); 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" ); AlibabaAlihealthDrugKytUploadcircubillResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 | < alibaba_alihealth_drug_kyt_uploadcircubill_response > < model >SUCCESS</ model > < msg_code >SUCCESS</ msg_code > < msg_info >调 用成功</ msg_info > < response_success >true</ response_success > </ alibaba_alihealth_drug_kyt_uploadcircubill_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|