AlibabaAlihealthDrugtraceTopLsydUploadretailRequest.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <?php
  2. /**
  3. * TOP API: alibaba.alihealth.drugtrace.top.lsyd.uploadretail request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2025.10.27
  7. */
  8. class AlibabaAlihealthDrugtraceTopLsydUploadretailRequest
  9. {
  10. /**
  11. * 单据编号(唯一)
  12. **/
  13. private $billCode;
  14. /**
  15. * 单据时间(一般为药品入出库时间)
  16. **/
  17. private $billTime;
  18. /**
  19. * 单据类型[321,使用出库][322,疫苗接种][116,消费者退货入库]
  20. **/
  21. private $billType;
  22. /**
  23. * 购买人证件编号
  24. **/
  25. private $customerId;
  26. /**
  27. * 购买人证件类型【1身份证2护照3 军官证4 医保卡5接种卡6学生证9其它】
  28. **/
  29. private $customerIdType;
  30. /**
  31. * 发货企业(可为空)
  32. **/
  33. private $fromUserId;
  34. /**
  35. * 码解析策略,1代表整单解析成功(任一码解析失败,上传时整单返回错误),传其他值或者不传代表部分解析成功(跳过无法解析的码,其余正常处理并上传)
  36. **/
  37. private $ignorePartSuccessFlag;
  38. /**
  39. * 药品发药人(最大长度20)
  40. **/
  41. private $medicDispenser;
  42. /**
  43. * 开药医师(最大长度20)
  44. **/
  45. private $medicDoctor;
  46. /**
  47. * 互联网订单标识 0非互联网 1互联网
  48. **/
  49. private $networkBillFlag;
  50. /**
  51. * 单据提交者(appkey编号,可为空)
  52. **/
  53. private $operIcCode;
  54. /**
  55. * 单据提交者姓名(可为空)
  56. **/
  57. private $operIcName;
  58. /**
  59. * 药品类型[2,特药,3,普药]【可以随便填写,单据上传后会以实际为准】
  60. **/
  61. private $physicType;
  62. /**
  63. * 码上放心平台企业唯一编码(门店或医疗机构),可通过“通过企业名得到唯一标识”接口获取;
  64. **/
  65. private $refUserId;
  66. /**
  67. * 备注
  68. **/
  69. private $remarks;
  70. /**
  71. * 追溯码【多个码时用逗号拼接的字符串。要求数量在3500个码以下,但一般不要传这么多,如果网络不好很容易传输一半报错】注意:在同一张单据里,不能有重复的码;在同一张单据中不能同时上传有关联关系的大、小码
  72. **/
  73. private $traceCodes;
  74. /**
  75. * 药品代理人(最大长度20)
  76. **/
  77. private $userAgent;
  78. /**
  79. * 药品使用者姓名(最大长度20)
  80. **/
  81. private $userName;
  82. /**
  83. * 购买人电话(最大长度11)
  84. **/
  85. private $userTel;
  86. private $apiParas = array();
  87. public function setBillCode($billCode)
  88. {
  89. $this->billCode = $billCode;
  90. $this->apiParas["bill_code"] = $billCode;
  91. }
  92. public function getBillCode()
  93. {
  94. return $this->billCode;
  95. }
  96. public function setBillTime($billTime)
  97. {
  98. $this->billTime = $billTime;
  99. $this->apiParas["bill_time"] = $billTime;
  100. }
  101. public function getBillTime()
  102. {
  103. return $this->billTime;
  104. }
  105. public function setBillType($billType)
  106. {
  107. $this->billType = $billType;
  108. $this->apiParas["bill_type"] = $billType;
  109. }
  110. public function getBillType()
  111. {
  112. return $this->billType;
  113. }
  114. public function setCustomerId($customerId)
  115. {
  116. $this->customerId = $customerId;
  117. $this->apiParas["customer_id"] = $customerId;
  118. }
  119. public function getCustomerId()
  120. {
  121. return $this->customerId;
  122. }
  123. public function setCustomerIdType($customerIdType)
  124. {
  125. $this->customerIdType = $customerIdType;
  126. $this->apiParas["customer_id_type"] = $customerIdType;
  127. }
  128. public function getCustomerIdType()
  129. {
  130. return $this->customerIdType;
  131. }
  132. public function setFromUserId($fromUserId)
  133. {
  134. $this->fromUserId = $fromUserId;
  135. $this->apiParas["from_user_id"] = $fromUserId;
  136. }
  137. public function getFromUserId()
  138. {
  139. return $this->fromUserId;
  140. }
  141. public function setIgnorePartSuccessFlag($ignorePartSuccessFlag)
  142. {
  143. $this->ignorePartSuccessFlag = $ignorePartSuccessFlag;
  144. $this->apiParas["ignore_part_success_flag"] = $ignorePartSuccessFlag;
  145. }
  146. public function getIgnorePartSuccessFlag()
  147. {
  148. return $this->ignorePartSuccessFlag;
  149. }
  150. public function setMedicDispenser($medicDispenser)
  151. {
  152. $this->medicDispenser = $medicDispenser;
  153. $this->apiParas["medic_dispenser"] = $medicDispenser;
  154. }
  155. public function getMedicDispenser()
  156. {
  157. return $this->medicDispenser;
  158. }
  159. public function setMedicDoctor($medicDoctor)
  160. {
  161. $this->medicDoctor = $medicDoctor;
  162. $this->apiParas["medic_doctor"] = $medicDoctor;
  163. }
  164. public function getMedicDoctor()
  165. {
  166. return $this->medicDoctor;
  167. }
  168. public function setNetworkBillFlag($networkBillFlag)
  169. {
  170. $this->networkBillFlag = $networkBillFlag;
  171. $this->apiParas["network_bill_flag"] = $networkBillFlag;
  172. }
  173. public function getNetworkBillFlag()
  174. {
  175. return $this->networkBillFlag;
  176. }
  177. public function setOperIcCode($operIcCode)
  178. {
  179. $this->operIcCode = $operIcCode;
  180. $this->apiParas["oper_ic_code"] = $operIcCode;
  181. }
  182. public function getOperIcCode()
  183. {
  184. return $this->operIcCode;
  185. }
  186. public function setOperIcName($operIcName)
  187. {
  188. $this->operIcName = $operIcName;
  189. $this->apiParas["oper_ic_name"] = $operIcName;
  190. }
  191. public function getOperIcName()
  192. {
  193. return $this->operIcName;
  194. }
  195. public function setPhysicType($physicType)
  196. {
  197. $this->physicType = $physicType;
  198. $this->apiParas["physic_type"] = $physicType;
  199. }
  200. public function getPhysicType()
  201. {
  202. return $this->physicType;
  203. }
  204. public function setRefUserId($refUserId)
  205. {
  206. $this->refUserId = $refUserId;
  207. $this->apiParas["ref_user_id"] = $refUserId;
  208. }
  209. public function getRefUserId()
  210. {
  211. return $this->refUserId;
  212. }
  213. public function setRemarks($remarks)
  214. {
  215. $this->remarks = $remarks;
  216. $this->apiParas["remarks"] = $remarks;
  217. }
  218. public function getRemarks()
  219. {
  220. return $this->remarks;
  221. }
  222. public function setTraceCodes($traceCodes)
  223. {
  224. $this->traceCodes = $traceCodes;
  225. $this->apiParas["trace_codes"] = $traceCodes;
  226. }
  227. public function getTraceCodes()
  228. {
  229. return $this->traceCodes;
  230. }
  231. public function setUserAgent($userAgent)
  232. {
  233. $this->userAgent = $userAgent;
  234. $this->apiParas["user_agent"] = $userAgent;
  235. }
  236. public function getUserAgent()
  237. {
  238. return $this->userAgent;
  239. }
  240. public function setUserName($userName)
  241. {
  242. $this->userName = $userName;
  243. $this->apiParas["user_name"] = $userName;
  244. }
  245. public function getUserName()
  246. {
  247. return $this->userName;
  248. }
  249. public function setUserTel($userTel)
  250. {
  251. $this->userTel = $userTel;
  252. $this->apiParas["user_tel"] = $userTel;
  253. }
  254. public function getUserTel()
  255. {
  256. return $this->userTel;
  257. }
  258. public function getApiMethodName()
  259. {
  260. return "alibaba.alihealth.drugtrace.top.lsyd.uploadretail";
  261. }
  262. public function getApiParas()
  263. {
  264. return $this->apiParas;
  265. }
  266. public function check()
  267. {
  268. RequestCheckUtil::checkNotNull($this->billCode,"billCode");
  269. RequestCheckUtil::checkNotNull($this->billTime,"billTime");
  270. RequestCheckUtil::checkNotNull($this->billType,"billType");
  271. RequestCheckUtil::checkNotNull($this->refUserId,"refUserId");
  272. RequestCheckUtil::checkNotNull($this->traceCodes,"traceCodes");
  273. RequestCheckUtil::checkMaxListSize($this->traceCodes,3500,"traceCodes");
  274. }
  275. public function putOtherTextParam($key, $value) {
  276. $this->apiParas[$key] = $value;
  277. $this->$key = $value;
  278. }
  279. }