| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.APIEnum; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEA_IBasicRepository; |
| | |
| | | { |
| | | ContractResolver = new CamelCasePropertyNamesContractResolver() |
| | | }; |
| | | /// <summary> |
| | | /// è°ç¨BST䏿¥RFIDæ¥å£ |
| | | /// </summary> |
| | | public string BSTPurchaseUp(BSTPurchaseUpModel bSTPurchaseUpModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x=>x.ApiCode==APIEnum.BSTPurchaseUp.ToString()); |
| | | if (apiInfo.Enable == WhetherEnum.False.ObjToInt()) |
| | | { |
| | | BSTResponse<object> bSTResponse = new BSTResponse<object>() { Code=200,Msg="æ¥å£ç¦ç¨"}; |
| | | return bSTResponse.Serialize(); |
| | | } |
| | | string request = JsonConvert.SerializeObject(bSTPurchaseUpModel, settings); |
| | | |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request); |
| | | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// è°ç¨ERPå纸åºåæ¥å£ |
| | | /// </summary> |
| | | public string BSTStockAsync(string barCode) |
| | | { |
| | | |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.BSTStockAsync.ToString() && x.Enable == WhetherEnum.True.ObjToInt()); |
| | | |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress + "?barcode=" + barCode); |
| | | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPä¸ä¼ éè´ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string ERPPurchaseUp(ERPPurchaseUpModel eRPPurchaseUpModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPPurchaseUpModel.ToString() && x.Enable == WhetherEnum.True.ObjToInt()); |
| | | |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, eRPPurchaseUpModel.Serialize().ToUpper()); |
| | | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPæåéå®åºåºä¸ä¼ ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string ERPProOutUp(ERPProOutUpModel eRPProOutUpModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPProOutUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt()); |
| | | |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, eRPProOutUpModel.Serialize().ToUpper()); |
| | | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPä¸ä¼ æåå
¥åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string ERPProInUp(ERPProInUpModel eRPProInUpModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPProInUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt()); |
| | | |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, eRPProInUpModel.Serialize().ToUpper()); |
| | | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// ERPä¸ä¼ åæåå
¥åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string ERPSemiProInUp(ERPProInUpModel eRPProInUpModel) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPSemiProInUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt()); |
| | | |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, eRPProInUpModel.Serialize().ToUpper()); |
| | | |
| | | return response; |
| | | } |
| | | } |
| | | } |