| | |
| | | ################################################################################ |
| | | |
| | | /zymes/.vs |
| | | /zymes/bin/Debug |
| | | /zymes/obj/Debug |
| | | /zymes/packages |
| | | /zymes/test/bin/Debug |
| | | /zymes/test/obj/Debug |
| New file |
| | |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Core.Report.PlugIn; |
| | | using Kingdee.BOS.Core.Report.PlugIn.Args; |
| | | using Kingdee.BOS.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace zymes_Project.BillView |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划订单列表跳转插件 |
| | | /// </summary> |
| | | [Description("供应商送料计划订单列表跳转插件")] |
| | | [HotUpdate] |
| | | public class FeedPlanOrderReportBill : AbstractSysReportPlugIn//报表表单插件 |
| | | { |
| | | public override void CellDbClick(CellEventArgs Args) |
| | | { |
| | | base.CellDbClick(Args); |
| | | string fmaterial = ((ISysReportViewService)this.View).GetCurrentRowValue("Fcolumn3")?.ToString();//物料代码 |
| | | string fstock = ((ISysReportViewService)this.View).GetCurrentRowValue("Fcolumn11")?.ToString();//仓库 |
| | | string fstockid = ""; |
| | | switch (fstock) |
| | | { |
| | | case "新厂": |
| | | fstockid = "5fe5d920a3f2bf"; |
| | | break; |
| | | case "老厂": |
| | | fstockid = "5fe5d926a3f2c1"; |
| | | break; |
| | | case "江苏韩电": |
| | | fstockid = "5fe5d92ca3f2c3"; |
| | | break; |
| | | } |
| | | |
| | | /* |
| | | 5fe5d920a3f2bf 新厂 |
| | | 5fe5d926a3f2c1 老厂 |
| | | 5fe5d92ca3f2c3 江苏韩电 |
| | | */ |
| | | SysReportShowParameter sysReportShowParameter = new SysReportShowParameter(); |
| | | sysReportShowParameter.IsShowFilter = false;//不显示过滤框 |
| | | sysReportShowParameter.FormId = "QOUL_FeedPlanOrderDetailReport"; |
| | | sysReportShowParameter.ParentPageId = this.View.ParentFormView.PageId; |
| | | sysReportShowParameter.CustomParams.Add("fmaterial", fmaterial);//可以将A报表的获得信息 |
| | | sysReportShowParameter.CustomParams.Add("fstockid", fstockid);//可以将A报表的获得信息 |
| | | //添加到里面,带到下一个报表B |
| | | this.View.ShowForm(sysReportShowParameter); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Core.Report.PlugIn; |
| | | using Kingdee.BOS.Core.Report.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.Util; |
| | | using Newtonsoft.Json; |
| | | using ZD.Cloud.Logger; |
| | | |
| | | namespace zymes_Project.BillView |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划订单明细列表跳转插件 |
| | | /// </summary> |
| | | [Description("供应商送料计划订单明细列表跳转插件")] |
| | | [HotUpdate] |
| | | public class FeedPlanOrderReportDetailBill : AbstractSysReportPlugIn//报表表单插件 |
| | | { |
| | | public override void ReportInitialize(ReportInitializeEventArgs e) |
| | | { |
| | | base.ReportInitialize(e); |
| | | DynamicObject customFilter = e.Paramter.FilterParameter.CustomFilter;//获取过滤条件信息,此时里面没有信息 |
| | | //取出上个页面存入的信息 |
| | | object value1 = this.View.OpenParameter.GetCustomParameter("fmaterial"); |
| | | object value2 = this.View.OpenParameter.GetCustomParameter("fstockid"); |
| | | if (value1.ToString() != "" || value2.ToString() != "") |
| | | { |
| | | //创建过滤框条件集合 |
| | | DynamicObject dynamicObject = new DynamicObject(customFilter.DynamicObjectType); |
| | | dynamicObject["Fmaterial"] = value1.ToString();//给过滤框里的字段赋值 |
| | | dynamicObject["Fstockid"] = value2.ToString();//给过滤框里的字段赋值 |
| | | //将这个对象赋值给过滤条件 |
| | | |
| | | e.Paramter.FilterParameter.CustomFilter = dynamicObject; |
| | | LogHelper.Info($"json:{JsonConvert.SerializeObject(e.Paramter.FilterParameter.CustomFilter)}"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Core.Report.PlugIn; |
| | | using Kingdee.BOS.Core.Report.PlugIn.Args; |
| | | using Kingdee.BOS.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using ZD.Cloud.Logger; |
| | | |
| | | namespace zymes_Project.BillView |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划列表跳转插件 |
| | | /// </summary> |
| | | [Description("供应商送料计划列表跳转插件")] |
| | | [HotUpdate] |
| | | public class FeedPlanReportBill : AbstractSysReportPlugIn//供应商送料计划列表跳转插件 |
| | | { |
| | | public override void CellDbClick(CellEventArgs Args) |
| | | { |
| | | base.CellDbClick(Args); |
| | | string fmaterial = ((ISysReportViewService)this.View).GetCurrentRowValue("Fcolumn3")?.ToString();//物料代码 |
| | | string fstock = ((ISysReportViewService)this.View).GetCurrentRowValue("Fcolumn11")?.ToString();//仓库 |
| | | string fstockid = ""; |
| | | switch (fstock) |
| | | { |
| | | case "新厂": |
| | | fstockid = "5fe5d920a3f2bf"; |
| | | break; |
| | | case "老厂": |
| | | fstockid = "5fe5d926a3f2c1"; |
| | | break; |
| | | case "江苏韩电": |
| | | fstockid = "5fe5d92ca3f2c3"; |
| | | break; |
| | | } |
| | | |
| | | /* |
| | | 5fe5d920a3f2bf 新厂 |
| | | 5fe5d926a3f2c1 老厂 |
| | | 5fe5d92ca3f2c3 江苏韩电 |
| | | */ |
| | | SysReportShowParameter sysReportShowParameter = new SysReportShowParameter(); |
| | | sysReportShowParameter.IsShowFilter = false;//不显示过滤框 |
| | | sysReportShowParameter.FormId = "QOUL_FeedPlanDetailReport"; |
| | | sysReportShowParameter.ParentPageId = this.View.ParentFormView.PageId; |
| | | sysReportShowParameter.CustomParams.Add("fmaterial", fmaterial);//可以将A报表的获得信息 |
| | | sysReportShowParameter.CustomParams.Add("fstockid", fstockid);//可以将A报表的获得信息 |
| | | //添加到里面,带到下一个报表B |
| | | this.View.ShowForm(sysReportShowParameter); |
| | | LogHelper.Info(fmaterial); |
| | | LogHelper.Info(fstock); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Core.Report.PlugIn; |
| | | using Kingdee.BOS.Core.Report.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.Util; |
| | | using Newtonsoft.Json; |
| | | using ZD.Cloud.Logger; |
| | | |
| | | namespace zymes_Project.BillView |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划明细列表跳转插件 |
| | | /// </summary> |
| | | [Description("供应商送料计划明细列表跳转插件")] |
| | | [HotUpdate] |
| | | public class FeedPlanReportDetailBill : AbstractSysReportPlugIn//报表表单插件 |
| | | { |
| | | |
| | | public override void ReportInitialize(ReportInitializeEventArgs e) |
| | | { |
| | | base.ReportInitialize(e); |
| | | DynamicObject customFilter = e.Paramter.FilterParameter.CustomFilter;//获取过滤条件信息,此时里面没有信息 |
| | | //取出上个页面存入的信息 |
| | | object value1 = this.View.OpenParameter.GetCustomParameter("fmaterial"); |
| | | object value2 = this.View.OpenParameter.GetCustomParameter("fstockid"); |
| | | LogHelper.Info("接收:"+value1.ToString()); |
| | | LogHelper.Info("接收:"+value2.ToString()); |
| | | if (value1.ToString() != "" || value2.ToString() != "") |
| | | { |
| | | LogHelper.Info("赋值成功:" + value2.ToString()); |
| | | //创建过滤框条件集合 |
| | | DynamicObject dynamicObject = new DynamicObject(customFilter.DynamicObjectType); |
| | | dynamicObject["Fmaterial"] = value1.ToString();//给过滤框里的字段赋值 |
| | | dynamicObject["Fstockid"] = value2.ToString();//给过滤框里的字段赋值 |
| | | //将这个对象赋值给过滤条件 |
| | | |
| | | |
| | | e.Paramter.FilterParameter.CustomFilter = dynamicObject; |
| | | //e.Paramter.FilterParameter.CustomFilter["Fmaterial"] = value1; |
| | | //e.Paramter.FilterParameter.CustomFilter["Fstockid"] = value2; |
| | | LogHelper.Info($"json:{JsonConvert.SerializeObject(e.Paramter.FilterParameter.CustomFilter)}"); |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8" ?> |
| | | <configuration> |
| | | <appSettings> |
| | | <add key="DbId" value="6204a70eba35fc"></add> |
| | | <add key="UserName" value="Administrator"></add> |
| | | <add key="PassWord" value="qaz!@#123"></add> |
| | | <add key="KDApiUrl" value="http://47.96.97.237/k3cloud/"></add> |
| | | <add key="DataBaseName" value="AIS20210811135644"></add> |
| | | <add key="ClientUrl" value="http://localhost:8082/LuBaoApi/"></add> |
| | | </appSettings> |
| | | </configuration> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Text; |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace zymes_Project |
| | | { |
| | | public class HttpClient |
| | | { |
| | | /// <summary> |
| | | /// Seivice URL |
| | | /// </summary> |
| | | public string Url { get; set; } |
| | | /// <summary> |
| | | /// 内容 |
| | | /// </summary> |
| | | public string Content { get; set; } |
| | | /// <summary> |
| | | /// Cookie,保证登录后,所有访问持有一个Cookie; |
| | | /// </summary> |
| | | static CookieContainer Cookie = new CookieContainer(); |
| | | |
| | | /// <summary> |
| | | /// HTTP访问 |
| | | /// </summary> |
| | | public string SyncRequest() |
| | | { |
| | | HttpWebRequest httpRequest = HttpWebRequest.Create(Url) as HttpWebRequest; |
| | | httpRequest.Method = "POST"; |
| | | httpRequest.ContentType = "application/json"; |
| | | httpRequest.CookieContainer = Cookie; |
| | | httpRequest.Timeout = 1000 * 60 * 10;//10min |
| | | |
| | | using (Stream reqStream = httpRequest.GetRequestStream()) |
| | | { |
| | | JObject jObj = new JObject(); |
| | | jObj.Add("format", 1); |
| | | jObj.Add("useragent", "ApiClient"); |
| | | jObj.Add("rid", Guid.NewGuid().ToString().GetHashCode().ToString()); |
| | | jObj.Add("parameters", Content); |
| | | jObj.Add("timestamp", DateTime.Now); |
| | | jObj.Add("v", "1.0"); |
| | | string sContent = jObj.ToString(); |
| | | var bytes = UnicodeEncoding.UTF8.GetBytes(sContent); |
| | | reqStream.Write(bytes, 0, bytes.Length); |
| | | reqStream.Flush(); |
| | | } |
| | | using (var repStream = httpRequest.GetResponse().GetResponseStream()) |
| | | { |
| | | using (var reader = new StreamReader(repStream)) |
| | | { |
| | | return ValidateResult(reader.ReadToEnd()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public async Task<string> AsyncRequest() |
| | | { |
| | | HttpWebRequest httpRequest = WebRequest.Create(Url) as HttpWebRequest; |
| | | httpRequest.Method = "POST"; |
| | | httpRequest.ContentType = "application/json"; |
| | | httpRequest.CookieContainer = Cookie; |
| | | httpRequest.Timeout = 1000 * 60 * 10;//10min |
| | | |
| | | using (Stream reqStream = await httpRequest.GetRequestStreamAsync()) |
| | | { |
| | | JObject jObj = new JObject(); |
| | | jObj.Add("format", 1); |
| | | jObj.Add("useragent", "ApiClient"); |
| | | jObj.Add("rid", Guid.NewGuid().ToString().GetHashCode().ToString()); |
| | | jObj.Add("parameters", Content); |
| | | jObj.Add("timestamp", DateTime.Now); |
| | | jObj.Add("v", "1.0"); |
| | | string content = jObj.ToString(); |
| | | var bytes = Encoding.UTF8.GetBytes(content); |
| | | reqStream.Write(bytes, 0, bytes.Length); |
| | | reqStream.Flush(); |
| | | } |
| | | using (var repStream = (await httpRequest.GetResponseAsync()).GetResponseStream()) |
| | | { |
| | | using (var reader = new StreamReader(repStream)) |
| | | { |
| | | return ValidateResult(await reader.ReadToEndAsync()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private static string ValidateResult(string responseText) |
| | | { |
| | | if (responseText.StartsWith("response_error:")) |
| | | { |
| | | responseText.TrimStart("response_error:".ToCharArray()); |
| | | } |
| | | return responseText; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Newtonsoft.Json; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project |
| | | { |
| | | public static class InvokeHelper |
| | | { |
| | | private static string CloudUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "KDApiUrl");//K/3 Cloud 业务站点地址 |
| | | /// <summary> |
| | | /// 登陆 |
| | | /// </summary> |
| | | public static string Login() |
| | | { |
| | | var dbId = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DbId"); |
| | | var useName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "UserName"); |
| | | var pwd = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "PassWord"); |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | Parameters.Add(dbId);//账套标示 |
| | | Parameters.Add(useName);//用户名 |
| | | Parameters.Add(pwd);//密码 |
| | | Parameters.Add(2052);//2052代表中文 |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | public static async Task<string> LoginAsync() |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); |
| | | List<object> Parameters = new List<object>(); |
| | | Parameters.Add("622703e117d642");//账套标示 |
| | | Parameters.Add("Administrator");//用户名 |
| | | Parameters.Add("sa@123456");//密码 |
| | | Parameters.Add(2052);//2052代表中文 |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | |
| | | return await httpClient.AsyncRequest(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存 |
| | | /// </summary> |
| | | /// <param name="formId"></param> |
| | | /// <param name="content"></param> |
| | | /// <returns></returns> |
| | | public static string Save(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | public static string BatchSave(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.BatchSave.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | public static async Task<string> SaveAsync(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc"); |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return await httpClient.AsyncRequest(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 提交 |
| | | /// </summary> |
| | | /// <param name="formId"></param> |
| | | /// <param name="content"></param> |
| | | /// <returns></returns> |
| | | public static string Submit(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | /// <summary> |
| | | /// 删除 |
| | | /// </summary> |
| | | /// <param name="formId"></param> |
| | | /// <param name="content"></param> |
| | | /// <returns></returns> |
| | | public static string Delete(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Delete.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | public static async Task<string> DeleteAsync(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Delete.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return await httpClient.AsyncRequest(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 审核 |
| | | /// </summary> |
| | | /// <param name="formId"></param> |
| | | /// <param name="content"></param> |
| | | /// <returns></returns> |
| | | public static string Audit(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | /// <summary> |
| | | /// 查询 |
| | | /// </summary> |
| | | /// <param name="formId"></param> |
| | | /// <param name="content"></param> |
| | | /// <returns></returns> |
| | | public static string View(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | //反审核 |
| | | public static string UnAudit(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UnAudit.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | //下推 |
| | | public static string Push(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Push.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | public static string Query(string formId, string content) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc"); |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | //Parameters.Add(formId); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 自定义 |
| | | /// </summary> |
| | | /// <param name="key">自定义方法标识</param> |
| | | /// <param name="args">参数</param> |
| | | /// <returns></returns> |
| | | public static string AbstractWebApiBusinessService(string key, List<object> args) |
| | | { |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, key, ".common.kdsvc"); |
| | | |
| | | httpClient.Content = JsonConvert.SerializeObject(args); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | |
| | | //生产订单 执行 |
| | | public static string ExcuteOperation(string formId, string opNumber, string content) |
| | | { |
| | | LogService.Write("生产订单 执行,opNumber: " + opNumber + ",content:" + content); |
| | | HttpClient httpClient = new HttpClient(); |
| | | httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExcuteOperation.common.kdsvc"); |
| | | |
| | | List<object> Parameters = new List<object>(); |
| | | //业务对象Id |
| | | Parameters.Add(formId); |
| | | //操作 开工"ToStart" |
| | | Parameters.Add(opNumber); |
| | | //Json字串 |
| | | Parameters.Add(content); |
| | | httpClient.Content = JsonConvert.SerializeObject(Parameters); |
| | | return httpClient.SyncRequest(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.IO; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace zymes_Project |
| | | { |
| | | public class LogService |
| | | { |
| | | private static readonly object lockObj = new object(); |
| | | |
| | | public static void WriteAsync(object obj, string filePath = "Vlog", bool isAppend = true) |
| | | { |
| | | Task.Run(() => |
| | | { |
| | | Write(obj, filePath, isAppend); |
| | | }); |
| | | } |
| | | |
| | | public static void WriteAsync<T>(object obj, string filePath = "Vlog", bool isAppend = true) |
| | | { |
| | | Task.Run(() => |
| | | { |
| | | Write(obj, $@"{filePath}\{typeof(T).Name}", isAppend); |
| | | }); |
| | | } |
| | | |
| | | #region 日志 |
| | | public static void Write(object obj, string filePath = "Vlog", bool isAppend = true) |
| | | { |
| | | try |
| | | { |
| | | lock (lockObj) |
| | | { |
| | | filePath = $@"{filePath}\webapi{DateTime.Now.ToString("yyyyMMdd")}.txt"; |
| | | |
| | | filePath = AppDomain.CurrentDomain.BaseDirectory + filePath; |
| | | |
| | | if (!System.IO.Directory.Exists(Path.GetDirectoryName(filePath))) |
| | | { |
| | | System.IO.Directory.CreateDirectory(Path.GetDirectoryName(filePath)); |
| | | } |
| | | |
| | | bool fileExists = System.IO.File.Exists(filePath); |
| | | //不存在 则创建该文件 |
| | | if (!fileExists) |
| | | { |
| | | System.IO.File.Create(filePath).Close(); |
| | | } |
| | | |
| | | using (StreamWriter writer = new StreamWriter(filePath, isAppend)) |
| | | { |
| | | //存在的时候才写一行 |
| | | if (fileExists && isAppend) |
| | | { |
| | | writer.WriteLine(); |
| | | } |
| | | |
| | | var content = obj is string ? obj : JsonConvert.SerializeObject(obj); |
| | | writer.WriteLine($"{DateTime.Now} {content}"); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[客户-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessCustomer : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessCustomer {billObj["Id"]} "; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("客户同步异常:" + sql); |
| | | continue; |
| | | } |
| | | DataRow dr = dt.Rows[0]; |
| | | JObject model = new JObject(); |
| | | 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)); |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | var requestPost = new RestRequest("Gy_Customer/SaveGy_CustomerListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("客户同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("客户同步异常,POST," + clientUrl + "Gy_Customer/SaveGy_CustomerListApi"); |
| | | LogService.Write("客户同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | }; |
| | | |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[部门-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessDepartment : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessDept {billObj["Id"]} "; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("部门同步异常:" + sql); |
| | | continue; |
| | | } |
| | | DataRow dr = dt.Rows[0]; |
| | | JObject model = new JObject(); |
| | | 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)); |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | var requestPost = new RestRequest("Gy_Department/SaveGy_DepartmentListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("部门同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("部门同步异常,POST," + clientUrl + "Gy_Department/SaveGy_DepartmentListApi"); |
| | | LogService.Write("部门同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | }; |
| | | |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[物料-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessMaterial : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | //public override void BeginOperationTransaction(BeginOperationTransactionArgs e) |
| | | //{ |
| | | // base.BeginOperationTransaction(e); |
| | | // //foreach (var item in e.DataEntitys) |
| | | // //{ |
| | | // // DynamicObjectCollection entryRows = item["FEntity"] as DynamicObjectCollection; |
| | | // //} |
| | | // Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | // foreach (var billObj in e.DataEntitys) |
| | | // { |
| | | // //DynamicObjectCollection entryRows = entity.DynamicProperty.GetValue(billObj.DataEntity) |
| | | // // as DynamicObjectCollection; |
| | | // DynamicObjectCollection entryRows = billObj["FEntity"] as DynamicObjectCollection; |
| | | // foreach (var entryRow in entryRows) |
| | | // { |
| | | // var fentryId = entryRow["Id"].ToString(); |
| | | // //生成生产订单 |
| | | // string sql = $"/*dialect*/ exec proc_jit_DayPlanAduitAddNemMoOrder {fentryId}"; |
| | | // DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | // if (dt.Rows[0][0].ToString().Contains("成功")) |
| | | // continue; |
| | | // foreach (DataRow dr in dt.Rows) |
| | | // { |
| | | // JObject model = new JObject(); |
| | | // model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = dr["FBillTypeNumber"].ToString() }); //单据类型 |
| | | // model.Add("FCreatorId", new JObject() { ["FUserID"] = Context.UserId }); //创建人 |
| | | // model.Add("FModifierId", new JObject() { ["FUserID"] = Context.UserId }); //修改人 |
| | | // model.Add("FDate", dr["FDate"].ToString()); |
| | | // model.Add("FBILLNO", dr["FSpreadBillNo"].ToString()); |
| | | // model.Add("FPrdOrgId", new JObject() { ["Fnumber"] = dr["FPrdOrgNumber"].ToString() }); |
| | | // model.Add("FWorkShopID0", new JObject() { ["Fnumber"] = dr["FWorkShopNumber"].ToString() }); |
| | | // model.Add("FOwnerTypeId", dr["FOwnerTypeId"].ToString()); |
| | | // model.Add("FIsRework", dr["FIsRework"].ToString()); |
| | | // model.Add("FBusinessType", dr["FBusinessType"].ToString()); |
| | | // model.Add("FTrustteed", dr["FTrustteed"].ToString()); |
| | | // model.Add("FIsEntrust", dr["FIsEntrust"].ToString()); |
| | | // model.Add("FPPBOMType", dr["FPPBOMType"].ToString()); |
| | | // model.Add("FIssueMtrl", dr["FIssueMtrl"].ToString()); |
| | | // JArray Fentity = new JArray(); |
| | | // JObject FentityModel = new JObject(); |
| | | // FentityModel.Add("FProductType", dr["FProductType"].ToString()); |
| | | // FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = dr["FMATERIALNUMBER"].ToString() }); |
| | | // FentityModel.Add("FWorkShopID", new JObject() { ["Fnumber"] = dr["FWorkShopNumber"].ToString() }); |
| | | // FentityModel.Add("FUnitId", new JObject() { ["Fnumber"] = dr["FUnitNumber"].ToString() }); |
| | | // FentityModel.Add("FQty", dr["FQty"].ToString()); |
| | | // FentityModel.Add("FYieldQty", dr["FYieldQty"].ToString()); |
| | | // FentityModel.Add("FPlanStartDate", dr["FPlanStartDate"].ToString()); |
| | | // FentityModel.Add("FPlanFinishDate", dr["FPlanFinishDate"].ToString()); |
| | | // FentityModel.Add("FRequestOrgId", new JObject() { ["Fnumber"] = dr["FRequestOrgNumber"].ToString() }); |
| | | // FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr["FBomNumber"].ToString() }); |
| | | // FentityModel.Add("FISBACKFLUSH", dr["FISBACKFLUSH"].ToString()); |
| | | // FentityModel.Add("FStockInOrgId", new JObject() { ["Fnumber"] = dr["FPrdOrgNumber"].ToString() }); |
| | | // FentityModel.Add("FBaseYieldQty", dr["FBaseYieldQty"].ToString()); |
| | | // FentityModel.Add("FReqType", dr["FReqType"].ToString()); |
| | | // FentityModel.Add("FInStockOwnerTypeId", dr["FInStockOwnerTypeId"].ToString()); |
| | | // FentityModel.Add("FBaseStockInLimitH", dr["FBaseStockInLimitH"].ToString()); |
| | | // FentityModel.Add("FInStockOwnerId", new JObject() { ["Fnumber"] = dr["FPrdOrgNumber"].ToString() }); |
| | | // FentityModel.Add("FCheckProduct", dr["FCheckProduct"].ToString()); |
| | | // FentityModel.Add("FBaseStockInLimitL", dr["FBaseStockInLimitL"].ToString()); |
| | | // FentityModel.Add("FBaseUnitQty", dr["FBaseUnitQty"].ToString()); |
| | | // FentityModel.Add("FRoutingId", new JObject() { ["Fnumber"] = dr["FRoutingNumber"].ToString() }); |
| | | // FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = dr["FUnitNumber"].ToString() }); |
| | | // FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = dr["FStockNumber"].ToString() }); |
| | | // FentityModel.Add("FStockInLimitH", dr["FStockInLimitH"].ToString()); |
| | | // FentityModel.Add("FStockInLimitL", dr["FStockInLimitL"].ToString()); |
| | | // FentityModel.Add("FCostRate", dr["FCostRate"].ToString()); |
| | | // FentityModel.Add("FCreateType", dr["FCreateType"].ToString()); |
| | | // FentityModel.Add("FYieldRate", dr["FYieldRate"].ToString()); |
| | | // FentityModel.Add("FGroup", dr["FGroup"].ToString()); |
| | | // FentityModel.Add("FNoStockInQty", dr["FNoStockInQty"].ToString()); |
| | | // FentityModel.Add("FBaseNoStockInQty", dr["FBaseNoStockInQty"].ToString()); |
| | | // FentityModel.Add("FRowId", dr["FRowId"].ToString()); |
| | | // FentityModel.Add("FPickMtrlStatus", dr["FPickMtrlStatus"].ToString()); |
| | | // FentityModel.Add("FMOChangeFlag", dr["FMOChangeFlag"].ToString()); |
| | | // FentityModel.Add("FDAYPLANBILLNO", dr["FDAYPLANBILLNO"].ToString()); |
| | | // FentityModel.Add("FDayPlanFseq", dr["FDayPlanFseq"].ToString()); |
| | | // FentityModel.Add("FDayPlanFentryId", dr["FDayPlanFentryId"].ToString()); |
| | | // FentityModel.Add("FDayPlanFid", dr["FDayPlanFid"].ToString()); |
| | | // FentityModel.Add("FDayPlanRemainQty", 0); |
| | | // FentityModel.Add("FDayPlanQty", dr["FQty"].ToString()); |
| | | // FentityModel.Add("F_TEZV_Base", new JObject() { ["Fnumber"] = dr["FPREBDONENUMBER"].ToString() });//包装标识 |
| | | // FentityModel.Add("F_bsv_Text1", dr["F_bsv_Text1"].ToString());//源单客户代码 |
| | | // FentityModel.Add("F_bsv_Date", dr["F_bsv_Date"].ToString());//要求交期 |
| | | // FentityModel.Add("F_bsv_KH", new JObject() { ["Fnumber"] = dr["FCUSTOMERNUMBER"].ToString() });//客户 |
| | | // //////////////生产订单源单信息//////////////////// |
| | | // //FSRCBILLTYPE,FSRCBILLID,FSRCBILLNO,FSRCBILLENTRYID,FSRCBILLENTRYSEQ,FSALEORDERID,FSALEORDERNO,FSALEORDERENTRYID,FSALEORDERENTRYSEQ |
| | | // FentityModel.Add("FSRCBILLTYPE", dr["FSRCBILLTYPE"].ToString()); |
| | | // FentityModel.Add("FSRCBILLID", dr["FSRCBILLID"].ToString()); |
| | | // FentityModel.Add("FSRCBILLNO", dr["FSRCBILLNO"].ToString()); |
| | | // FentityModel.Add("FSRCBILLENTRYID", dr["FSRCBILLENTRYID"].ToString()); |
| | | // FentityModel.Add("FSRCBILLENTRYSEQ", dr["FSRCBILLENTRYSEQ"].ToString()); |
| | | // FentityModel.Add("FSALEORDERID", dr["FSALEORDERID"].ToString()); |
| | | // FentityModel.Add("FSALEORDERNO", dr["FSALEORDERNO"].ToString()); |
| | | // FentityModel.Add("FSALEORDERENTRYID", dr["FSALEORDERENTRYID"].ToString()); |
| | | // FentityModel.Add("FSALEORDERENTRYSEQ", dr["FSALEORDERENTRYSEQ"].ToString()); |
| | | // FentityModel.Add("FReqSrc", dr["FReqSrc"].ToString());//需求来源 1销售订单 |
| | | // if (dr["FSRCBILLTYPE"].ToString() == "PLN_PLANORDER") |
| | | // { |
| | | // JArray _Fentity2 = new JArray(); |
| | | // JObject _FentityModel2 = new JObject(); |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FFlowId", "");//业务流程图:FTREEENTITY_Link_FFlowId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FFlowLineId", "0");//推进路线:FTREEENTITY_Link_FFlowLineId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FRuleId", "PlanOrder_MO");//转换规则:FTREEENTITY_Link_FRuleId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSTableId", "0");//源单表内码:FTREEENTITY_Link_FSTableId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSTableName", "T_PLN_PLANORDER");//源单表:FTREEENTITY_Link_FSTableName |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSBillId", dr["FSBILLID"].ToString());//源单内码:FTREEENTITY_Link_FSBillId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSId", dr["FSID"].ToString()); //源单分录内码:FTREEENTITY_Link_FSId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FBaseUnitQtyOld", dr["FQty"].ToString());//原始携带量:FTREEENTITY_Link_FBaseUnitQtyOld |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FBaseUnitQty", dr["FQty"].ToString());//修改携带量:FTREEENTITY_Link_FBaseUnitQty |
| | | // _Fentity2.Add(_FentityModel2); |
| | | // FentityModel.Add("FTREEENTITY_Link", _Fentity2); |
| | | // } |
| | | // ////////////////////////////////////////////////// |
| | | // Fentity.Add(FentityModel); |
| | | // model.Add("FTreeEntity", Fentity); |
| | | // JObject jsonRoot = new JObject() |
| | | // { |
| | | // ["Creator"] = "", |
| | | // ["NeedUpDateFields"] = new JArray(), |
| | | // ["NeedReturnFields"] = new JArray(), |
| | | // ["IsDeleteEntry"] = "false", |
| | | // ["SubSystemId"] = "", |
| | | // ["IsVerifyBaseDataField"] = "false", |
| | | // ["Model"] = model |
| | | // }; |
| | | // var _result = InvokeHelper.Save("PRD_MO", jsonRoot.ToString()); |
| | | // var _saveObj = JObject.Parse(_result); |
| | | // var saveIsSuc = _saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | // if (saveIsSuc != "TRUE") |
| | | // { |
| | | // e.CancelOperation = true; |
| | | // dictionary.Add(dr["FDAYPLANBILLNO"].ToString(), "生产订单生成失败," + _saveObj["Result"]["ResponseStatus"]["Errors"][0]["Message"].ToString()); |
| | | // LogService.Write("生产订单生成失败json" + jsonRoot.ToString()); |
| | | // //this.View.ShowErrMessage("生产订单生成失败," + _saveObj["Result"]["ResponseStatus"]["Errors"][0]["Message"].ToString()); |
| | | // continue; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessMaterial {billObj["Id"]} "; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("物料同步异常:" + sql); |
| | | continue; |
| | | } |
| | | DataRow dr = dt.Rows[0]; |
| | | JObject model = new JObject(); |
| | | foreach (DataColumn column in dt.Columns) |
| | | { |
| | | model.Add(column.ColumnName, dr[column.ColumnName].ToString()); |
| | | } |
| | | //model.Add("HItemID", dr["HItemID"].ToString()); |
| | | //model.Add("HERPItemID", dr["HERPItemID"].ToString()); |
| | | //model.Add("HCREATEORGID", dr["HCREATEORGID"].ToString()); |
| | | //model.Add("HUSEORGID", dr["HUSEORGID"].ToString()); |
| | | //model.Add("HNumber", dr["HNumber"].ToString()); |
| | | //model.Add("HName", dr["HName"].ToString()); |
| | | //model.Add("HModel", dr["HModel"].ToString()); |
| | | //model.Add("HUnitID", dr["HUnitID"].ToString()); |
| | | //model.Add("HUnitGroupID", dr["HUnitGroupID"].ToString()); |
| | | //model.Add("HMaterClsID", dr["HMaterClsID"].ToString()); |
| | | //model.Add("HMaterTypeID", dr["HMaterTypeID"].ToString()); |
| | | //model.Add("HWhID", dr["HWhID"].ToString()); |
| | | //model.Add("HSPID", dr["HSPID"].ToString()); |
| | | //model.Add("HMinPickQty", dr["HMinPickQty"].ToString()); |
| | | string _model = JsonConvert.SerializeObject(model); |
| | | JObject jsonRoot = new JObject() |
| | | { |
| | | ["model"] = model + ";Admin;100038" |
| | | }; |
| | | JObject _jsonRoot = new JObject() |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | |
| | | //string jsonRoot = JsonConvert.SerializeObject(jsonRoot); |
| | | //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 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | //删除 |
| | | //var requestGet = new RestRequest("Gy_Material/Delete", Method.GET); |
| | | //requestGet.AddParameter("HItemID", dr["HERPItemID"].ToString()); |
| | | //requestGet.AddParameter("user", "10000"); |
| | | //IRestResponse response = client.Execute(requestGet); |
| | | //var contentGet = response.Content; |
| | | //Console.WriteLine("GET方式获取结果:" + contentGet); |
| | | //新增 |
| | | //LogService.Write("物料同步示例:"+ JsonConvert.SerializeObject(_jsonRoot)); |
| | | var requestPost = new RestRequest("Gy_Material/SaveGy_MaterialListApi", Method.POST); |
| | | //var json = newjson.ToString() + ";Admin;100038"; |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) { |
| | | LogService.Write("物料同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("物料同步异常,POST," + clientUrl + "Gy_Material/SaveGy_MaterialListApi"); |
| | | LogService.Write("物料同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | //Console.WriteLine("POST方式获取结果:" + contentPost); |
| | | //Console.Read(); |
| | | }; |
| | | |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[生产订单-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessPrdMo : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | //public override void BeginOperationTransaction(BeginOperationTransactionArgs e) |
| | | //{ |
| | | // base.BeginOperationTransaction(e); |
| | | // //foreach (var item in e.DataEntitys) |
| | | // //{ |
| | | // // DynamicObjectCollection entryRows = item["FEntity"] as DynamicObjectCollection; |
| | | // //} |
| | | // Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | // foreach (var billObj in e.DataEntitys) |
| | | // { |
| | | // //DynamicObjectCollection entryRows = entity.DynamicProperty.GetValue(billObj.DataEntity) |
| | | // // as DynamicObjectCollection; |
| | | // DynamicObjectCollection entryRows = billObj["FEntity"] as DynamicObjectCollection; |
| | | // foreach (var entryRow in entryRows) |
| | | // { |
| | | // var fentryId = entryRow["Id"].ToString(); |
| | | // //生成生产订单 |
| | | // string sql = $"/*dialect*/ exec proc_jit_DayPlanAduitAddNemMoOrder {fentryId}"; |
| | | // DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | // if (dt.Rows[0][0].ToString().Contains("成功")) |
| | | // continue; |
| | | // foreach (DataRow dr in dt.Rows) |
| | | // { |
| | | // JObject model = new JObject(); |
| | | // model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = dr["FBillTypeNumber"].ToString() }); //单据类型 |
| | | // model.Add("FCreatorId", new JObject() { ["FUserID"] = Context.UserId }); //创建人 |
| | | // model.Add("FModifierId", new JObject() { ["FUserID"] = Context.UserId }); //修改人 |
| | | // model.Add("FDate", dr["FDate"].ToString()); |
| | | // model.Add("FBILLNO", dr["FSpreadBillNo"].ToString()); |
| | | // model.Add("FPrdOrgId", new JObject() { ["Fnumber"] = dr["FPrdOrgNumber"].ToString() }); |
| | | // model.Add("FWorkShopID0", new JObject() { ["Fnumber"] = dr["FWorkShopNumber"].ToString() }); |
| | | // model.Add("FOwnerTypeId", dr["FOwnerTypeId"].ToString()); |
| | | // model.Add("FIsRework", dr["FIsRework"].ToString()); |
| | | // model.Add("FBusinessType", dr["FBusinessType"].ToString()); |
| | | // model.Add("FTrustteed", dr["FTrustteed"].ToString()); |
| | | // model.Add("FIsEntrust", dr["FIsEntrust"].ToString()); |
| | | // model.Add("FPPBOMType", dr["FPPBOMType"].ToString()); |
| | | // model.Add("FIssueMtrl", dr["FIssueMtrl"].ToString()); |
| | | // JArray Fentity = new JArray(); |
| | | // JObject FentityModel = new JObject(); |
| | | // FentityModel.Add("FProductType", dr["FProductType"].ToString()); |
| | | // FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = dr["FMATERIALNUMBER"].ToString() }); |
| | | // FentityModel.Add("FWorkShopID", new JObject() { ["Fnumber"] = dr["FWorkShopNumber"].ToString() }); |
| | | // FentityModel.Add("FUnitId", new JObject() { ["Fnumber"] = dr["FUnitNumber"].ToString() }); |
| | | // FentityModel.Add("FQty", dr["FQty"].ToString()); |
| | | // FentityModel.Add("FYieldQty", dr["FYieldQty"].ToString()); |
| | | // FentityModel.Add("FPlanStartDate", dr["FPlanStartDate"].ToString()); |
| | | // FentityModel.Add("FPlanFinishDate", dr["FPlanFinishDate"].ToString()); |
| | | // FentityModel.Add("FRequestOrgId", new JObject() { ["Fnumber"] = dr["FRequestOrgNumber"].ToString() }); |
| | | // FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr["FBomNumber"].ToString() }); |
| | | // FentityModel.Add("FISBACKFLUSH", dr["FISBACKFLUSH"].ToString()); |
| | | // FentityModel.Add("FStockInOrgId", new JObject() { ["Fnumber"] = dr["FPrdOrgNumber"].ToString() }); |
| | | // FentityModel.Add("FBaseYieldQty", dr["FBaseYieldQty"].ToString()); |
| | | // FentityModel.Add("FReqType", dr["FReqType"].ToString()); |
| | | // FentityModel.Add("FInStockOwnerTypeId", dr["FInStockOwnerTypeId"].ToString()); |
| | | // FentityModel.Add("FBaseStockInLimitH", dr["FBaseStockInLimitH"].ToString()); |
| | | // FentityModel.Add("FInStockOwnerId", new JObject() { ["Fnumber"] = dr["FPrdOrgNumber"].ToString() }); |
| | | // FentityModel.Add("FCheckProduct", dr["FCheckProduct"].ToString()); |
| | | // FentityModel.Add("FBaseStockInLimitL", dr["FBaseStockInLimitL"].ToString()); |
| | | // FentityModel.Add("FBaseUnitQty", dr["FBaseUnitQty"].ToString()); |
| | | // FentityModel.Add("FRoutingId", new JObject() { ["Fnumber"] = dr["FRoutingNumber"].ToString() }); |
| | | // FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = dr["FUnitNumber"].ToString() }); |
| | | // FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = dr["FStockNumber"].ToString() }); |
| | | // FentityModel.Add("FStockInLimitH", dr["FStockInLimitH"].ToString()); |
| | | // FentityModel.Add("FStockInLimitL", dr["FStockInLimitL"].ToString()); |
| | | // FentityModel.Add("FCostRate", dr["FCostRate"].ToString()); |
| | | // FentityModel.Add("FCreateType", dr["FCreateType"].ToString()); |
| | | // FentityModel.Add("FYieldRate", dr["FYieldRate"].ToString()); |
| | | // FentityModel.Add("FGroup", dr["FGroup"].ToString()); |
| | | // FentityModel.Add("FNoStockInQty", dr["FNoStockInQty"].ToString()); |
| | | // FentityModel.Add("FBaseNoStockInQty", dr["FBaseNoStockInQty"].ToString()); |
| | | // FentityModel.Add("FRowId", dr["FRowId"].ToString()); |
| | | // FentityModel.Add("FPickMtrlStatus", dr["FPickMtrlStatus"].ToString()); |
| | | // FentityModel.Add("FMOChangeFlag", dr["FMOChangeFlag"].ToString()); |
| | | // FentityModel.Add("FDAYPLANBILLNO", dr["FDAYPLANBILLNO"].ToString()); |
| | | // FentityModel.Add("FDayPlanFseq", dr["FDayPlanFseq"].ToString()); |
| | | // FentityModel.Add("FDayPlanFentryId", dr["FDayPlanFentryId"].ToString()); |
| | | // FentityModel.Add("FDayPlanFid", dr["FDayPlanFid"].ToString()); |
| | | // FentityModel.Add("FDayPlanRemainQty", 0); |
| | | // FentityModel.Add("FDayPlanQty", dr["FQty"].ToString()); |
| | | // FentityModel.Add("F_TEZV_Base", new JObject() { ["Fnumber"] = dr["FPREBDONENUMBER"].ToString() });//包装标识 |
| | | // FentityModel.Add("F_bsv_Text1", dr["F_bsv_Text1"].ToString());//源单客户代码 |
| | | // FentityModel.Add("F_bsv_Date", dr["F_bsv_Date"].ToString());//要求交期 |
| | | // FentityModel.Add("F_bsv_KH", new JObject() { ["Fnumber"] = dr["FCUSTOMERNUMBER"].ToString() });//客户 |
| | | // //////////////生产订单源单信息//////////////////// |
| | | // //FSRCBILLTYPE,FSRCBILLID,FSRCBILLNO,FSRCBILLENTRYID,FSRCBILLENTRYSEQ,FSALEORDERID,FSALEORDERNO,FSALEORDERENTRYID,FSALEORDERENTRYSEQ |
| | | // FentityModel.Add("FSRCBILLTYPE", dr["FSRCBILLTYPE"].ToString()); |
| | | // FentityModel.Add("FSRCBILLID", dr["FSRCBILLID"].ToString()); |
| | | // FentityModel.Add("FSRCBILLNO", dr["FSRCBILLNO"].ToString()); |
| | | // FentityModel.Add("FSRCBILLENTRYID", dr["FSRCBILLENTRYID"].ToString()); |
| | | // FentityModel.Add("FSRCBILLENTRYSEQ", dr["FSRCBILLENTRYSEQ"].ToString()); |
| | | // FentityModel.Add("FSALEORDERID", dr["FSALEORDERID"].ToString()); |
| | | // FentityModel.Add("FSALEORDERNO", dr["FSALEORDERNO"].ToString()); |
| | | // FentityModel.Add("FSALEORDERENTRYID", dr["FSALEORDERENTRYID"].ToString()); |
| | | // FentityModel.Add("FSALEORDERENTRYSEQ", dr["FSALEORDERENTRYSEQ"].ToString()); |
| | | // FentityModel.Add("FReqSrc", dr["FReqSrc"].ToString());//需求来源 1销售订单 |
| | | // if (dr["FSRCBILLTYPE"].ToString() == "PLN_PLANORDER") |
| | | // { |
| | | // JArray _Fentity2 = new JArray(); |
| | | // JObject _FentityModel2 = new JObject(); |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FFlowId", "");//业务流程图:FTREEENTITY_Link_FFlowId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FFlowLineId", "0");//推进路线:FTREEENTITY_Link_FFlowLineId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FRuleId", "PlanOrder_MO");//转换规则:FTREEENTITY_Link_FRuleId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSTableId", "0");//源单表内码:FTREEENTITY_Link_FSTableId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSTableName", "T_PLN_PLANORDER");//源单表:FTREEENTITY_Link_FSTableName |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSBillId", dr["FSBILLID"].ToString());//源单内码:FTREEENTITY_Link_FSBillId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FSId", dr["FSID"].ToString()); //源单分录内码:FTREEENTITY_Link_FSId |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FBaseUnitQtyOld", dr["FQty"].ToString());//原始携带量:FTREEENTITY_Link_FBaseUnitQtyOld |
| | | // _FentityModel2.Add("FTREEENTITY_Link_FBaseUnitQty", dr["FQty"].ToString());//修改携带量:FTREEENTITY_Link_FBaseUnitQty |
| | | // _Fentity2.Add(_FentityModel2); |
| | | // FentityModel.Add("FTREEENTITY_Link", _Fentity2); |
| | | // } |
| | | // ////////////////////////////////////////////////// |
| | | // Fentity.Add(FentityModel); |
| | | // model.Add("FTreeEntity", Fentity); |
| | | // JObject jsonRoot = new JObject() |
| | | // { |
| | | // ["Creator"] = "", |
| | | // ["NeedUpDateFields"] = new JArray(), |
| | | // ["NeedReturnFields"] = new JArray(), |
| | | // ["IsDeleteEntry"] = "false", |
| | | // ["SubSystemId"] = "", |
| | | // ["IsVerifyBaseDataField"] = "false", |
| | | // ["Model"] = model |
| | | // }; |
| | | // var _result = InvokeHelper.Save("PRD_MO", jsonRoot.ToString()); |
| | | // var _saveObj = JObject.Parse(_result); |
| | | // var saveIsSuc = _saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | // if (saveIsSuc != "TRUE") |
| | | // { |
| | | // e.CancelOperation = true; |
| | | // dictionary.Add(dr["FDAYPLANBILLNO"].ToString(), "生产订单生成失败," + _saveObj["Result"]["ResponseStatus"]["Errors"][0]["Message"].ToString()); |
| | | // LogService.Write("生产订单生成失败json" + jsonRoot.ToString()); |
| | | // //this.View.ShowErrMessage("生产订单生成失败," + _saveObj["Result"]["ResponseStatus"]["Errors"][0]["Message"].ToString()); |
| | | // continue; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessPRDMO {billObj["Id"]} "; |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(Context, sql); |
| | | DataTable maindt = ds.Tables[1]; |
| | | DataTable subdt = ds.Tables[0]; |
| | | if (maindt.Rows.Count == 0 || subdt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("生产订单同步异常:" + sql); |
| | | continue; |
| | | } |
| | | JArray array = new JArray();//明细表 |
| | | foreach (DataRow dr in subdt.Rows) |
| | | { |
| | | JObject fentrymodel = new JObject(); |
| | | foreach (DataColumn column in subdt.Columns) |
| | | { |
| | | fentrymodel.Add(column.ColumnName, dr[column.ColumnName].ToString()); |
| | | } |
| | | array.Add(fentrymodel); |
| | | } |
| | | JObject model = new JObject();//主表 |
| | | DataRow maindr = maindt.Rows[0]; |
| | | foreach (DataColumn column in maindt.Columns) |
| | | { |
| | | model.Add(column.ColumnName, maindr[column.ColumnName].ToString()); |
| | | } |
| | | model.Add("HENTRY", array); |
| | | JObject jsonRoot = new JObject() |
| | | { |
| | | ["model"] = model |
| | | }; |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | //新增 |
| | | var requestPost = new RestRequest("Sc_ICMOBill/ICMOBillSaveApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("生产订单同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("生产订单同步异常,POST," + clientUrl + "Sc_ICMOBill/ICMOBillSaveApi"); |
| | | LogService.Write("生产订单同步异常,JsonConvert.SerializeObject(jsonRoot)," + JsonConvert.SerializeObject(jsonRoot)); |
| | | } |
| | | }; |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[仓库-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessStock : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessStock {billObj["Id"]} "; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("仓库同步异常:" + sql); |
| | | continue; |
| | | } |
| | | DataRow dr = dt.Rows[0]; |
| | | JObject model = new JObject(); |
| | | 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)); |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | var requestPost = new RestRequest("Gy_Warehouse/SaveGy_WarehouseListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("仓库同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("仓库同步异常,POST," + clientUrl + "Gy_Warehouse/SaveGy_WarehouseListApi"); |
| | | LogService.Write("仓库同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | }; |
| | | |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[供应商-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessSupplier : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessSupplier {billObj["Id"]} "; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("供应商同步异常:" + sql); |
| | | continue; |
| | | } |
| | | DataRow dr = dt.Rows[0]; |
| | | JObject model = new JObject(); |
| | | 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)); |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | var requestPost = new RestRequest("Gy_Supplier/SaveGy_SupplierListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("供应商同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("供应商步异常,POST," + clientUrl + "Gy_Supplier/SaveGy_SupplierListApi"); |
| | | LogService.Write("供应商同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | }; |
| | | |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Kingdee.BOS.Util; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | using Newtonsoft.Json; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using System.Linq; |
| | | using RestSharp; |
| | | using zymes_Project.Utility; |
| | | |
| | | namespace zymes_Project.OperationService |
| | | { |
| | | [Description("[单位-审核]服务插件]")] |
| | | [HotUpdate] |
| | | public class zymes_RealessUnit : AbstractOperationServicePlugIn |
| | | { |
| | | Dictionary<string, string> dictionary = new Dictionary<string, string>(); |
| | | public override void OnPrepareOperationServiceOption(OnPrepareOperationServiceEventArgs e) |
| | | { |
| | | base.OnPrepareOperationServiceOption(e); |
| | | |
| | | //为了在BeginOperationTransaction里检查数据抛出异常时 |
| | | //只回滚当前单据的事务,这里设置为不支持批量事务,这样BOS会 |
| | | //循环为每一张单据创建事务调用操作 |
| | | e.SupportTransaction = true; |
| | | e.SurportBatchTransaction = false; |
| | | } |
| | | public override void OnPreparePropertys(PreparePropertysEventArgs e) |
| | | { |
| | | base.OnPreparePropertys(e); |
| | | e.FieldKeys.Add("FEntity"); |
| | | e.FieldKeys.Add("FEntity_FEntryID"); |
| | | } |
| | | public override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e) |
| | | { |
| | | base.AfterExecuteOperationTransaction(e); |
| | | Entity entity = this.BusinessInfo.GetEntity("FEntity");//获取明细信息 |
| | | foreach (var billObj in e.DataEntitys) |
| | | { |
| | | var sql = $"exec zymes_RealessUnit {billObj["Id"]} "; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | | LogService.Write("单位同步异常:" + sql); |
| | | continue; |
| | | } |
| | | DataRow dr = dt.Rows[0]; |
| | | JObject model = new JObject(); |
| | | 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)); |
| | | string clientUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "ClientUrl");//K/3 Cloud 业务站点地址 |
| | | var client = new RestSharp.RestClient(clientUrl); |
| | | var requestPost = new RestRequest("Gy_Unit/SaveGy_UnitListApi", Method.POST); |
| | | requestPost.AddParameter("application/json", JsonConvert.SerializeObject(_jsonRoot), ParameterType.RequestBody); |
| | | IRestResponse responsePost = client.Execute(requestPost); |
| | | var contentPost = responsePost.Content; |
| | | if (!contentPost.Contains("成功")) |
| | | { |
| | | LogService.Write("单位同步异常,POST方式获取结果," + billObj["Id"] + "," + contentPost); |
| | | LogService.Write("单位同步异常,POST," + clientUrl + "Gy_Unit/SaveGy_UnitListApi"); |
| | | LogService.Write("单位同步异常,JsonConvert.SerializeObject(_jsonRoot)," + JsonConvert.SerializeObject(_jsonRoot)); |
| | | } |
| | | }; |
| | | |
| | | foreach (var item in dictionary) |
| | | { |
| | | ResultMessage.dataError(this.OperationResult.OperateResult, item.Key, item.Value); |
| | | } |
| | | } |
| | | public static class ResultMessage |
| | | {/// <summary> |
| | | /// 修改提示信息 |
| | | /// </summary> |
| | | /// <param name="operateResult"></param> |
| | | /// <param name="billno"></param> |
| | | public static void dataError(OperateResultCollection operateResult, string billno, string message) |
| | | { |
| | | OperateResult operate = operateResult.Where(n => n.Number == billno).First(); |
| | | operate.Message = message; |
| | | operate.SuccessStatus = false; |
| | | operate.MessageType = MessageType.FatalError; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // 有关程序集的一般信息由以下 |
| | | // 控制。更改这些特性值可修改 |
| | | // 与程序集关联的信息。 |
| | | [assembly: AssemblyTitle("zymes_Project")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("zymes_Project")] |
| | | [assembly: AssemblyCopyright("Copyright © 2021")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // 将 ComVisible 设置为 false 会使此程序集中的类型 |
| | | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 |
| | | //请将此类型的 ComVisible 特性设置为 true。 |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID |
| | | [assembly: Guid("08f1d118-335a-4c90-a223-61bea98bba65")] |
| | | |
| | | // 程序集的版本信息由下列四个值组成: |
| | | // |
| | | // 主版本 |
| | | // 次版本 |
| | | // 生成号 |
| | | // 修订号 |
| | | // |
| | | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 |
| | | //通过使用 "*",如下所示: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <auto-generated> |
| | | // 此代码由工具生成。 |
| | | // 运行时版本:4.0.30319.42000 |
| | | // |
| | | // 对此文件的更改可能会导致不正确的行为,并且如果 |
| | | // 重新生成代码,这些更改将会丢失。 |
| | | // </auto-generated> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace zymes_Project.Properties { |
| | | |
| | | |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] |
| | | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
| | | |
| | | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
| | | |
| | | public static Settings Default { |
| | | get { |
| | | return defaultInstance; |
| | | } |
| | | } |
| | | |
| | | [global::System.Configuration.ApplicationScopedSettingAttribute()] |
| | | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| | | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] |
| | | [global::System.Configuration.DefaultSettingValueAttribute("http://122.227.199.62:58588/services/WorkflowService")] |
| | | public string zymes_Project_WorkflowService_WorkflowService { |
| | | get { |
| | | return ((string)(this["zymes_Project_WorkflowService_WorkflowService"])); |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version='1.0' encoding='utf-8'?> |
| | | <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="zymes_Project.Properties" GeneratedClassName="Settings"> |
| | | <Profiles /> |
| | | <Settings> |
| | | <Setting Name="zymes_Project_WorkflowService_WorkflowService" Type="(Web Service URL)" Scope="Application"> |
| | | <Value Profile="(Default)">http://122.227.199.62:58588/services/WorkflowService</Value> |
| | | </Setting> |
| | | </Settings> |
| | | </SettingsFile> |
| New file |
| | |
| | | using Kingdee.BOS; |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Contracts; |
| | | using Kingdee.BOS.Contracts.Report; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.List; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using Kingdee.BOS.Util; |
| | | using ZD.Cloud.Logger; |
| | | using Newtonsoft.Json; |
| | | |
| | | namespace zymes_Project.Report |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划明细列表 |
| | | /// </summary> |
| | | [Description("供应商送料计划明细列表")] |
| | | [HotUpdate] |
| | | public class FeedPlanDetailReport : SysReportBaseService |
| | | { |
| | | |
| | | |
| | | public override void Initialize() |
| | | { |
| | | base.Initialize(); |
| | | // 简单账表类型:普通、树形、分页 |
| | | this.ReportProperty.ReportType = ReportType.REPORTTYPE_NORMAL; |
| | | this.IsCreateTempTableByPlugin = true; |
| | | //取代码中配置的列 |
| | | this.ReportProperty.IsUIDesignerColumns = false; |
| | | //是否分组汇总 |
| | | this.ReportProperty.IsGroupSummary = true; |
| | | |
| | | } |
| | | |
| | | public override ReportHeader GetReportHeaders(IRptParams filter) |
| | | { |
| | | ReportHeader header = new ReportHeader(); |
| | | |
| | | header.AddChild("FIDENTITYID", new LocaleValue("序号")); |
| | | header.AddChild("Fcolumn2", new LocaleValue("日期")); |
| | | header.AddChild("Fcolumn3", new LocaleValue("模块")); |
| | | header.AddChild("Fcolumn4", new LocaleValue("部门 / 供应商 / 仓库")); |
| | | header.AddChild("Fcolumn5", new LocaleValue("旧物料代码")); |
| | | header.AddChild("Fcolumn6", new LocaleValue("物料代码")); |
| | | header.AddChild("Fcolumn7", new LocaleValue("物料名称")); |
| | | header.AddChild("Fcolumn8", new LocaleValue("规格型号")); |
| | | header.AddChild("Fcolumn9", new LocaleValue("数量")); |
| | | header.AddChild("Fcolumn10", new LocaleValue("厂区")); |
| | | header.AddChild("Fcolumn11", new LocaleValue("单据号")); |
| | | header.AddChild("Fcolumn12", new LocaleValue("销售订单号")); |
| | | return header; |
| | | } |
| | | |
| | | public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName) |
| | | { |
| | | base.BuilderReportSqlAndTempTable(filter, tableName); |
| | | |
| | | DynamicObject customFil = filter.FilterParameter.CustomFilter; |
| | | LogHelper.Info($"json:{JsonConvert.SerializeObject(customFil)}"); |
| | | string FMateriel = ""; //物料 |
| | | string FMaterielName = "";//物料名称 |
| | | string FModel = "";//规格型号 |
| | | string FSupplier = "0";//供应商 默认值为0 |
| | | string FOrgId = "100092"; //组织(默认取值当前组织) |
| | | string FFactoryArea = ""; //厂区 |
| | | string FBuyer = ""; //采购员 |
| | | string FWarehouse = "";//仓库 |
| | | bool FIsMainMaterial = false;//是否主料 |
| | | |
| | | //5fe5d920a3f2bf |
| | | //5fe5d926a3f2c1 |
| | | //5fe5d92ca3f2c3 |
| | | |
| | | |
| | | |
| | | if (((DynamicObject)customFil["FMateriel"]) != null) |
| | | { |
| | | FMateriel = ((DynamicObject)customFil["FMateriel"])["Number"].ToString(); |
| | | FMaterielName = ((DynamicObject)customFil["FMateriel"])["Name"].ToString(); |
| | | FModel = ((DynamicObject)customFil["FMateriel"])["Specification"].ToString(); |
| | | |
| | | } |
| | | if (((DynamicObject)customFil["FSupplier"]) != null) |
| | | { |
| | | FSupplier = ((DynamicObject)customFil["FSupplier"])["Number"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FFactoryArea"]) != null) |
| | | { |
| | | FFactoryArea = ((DynamicObject)customFil["FFactoryArea"])["Id"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FOrgId"]) != null) |
| | | { |
| | | FOrgId = ((DynamicObject)customFil["FOrgId"])["Id"].ToString(); |
| | | } |
| | | //跳转框赋值 (物料编码 + 仓库FentryID) |
| | | if (((DynamicObject)customFil["FMateriel"]) == null) |
| | | { |
| | | LogHelper.Info("测试111:" + FMateriel); |
| | | } |
| | | if (FMateriel == "") |
| | | LogHelper.Info("物料:" + FMateriel); |
| | | if (FFactoryArea == "") |
| | | LogHelper.Info("厂区:" + FFactoryArea); |
| | | //LogHelper.Info("Fmaterial:" + customFil["Fmaterial"].ToString()); |
| | | //LogHelper.Info("Fstockid:" + customFil["Fstockid"].ToString()); |
| | | if ((customFil["Fmaterial"]) != null && FMateriel == "") |
| | | { |
| | | FMateriel = customFil["Fmaterial"].ToString(); |
| | | LogHelper.Info("FMateriel:" + FMateriel); |
| | | } |
| | | if ((customFil["Fstockid"]) != null && FFactoryArea == "") |
| | | { |
| | | FFactoryArea = customFil["Fstockid"].ToString(); |
| | | LogHelper.Info("FFactoryArea:" + FFactoryArea); |
| | | |
| | | } |
| | | string sql = string.Format(@"/*dialect*/ |
| | | exec [h_p_Cg_SupSendGoodsPlanZSFMX] '{0}','{1}','{2}','{3}','{4}','{5}','{6}' |
| | | ", FSupplier, FOrgId, FFactoryArea, FMateriel, FMaterielName, FModel, tableName); |
| | | LogHelper.Info(sql); |
| | | DBUtils.Execute(this.Context, sql); |
| | | //EXEC h_p_Cg_SupSendGoodsPlanZSFMX 0,100092,'5fe5d926a3f2c1','1.00.000.0115','','' |
| | | } |
| | | public override void CloseReport() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using Kingdee.BOS; |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Contracts; |
| | | using Kingdee.BOS.Contracts.Report; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.List; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using Kingdee.BOS.Util; |
| | | using ZD.Cloud.Logger; |
| | | |
| | | namespace zymes_Project.Report |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划订单明细列表 |
| | | /// </summary> |
| | | [Description("供应商送料计划订单明细列表")] |
| | | [HotUpdate] |
| | | public class FeedPlanOrderDetailReport : SysReportBaseService |
| | | { |
| | | |
| | | public override void Initialize() |
| | | { |
| | | base.Initialize(); |
| | | // 简单账表类型:普通、树形、分页 |
| | | this.ReportProperty.ReportType = ReportType.REPORTTYPE_NORMAL; |
| | | this.IsCreateTempTableByPlugin = true; |
| | | //取代码中配置的列 |
| | | this.ReportProperty.IsUIDesignerColumns = false; |
| | | //是否分组汇总 |
| | | this.ReportProperty.IsGroupSummary = true; |
| | | } |
| | | |
| | | public override ReportHeader GetReportHeaders(IRptParams filter) |
| | | { |
| | | ReportHeader header = new ReportHeader(); |
| | | header.AddChild("FIDENTITYID", new LocaleValue("序号")); |
| | | header.AddChild("Fcolumn2", new LocaleValue("日期")); |
| | | header.AddChild("Fcolumn3", new LocaleValue("模块")); |
| | | header.AddChild("Fcolumn4", new LocaleValue("部门 / 供应商 / 仓库")); |
| | | header.AddChild("Fcolumn5", new LocaleValue("旧物料代码")); |
| | | header.AddChild("Fcolumn6", new LocaleValue("物料代码")); |
| | | header.AddChild("Fcolumn7", new LocaleValue("物料名称")); |
| | | header.AddChild("Fcolumn8", new LocaleValue("规格型号")); |
| | | header.AddChild("Fcolumn9", new LocaleValue("数量")); |
| | | header.AddChild("Fcolumn10", new LocaleValue("厂区")); |
| | | // header.AddChild("Fcolumn11", new LocaleValue("单据号")); |
| | | // header.AddChild("Fcolumn12", new LocaleValue("销售订单号")); |
| | | return header; |
| | | } |
| | | |
| | | public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName) |
| | | { |
| | | base.BuilderReportSqlAndTempTable(filter, tableName); |
| | | |
| | | DynamicObject customFil = filter.FilterParameter.CustomFilter; |
| | | string FMateriel = ""; //物料 |
| | | string FMaterielName = "";//物料名称 |
| | | string FModel = "";//规格型号 |
| | | string FSupplier = "0";//供应商 默认值为0 |
| | | string FOrgId = "100092"; //组织(默认取值当前组织) |
| | | string FFactoryArea = ""; //厂区 |
| | | string FBuyer = ""; //采购员 |
| | | string FWarehouse = "";//仓库 |
| | | bool FIsMainMaterial = false;//是否主料 |
| | | string saleOrderNo = "";//采购订单号 |
| | | //5fe5d920a3f2bf |
| | | //5fe5d926a3f2c1 |
| | | //5fe5d92ca3f2c3 |
| | | |
| | | |
| | | |
| | | if (((DynamicObject)customFil["FMateriel"]) != null) |
| | | { |
| | | FMateriel = ((DynamicObject)customFil["FMateriel"])["Number"].ToString(); |
| | | FMaterielName = ((DynamicObject)customFil["FMateriel"])["Name"].ToString(); |
| | | FModel = ((DynamicObject)customFil["FMateriel"])["Specification"].ToString(); |
| | | |
| | | } |
| | | if (((DynamicObject)customFil["FSupplier"]) != null) |
| | | { |
| | | FSupplier = ((DynamicObject)customFil["FSupplier"])["Number"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FFactoryArea"]) != null) |
| | | { |
| | | FFactoryArea = ((DynamicObject)customFil["FFactoryArea"])["Id"].ToString(); |
| | | } |
| | | if ((customFil["FSaleOrderNo"]) != null) |
| | | { |
| | | saleOrderNo = customFil["FSaleOrderNo"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FOrgId"]) != null) |
| | | { |
| | | FOrgId = ((DynamicObject)customFil["FOrgId"])["Id"].ToString(); |
| | | } |
| | | //跳转框赋值 (物料编码 + 仓库FentryID) |
| | | LogHelper.Info("物料:"+ FMateriel); |
| | | LogHelper.Info("厂区:"+FFactoryArea); |
| | | |
| | | if ((customFil["Fmaterial"]) != null && FMateriel == "") |
| | | { |
| | | FMateriel = customFil["Fmaterial"].ToString(); |
| | | LogHelper.Info("FMateriel:" + FMateriel); |
| | | |
| | | } |
| | | if ((customFil["Fstockid"]) != null && FFactoryArea == "") |
| | | { |
| | | FFactoryArea = customFil["Fstockid"].ToString(); |
| | | LogHelper.Info("FFactoryArea:" + FFactoryArea); |
| | | |
| | | } |
| | | string sql = string.Format(@"/*dialect*/ |
| | | exec [h_p_Cg_SupSendGoodsPlanZSFMXDD] '{0}','{1}','{2}','{3}','{4}','{5}','{6}' ,'{7}' |
| | | ", FSupplier, FOrgId, FFactoryArea, FMateriel, FMaterielName, FModel, saleOrderNo, tableName); |
| | | LogHelper.Info(sql); |
| | | DBUtils.Execute(this.Context, sql); |
| | | //EXEC h_p_Cg_SupSendGoodsPlanZSFMXDD 0,100092,'5fe5d926a3f2c1','1.00.002.1647','','','W595801' |
| | | } |
| | | public override void CloseReport() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using Kingdee.BOS; |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Contracts; |
| | | using Kingdee.BOS.Contracts.Report; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.List; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using Kingdee.BOS.Util; |
| | | using ZD.Cloud.Logger; |
| | | using Newtonsoft.Json; |
| | | |
| | | namespace zymes_Project.Report |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划列表订单 |
| | | /// </summary> |
| | | [Description("供应商送料计划列表订单")] |
| | | [HotUpdate] |
| | | public class FeedPlanOrderReport : SysReportBaseService |
| | | { |
| | | |
| | | public override void Initialize() |
| | | { |
| | | //base.Initialize(); |
| | | //this.ReportProperty.ReportType = ReportType.REPORTTYPE_NORMAL; |
| | | //this.ReportProperty.ReportName = new LocaleValue("供应商送料计划列表订单", base.Context.UserLocale.LCID); |
| | | //this.ReportProperty.IsUIDesignerColumns = true; |
| | | //this.ReportProperty.IsGroupSummary = true; |
| | | //this.ReportProperty.SimpleAllCols = false; |
| | | |
| | | base.Initialize(); |
| | | // 简单账表类型:普通、树形、分页 |
| | | this.ReportProperty.ReportType = ReportType.REPORTTYPE_NORMAL; |
| | | this.IsCreateTempTableByPlugin = true; |
| | | //取代码中配置的列 |
| | | this.ReportProperty.IsUIDesignerColumns = false; |
| | | //是否分组汇总 |
| | | this.ReportProperty.IsGroupSummary = true; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public override ReportHeader GetReportHeaders(IRptParams filter) |
| | | { |
| | | ReportHeader header = new ReportHeader(); |
| | | |
| | | header.AddChild("FIDENTITYID", new LocaleValue("序号"), SqlStorageType.Sqlvarchar).ColIndex = 0; |
| | | header.AddChild("Fcolumn32", new LocaleValue("订单号"), SqlStorageType.Sqlvarchar).ColIndex = 1; |
| | | header.AddChild("Fcolumn2", new LocaleValue("旧物料代码"), SqlStorageType.Sqlvarchar).ColIndex = 2; |
| | | header.AddChild("Fcolumn3", new LocaleValue("物料代码"), SqlStorageType.Sqlvarchar).ColIndex = 3; |
| | | header.AddChild("Fcolumn4", new LocaleValue("物料名称"), SqlStorageType.Sqlvarchar).ColIndex = 4; |
| | | header.AddChild("Fcolumn5", new LocaleValue("规格型号"), SqlStorageType.Sqlvarchar).ColIndex = 5; |
| | | header.AddChild("Fcolumn6", new LocaleValue("采购计量单位"), SqlStorageType.Sqlvarchar).ColIndex = 6; |
| | | header.AddChild("Fcolumn7", new LocaleValue("供应商"), SqlStorageType.Sqlvarchar).ColIndex = 7; |
| | | header.AddChild("Fcolumn8", new LocaleValue("库存数量"), SqlStorageType.Sqlvarchar).ColIndex = 8; |
| | | header.AddChild("Fcolumn9", new LocaleValue("线边仓数量"), SqlStorageType.Sqlvarchar).ColIndex = 9; |
| | | header.AddChild("Fcolumn10", new LocaleValue("采购在途数量"), SqlStorageType.Sqlvarchar).ColIndex = 10; |
| | | header.AddChild("Fcolumn11", new LocaleValue("厂区"), SqlStorageType.Sqlvarchar).ColIndex = 11; |
| | | header.AddChild("Fcolumn41", new LocaleValue("老厂仓库")).ColIndex = 11; |
| | | header.AddChild("Fcolumn42", new LocaleValue("新厂仓库")).ColIndex = 11; |
| | | header.AddChild("Fcolumn12", new LocaleValue("拖期数量"), SqlStorageType.Sqlvarchar).ColIndex = 12; |
| | | header.AddChild("Fcolumn13", new LocaleValue("T数量"), SqlStorageType.Sqlvarchar).ColIndex = 13; |
| | | header.AddChild("Fcolumn14", new LocaleValue("T+1数量"), SqlStorageType.Sqlvarchar).ColIndex = 14; |
| | | header.AddChild("Fcolumn15", new LocaleValue("T+2数量"), SqlStorageType.Sqlvarchar).ColIndex = 15; |
| | | header.AddChild("Fcolumn16", new LocaleValue("T+3数量"), SqlStorageType.Sqlvarchar).ColIndex = 16; |
| | | header.AddChild("Fcolumn17", new LocaleValue("T+4数量"), SqlStorageType.Sqlvarchar).ColIndex = 17; |
| | | header.AddChild("Fcolumn18", new LocaleValue("T+5数量"), SqlStorageType.Sqlvarchar).ColIndex = 18; |
| | | header.AddChild("Fcolumn19", new LocaleValue("T+6数量"), SqlStorageType.Sqlvarchar).ColIndex = 19; |
| | | header.AddChild("Fcolumn20", new LocaleValue("T+7数量"), SqlStorageType.Sqlvarchar).ColIndex = 20; |
| | | header.AddChild("Fcolumn21", new LocaleValue("T合计")).ColIndex = 21; |
| | | header.AddChild("Fcolumn22", new LocaleValue("拖期计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 22; |
| | | header.AddChild("Fcolumn23", new LocaleValue("T计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 23; |
| | | header.AddChild("Fcolumn24", new LocaleValue("T+1计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 24; |
| | | header.AddChild("Fcolumn25", new LocaleValue("T+2计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 25; |
| | | header.AddChild("Fcolumn26", new LocaleValue("T+3计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 26; |
| | | header.AddChild("Fcolumn27", new LocaleValue("T+4计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 27; |
| | | header.AddChild("Fcolumn28", new LocaleValue("T+5计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 28; |
| | | header.AddChild("Fcolumn29", new LocaleValue("T+6计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 29; |
| | | header.AddChild("Fcolumn30", new LocaleValue("T+7计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 30; |
| | | header.AddChild("Fcolumn31", new LocaleValue("T计划合计")).ColIndex = 31; |
| | | |
| | | |
| | | return header; |
| | | } |
| | | |
| | | public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName) |
| | | { |
| | | base.BuilderReportSqlAndTempTable(filter, tableName); |
| | | |
| | | DynamicObject customFil = filter.FilterParameter.CustomFilter; |
| | | string FMateriel = ""; //物料 |
| | | string FMaterielName = "";//物料名称 |
| | | string FModel = "";//规格型号 |
| | | string FSupplier = "0";//供应商 默认值为0 |
| | | string FOrgId = "100092"; //组织(默认取值当前组织) |
| | | string FFactoryArea = ""; //厂区 |
| | | string FBuyer = ""; //采购员 |
| | | string FWarehouse = "";//仓库 |
| | | string saleOrderNo = ""; |
| | | bool FIsMainMaterial = Convert.ToBoolean(customFil["FIsMainMaterial"]);//True False//是否主料 |
| | | bool FIsTq = Convert.ToBoolean(customFil["FIsTq"]);//True False//是否拖期 |
| | | bool FIsXBC = Convert.ToBoolean(customFil["FIsXBC"]);//True False//是否线边仓 |
| | | bool FIsZZ = Convert.ToBoolean(customFil["FIsZZ"]);//True False//是否显示所有物料 |
| | | |
| | | //5fe5d920a3f2bf |
| | | //5fe5d926a3f2c1 |
| | | //5fe5d92ca3f2c3 |
| | | |
| | | if (((DynamicObject)customFil["FMateriel"]) != null) |
| | | { |
| | | FMateriel = ((DynamicObject)customFil["FMateriel"])["Number"].ToString(); |
| | | FMaterielName = ((DynamicObject)customFil["FMateriel"])["Name"].ToString(); |
| | | FModel = ((DynamicObject)customFil["FMateriel"])["Specification"].ToString(); |
| | | |
| | | } |
| | | if (((DynamicObject)customFil["FSupplier"]) != null) |
| | | { |
| | | FSupplier = ((DynamicObject)customFil["FSupplier"])["Id"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FFactoryArea"]) != null) |
| | | { |
| | | FFactoryArea = ((DynamicObject)customFil["FFactoryArea"])["Id"].ToString(); |
| | | } |
| | | |
| | | if (((DynamicObject)customFil["FBuyer"]) != null) |
| | | { |
| | | FBuyer = ((DynamicObject)customFil["FBuyer"])["Id"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FWarehouse"]) != null) |
| | | { |
| | | FWarehouse = ((DynamicObject)customFil["FWarehouse"])["Id"].ToString(); |
| | | } |
| | | if ((customFil["FIsMainMaterial"]) != null) |
| | | { |
| | | FIsMainMaterial = Convert.ToBoolean(customFil["FIsMainMaterial"]);//True False |
| | | } |
| | | if ((customFil["FSaleOrderNo"]) != null) |
| | | { |
| | | saleOrderNo = customFil["FSaleOrderNo"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FOrgId"]) != null) |
| | | { |
| | | FOrgId = ((DynamicObject)customFil["FOrgId"])["Id"].ToString(); |
| | | |
| | | } |
| | | string sql = string.Format(@"/*dialect*/ |
| | | exec [h_p_Cg_SupSendGoodsPlanZSFDD] '{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}' ,'{11}' ,'{12}','{13}' |
| | | ", FSupplier, FOrgId, FFactoryArea, FMateriel, FMaterielName, FModel, saleOrderNo, FBuyer, FWarehouse, FIsMainMaterial ? 1 : 0, FIsXBC ? 1 : 0, FIsTq ? 1 : 0, FIsZZ ? 1 : 0, tableName); |
| | | LogHelper.Info(sql); |
| | | DBUtils.Execute(this.Context, sql); |
| | | //EXEC h_p_Cg_SupSendGoodsPlanZSFDD 0,100092,'5fe5d920a3f2bf','','','','',0,0,1 |
| | | } |
| | | public override void CloseReport() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using Kingdee.BOS; |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Contracts; |
| | | using Kingdee.BOS.Contracts.Report; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.List; |
| | | using Kingdee.BOS.Core.Report; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using Kingdee.BOS.Util; |
| | | using ZD.Cloud.Logger; |
| | | |
| | | namespace zymes_Project.Report |
| | | { |
| | | /// <summary> |
| | | /// 供应商送料计划列表 |
| | | /// </summary> |
| | | [Description("供应商送料计划列表")] |
| | | [HotUpdate] |
| | | public class FeedPlanReport : SysReportBaseService |
| | | { |
| | | |
| | | public override void Initialize() |
| | | { |
| | | base.Initialize(); |
| | | // 简单账表类型:普通、树形、分页 |
| | | this.ReportProperty.ReportType = ReportType.REPORTTYPE_NORMAL; |
| | | this.IsCreateTempTableByPlugin = true; |
| | | //取代码中配置的列 |
| | | this.ReportProperty.IsUIDesignerColumns = false; |
| | | //是否分组汇总 |
| | | this.ReportProperty.IsGroupSummary = true; |
| | | } |
| | | |
| | | public override ReportHeader GetReportHeaders(IRptParams filter) |
| | | { |
| | | ReportHeader header = new ReportHeader(); |
| | | // FIDENTITYID 序号 旧物料代码 物料代码 物料名称 规格型号 采购计量单位 供应商 库存数量 线边仓数量 采购在途数量 厂区 拖期数量 T数量 T + 1数量 T+2数量 T+3数量 T+4数量 T+5数量 T+6数量 T+7数量 合计 |
| | | |
| | | header.AddChild("FIDENTITYID", new LocaleValue("序号"), SqlStorageType.Sqlvarchar).ColIndex=0; |
| | | header.AddChild("Fcolumn2", new LocaleValue("旧物料代码"), SqlStorageType.Sqlvarchar).ColIndex = 1; |
| | | header.AddChild("Fcolumn3", new LocaleValue("物料代码"), SqlStorageType.Sqlvarchar).ColIndex = 2; |
| | | header.AddChild("Fcolumn4", new LocaleValue("物料名称"), SqlStorageType.Sqlvarchar).ColIndex = 3; |
| | | header.AddChild("Fcolumn5", new LocaleValue("规格型号"), SqlStorageType.Sqlvarchar).ColIndex = 4; |
| | | header.AddChild("Fcolumn43", new LocaleValue("货主"), SqlStorageType.Sqlvarchar).ColIndex = 5; |
| | | header.AddChild("Fcolumn6", new LocaleValue("采购计量单位"), SqlStorageType.Sqlvarchar).ColIndex = 5; |
| | | header.AddChild("Fcolumn7", new LocaleValue("供应商"), SqlStorageType.Sqlvarchar).ColIndex = 6; |
| | | header.AddChild("Fcolumn8", new LocaleValue("库存数量"), SqlStorageType.Sqlvarchar).ColIndex = 7; |
| | | header.AddChild("Fcolumn9", new LocaleValue("线边仓数量"), SqlStorageType.Sqlvarchar).ColIndex = 8; |
| | | header.AddChild("Fcolumn10", new LocaleValue("采购在途数量"), SqlStorageType.Sqlvarchar).ColIndex = 9; |
| | | header.AddChild("Fcolumn11", new LocaleValue("厂区"), SqlStorageType.Sqlvarchar).ColIndex = 10; |
| | | header.AddChild("Fcolumn41", new LocaleValue("老厂仓库")).ColIndex = 10; |
| | | header.AddChild("Fcolumn42", new LocaleValue("新厂仓库")).ColIndex = 10; |
| | | header.AddChild("Fcolumn12", new LocaleValue("拖期数量"), SqlStorageType.Sqlvarchar).ColIndex = 11; |
| | | header.AddChild("Fcolumn13", new LocaleValue("T数量"), SqlStorageType.Sqlvarchar).ColIndex = 12; |
| | | header.AddChild("Fcolumn14", new LocaleValue("T+1数量"), SqlStorageType.Sqlvarchar).ColIndex = 13; |
| | | header.AddChild("Fcolumn15", new LocaleValue("T+2数量"), SqlStorageType.Sqlvarchar).ColIndex = 14; |
| | | header.AddChild("Fcolumn16", new LocaleValue("T+3数量"), SqlStorageType.Sqlvarchar).ColIndex = 15; |
| | | header.AddChild("Fcolumn17", new LocaleValue("T+4数量"), SqlStorageType.Sqlvarchar).ColIndex = 16; |
| | | header.AddChild("Fcolumn18", new LocaleValue("T+5数量"), SqlStorageType.Sqlvarchar).ColIndex = 17; |
| | | header.AddChild("Fcolumn19", new LocaleValue("T+6数量"), SqlStorageType.Sqlvarchar).ColIndex = 18; |
| | | header.AddChild("Fcolumn20", new LocaleValue("T+7数量"), SqlStorageType.Sqlvarchar).ColIndex = 19; |
| | | header.AddChild("Fcolumn21", new LocaleValue("T合计")).ColIndex = 20; |
| | | header.AddChild("Fcolumn22", new LocaleValue("拖期计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 21; |
| | | header.AddChild("Fcolumn23", new LocaleValue("T计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 22; |
| | | header.AddChild("Fcolumn24", new LocaleValue("T+1计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 23; |
| | | header.AddChild("Fcolumn25", new LocaleValue("T+2计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 24; |
| | | header.AddChild("Fcolumn26", new LocaleValue("T+3计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 25; |
| | | header.AddChild("Fcolumn27", new LocaleValue("T+4计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 26; |
| | | header.AddChild("Fcolumn28", new LocaleValue("T+5计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 27; |
| | | header.AddChild("Fcolumn29", new LocaleValue("T+6计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 28; |
| | | header.AddChild("Fcolumn30", new LocaleValue("T+7计划数量"), SqlStorageType.Sqlvarchar).ColIndex = 29; |
| | | header.AddChild("Fcolumn31", new LocaleValue("T计划合计")).ColIndex = 30; |
| | | //header.AddChild("Fcolumn41", new LocaleValue("老厂仓库")).ColIndex = 31; |
| | | //header.AddChild("Fcolumn42", new LocaleValue("新厂仓库")).ColIndex = 32; |
| | | |
| | | return header; |
| | | |
| | | return header; |
| | | } |
| | | |
| | | public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName) |
| | | { |
| | | base.BuilderReportSqlAndTempTable(filter, tableName); |
| | | |
| | | DynamicObject customFil = filter.FilterParameter.CustomFilter; |
| | | string FMateriel = ""; //物料 |
| | | string FMaterielName = "";//物料名称 |
| | | string FModel = "";//规格型号 |
| | | string FSupplier = "0";//供应商 默认值为0 |
| | | string FOrgId = "100092"; //组织(默认取值当前组织) |
| | | string FFactoryArea = ""; //厂区 |
| | | string FBuyer = ""; //采购员 |
| | | string FWarehouse = "";//仓库 |
| | | bool FIsMainMaterial = Convert.ToBoolean(customFil["FIsMainMaterial"]);//True False//是否主料 |
| | | bool FIsTq = Convert.ToBoolean(customFil["FIsTq"]);//True False//是否拖期 |
| | | bool FIsXBC = Convert.ToBoolean(customFil["FIsXBC"]);//True False//是否线边仓 |
| | | bool FIsZZ = Convert.ToBoolean(customFil["FIsZZ"]);//True False//是否显示所有物料 |
| | | |
| | | if (((DynamicObject)customFil["FMateriel"]) != null) |
| | | { |
| | | FMateriel = ((DynamicObject)customFil["FMateriel"])["Number"].ToString(); |
| | | FMaterielName = ((DynamicObject)customFil["FMateriel"])["Name"].ToString(); |
| | | FModel = ((DynamicObject)customFil["FMateriel"])["Specification"].ToString(); |
| | | |
| | | } |
| | | if (((DynamicObject)customFil["FSupplier"]) != null) |
| | | { |
| | | FSupplier = ((DynamicObject)customFil["FSupplier"])["Id"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FFactoryArea"]) != null) |
| | | { |
| | | FFactoryArea = ((DynamicObject)customFil["FFactoryArea"])["Id"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FBuyer"]) != null) |
| | | { |
| | | FBuyer = ((DynamicObject)customFil["FBuyer"])["Id"].ToString(); |
| | | } |
| | | if (((DynamicObject)customFil["FWarehouse"]) != null) |
| | | { |
| | | FWarehouse = ((DynamicObject)customFil["FWarehouse"])["Id"].ToString(); |
| | | } |
| | | |
| | | if (((DynamicObject)customFil["FOrgId"]) != null) |
| | | { |
| | | FOrgId = ((DynamicObject)customFil["FOrgId"])["Id"].ToString(); |
| | | |
| | | } |
| | | string sql = string.Format(@"/*dialect*/ |
| | | exec [h_p_Cg_SupSendGoodsPlanZSF] '{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}' ,'{11}' ,'{12}' |
| | | ", FSupplier, FOrgId, FFactoryArea, FMateriel, FMaterielName, FModel, FBuyer, FWarehouse, FIsMainMaterial ? 1 : 0, FIsXBC ? 1 : 0, FIsTq ? 1 : 0, FIsZZ ? 1 : 0, tableName); |
| | | LogHelper.Info(sql); |
| | | DBUtils.Execute(this.Context, sql); |
| | | //EXEC h_p_Cg_SupSendGoodsPlanZSF 0,100092,'5fe5d920a3f2bf','','','',382467,0,1,1 |
| | | } |
| | | public override void CloseReport() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Xml.Serialization; |
| | | |
| | | namespace zymes_Project.Utility |
| | | { |
| | | public class Util |
| | | { |
| | | public static string GetObjectType(object obj) |
| | | { |
| | | var isType = false; |
| | | isType = obj.GetType() == typeof(string); |
| | | if (isType) |
| | | { |
| | | return "string"; |
| | | } |
| | | |
| | | isType = obj.GetType() == typeof(double); |
| | | if (isType) |
| | | { |
| | | return "double"; |
| | | } |
| | | |
| | | isType = obj.GetType() == typeof(long); |
| | | if (isType) |
| | | { |
| | | return "long"; |
| | | } |
| | | |
| | | isType = obj.GetType() == typeof(DateTime); |
| | | if (isType) |
| | | { |
| | | return "date"; |
| | | } |
| | | |
| | | isType = obj.GetType() == typeof(int); |
| | | if (isType) |
| | | { |
| | | return "int"; |
| | | } |
| | | |
| | | isType = obj.GetType() == typeof(decimal); |
| | | if (isType) |
| | | { |
| | | return "decimal"; |
| | | } |
| | | |
| | | return "string"; |
| | | } |
| | | |
| | | public static JObject JsonVerify(string json) |
| | | { |
| | | if (string.IsNullOrEmpty(json)) |
| | | { |
| | | throw new Exception("参数不能为空"); |
| | | } |
| | | try |
| | | { |
| | | return JObject.Parse(json.ToString().Replace("\r", "").Replace("\n", "").Replace("\t", "")); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | //public static T DeepCopy<T>(T obj) |
| | | //{ |
| | | // object retval; |
| | | // using (MemoryStream ms = new MemoryStream()) |
| | | // { |
| | | // XmlSerializer xml = new XmlSerializer(typeof(T)); |
| | | // xml.Serialize(ms, obj); |
| | | // ms.Seek(0, SeekOrigin.Begin); |
| | | // retval = xml.Deserialize(ms); |
| | | // ms.Close(); |
| | | // } |
| | | // return (T)retval; |
| | | //} |
| | | |
| | | public static String GetConfigKey(String configPath, String key) |
| | | { |
| | | Configuration ConfigurationInstance = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap() |
| | | { |
| | | ExeConfigFilename = configPath |
| | | }, ConfigurationUserLevel.None); |
| | | |
| | | |
| | | if (ConfigurationInstance.AppSettings.Settings[key] != null) |
| | | return ConfigurationInstance.AppSettings.Settings[key].Value; |
| | | else |
| | | |
| | | return string.Empty; |
| | | } |
| | | |
| | | public static bool SetConfigKey(String configPath, String key, String vls) |
| | | { |
| | | try |
| | | { |
| | | Configuration ConfigurationInstance = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap() |
| | | { |
| | | ExeConfigFilename = configPath |
| | | }, ConfigurationUserLevel.None); |
| | | |
| | | if (ConfigurationInstance.AppSettings.Settings[key] != null) |
| | | ConfigurationInstance.AppSettings.Settings[key].Value = vls; |
| | | else |
| | | ConfigurationInstance.AppSettings.Settings.Add(key, vls); |
| | | ConfigurationInstance.Save(ConfigurationSaveMode.Modified); |
| | | ConfigurationManager.RefreshSection("appSettings"); |
| | | return true; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections> |
| | | <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
| | | <section name="zymes_Project.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
| | | </sectionGroup> |
| | | </configSections> |
| | | <system.serviceModel> |
| | | <bindings /> |
| | | <client /> |
| | | </system.serviceModel> |
| | | <applicationSettings> |
| | | <zymes_Project.Properties.Settings> |
| | | <setting name="zymes_Project_WorkflowService_WorkflowService" serializeAs="String"> |
| | | <value>http://122.227.199.62:58588/services/WorkflowService</value> |
| | | </setting> |
| | | </zymes_Project.Properties.Settings> |
| | | </applicationSettings> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> |
| | | <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> |
| | | <bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | </configuration> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="log4net" version="1.2.10" targetFramework="net472" /> |
| | | <package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net472" /> |
| | | <package id="RestSharp" version="104.0" targetFramework="net472" /> |
| | | <package id="System.Buffers" version="4.5.1" targetFramework="net472" /> |
| | | <package id="System.Memory" version="4.5.4" targetFramework="net472" /> |
| | | <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" /> |
| | | <package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" /> |
| | | <package id="System.Text.Encodings.Web" version="5.0.0" targetFramework="net472" /> |
| | | <package id="System.Text.Json" version="5.0.1" targetFramework="net472" /> |
| | | <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" /> |
| | | <package id="System.ValueTuple" version="4.5.0" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.Common" version="7.5.1.7" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.Logger" version="1.1.0" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.WebApi" version="7.3.2.3" targetFramework="net472" /> |
| | | <package id="ZD.Newtonsoft.Json" version="1.0.0" targetFramework="net472" /> |
| | | <package id="ZD.Share" version="1.0.0" targetFramework="net472" /> |
| | | </packages> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8" ?> |
| | | <configuration> |
| | | <startup> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> |
| | | </startup> |
| | | </configuration> |
| New file |
| | |
| | | using Kingdee.BOS.JSON; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace test |
| | | { |
| | | class Program |
| | | { |
| | | static void Main(string[] args) |
| | | { |
| | | CustomDemo1(); |
| | | Console.WriteLine(Convert.ToDecimal(1 / 10)); |
| | | Console.WriteLine(1 % 10); |
| | | Console.WriteLine(1 % 10.0); |
| | | Console.WriteLine((float)61 / 111); |
| | | Console.WriteLine((double)61 / 111); |
| | | Console.WriteLine(Math.Round(((decimal)61 / 111), 2)); |
| | | Console.WriteLine(Math.Round(((decimal)61 * 100 / 111), 2)); |
| | | } |
| | | private static void CustomDemo() |
| | | { |
| | | JArray array = new JArray(); |
| | | var entry = new JObject() |
| | | { |
| | | ["HMaterID"] = 100465, |
| | | ["HMaterNumber"] = "S1.06", |
| | | ["HMaterName"] = "智能手机-6S", |
| | | ["HModel"] = " ", |
| | | ["HSourceID"] = 0, |
| | | ["HSourceName"] = null, |
| | | ["HDeptID"] = 100512, |
| | | ["HDeptName"] = "手机车间", |
| | | ["HUnitID"] = 10101, |
| | | ["HUnitName"] = "Pcs", |
| | | ["HQty"] = 100, |
| | | ["HSTATUS"] = "3", |
| | | ["HPlanBeginDate"] = "2022-11-29", |
| | | ["HPlanEndDate"] = "2022-11-29", |
| | | }; |
| | | array.Add(entry); |
| | | entry = new JObject() |
| | | { |
| | | ["HMaterID"] = 100465, |
| | | ["HMaterNumber"] = "S1.06", |
| | | ["HMaterName"] = "智能手机-6S", |
| | | ["HModel"] = " ", |
| | | ["HSourceID"] = 0, |
| | | ["HSourceName"] = null, |
| | | ["HDeptID"] = 100512, |
| | | ["HDeptName"] = "手机车间", |
| | | ["HUnitID"] = 10101, |
| | | ["HUnitName"] = "Pcs", |
| | | ["HQty"] = 100, |
| | | ["HSTATUS"] = "3", |
| | | ["HPlanBeginDate"] = "2022-11-29", |
| | | ["HPlanEndDate"] = "2022-11-29", |
| | | }; |
| | | array.Add(entry); |
| | | var model = new JObject() |
| | | { |
| | | ["HBillNo"] = "MO000148", |
| | | ["HInterID"] = "100169", |
| | | ["HPRDORGID"] = "100038", |
| | | ["HDate"] = "2022-11-29", |
| | | ["HSeOrderBillNo"] = "", |
| | | ["HSeOrderInterID"] = "0", |
| | | ["HSeOrderEntryID"] = "0", |
| | | ["HEmpName"] = "", |
| | | ["HEmpID"] = "0", |
| | | ["HCenterName"] = "", |
| | | ["HCenterID"] = "0", |
| | | ["HPlanQty"] = "1", |
| | | ["HRemark"] = "CLOUD导入", |
| | | ["HSTATUS"] = "1", |
| | | ["HENTRY"] = array |
| | | }; |
| | | |
| | | Console.WriteLine(array); |
| | | Console.WriteLine(model); |
| | | Console.Read(); |
| | | |
| | | |
| | | } |
| | | |
| | | private static void CustomDemo1() |
| | | { |
| | | string ret = @"{""code"":""1"",""count"":1,""Message"":""保存成功!"",""data"":1,""list"":null,""Dictlist"":null,""Verify"":null,""HInterID"":null}"; |
| | | List<string> ltCodes = new List<string>(System.Text.RegularExpressions.Regex.Split(ret, ",")); |
| | | List<string> _ltCodes = new List<string>(ret.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries)); |
| | | Console.WriteLine(ret); |
| | | Console.Read(); |
| | | } |
| | | |
| | | public class Root |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string code { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public int count { get; set; } |
| | | /// <summary> |
| | | /// 保存成功! |
| | | /// </summary> |
| | | public string Message { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public int data { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string list { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string Dictlist { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string Verify { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string HInterID { get; set; } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // 有关程序集的一般信息由以下 |
| | | // 控制。更改这些特性值可修改 |
| | | // 与程序集关联的信息。 |
| | | [assembly: AssemblyTitle("test")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("test")] |
| | | [assembly: AssemblyCopyright("Copyright © 2022")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // 将 ComVisible 设置为 false 会使此程序集中的类型 |
| | | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 |
| | | //请将此类型的 ComVisible 特性设置为 true。 |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID |
| | | [assembly: Guid("bef25853-55ad-4143-9b24-de234104c5db")] |
| | | |
| | | // 程序集的版本信息由下列四个值组成: |
| | | // |
| | | // 主版本 |
| | | // 次版本 |
| | | // 生成号 |
| | | // 修订号 |
| | | // |
| | | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 |
| | | //通过使用 "*",如下所示: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{BEF25853-55AD-4143-9B24-DE234104C5DB}</ProjectGuid> |
| | | <OutputType>Exe</OutputType> |
| | | <RootNamespace>test</RootNamespace> |
| | | <AssemblyName>test</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
| | | <Deterministic>true</Deterministic> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup> |
| | | <StartupObject> |
| | | </StartupObject> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="Kingdee.BOS"> |
| | | <HintPath>..\..\..\办公\K3Cloud\WebSite\bin\Kingdee.BOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\办公\K3Cloud\WebSite\bin\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Program.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="App.config" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{08F1D118-335A-4C90-A223-61BEA98BBA65}</ProjectGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>zymes_Project</RootNamespace> |
| | | <AssemblyName>zymes_Project</AssemblyName> |
| | | <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>true</Deterministic> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup> |
| | | <StartupObject /> |
| | | </PropertyGroup> |
| | | <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> |
| | | </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> |
| | | </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> |
| | | </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> |
| | | </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> |
| | | </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> |
| | | </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> |
| | | </Reference> |
| | | <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>packages\ZD.Newtonsoft.Json.1.0.0\lib\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="RestSharp, Version=104.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>packages\RestSharp.104.0\lib\net4\RestSharp.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Configuration" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.EnterpriseServices" /> |
| | | <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Numerics" /> |
| | | <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Runtime.Serialization" /> |
| | | <Reference Include="System.ServiceModel" /> |
| | | <Reference Include="System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Text.Json, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Text.Json.5.0.1\lib\net461\System.Text.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> |
| | | <HintPath>packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Web.Services" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Xml" /> |
| | | <Reference Include="ZD.Cloud.Logger, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>packages\ZD.Cloud.Logger.1.1.0\lib\net40\ZD.Cloud.Logger.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZD.Cloud.WebApi, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\ZD.Cloud.WebApi.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZD.Share, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>packages\ZD.Share.1.0.0\lib\net452\ZD.Share.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="BillView\FeedPlanOrderReportBill.cs" /> |
| | | <Compile Include="BillView\FeedPlanOrderReportDetailBill.cs" /> |
| | | <Compile Include="BillView\FeedPlanReportDetailBill.cs" /> |
| | | <Compile Include="BillView\FeedPlanReportBill.cs" /> |
| | | <Compile Include="HttpClient.cs" /> |
| | | <Compile Include="InvokeHelper.cs" /> |
| | | <Compile Include="LogService.cs" /> |
| | | <Compile Include="OperationService\zymes_RealessDepartment.cs" /> |
| | | <Compile Include="OperationService\zymes_RealessStock.cs" /> |
| | | <Compile Include="OperationService\zymes_RealessCustomer.cs" /> |
| | | <Compile Include="OperationService\zymes_RealessSupplier.cs" /> |
| | | <Compile Include="OperationService\zymes_RealessUnit.cs" /> |
| | | <Compile Include="OperationService\zymes_RealessPrdMo.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | <Compile Include="Properties\Settings.Designer.cs"> |
| | | <AutoGen>True</AutoGen> |
| | | <DesignTimeSharedInput>True</DesignTimeSharedInput> |
| | | <DependentUpon>Settings.settings</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="OperationService\zymes_RealessMaterial.cs" /> |
| | | <Compile Include="Report\FeedPlanOrderDetailReport.cs" /> |
| | | <Compile Include="Report\FeedPlanOrderReport.cs" /> |
| | | <Compile Include="Report\FeedPlanDetailReport.cs" /> |
| | | <Compile Include="Report\FeedPlanReport.cs" /> |
| | | <Compile Include="Utility\Util.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="app.config" /> |
| | | <None Include="Config\kdapi.config" /> |
| | | <None Include="packages.config" /> |
| | | <None Include="Properties\Settings.settings"> |
| | | <Generator>SettingsSingleFileGenerator</Generator> |
| | | <LastGenOutput>Settings.Designer.cs</LastGenOutput> |
| | | </None> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <WCFMetadata Include="Connected Services\" /> |
| | | </ItemGroup> |
| | | <ItemGroup /> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <ProjectView>ShowAllFiles</ProjectView> |
| | | </PropertyGroup> |
| | | </Project> |
| New file |
| | |
| | | |
| | | Microsoft Visual Studio Solution File, Format Version 12.00 |
| | | # Visual Studio Version 16 |
| | | VisualStudioVersion = 16.0.30517.126 |
| | | MinimumVisualStudioVersion = 10.0.40219.1 |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zymes_Project", "zymes_Project.csproj", "{08F1D118-335A-4C90-A223-61BEA98BBA65}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{BEF25853-55AD-4143-9B24-DE234104C5DB}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | | Debug|Any CPU = Debug|Any CPU |
| | | Release|Any CPU = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
| | | {08F1D118-335A-4C90-A223-61BEA98BBA65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {08F1D118-335A-4C90-A223-61BEA98BBA65}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {08F1D118-335A-4C90-A223-61BEA98BBA65}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {08F1D118-335A-4C90-A223-61BEA98BBA65}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {BEF25853-55AD-4143-9B24-DE234104C5DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {BEF25853-55AD-4143-9B24-DE234104C5DB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {BEF25853-55AD-4143-9B24-DE234104C5DB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {BEF25853-55AD-4143-9B24-DE234104C5DB}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |
| | | EndGlobalSection |
| | | GlobalSection(ExtensibilityGlobals) = postSolution |
| | | SolutionGuid = {4D1179F7-D0FD-42C4-BAFD-FD0A7D0F1879} |
| | | EndGlobalSection |
| | | EndGlobal |