| | |
| | | <add key="KDApiUrl" value=""></add> |
| | | <add key="DataBaseName" value=""></add> |
| | | <add key="ClientUrl" value=""></add> |
| | | <add key="HOrganNumber" value="9010"></add> |
| | | <add key="HOrganNumber" value="9010,9011"></add> |
| | | </appSettings> |
| | | </configuration> |
| | |
| | | { |
| | | sql = $@" |
| | | /*dialect*/ |
| | | select F_RCZU_MesIp ,FISNEEDPUSH from T_ORG_Organizations |
| | | where FNUMBER ='{FNUMBER}'"; |
| | | select F_RCZU_MesIp ,FISNEEDPUSH from T_ORG_Organizations where FNUMBER ='{FNUMBER}'"; |
| | | |
| | | } |
| | | else |
| | |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | |
| | | var id = billObj["Id"].ToString(); |
| | | |
| | | var sqls= string.Empty; |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | //var sql = $"exec zymes_RealessBillType '{billObj["Id"]}' "; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("单据类型同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("单据类型同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Xt_BillType/SaveXt_BillTypeListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("生产BOM同步示例" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Gy_ICBomBill/Gy_ICBomBillaveApi", Method.POST); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("币别同步示例.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("币别同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Currency/SaveGy_CurrencyListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("客户同步示例" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Customer/SaveGy_CustomerListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("部门同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Department/SaveGy_DepartmentListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("采购价格同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("采购价格同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_MatePriceSup/SaveGy_MatePriceSupListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | var forgID = Context.CurrentOrganizationInfo.ID; |
| | | LogService.Write($"组织:{forgName},{forgID}"); |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | //LogService.Write("物料同步插件执行开始:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | //var sql = $"exec zymes_RealessMaterial {billObj["Id"]} "; |
| | | LogService.Write("物料同步插件执行开始:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("物料同步插件,JSON拼接完成:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | //var client = new RestSharp.RestClient("http://47.96.97.237/api/"); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | LogService.Write("物料同步插件,JSON拼接完成:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //var client = new RestSharp.RestClient(" http://10.11.18.195:8080/simoerapi/"); |
| | | //删除 |
| | | //var requestGet = new RestRequest("Gy_Material/Delete", Method.GET); |
| | | //requestGet.AddParameter("HItemID", dr["HERPItemID"].ToString()); |
| | |
| | | //var contentGet = response.Content; |
| | | //Console.WriteLine("GET方式获取结果:" + contentGet); |
| | | //新增 |
| | | //LogService.Write("物料同步示例:"+ JsonConvert.SerializeObject(_jsonRoot)); |
| | | LogService.Write("物料同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | var requestPost = new RestRequest("Gy_Material/SaveGy_MaterialListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | //LogService.Write("物料同步插件,post完成:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | LogService.Write("物料同步插件,post完成:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | |
| | | LogService.Write("物料同步异常,POST," + "Gy_Material/SaveGy_MaterialListApi"); |
| | | LogService.Write("物料同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | //Console.WriteLine("POST方式获取结果:" + responsePost.ErrorMessage); |
| | | //Console.Read(); |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogService.Write("物料同步插件,抛出异常:" + ex.Message.ToString()); |
| | | } |
| | | //LogService.Write("物料同步插件,代码执行完成:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | //foreach (var item in dictionary) |
| | | //{ |
| | | // ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | //} |
| | | LogService.Write("物料同步插件,代码执行完成:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff:ffffff")); |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | |
| | | |
| | | string http = dataTable.Rows[0]["F_RCZU_MesIp"].ToString(); |
| | | |
| | | //DataRow dr = dt.Rows[0]; |
| | | JArray array = new JArray(); |
| | | foreach(DataRow dr in dt.Rows) |
| | | { |
| | |
| | | } |
| | | JObject model = new JObject(); |
| | | model.Add("HOperatorInfoEntry", array); |
| | | //foreach (DataColumn column in dt.Columns) |
| | | //{ |
| | | // model.Add(column.ColumnName, dr[column.ColumnName].ToString()); |
| | | //} |
| | | |
| | | JObject _jsonRoot = new JObject() |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("业务员同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("业务员同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Operator/SaveGy_OperatorListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("付款条件同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("付款条件同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_PaymentCondition/SaveGy_PaymentConditionListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | //var client = new RestSharp.RestClient("http://47.96.97.237/api/"); |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Sc_ICMOBill/ICMOBillSaveApi", Method.POST); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("生产用料清单同步示例" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Sc_PPBomBill/Sc_PPBomBillSaveApi", Method.POST); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("采购订单同步示例" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Cg_POOrderBill/Cg_POOrderBillSaveApi", Method.POST); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("收料通知单同步示例" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Cg_POInStockBill/Cg_POInStockBillSaveApi", Method.POST); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("汇率类型同步示例.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("汇率类型同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_RateType/SaveGy_RateTypeListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("收款条件同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("收款条件同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_RecCondition/SaveGy_RecConditionListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("发货通知单同步示例" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Xs_SeOutStockBill/Xs_SeOutStockBillSaveApi", Method.POST); |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | //var sql = $"exec zymes_RealessSettleStyle {billObj["Id"]} "; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("结算方式同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("结算方式同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_SettleStyle/SaveGy_SettleStyleListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("员工同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("员工同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Staff/SaveGy_StaffListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | //var sql = $"exec zymes_RealessStock {billObj["Id"]} "; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = string.Format(@" |
| | |
| | | continue; |
| | | } |
| | | |
| | | //string HOrganNumber = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "HOrganNumber"); |
| | | |
| | | //获取创建仓库仓位的使用组织 |
| | | DataTable dataTable = LogService.Get_DisPlayOrg(Context, maindt.Rows[0]["HOrganNumber"].ToString()); |
| | | if (dataTable.Rows.Count == 0) |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("仓库仓位同步示例:" + JsonConvert.SerializeObject(jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | LogService.Write("仓库仓位同步示例,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(jsonRoot)); |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Warehouse/SaveGy_WarehouseListApi", Method.POST); |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("库存状态同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("库存状态同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_StockStatus/SaveGy_StockStatusListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("供应商同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Supplier/SaveGy_SupplierListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | |
| | | var sql = $"exec zymes_RealessTaxMIX {billObj["Id"]} "; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | | /*dialect*/ |
| | | select a.FENTRYID AS HItemID,a.FTAXMIXID as HTaxMixID,a.FTAXBENCHMARK as HTAXBENCHMARK,a.FTAXRATEID as FTAXRATEID |
| | | from T_BD_TAXMIXENTRY a with(nolock) |
| | | Where a.FTAXMIXID={id} |
| | | select a.FTAXMIXID HItemID ,a.FNUMBER HNumber,l.FNAME HName,a.FNUMBER HShortNumber,0 HParentID,1 HLevel, |
| | | 'true' as HEndFlag,case when a.FFORBIDSTATUS='A' then 'false' else 'true' end as HStopflag,'CLD-ERP导入' as HRemark, |
| | | '' HHelpCode,'false' HUseFlag,a.FCREATEDATE HMakeTime,'' HMakeEmp,'' HCheckEmp,a.FCREATEDATE HCheckTime,'' HModifyEmp, |
| | | a.FMODIFYDATE HModifyTime,'' HStopEmp,a.FSTARTDATE HStopTime,a.FUSEORGID HUSEORGID,a.FCREATEORGID HCREATEORGID |
| | | from T_BD_TAXMIX a with(nolock) |
| | | inner join T_BD_TAXMIX_L l on a.FTAXMIXID = l.FTAXMIXID |
| | | Where a.FTAXMIXID={id} |
| | | "; |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(Context, sql); |
| | | DataTable maindt = ds.Tables[1]; |
| | | DataTable subdt = ds.Tables[0]; |
| | | DataTable maindt = ds.Tables[1]; |
| | | |
| | | if (maindt.Rows.Count == 0 || subdt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("税率组合同步异常:" + sql); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | //获取供应商的使用组织 |
| | | DataTable dataTable = LogService.Get_DisPlayOrg(Context, subdt.Rows[0]["HUSEORGID"].ToString()); |
| | | if (dataTable.Rows.Count == 0) |
| | | continue; |
| | | |
| | | if (dataTable.Rows[0]["FISNEEDPUSH"].ToString() == "0") |
| | | continue; |
| | | |
| | | string http = dataTable.Rows[0]["F_RCZU_MesIp"].ToString(); |
| | | |
| | | |
| | | JArray array = new JArray();//明细表 |
| | | foreach (DataRow dr in subdt.Rows) |
| | | { |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | |
| | | |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | //新增 |
| | | var requestPost = new RestRequest("Gy_TaxMIXMain/SaveGy_TaxMIXMainListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(jsonRoot), ParameterType.RequestBody); |
| | |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("税率组合同步异常,POST方式获取结果," + billObj["Id"] + "," + responsePost.ErrorMessage); |
| | | LogService.Write("税率组合同步异常,POST," + clientUrl + "Gy_TaxMIXMain/SaveGy_TaxMIXMainListApi"); |
| | | LogService.Write("税率组合同步异常,POST,Gy_TaxMIXMain/SaveGy_TaxMIXMainListApi"); |
| | | LogService.Write("税率组合同步异常,JsonConvert.SerializeObject(jsonRoot)," + JsonConvert.SerializeObject(jsonRoot)); |
| | | } |
| | | }; |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql = string.Empty; |
| | | sql = $@" |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("税率同步示例JsonConvert.SerializeObject(_jsonRoot):" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("税率同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_TaxRate/SaveGy_TaxRateListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var forgName = Context.CurrentOrganizationInfo.Name; |
| | | //if (!forgName.Contains("杭州斯莫尔磁性材料有限公司")) |
| | | // continue; |
| | | //var sql = $"exec zymes_RealessUnit {billObj["Id"]} "; |
| | | var id = billObj["Id"].ToString(); |
| | | string sql =string.Empty; |
| | | sql = $@" |
| | |
| | | continue; |
| | | } |
| | | |
| | | string HOrganNumber = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "HOrganNumber"); |
| | | |
| | | LogService.Write("组织:" + HOrganNumber); |
| | | |
| | | //获取单位的使用组织 |
| | | DataTable dataTable = LogService.Get_DisPlayOrg(Context, HOrganNumber); |
| | | DataTable dataTable = LogService.Get_DisPlayOrg(Context, dt.Rows[0]["HUSEORGID"].ToString()); |
| | | if (dataTable.Rows.Count == 0) |
| | | continue; |
| | | |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("单位同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("单位同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | //var client = new RestSharp.RestClient("http://47.96.97.237/API/"); |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Unit/SaveGy_UnitListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | //LogService.Write("作业同步示例:" + JsonConvert.SerializeObject(_jsonRoot)); |
| | | //LogService.Write("作业同步示例:" + _jsonRoot); |
| | | //string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | |
| | | var client = new RestSharp.RestClient(http); |
| | | var requestPost = new RestRequest("Gy_Work/SaveGy_WorkListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>zymes_Project</RootNamespace> |
| | | <AssemblyName>zymes_Project_%28V1.0%29_9010_20240626_yangle</AssemblyName> |
| | | <AssemblyName>zymes_Project_%28V1.0%29_9010_20250812_zrg</AssemblyName> |
| | | <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>true</Deterministic> |
| | |
| | | <ItemGroup> |
| | | <Reference Include="Kingdee.BOS, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.dll</HintPath> |
| | | <HintPath>packages\ZD.Cloud.Common.7.5.1.7\lib\net452\Kingdee.BOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.App.dll</HintPath> |
| | | <HintPath>packages\ZD.Cloud.Common.7.5.1.7\lib\net452\Kingdee.BOS.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Contracts, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.Contracts.dll</HintPath> |
| | | <HintPath>packages\ZD.Cloud.Common.7.5.1.7\lib\net452\Kingdee.BOS.Contracts.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.Core.dll</HintPath> |
| | | <HintPath>packages\ZD.Cloud.Common.7.5.1.7\lib\net452\Kingdee.BOS.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.DataEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.DataEntity.dll</HintPath> |
| | | <HintPath>packages\ZD.Cloud.Common.7.5.1.7\lib\net452\Kingdee.BOS.DataEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.ServiceHelper.dll</HintPath> |
| | | <HintPath>packages\ZD.Cloud.Common.7.5.1.7\lib\net452\Kingdee.BOS.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> |
| | | <HintPath>packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <ProjectView>ShowAllFiles</ProjectView> |
| | | <ProjectView>ProjectFiles</ProjectView> |
| | | </PropertyGroup> |
| | | </Project> |