diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..257d421 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "csharpier": { + "version": "1.0.3", + "commands": [ + "csharpier" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/Gatedge.K3Cloud.Utils/Common/FilterItem.cs b/Gatedge.K3Cloud.Utils/Common/FilterItem.cs new file mode 100644 index 0000000..8337b29 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Common/FilterItem.cs @@ -0,0 +1,93 @@ +namespace Gatedge.K3Cloud.Utils.Common +{ + /// + /// 过滤条件项 + /// + public class FilterItem + { + + + //{"Left":"(","FieldName":"Field1","Compare":"67","Value":"111","Right":")","Logic":"0"} + /// + /// 左连接符 + /// + public string Left { get; set; } + /// + /// 字段名 + /// + public string FieldName { get; set; } + /// + /// 比较符 + /// + public string Compare { get; set; } + /// + /// 值 + /// + public string Value { get; set; } + /// + /// 右连接符 + /// + public string Right { get; set; } + /// + /// 逻辑控制符 + /// + public string Logic { get; set; } + + /// + /// 构造函数 + /// + public FilterItem() + { + Left = ""; + Right = ""; + Logic = "0"; + FieldName = ""; + Compare = ""; + Value = ""; + } + + /// + /// 生成并且的条件 + /// + /// + /// + /// + public FilterItem(string fieldName, string compare, string value) + { + Left = ""; + Right = ""; + Logic = "0"; + FieldName = fieldName; + Compare = compare; + Value = value; + } + /// + /// 构造无左右连接符的过滤条件 + /// + /// + /// + /// + /// + public FilterItem(string fieldName, string compare, string value, string logic) + { + Left = ""; + Right = ""; + FieldName = fieldName; + Compare = compare; + Value = value; + Logic = logic; + } + /// + /// 构造全属性过滤条件 + /// + public FilterItem(string left, string fieldName, string compare, string value, string right, string logic) + { + Left = left; + FieldName = fieldName; + Compare = compare; + Value = value; + Right = right; + Logic = logic; + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Common/FilterList.cs b/Gatedge.K3Cloud.Utils/Common/FilterList.cs new file mode 100644 index 0000000..e0a2dfb --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Common/FilterList.cs @@ -0,0 +1,82 @@ + + +namespace Gatedge.K3Cloud.Utils.Common +{ + /// + /// 过滤条件实体类 + /// + public class FilterList + { + private List Items; + + /// + /// 构造函数,初始化过滤子项 + /// + public FilterList() + { + Items = new List(); + } + /// + /// 添加已审核过滤 + /// + /// + /// + public FilterList AddAuditedItems(string AuditFieldKey = "FDocumentStatus") + { + FilterItem DocumentStatusItem = new FilterItem() + { + Left = "", + FieldName = AuditFieldKey, + Compare = "105", + Value = "C", + Right = "", + Logic = "0", + }; + + Items.Add(DocumentStatusItem); + return this; + } + + /// + /// 添加未禁用过滤 + /// + /// + /// + public FilterList AddNotCancelItems(string CancelFieldKey = "FCancelStatus") + { + FilterItem DocumentStatusItem = new FilterItem() + { + Left = "", + FieldName = CancelFieldKey, + Compare = "105", + Value = "A", + Right = "", + Logic = "0", + }; + + Items.Add(DocumentStatusItem); + return this; + } + + /// + /// 添加过滤字段 + /// + /// + /// + public FilterList AddFilterItem(FilterItem filterItem) + { + Items.Add(filterItem); + return this; + } + + /// + /// 获取过滤字段 + /// + /// + public List GetFilterString() + { + + return Items; + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Exceptions/K3CloudException.cs b/Gatedge.K3Cloud.Utils/Exceptions/K3CloudException.cs new file mode 100644 index 0000000..7fcff0c --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Exceptions/K3CloudException.cs @@ -0,0 +1,26 @@ + + +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; + +namespace Gatedge.K3Cloud.Utils.Exceptions +{ + /// + /// 金蝶云星空查看单据异常类 + /// + public class K3CloudException : Exception + { + /// + /// 错误信息列表 + /// + public K3CloudResponseStatus responseStatus { get; set; } + /// + /// 构造一个新的异常 + /// + /// + /// + public K3CloudException(string message, K3CloudResponseStatus responseStatus) : base(message) + { + this.responseStatus = responseStatus; + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Gatedge.K3Cloud.Utils.csproj b/Gatedge.K3Cloud.Utils/Gatedge.K3Cloud.Utils.csproj new file mode 100644 index 0000000..2a5ea60 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Gatedge.K3Cloud.Utils.csproj @@ -0,0 +1,19 @@ + + + + net6.0 + enable + enable + + + + + + + + + ..\Library\Kingdee.CDP.WebApi.SDK.dll + + + + diff --git a/Gatedge.K3Cloud.Utils/K3CloudApiUtils.cs b/Gatedge.K3Cloud.Utils/K3CloudApiUtils.cs new file mode 100644 index 0000000..9722164 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/K3CloudApiUtils.cs @@ -0,0 +1,363 @@ +using Gatedge.K3Cloud.Utils.Exceptions; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +using Gatedge.K3Cloud.Utils.Option; +using Kingdee.CDP.WebApi.SDK; +using Kingdee.CDP.WebApi.SDK.DataEntity; +using System.Text.Json; + +namespace Gatedge.K3Cloud.Utils +{ + /// + /// K3CloudApi帮助类 + /// + public class K3CloudApiUtils + { + private List _options; + private K3CloudApi _cloudApi; + private LoginInfo _userInfo; + + /// + /// 构造K3CloudApiUtils,option、env是从ICO容器中拿到的对象 + /// + /// 金蝶配置 + public K3CloudApiUtils(List option) + { + _options = option; + } + /// + /// 获取Kingdee配置信息 + /// + /// + public List GetKingdeeOptions() + { + return _options; + } + + /// + /// 根据Token中的信息创建K3CloudApi对象 + /// + /// + /// + public void InitCloudApi(LoginInfo User) + { + var userName = User.UserName; + var lcId = User.LCId; + var orgNum = User.OrgNum; + var DBID = User.DBID; + var serverUrl = User.ServerUrl; + K3CloudOption? kingdeeOption = _options + .Where(n => n.AcctID == DBID && n.ServerUrl.ToUpperInvariant() == serverUrl.ToUpperInvariant()) + .FirstOrDefault(); + if (kingdeeOption == null) + { + throw new Exception("配置文件没有对应的第三方授权登录信息!"); + } + _cloudApi = new K3CloudApi(serverUrl); + + _cloudApi.InitClient( + acctID: DBID, + appID: kingdeeOption?.AppID, + appSec: kingdeeOption?.AppSec, + serverUrl: serverUrl, + userName: userName, + lcid: lcId, + orgNum: orgNum + ); + this._userInfo = User; + } + + + + /// + /// 获取默认用户的api + /// + /// + /// + public K3CloudApi CreateDefaultK3CloudApi(LoginInfo loginInfo) + { + K3CloudOption? kingdeeOption = _options + .Where(n => n.AcctID == loginInfo.DBID && n.ServerUrl.ToUpperInvariant() == loginInfo.ServerUrl.ToUpperInvariant()) + .FirstOrDefault(); + if (kingdeeOption == null) + { + throw new Exception("配置文件没有对应的第三方授权登录信息!"); + } + // 默认登录信息从配置文件appsetting.json获取AppID、AppSec,其余从前端传参 + ThirdPassPortInfo thirdPassPortInfo = new ThirdPassPortInfo(); + thirdPassPortInfo.CloudDbId = loginInfo.DBID; + thirdPassPortInfo.ApiAppId = kingdeeOption?.AppID; + thirdPassPortInfo.AppSec = kingdeeOption?.AppSec; + thirdPassPortInfo.CloudUrl = loginInfo.ServerUrl; + thirdPassPortInfo.Language = loginInfo.LCId.ToString(); + thirdPassPortInfo.CloudUser = loginInfo.UserName; + _cloudApi = new K3CloudApi(thirdPassPortInfo, 30); + return _cloudApi; + } + + + /// + /// 创建金蝶云API SDK + /// + /// + /// + public K3CloudApiUtils GetDefaultK3CloudApiUtil(LoginInfo loginInfo) + { + K3CloudOption? kingdeeOption = _options + .Where(n => n.AcctID == loginInfo.DBID && n.ServerUrl.ToUpperInvariant() == loginInfo.ServerUrl.ToUpperInvariant()) + .FirstOrDefault(); + if (kingdeeOption == null) + { + throw new Exception("配置文件没有对应的第三方授权登录信息!"); + } + // 默认登录信息从配置文件appsetting.json获取AppID、AppSec,其余从前端传参 + var logInfo = new LoginInfo() + { + UserName = kingdeeOption.UserName, + LCId = kingdeeOption.LCID, + OrgNum = kingdeeOption.OrgNumber, + DBID = kingdeeOption.AcctID, + ServerUrl = kingdeeOption.ServerUrl, + }; + var k3CloudApiUtil = new K3CloudApiUtils(_options); + k3CloudApiUtil.InitCloudApi(logInfo); + return k3CloudApiUtil; + } + + /// + /// 创建金蝶云API SDK + /// + /// + /// + public K3CloudApiUtils GetDefaultK3CloudApiUtil() + { + + if (this._userInfo == null) + { + throw new Exception("当前工具类没有,初始化用户信息"); + } + return GetDefaultK3CloudApiUtil(_userInfo); + } + + /// + /// 获取金蝶云星空SDK实例 + /// + /// + public K3CloudApi GetApiClient() + { + return _cloudApi; + } + + /// + /// 查询列表 + /// + /// + /// + public ListResult QueryList(Query queryParam) + { + var datastr = queryParam.ToString(); + var resultString = _cloudApi.BillQuery(datastr); + // 包含ErrorCode认定为失败 + if (resultString.Contains("ErrorCode")) + { + var errorResult = JsonSerializer.Deserialize(resultString); + var responseStatus = errorResult?.Result?.ResponseStatus; + Exception error = new K3CloudException("查看单据列表出错", responseStatus); + throw error; + } + List>? result = JsonSerializer.Deserialize>>(resultString); + return new ListResult(result); + } + + + /// + /// 查询单据 + /// + /// 表单ID + /// 参数 + /// + /// + public object Query(string formId, View viewBill) + { + var jsonData = viewBill.ToString(); + var resultString = _cloudApi.View(formId, jsonData); + var result = JsonSerializer.Deserialize(resultString); + if (result?.Result?.ResponseStatus?.IsSuccess != true) + { + var responseStatus = result?.Result?.ResponseStatus; + Exception error = new K3CloudException("查看单据出错", responseStatus); + throw error; + } + var data = result?.Result?.Result; + return data; + } + + /// + /// 查询单据 + /// + /// 表单ID + /// 参数 + /// + /// + public T Query(string formId, View viewBill) + { + var jsonData = viewBill.ToString(); + var resultString = _cloudApi.View(formId, jsonData); + var result = JsonSerializer.Deserialize(resultString); + if (result?.Result?.ResponseStatus?.IsSuccess != true) + { + var responseStatus = result?.Result?.ResponseStatus; + Exception error = new K3CloudException("查看单据出错", responseStatus); + throw error; + } + var data = result?.Result?.Result; + var dataString = JsonSerializer.Serialize(data); + return JsonSerializer.Deserialize(dataString); + } + + /// + /// 下推接口 + /// + /// 表单ID + /// 参数 + /// + public K3CloudResponseStatus Push(string formId, Push billPush) + { + var pushString = billPush.ToString(); + var resultString = _cloudApi.Push(formId, pushString); + var result = JsonSerializer.Deserialize(resultString); + var data = result?.Result?.ResponseStatus; + return data; + } + + + + /// + /// 保存接口 + /// + /// + /// + /// + public K3CloudResponseStatus Save(string formId, Save billSave) + { + var requestString = billSave.ToString(); + var resultString = _cloudApi.Save(formId, requestString); + var result = JsonSerializer.Deserialize(resultString); + if (result?.Result?.ResponseStatus?.IsSuccess != true) + { + var responseStatus = result?.Result?.ResponseStatus; + Exception error = new K3CloudException("单据保存出错", responseStatus); + throw error; + } + var data = result?.Result?.ResponseStatus; + return data; + } + + /// + /// 批量保存接口 + /// + /// + /// + /// + public K3CloudResponseStatus BatchSave(string formId, PatchSave patchSave) + { + var requestString = patchSave.ToString(); + var resultString = _cloudApi.BatchSave(formId, requestString); + var result = JsonSerializer.Deserialize(resultString); + if (result?.Result?.ResponseStatus?.IsSuccess != true) + { + var responseStatus = result?.Result?.ResponseStatus; + Exception error = new K3CloudException("单据批量保存出错", responseStatus); + throw error; + } + var data = result?.Result?.ResponseStatus; + return data; + } + + + /// + /// 删除接口 + /// + /// + /// + /// + public K3CloudResponseStatus Delete(string formId, Delete billdelete) + { + var paramStr = billdelete.ToString(); + var resultString = _cloudApi.Delete(formId, paramStr); + var result = JsonSerializer.Deserialize(resultString); + if (result?.Result?.ResponseStatus?.IsSuccess != true) + { + var responseStatus = result?.Result?.ResponseStatus; + Exception error = new K3CloudException("单据删除出错", responseStatus); + throw error; + } + var data = result?.Result?.ResponseStatus; + return data; + } + + + + /// + /// 提交接口 + /// + /// + /// + /// + public K3CloudResponseStatus Submit(string formId, Submit billSubmit) + { + var resultString = _cloudApi.Submit(formId, billSubmit.ToString()); + var result = JsonSerializer.Deserialize(resultString); + var data = result?.Result?.ResponseStatus; + return data; + } + + /// + /// 提交接口 + /// + /// + /// + /// + public K3CloudResponseStatus CancelAssign(string formId, CancelAssign billSubmit) + { + var resultString = _cloudApi.CancelAssign(formId, billSubmit.ToString()); + var result = JsonSerializer.Deserialize(resultString); + var data = result?.Result?.ResponseStatus; + return data; + } + + /// + /// 审核接口 + /// + /// + /// + /// + public K3CloudResponseStatus Audit(string formId, Audit billAudit) + { + var resultString = _cloudApi.Audit(formId, billAudit.ToString()); + var result = JsonSerializer.Deserialize(resultString); + var data = result?.Result?.ResponseStatus; + return data; + } + + /// + /// 文件系统 + /// + /// + /// + public Model.K3Result.Model.K3CloudResult FileDonwload(FileParam fileParam) + { + var resultString = _cloudApi.AttachmentDownLoad(fileParam.ToString()); + + var result = JsonSerializer.Deserialize(resultString); + if (result?.Result?.ResponseStatus?.IsSuccess != true) + { + var responseStatus = result?.Result?.ResponseStatus; + Exception error = new K3CloudException("附件下载出错", responseStatus); + throw error; + } + return result?.Result; + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/Audit.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/Audit.cs new file mode 100644 index 0000000..efd516a --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/Audit.cs @@ -0,0 +1,64 @@ +using Newtonsoft.Json; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 单据审核 + /// + public class Audit + { + /// + /// 单据内码 + /// + public string? Ids { get; set; } + + /// + /// 组织ID + /// + public int CreateOrgId { get; set; } + + /// + /// 单据编码 + /// + public string[]? Numbers { get; set; } + + /// + /// 是否启用网控,布尔类型,默认false(非必录) + /// + public bool? NetworkCtrl { get; set; } = false; + + /// + /// 交互标志集合,字符串类型,分号分隔,格式:"flag1;flag2;..."(非必录) 例如(允许负库存标识:STK_InvCheckResult) + /// + public string? InterationFlags { get; set; } + + /// + /// 是否允许忽略交互,布尔类型,默认true(非必录) + /// + public bool? IgnoreInterationFlag { get; set; } = true; + + /// + /// 是否检验单据关联运行中的工作流实例,布尔类型,默认true(非必录) + /// + public bool? IsVerifyProcInst { get; set; } = true; + + /// + /// 是否应用单据参数设置分批处理,默认false + /// + public bool? UseBatControlTimes { get; set; } = false; + + /// + /// 重写 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/CancelAssign.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/CancelAssign.cs new file mode 100644 index 0000000..50b6897 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/CancelAssign.cs @@ -0,0 +1,46 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + public class CancelAssign + { + /// + /// 单据内码 + /// + public string? Ids { get; set; } + + /// + /// 组织ID + /// + public int CreateOrgId { get; set; } + + /// + /// 单据编码 + /// + public string[]? Numbers { get; set; } + + /// + /// 是否启用网控,布尔类型,默认false(非必录) + /// + public bool? NetworkCtrl { get; set; } + + + /// + /// 获取参数 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/Delete.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/Delete.cs new file mode 100644 index 0000000..275970d --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/Delete.cs @@ -0,0 +1,42 @@ +using Newtonsoft.Json; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 单据删除参数类 + /// + public class Delete + { /// + /// 单据内码 + /// + public string? Ids { get; set; } + + /// + /// 组织ID + /// + public long CreateOrgId { get; set; } + + /// + /// 单据编码 + /// + public string? Numbers { get; set; } + + /// + /// 是否启用网控 + /// + public bool NetworkCtrl { get; set; } + + /// + /// 重写 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/FileParam.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/FileParam.cs new file mode 100644 index 0000000..24e699f --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/FileParam.cs @@ -0,0 +1,32 @@ +using Newtonsoft.Json; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 文件系统参数 + /// + public class FileParam + { + /// + /// 文件Id + /// + public string FileId { get; set; } + /// + /// 开始索引 + /// + public long StartIndex { get; set; } + + /// + /// 重写 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/LoginInfo.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/LoginInfo.cs new file mode 100644 index 0000000..fbd3c48 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/LoginInfo.cs @@ -0,0 +1,38 @@ +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 登录信息参数类 + /// + public class LoginInfo + { + /// + /// 用户名 + /// + public string UserName { get; set; } + + /// + /// 密码 + /// + public string Password { get; set; } + + /// + /// 语言Id + /// + public int LCId { get; set; } + + /// + /// 金蝶URL + /// + public string ServerUrl { get; set; } + + /// + /// 数据中心DBID + /// + public string DBID { get; set; } + + /// + /// 组织编码 + /// + public string OrgNum { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/PatchSave.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/PatchSave.cs new file mode 100644 index 0000000..d030a42 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/PatchSave.cs @@ -0,0 +1,87 @@ +using Newtonsoft.Json; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 批量保存 + /// + public class PatchSave + { /// + /// 是否用编码搜索基础资料,布尔类型,默认true(非必录) + /// + public bool? NumberSearch { get; set; } = true; + + /// + /// 是否验证数据合法性标志,布尔类型,默认true(非必录)注(设为false时不对数据合法性进行校验) + /// + public bool? ValidateFlag { get; set; } = true; + + /// + /// 是否删除已存在的分录,布尔类型,默认true(非必录) + /// + public bool? IsDeleteEntry { get; set; } = true; + + /// + /// 是否批量填充分录,默认true(非必录) + /// + public bool? IsEntryBatchFill { get; set; } = true; + /// + /// 需要更新的字段,数组类型,格式:[key1,key2,...] (非必录)注(更新字段时Model数据包中必须设置内码,若更新单据体字段还需设置分录内码) + /// + public string? NeedUpDateFields { get; set; } + /// + /// 需返回结果的字段集合,数组类型,格式:[key,entitykey.key,...](非必录) 注(返回单据体字段格式:entitykey.key) + /// + public string NeedReturnFields { get; set; } + /// + /// 表单所在的子系统内码,字符串类型(非必录) + /// + public string? SubSystemId { get; set; } + /// + /// 交互标志集合,字符串类型,分号分隔,格式:"flag1;flag2;..."(非必录) 例如(允许负库存标识:STK_InvCheckResult) + /// + public string? InterationFlags { get; set; } + /// + /// 服务端开启的线程数,整型(非必录) 注(数据包数应大于此值,否则无效) + /// + public int? BatchCount { get; set; } + /// + /// 是否验证所有的基础资料有效性,布尔类,默认false(非必录) + /// + public bool? IsVerifyBaseDataField { get; set; } = false; + /// + /// 是否自动调整JSON字段顺序,布尔类型,默认false(非必录) + /// + public bool? IsAutoAdjustField { get; set; } = false; + /// + /// 是否允许忽略交互,布尔类型,默认true(非必录) + /// + public bool? IgnoreInterationFlag { get; set; } = true; + /// + /// 是否控制精度,为true时对金额、单价和数量字段进行精度验证,默认false(非必录) + /// + public bool? IsControlPrecision { get; set; } = false; + /// + /// 校验Json数据包是否重复传入,一旦重复传入,接口调用失败,默认false(非必录) + /// + public bool? ValidateRepeatJson { get; set; } = false; + + /// + /// 表单数据包,数组类型(必录) + /// + public IEnumerable Model { get; set; } + + /// + /// 重写 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/Push.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/Push.cs new file mode 100644 index 0000000..8725d2f --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/Push.cs @@ -0,0 +1,69 @@ +using Newtonsoft.Json; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 下推参数 + /// + public class Push + { + /// + /// 单据内码 + /// + public string? Ids { get; set; } + + /// + /// 组织ID + /// + public long? TargetOrgId { get; set; } + + /// + /// 单据编码 + /// + public string? Numbers { get; set; } + + /// + /// 分录行内码 + /// + public string? EntryIds { get; set; } + + /// + /// 是否启用默认转换规则 + /// + public bool IsEnableDefaultRule { get; set; } + /// + /// 保存失败自动暂存单据 + /// + public bool IsDraftWhenSaveFail { get; set; } + + + + /// + /// 转换规则ID + /// + public string? RuleId { get; set; } + + /// + /// 目标单据ID + /// + public string? TargetFormId { get; set; } + + /// + /// 自定义参数 + /// + public Dictionary? CustomParams { get; set; } + + /// + /// 重写ToString + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/Query.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/Query.cs new file mode 100644 index 0000000..f512383 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/Query.cs @@ -0,0 +1,88 @@ +using Gatedge.K3Cloud.Utils.Common; +using Newtonsoft.Json; + + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 金蝶云星空单据列表查询参数类 + /// + public class Query + { + /// + /// 业务对象表单Id(必录) + /// + public string FormId { get; set; } + /// + /// 需查询的字段key集合 + /// + public string? FieldKeys { get; set; } + /// + /// 过滤条件 + /// + public List? FilterString { get; set; } + /// + /// 排序字段 + /// + public string? OrderString { get; set; } + /// + /// 返回总行数 + /// + public int? TopRowCount { get; set; } + /// + /// 开始行索引 + /// + public int? StartRow { get; set; } + /// + /// 最大行数 + /// + public int? Limit { get; set; } + /// + /// 表单所在的子系统内码 + /// + public string? SubSystemId { get; set; } + + /// + /// 重写 + /// + /// + public override string ToString() + { + + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + + /// + /// 获取查询信息 + /// + /// + public string GetInfo() + { + var filterString = JsonConvert.SerializeObject(FilterString); + var info = string.Format(@" +业务对象表单Id(必录):{0} +需查询的字段key集合:{1} +过滤条件:{2} +排序字段:{3} +返回总行数:{4} +开始行索引:{5} +最大行数:{6} +表单所在的子系统内码:{7} +", +FormId, +FieldKeys, +filterString, +OrderString, +TopRowCount, +StartRow, +Limit, +SubSystemId +); + return info; + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/Save.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/Save.cs new file mode 100644 index 0000000..a21f29c --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/Save.cs @@ -0,0 +1,49 @@ +using Newtonsoft.Json; + + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 单据保存 + /// + public class Save + { + /// + /// 更新字段 + /// + public string? NeedUpDateFields { get; set; } + + /// + /// 返回字段 + /// + public string? NeedReturnFields { get; set; } + + /// + /// 清空分录 + /// + public bool IsDeleteEntry { get; set; } + + /// + /// 自动提交审核 + /// + public bool IsAutoSubmitAndAudit { get; set; } + + /// + /// 表单数据包,JSON类型(必录) + /// + public T Model { get; set; } + + /// + /// 重写 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/Submit.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/Submit.cs new file mode 100644 index 0000000..f2da2f5 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/Submit.cs @@ -0,0 +1,48 @@ +using Newtonsoft.Json; + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 提交参数 + /// + public class Submit + { + /// + /// 单据内码 + /// + public string? Ids { get; set; } + + /// + /// 组织ID + /// + public int CreateOrgId { get; set; } + + /// + /// 单据编码 + /// + public string[]? Numbers { get; set; } + + /// + /// 是否启用网控,布尔类型,默认false(非必录) + /// + public bool? NetworkCtrl { get; set; } + + /// + /// 是否允许忽略交互,布尔类型,默认true(非必录) + /// + public bool? IgnoreInterationFlag { get; set; } + + /// + /// 获取参数 + /// + /// + public override string ToString() + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Request/View.cs b/Gatedge.K3Cloud.Utils/Model/K3Request/View.cs new file mode 100644 index 0000000..da2b4e6 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Request/View.cs @@ -0,0 +1,45 @@ +using Newtonsoft.Json; + + +namespace Gatedge.K3Cloud.Utils.Model.K3Request +{ + /// + /// 单据查询条件类 + /// + public class View + { + /// + /// 单据内码 + /// + public string? Id { get; set; } + + /// + /// 组织ID + /// + public long? CreateOrgId { get; set; } + + /// + /// 单据编码 + /// + public string? Number { get; set; } + + /// + /// 单据体是否按序号排序 + /// + public bool IsSortBySeq { get; set; } + + /// + /// 重写ToString方法 + /// + /// + public override string ToString() + { + + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.SerializeObject(this, settings); + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Result/KingdeeResult.cs b/Gatedge.K3Cloud.Utils/Model/K3Result/KingdeeResult.cs new file mode 100644 index 0000000..8135a9c --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Result/KingdeeResult.cs @@ -0,0 +1,15 @@ +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; + +namespace Gatedge.K3Cloud.Utils.Model.K3Result +{ + /// + /// 金蝶云星空返回类 + /// + public class KingdeeResult + { + /// + /// 返回对象 + /// + public K3CloudResult? Result { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Result/ListResult.cs b/Gatedge.K3Cloud.Utils/Model/K3Result/ListResult.cs new file mode 100644 index 0000000..5560321 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Result/ListResult.cs @@ -0,0 +1,23 @@ +namespace Gatedge.K3Cloud.Utils.Model.K3Result +{ + /// + /// 列表查询输出类 + /// + public class ListResult + { + + /// + /// 列表 + /// + public List> List { get; set; } + + /// + /// 构造函数 + /// + /// + public ListResult(List> list) + { + this.List = list; + } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResponseStatus.cs b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResponseStatus.cs new file mode 100644 index 0000000..66ce456 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResponseStatus.cs @@ -0,0 +1,33 @@ +namespace Gatedge.K3Cloud.Utils.Model.K3Result.Model +{ + /// + /// 响应对象 + /// + public class K3CloudResponseStatus + { + /// + /// 错误代码 + /// + public int ErrorCode { get; set; } + /// + /// 是否成功 + /// + public bool IsSuccess { get; set; } + /// + /// 错误信息列表 + /// + public List? Errors { get; set; } + /// + /// 成功实体 + /// + public List? SuccessEntitys { get; set; } + /// + /// 成功消息 + /// + public List? SuccessMessages { get; set; } + /// + /// 消息代码 + /// + public int MsgCode { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResult.cs b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResult.cs new file mode 100644 index 0000000..b833403 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResult.cs @@ -0,0 +1,44 @@ +namespace Gatedge.K3Cloud.Utils.Model.K3Result.Model +{ + /// + /// 返回类 + /// + public class K3CloudResult + { + /// + /// 响应对象 + /// + public K3CloudResponseStatus? ResponseStatus { get; set; } + + /// + /// 转换响应对象 + /// + public K3CloudResponseStatus? ConvertResponseStatus { get; set; } + + /// + /// 返回结果,用于查看单据 + /// + public object? Result { get; set; } + + /// + /// 开始索引 + /// + public long? StartIndex { get; set; } + /// + /// 是否最后 + /// + public bool? IsLast { get; set; } + /// + /// 文件大小 + /// + public long? FileSize { get; set; } + /// + /// 文件名称 + /// + public string? FileName { get; set; } + /// + /// 文件内容(Base64) + /// + public string? FilePart { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResultInfo.cs b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResultInfo.cs new file mode 100644 index 0000000..4008ec9 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudResultInfo.cs @@ -0,0 +1,21 @@ +namespace Gatedge.K3Cloud.Utils.Model.K3Result.Model +{ + /// + /// 金蝶云星空查看错误信息类 + /// + public class K3CloudResultInfo + { + /// + /// 字段名称 + /// + public string? FieldName { get; set; } + /// + /// 错误信息 + /// + public string? Message { get; set; } + /// + /// 序号 + /// + public int DIndex { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudSuccessEntity.cs b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudSuccessEntity.cs new file mode 100644 index 0000000..882c030 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Model/K3Result/Model/K3CloudSuccessEntity.cs @@ -0,0 +1,25 @@ +namespace Gatedge.K3Cloud.Utils.Model.K3Result.Model +{ + /// + /// 成功实体 + /// + public class K3CloudSuccessEntity + { + /// + /// 单据Id + /// + public int Id { get; set; } + /// + /// 单据编号 + /// + public string Number { get; set; } + /// + /// 实体索引 + /// + public int DIndex { get; set; } + /// + /// 分录Id + /// + public object EntryIds { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/Option/K3CloudOption.cs b/Gatedge.K3Cloud.Utils/Option/K3CloudOption.cs new file mode 100644 index 0000000..5b80b95 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/Option/K3CloudOption.cs @@ -0,0 +1,41 @@ +namespace Gatedge.K3Cloud.Utils.Option +{ + /// + /// 金蝶配置帮助类 + /// + public class K3CloudOption + { + /// + /// DBID + /// + public string AcctID { get; set; } + /// + /// 应用ID + /// + public string AppID { get; set; } + /// + /// 应用密钥 + /// + public string AppSec { get; set; } + /// + /// 服务器地址 + /// + public string ServerUrl { get; set; } + /// + /// 时间 + /// + public int Timestamp { get; set; } + /// + /// 默认语言ID + /// + public int LCID { get; set; } + /// + /// 默认用户名称 + /// + public string UserName { get; set; } + /// + /// 默认组织ID + /// + public string OrgNumber { get; set; } + } +} diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..ed92695 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge..A76F8AED.Up2Date b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge..A76F8AED.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.AssemblyInfo.cs b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.AssemblyInfo.cs new file mode 100644 index 0000000..2763cd3 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Gatedge.K3Cloud.Utils")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("Gatedge.K3Cloud.Utils")] +[assembly: System.Reflection.AssemblyTitleAttribute("Gatedge.K3Cloud.Utils")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// 由 MSBuild WriteCodeFragment 类生成。 + diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.AssemblyInfoInputs.cache b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.AssemblyInfoInputs.cache new file mode 100644 index 0000000..0cd7eb4 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +165ea657890767af593db8502b07268a6eb443998ec6ccaed530b9b98ffa5127 diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.GeneratedMSBuildEditorConfig.editorconfig b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..3592c3f --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = Gatedge.K3Cloud.Utils +build_property.ProjectDir = D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 6.0 +build_property.EnableCodeStyleSeverity = diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.GlobalUsings.g.cs b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.assets.cache b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.assets.cache new file mode 100644 index 0000000..901b25a Binary files /dev/null and b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.assets.cache differ diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.AssemblyReference.cache b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.AssemblyReference.cache new file mode 100644 index 0000000..2b42a40 Binary files /dev/null and b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.AssemblyReference.cache differ diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.CoreCompileInputs.cache b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..988d516 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +3270acc3fb76962103a967574cd19f6ece0700a9a54f63abf421e87e5aaff3e2 diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.FileListAbsolute.txt b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..807ea2c --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\bin\Debug\net6.0\Gatedge.K3Cloud.Utils.deps.json +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\bin\Debug\net6.0\Gatedge.K3Cloud.Utils.dll +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\bin\Debug\net6.0\Gatedge.K3Cloud.Utils.pdb +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\bin\Debug\net6.0\Kingdee.CDP.WebApi.SDK.dll +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.csproj.AssemblyReference.cache +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.GeneratedMSBuildEditorConfig.editorconfig +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.AssemblyInfoInputs.cache +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.AssemblyInfo.cs +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.csproj.CoreCompileInputs.cache +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge..A76F8AED.Up2Date +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.dll +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\refint\Gatedge.K3Cloud.Utils.dll +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\Gatedge.K3Cloud.Utils.pdb +D:\格致金蝶\澳门新东方置地\Gatedge.NewOrientLandMark.BOS\Gatedge.K3Cloud.Utils\obj\Debug\net6.0\ref\Gatedge.K3Cloud.Utils.dll diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.dll b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.dll new file mode 100644 index 0000000..8dac6a3 Binary files /dev/null and b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.dll differ diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.pdb b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.pdb new file mode 100644 index 0000000..9899204 Binary files /dev/null and b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/Gatedge.K3Cloud.Utils.pdb differ diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/ref/Gatedge.K3Cloud.Utils.dll b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/ref/Gatedge.K3Cloud.Utils.dll new file mode 100644 index 0000000..37fac04 Binary files /dev/null and b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/ref/Gatedge.K3Cloud.Utils.dll differ diff --git a/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/refint/Gatedge.K3Cloud.Utils.dll b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/refint/Gatedge.K3Cloud.Utils.dll new file mode 100644 index 0000000..37fac04 Binary files /dev/null and b/Gatedge.K3Cloud.Utils/obj/Debug/net6.0/refint/Gatedge.K3Cloud.Utils.dll differ diff --git a/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.dgspec.json b/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.dgspec.json new file mode 100644 index 0000000..7ccb3eb --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.dgspec.json @@ -0,0 +1,95 @@ +{ + "format": 1, + "restore": { + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj": {} + }, + "projects": { + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "projectName": "Gatedge.K3Cloud.Utils", + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "packagesPath": "C:\\Users\\海\\.nuget\\packages\\", + "outputPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" + ], + "configFilePaths": [ + "C:\\Users\\海\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "dependencies": { + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.3, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[6.0.36, 6.0.36]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.g.props b/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.g.props new file mode 100644 index 0000000..a2aa38d --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.g.props @@ -0,0 +1,17 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\海\.nuget\packages\;D:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\ + PackageReference + 6.12.1 + + + + + + + \ No newline at end of file diff --git a/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.g.targets b/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/Gatedge.K3Cloud.Utils.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Gatedge.K3Cloud.Utils/obj/project.assets.json b/Gatedge.K3Cloud.Utils/obj/project.assets.json new file mode 100644 index 0000000..7d9a1b5 --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/project.assets.json @@ -0,0 +1,149 @@ +{ + "version": 3, + "targets": { + "net6.0": { + "Newtonsoft.Json/13.0.3": { + "type": "package", + "compile": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + } + } + } + }, + "libraries": { + "Newtonsoft.Json/13.0.3": { + "sha512": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", + "type": "package", + "path": "newtonsoft.json/13.0.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.md", + "README.md", + "lib/net20/Newtonsoft.Json.dll", + "lib/net20/Newtonsoft.Json.xml", + "lib/net35/Newtonsoft.Json.dll", + "lib/net35/Newtonsoft.Json.xml", + "lib/net40/Newtonsoft.Json.dll", + "lib/net40/Newtonsoft.Json.xml", + "lib/net45/Newtonsoft.Json.dll", + "lib/net45/Newtonsoft.Json.xml", + "lib/net6.0/Newtonsoft.Json.dll", + "lib/net6.0/Newtonsoft.Json.xml", + "lib/netstandard1.0/Newtonsoft.Json.dll", + "lib/netstandard1.0/Newtonsoft.Json.xml", + "lib/netstandard1.3/Newtonsoft.Json.dll", + "lib/netstandard1.3/Newtonsoft.Json.xml", + "lib/netstandard2.0/Newtonsoft.Json.dll", + "lib/netstandard2.0/Newtonsoft.Json.xml", + "newtonsoft.json.13.0.3.nupkg.sha512", + "newtonsoft.json.nuspec", + "packageIcon.png" + ] + } + }, + "projectFileDependencyGroups": { + "net6.0": [ + "Newtonsoft.Json >= 13.0.3" + ] + }, + "packageFolders": { + "C:\\Users\\海\\.nuget\\packages\\": {}, + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "projectName": "Gatedge.K3Cloud.Utils", + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "packagesPath": "C:\\Users\\海\\.nuget\\packages\\", + "outputPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" + ], + "configFilePaths": [ + "C:\\Users\\海\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "dependencies": { + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.3, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[6.0.36, 6.0.36]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/Gatedge.K3Cloud.Utils/obj/project.nuget.cache b/Gatedge.K3Cloud.Utils/obj/project.nuget.cache new file mode 100644 index 0000000..9056d0d --- /dev/null +++ b/Gatedge.K3Cloud.Utils/obj/project.nuget.cache @@ -0,0 +1,13 @@ +{ + "version": 2, + "dgSpecHash": "Zsi42lfljO8=", + "success": true, + "projectFilePath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "expectedPackageFiles": [ + "C:\\Users\\海\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\6.0.36\\microsoft.windowsdesktop.app.ref.6.0.36.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.netcore.app.ref\\6.0.36\\microsoft.netcore.app.ref.6.0.36.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\6.0.36\\microsoft.aspnetcore.app.ref.6.0.36.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file diff --git a/Gatedge.NewOrientLandMark.BOS.sln b/Gatedge.NewOrientLandMark.BOS.sln new file mode 100644 index 0000000..b908771 --- /dev/null +++ b/Gatedge.NewOrientLandMark.BOS.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35506.116 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gatedge.NewOrientLandMark.BOS", "Gatedge.NewOrientLandMark.BOS\Gatedge.NewOrientLandMark.BOS.csproj", "{20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gatedge.ScanCode.Basis.PlugIn", "Gatedge.ScanCode.Basis.PlugIn\Gatedge.ScanCode.Basis.PlugIn.csproj", "{C2252356-BCEC-48D8-80DF-6C45B4BDA1FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gatedge.ScanCode", "Gatedge.ScanCode\Gatedge.ScanCode.csproj", "{A26D430B-8ABD-4EFF-A42E-E5870F9C2402}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gatedge.K3Cloud.Utils", "Gatedge.K3Cloud.Utils\Gatedge.K3Cloud.Utils.csproj", "{83F71047-7D98-4D30-B175-BF75550383E7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3}.Release|Any CPU.Build.0 = Release|Any CPU + {C2252356-BCEC-48D8-80DF-6C45B4BDA1FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2252356-BCEC-48D8-80DF-6C45B4BDA1FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2252356-BCEC-48D8-80DF-6C45B4BDA1FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2252356-BCEC-48D8-80DF-6C45B4BDA1FC}.Release|Any CPU.Build.0 = Release|Any CPU + {A26D430B-8ABD-4EFF-A42E-E5870F9C2402}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A26D430B-8ABD-4EFF-A42E-E5870F9C2402}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A26D430B-8ABD-4EFF-A42E-E5870F9C2402}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A26D430B-8ABD-4EFF-A42E-E5870F9C2402}.Release|Any CPU.Build.0 = Release|Any CPU + {83F71047-7D98-4D30-B175-BF75550383E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83F71047-7D98-4D30-B175-BF75550383E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83F71047-7D98-4D30-B175-BF75550383E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83F71047-7D98-4D30-B175-BF75550383E7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Gatedge.NewOrientLandMark.BOS/Gatedge.NewOrientLandMark.BOS.csproj b/Gatedge.NewOrientLandMark.BOS/Gatedge.NewOrientLandMark.BOS.csproj new file mode 100644 index 0000000..dcc3930 --- /dev/null +++ b/Gatedge.NewOrientLandMark.BOS/Gatedge.NewOrientLandMark.BOS.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {20CFFA50-E5D4-48F5-99CD-7DDFD992F8C3} + Library + Properties + Gatedge.NewOrientLandMark.BOS + Gatedge.NewOrientLandMark.BOS + v4.8 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Gatedge.NewOrientLandMark.BOS/Gatedge.NewOrientLandMark.BOS.csproj.user b/Gatedge.NewOrientLandMark.BOS/Gatedge.NewOrientLandMark.BOS.csproj.user new file mode 100644 index 0000000..0b24643 --- /dev/null +++ b/Gatedge.NewOrientLandMark.BOS/Gatedge.NewOrientLandMark.BOS.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/Gatedge.NewOrientLandMark.BOS/Properties/AssemblyInfo.cs b/Gatedge.NewOrientLandMark.BOS/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..919773c --- /dev/null +++ b/Gatedge.NewOrientLandMark.BOS/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Gatedge.NewOrientLandMark.BOS")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Gatedge.NewOrientLandMark.BOS")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("20cffa50-e5d4-48f5-99cd-7ddfd992f8c3")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Gatedge.ScanCode.Basis.PlugIn/Bill/BAR_BarCodePrint/FormPlugIn/BarCodePrintEditRewrite.cs b/Gatedge.ScanCode.Basis.PlugIn/Bill/BAR_BarCodePrint/FormPlugIn/BarCodePrintEditRewrite.cs new file mode 100644 index 0000000..d33c4f0 --- /dev/null +++ b/Gatedge.ScanCode.Basis.PlugIn/Bill/BAR_BarCodePrint/FormPlugIn/BarCodePrintEditRewrite.cs @@ -0,0 +1,6871 @@ +using Kingdee.BOS; +using Kingdee.BOS.App; +using Kingdee.BOS.App.Data; +using Kingdee.BOS.Contracts; +using Kingdee.BOS.Core; +using Kingdee.BOS.Core.Bill; +using Kingdee.BOS.Core.Bill.PlugIn; +using Kingdee.BOS.Core.Bill.PlugIn.Args; +using Kingdee.BOS.Core.CommonFilter; +using Kingdee.BOS.Core.DynamicForm; +using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; +using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel; +using Kingdee.BOS.Core.Enums; +using Kingdee.BOS.Core.Interaction; +using Kingdee.BOS.Core.List; +using Kingdee.BOS.Core.Metadata; +using Kingdee.BOS.Core.Metadata.EntityElement; +using Kingdee.BOS.Core.Metadata.FieldElement; +using Kingdee.BOS.Core.Metadata.FormElement; +using Kingdee.BOS.Core.NotePrint; +using Kingdee.BOS.Core.SqlBuilder; +using Kingdee.BOS.FileServer.Core.Object; +using Kingdee.BOS.FileServer.ProxyService; +using Kingdee.BOS.JSON; +using Kingdee.BOS.KDThread; +using Kingdee.BOS.Orm; +using Kingdee.BOS.Orm.DataEntity; +using Kingdee.BOS.Orm.Metadata.DataEntity; +using Kingdee.BOS.Resource; +using Kingdee.BOS.ServiceHelper; +using Kingdee.BOS.ServiceHelper.Report; +using Kingdee.BOS.Util; +using Kingdee.K3.BD.BarCode.App.Core; +using Kingdee.K3.BD.BarCode.App.Core.BarCodeItem; +using Kingdee.K3.BD.BarCode.Business.PlugIn; +using Kingdee.K3.BD.BarCode.Core; +using Kingdee.K3.BD.BarCode.Core.DataModel.Service; +using Kingdee.K3.BD.BarCode.ServiceHelper; +using Kingdee.K3.BD.NewCode.Core.Utils; +using Kingdee.K3.BD.ServiceHelper; +using Kingdee.K3.Core.BD; +using Kingdee.K3.Core.BD.ServiceArgs; +using Kingdee.K3.Core.SCM; +using Kingdee.K3.Core.SCM.STK; +using Kingdee.K3.SCM.App.Core.Util; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; +using StockServiceHelper = Kingdee.K3.SCM.ServiceHelper.StockServiceHelper; + +namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn +{ + [Description("条码打印重写"), HotUpdate] + public class BarCodePrintEditRewrite : AbstractBillPlugIn + { + private int totalCount = 0; + private int currentCount = 0; + private List _noteTemplates; + private string barcodeToPrint = string.Empty; + private List printDatas = new List(); + + private List newPrintDatas = new List(); + + private string printOperationType = string.Empty; + + private int currPrintIndex = -1; + + private int currPrintQty = 0; + + private string flagPrintType = string.Empty; + + private string _permissionConst = string.Empty; + + private long _sRuleId = 0L; + + private long _sBoxRuleId = 0L; + + private long _sCenterBoxRuleId = 0L; + + private long _sBigBoxRuleId = 0L; + + private long _sFieldRuleId = 0L; + + protected string _sFormId = string.Empty; + + protected Dictionary SelectRowId = new Dictionary(); + + protected int IsCheck = 0; + + protected string _sourceId = string.Empty; + + protected string _sourceEntryId = string.Empty; + + protected string _sEntityKey = string.Empty; + + private FormMetadata _billFormMetaData = null; + + private int _isFromBill = 0; + + private bool _isAutoPacking = false; + + private bool _isCustomerPolicy = false; + + private bool _isThreePacking = false; + + private bool _controlCreateNumber = false; + + private ListSelectedRowCollection listData = new ListSelectedRowCollection(); + + private int _isFromPrintList = 0; + + private string billPageId = string.Empty; + + protected BarCodeSysParamsModel barcodeSysParm = null; + + public string Msg = ""; + + private Dictionary _baseBusinessInfo = new Dictionary(); + + private Dictionary _baseDataInfo = new Dictionary(); + + private bool _ctrlBatchCreate = false; + + private List MergeID = new List(); + + private List caculateCountInfos; + + private int _progressValue = 0; + + private int _proIncrement = 100; + + private string _pPageId = string.Empty; + + private bool _isEditQty = false; + + protected string identification = "UHIK_BAR_BarCodePrint"; + + public override void OnInitialize(InitializeEventArgs e) + { + try + { + base.OnInitialize(e); + _permissionConst = "UHIK_BAR_BarCodePrint"; + if (_permissionConst != "SCP_BarCodePrint") + { + InitBillNameFilter(); + } + + if (_noteTemplates == null) + { + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.FTemplatePolicyType.Equals("1")) + { + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId_Org(base.View.Context, "UHIK_BAR_BarCodePrint"); + } + else if (barCodeBillSystemParameters.FTemplatePolicyType.Equals("2")) + { + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId_User(base.View.Context, "UHIK_BAR_BarCodePrint"); + } + + if (_noteTemplates == null || _noteTemplates.Count == 0 || barCodeBillSystemParameters.FTemplatepercon) + { + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId(base.View.Context, "UHIK_BAR_BarCodePrint"); + if (_noteTemplates != null && barCodeBillSystemParameters.FTemplatepercon) + { + _noteTemplates = GetPrint(_noteTemplates, "UHIK_BAR_BarCodePrint"); + } + } + + barcodeSysParm = barCodeBillSystemParameters; + } + + Field field = base.View.Model.BusinessInfo.GetField("FBCLOT"); + + base.View.GetBarItem("FEntityToBill", "tbCreateBarcodeLot").Visible = field != null; + + SetComboField(); + InitCustParam(e); + } + catch (Exception ex) + { + ////UNWLogger.Error(base.Context, "BarCodePrintEdit", "OnInitialize error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public override void OnLoad(EventArgs e) + { + IsCheck = 0; + try + { + base.OnLoad(e); + if (_isFromBill == 1) + { + base.View.Model.SetValue("FBillId", _sFormId); + base.View.Model.SetValue("FBarCodeRule", _sRuleId); + } + + if (base.View.OpenParameter.Status != OperationStatus.VIEW) + { + SetDefData(); + } + + if (_isFromBill == 1) + { + ApplyReturnData(listData); + } + + string defaultPrinter = GetDefaultPrinter(); + if (!string.IsNullOrWhiteSpace(defaultPrinter)) + { + base.View.Model.SetValue("FPrintAddress", defaultPrinter); + } + + if (_isFromBill == 1) + { + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.FAutoCreateBarCode) + { + base.View.Model.SetValue("FBillCheckBox", true); + CreateBarCode("TBCREBARCODEROW"); + WirteBackBarcodeSign(base.View.Context); + } + } + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "OnLoad error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public List GetPrint(List _noteTemplates, string type = "") + { + List list = new List(); + PrintTemplateSetting printTemplateSetting = PrintServiceHelper.GetPrintTemplateSetting(base.View.Context, type, base.Context.UserId); + foreach (EnumItem _noteTemplate in _noteTemplates) + { + if (printTemplateSetting.NoteTemplateEnable(_noteTemplate.EnumId)) + { + EnumItem enumItem = new EnumItem(); + enumItem.EnumId = _noteTemplate.EnumId; + enumItem.Value = _noteTemplate.EnumId; + enumItem.Caption = _noteTemplate.Caption; + list.Add(enumItem); + } + } + + return list; + } + + private void IsAutoPacking() + { + barcodeSysParm = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + base.View.Model.SetValue("FAutoPacking", barcodeSysParm.AutoCreatePaking); + _isAutoPacking = barcodeSysParm.AutoCreatePaking; + base.View.InvokeFieldUpdateService("FAutoPacking", 0); + base.View.Model.SetValue("FIsCustomerPolicy", barcodeSysParm.FTemplatePolicyType.Equals("3")); + _isCustomerPolicy = barcodeSysParm.FTemplatePolicyType.Equals("3"); + base.View.InvokeFieldUpdateService("FIsCustomerPolicy", 0); + if (barcodeSysParm.FTemplatePolicyType.Equals("3")) + { + base.View.Model.SetValue("FTempRadioGroup", 1); + } + + base.View.Model.SetValue("FLevelThreePacking", barcodeSysParm.FThreeLevelPacking); + _isThreePacking = barcodeSysParm.FThreeLevelPacking; + base.View.InvokeFieldUpdateService("FLevelThreePacking", 0); + base.View.Model.SetValue("FControlCreateNumber", barcodeSysParm.FControlCreateNumber); + _controlCreateNumber = barcodeSysParm.FControlCreateNumber; + base.View.InvokeFieldUpdateService("FControlCreateNumber", 0); + } + + public override void AfterBindData(EventArgs e) + { + try + { + base.AfterBindData(e); + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.FOpenBarPrintChainReq) + { + JSONObject jSONObject = new JSONObject(); + string typeName = "Kingdee.BOS.Core.ViewUtils,Kingdee.BOS.Core"; + Type type = Type.GetType(typeName); + MethodInfo methodInfo = ((type != null) ? type.GetMethod("FireClientCustomEvents", new Type[5] + { + typeof(IDynamicFormView), + typeof(string), + typeof(string), + typeof(int), + typeof(JSONObject) + }) : null); + if (methodInfo != null) + { + methodInfo.Invoke(null, new object[5] { base.View, "SetClientParams", "Custom.SetClientParams.SeqReqEnabled", 3000, jSONObject }); + } + } + + if (base.View.OpenParameter.Status != OperationStatus.VIEW) + { + SetDefData(); + } + + SetComboItems(); + ControlTempRadio(); + if (_isFromPrintList == 1) + { + LockPrintInfo(); + } + else + { + IsAutoPacking(); + } + + Field field = base.View.Model.BusinessInfo.GetField("FBCLOT"); + if (field != null) + { + base.View.GetBarItem("FEntityToBill", "tbCreateBarcodeLot").Visible = true; + } + else + { + base.View.GetBarItem("FEntityToBill", "tbCreateBarcodeLot").Visible = false; + } + + ResetIsPrint(); + } + catch (Exception ex) + { + throw ex; + } + } + + public void ResetIsPrint() + { + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (!barCodeBillSystemParameters.IsPrintNoCanPrint) + { + Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBar"); + DynamicObjectCollection entityDataObject = base.View.Model.GetEntityDataObject(entity); + for (int i = 0; i < entityDataObject.Count(); i++) + { + base.View.Model.SetValue("IsPrinted", false, i); + } + } + } + + private void ControlTempRadio() + { + string text = Model.GetValue("FTempRadioGroup").ToString(); + if (text.Equals("1")) + { + Model.SetValue("FAssistantType", null); + Model.SetValue("FAssistant", null); + base.View.GetControl("FCustomer").Enabled = true; + base.View.GetControl("FAssistantType").Enabled = false; + base.View.GetControl("FAssistant").Enabled = false; + return; + } + + if (text.Equals("2")) + { + Model.SetValue("FCustomer", null); + base.View.GetControl("FCustomer").Enabled = false; + base.View.GetControl("FAssistantType").Enabled = true; + base.View.GetControl("FAssistant").Enabled = true; + return; + } + + Model.SetValue("FAssistantType", null); + Model.SetValue("FAssistant", null); + if (!barcodeSysParm.FTemplatePolicyType.Equals("3")) + { + Model.SetValue("FCustomer", null); + } + + base.View.GetControl("FCustomer").Enabled = false; + base.View.GetControl("FAssistantType").Enabled = false; + base.View.GetControl("FAssistant").Enabled = false; + } + + private void InitBillNameFilter() + { + Field field = base.View.BusinessInfo.GetField("FBillId"); + BarCodeCommonServiceHelper.GetBarCodeBillFilter(base.Context, (BaseDataField)field); + } + + public void SetComboItems() + { + Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBar"); + DynamicObjectCollection entityDataObject = base.View.Model.GetEntityDataObject(entity); + ComboFieldEditor control = base.View.GetControl("FBarCodeModelToBar"); + control.SetComboItems(_noteTemplates); + } + + private bool IsCheckPermission(Context ctx, string formId, string permissionId) + { + return false; + + } + + public override void AfterCreateNewEntryRow(CreateNewEntryEventArgs e) + { + try + { + if (e.Entity.Key.EqualsIgnoreCase("FEntityToBill")) + { + base.View.Model.SetValue("FBARCODEMODELToBill", base.View.Model.GetValue("FBarCodeModel"), e.Row); + } + + base.AfterCreateNewEntryRow(e); + } + catch (Exception ex) + { + + throw ex; + } + } + + public override void BarItemClick(BarItemClickEventArgs e) + { + try + { + switch (e.BarItemKey.ToUpperInvariant()) + { + case "TBNEW": + _isFromPrintList = 0; + _isFromBill = 0; + _sRuleId = 0L; + _sFormId = string.Empty; + _sourceId = string.Empty; + break; + case "TBCHOOSEBILL": + { + int entryRowCount = base.View.Model.GetEntryRowCount("FEntityToBill"); + if (entryRowCount > 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("暂不支持追加选单!", "0011019000003945", SubSystemType.BASE)); + return; + } + + if (IsCheckPermission(base.Context, _permissionConst, "5709b1a2a857e6")) + { + e.Cancel = true; + base.View.ShowWarnningMessage(ResManager.LoadKDString("没有该操作权限!", "0011019000003162", SubSystemType.BASE)); + return; + } + + if (ChooseBillCtrl(_sFormId)) + { + e.Cancel = true; + return; + } + + OpenBarCodeGetBill(); + break; + } + } + + base.BarItemClick(e); + } + catch (Exception ex) + { + throw ex; + } + } + + public override void EntryBarItemClick(BarItemClickEventArgs e) + { + try + { + switch (e.BarItemKey.ToUpperInvariant()) + { + + case "TBBATCHFILL": + BatchFill(); + break; + case "BTNSELECTEDTICK": + SelectedTick(check: true); + break; + case "BTNSELECTEDNOTICK": + SelectedTick(check: false); + break; + case "BTNBARCODESELECTTICK": + BarcodeSelectedTick(check: true); + break; + case "BTNBARCODESELECTNOTICK": + BarcodeSelectedTick(check: false); + break; + case "TBCREBARCODESUM": + case "TBCREBARCODEROW": + { + Msg = ""; + DateTime now = DateTime.Now; + base.View.Model.Save(); + e.Cancel = CreateBarCode(e.BarItemKey.ToUpperInvariant()); + WirteBackBarcodeSign(base.View.Context); + //拓展功能-添加工单号-2025-6-24 + DynamicObject billtype = base.View.Model.GetValue("FBillId") as DynamicObject; + string formid = billtype["Id"].ToString(); + + base.View.UpdateView("FEntityToBar"); + ////拓展功能--返回源单单号 + if (Msg != "") + { + double num = DateTime.Now.Subtract(now).TotalMilliseconds / 1000.0; + Msg = Msg + Environment.NewLine + ResManager.LoadKDString("生成条码总耗时:", "1867c782d18041fe", "APP_ISVPAAC2016062210550") + Convert.ToString(num) + ResManager.LoadKDString("秒", "1c66015500d04260", "APP_ISVPAAC2016062210550"); + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.IsTimeConsumReminder) + { + base.View.ShowWarnningMessage(Msg); + } + e.Cancel = true; + return; + } + //// TODO 同步条码主档 + //SynchronizeCodeMain(); + break; + } + case "TBDELETELIST": + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + if (barcodeSysParm.FTemplatePolicyType.Equals("3")) + { + base.View.Model.SetValue("FCustomer", null); + } + + break; + case "TBGETNEWDATA": + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + BindBillData(); + base.View.UpdateView("FEntityToBill"); + break; + case "TBPRINTBARCODE": + if (IsCheckPermission(base.Context, _permissionConst, "570756a559fbbd")) + { + e.Cancel = true; + base.View.ShowMessage(ResManager.LoadKDString("您没有打印条码权限!", "0011019000003088", SubSystemType.BASE)); + return; + } + + PrintBarCode("print"); + break; + case "TBVIEWBARCODE": + if (IsCheckPermission(base.Context, _permissionConst, "570756a559fbbd")) + { + e.Cancel = true; + base.View.ShowMessage(ResManager.LoadKDString("您没有打印条码权限!", "0011019000003088", SubSystemType.BASE)); + return; + } + + PrintBarCode("preview"); + break; + case "TBBUTTONSAVING": + { + if (IsCheckPermission(base.Context, _permissionConst, "570756a559fbbd")) + { + e.Cancel = true; + base.View.ShowMessage(ResManager.LoadKDString("您没有打印条码权限!", "0011019000003088", SubSystemType.BASE)); + return; + } + + StringBuilder stringBuilder = CheckPrint(); + if (stringBuilder.Length > 0) + { + e.Cancel = true; + base.View.ShowMessage(stringBuilder.ToString()); + return; + } + + IOperationResult operationResult = base.View.Model.Save(); + SavingPrintBarCode(); + break; + } + case "TBSPLITCOPYROW": + { + ExtendedDataEntitySet extendedDataEntitySet2 = new ExtendedDataEntitySet(); + extendedDataEntitySet2.Parse(new DynamicObject[1] { base.View.Model.DataObject }, base.View.Model.BusinessInfo); + ExtendedDataEntity[] source = (from p in extendedDataEntitySet2.FindByEntityKey("FEntityToBill") + where p.DataEntity["BillCheckBox"].ToString().EqualsIgnoreCase("True") + select p).ToArray(); + if (source.Count() < 1) + { + e.Cancel = true; + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择源单明细行!", "0011019000003163", SubSystemType.BASE)); + return; + } + + if (source.Count() > 1) + { + e.Cancel = true; + base.View.ShowErrMessage(ResManager.LoadKDString("仅支持选择一个源单明细行进行复制", "a7144aece14441c4", "APP_ISVPAAC2016062210550")); + return; + } + + OpenBarcodePrintSplitCopyRowEdit(source.FirstOrDefault()); + break; + } + case "COPYROW": + { + int[] selectedRows = base.View.GetControl("FEntityToBill").GetSelectedRows(); + selectedRows = selectedRows.OrderBy((int x) => x).ToArray(); + if (selectedRows.Count() < 1) + { + e.Cancel = true; + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择需要复制的源单明细行!", "0011019000003163", SubSystemType.BASE)); + return; + } + + int rowIndex = 0; + int count = base.View.Model.GetEntryRowCount("FEntityToBill"); + Util.ForEach((IEnumerable)selectedRows, (Action)delegate (int X) + { + AssociatedCopyRowUtil.CopyRow(base.View, "FEntityToBill", Convert.ToInt32(X), count + rowIndex, false, (OperationParmListParameter)null, true, (List)null); + rowIndex++; + }); + break; + } + case "TBCREATEBARCODELOT": + { + Field field = base.View.BusinessInfo.GetField("FBCLOT"); + int entryRowCount = base.View.Model.GetEntryRowCount("FEntityToBill"); + if (field == null || entryRowCount <= 0) + { + e.Cancel = true; + return; + } + + string strSQL = "SELECT ISNULL(MAX(FBCLOT),0)+1 as NEWBCLOT FROM T_UN_BARCODELOT;"; + DynamicObject dynamicObject = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text).FirstOrDefault(); + string text = Convert.ToString(dynamicObject["NEWBCLOT"]).PadLeft(6, '0'); + for (int j = 0; j < entryRowCount; j++) + { + base.View.Model.SetValue(field.Key, text, j); + } + + string strSQL2 = ((text == "000001") ? string.Format("INSERT INTO T_UN_BARCODELOT(FBCLOT,FLASTUPDATETIME,FLASTUSERID) VALUES(1,{0},{1});", (base.Context.DatabaseType == DatabaseType.MS_SQL_Server) ? "getdate()" : "sysdate", base.Context.UserId) : string.Format("UPDATE T_UN_BARCODELOT SET FBCLOT=FBCLOT+1,FLASTUPDATETIME={0},FLASTUSERID={1};", (base.Context.DatabaseType == DatabaseType.MS_SQL_Server) ? "getdate()" : "sysdate", base.Context.UserId)); + DBUtils.Execute(base.Context, strSQL2); + break; + } + case "TBBARCODEPACKING": + { + long defaultPackageRule = BarCodeCommonServiceHelper.GetDefaultPackageRule(base.Context); + if (defaultPackageRule > 0) + { + ExtendedDataEntitySet extendedDataEntitySet = new ExtendedDataEntitySet(); + extendedDataEntitySet.Parse(new DynamicObject[1] { base.View.Model.DataObject }, base.View.Model.BusinessInfo); + ExtendedDataEntity[] array = (from p in extendedDataEntitySet.FindByEntityKey("FEntityToBar") + where p.DataEntity["BarCodeCheck"].ToString().EqualsIgnoreCase("True") + select p).ToArray(); + if (array.Count() < 1) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择需要装箱的条码", "630d107d728e4b6a", "APP_ISVPAAC2016062210550")); + e.Cancel = true; + return; + } + + List list = new List(); + ExtendedDataEntity[] array2 = array; + for (int i = 0; i < array2.Length; i++) + { + ExtendedDataEntity extendedDataEntity = array2[i]; + list.Add(extendedDataEntity.DataEntity); + } + + BarcodePacking(defaultPackageRule, list.ToArray()); + break; + } + + base.View.ShowWarnningMessage(ResManager.LoadKDString("没有设置默认的包装条码规则!", "06558d54344e4daa", "APP_ISVPAAC2016062210550")); + e.Cancel = true; + return; + } + case "TBSYNCHRONIZE": + { + // 同步条码主档 + SynchronizeCodeMain(); + return; + } + } + + base.EntryBarItemClick(e); + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "BarItemClick error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + private StringBuilder CheckPrint() + { + DynamicObjectCollection source = base.View.Model.DataObject["BD_BARCODEPRINTENTRYBAR"] as DynamicObjectCollection; + DynamicObject[] source2 = source.Where((DynamicObject p) => p["BarCodeCheck"].ToString().EqualsIgnoreCase("True")).ToArray(); + StringBuilder text = new StringBuilder(); + if (source2.Count() > 0) + { + Util.ForEach(source2.Where((DynamicObject p) => KUtil.Get(p, "PrintNumber") == 0m), (Action)delegate (DynamicObject p, int r) + { + text.AppendFormat(ResManager.LoadKDString("第【{0}】行 ,打印数不能为空!", "b1158e1effdf4a84", "APP_ISVPAAC2016062210550"), r + 1).AppendLine(); + }); + } + else + { + text.AppendFormat(ResManager.LoadKDString("请选择要打印的行!", "334a1b226b0243e1", "APP_ISVPAAC2016062210550")); + } + + return text; + } + + private void BatchFill() + { + string entryCurrentFieldKey = Model.GetEntryCurrentFieldKey("FEntityToBill"); + if (entryCurrentFieldKey.ToUpper() == "FBARCODEFIELDRULETOBILL") + { + int entryCurrentRowIndex = Model.GetEntryCurrentRowIndex("FEntityToBill"); + ExtendedDataEntitySet extendedDataEntitySet = new ExtendedDataEntitySet(); + extendedDataEntitySet.Parse(new DynamicObject[1] { base.View.Model.DataObject }, base.View.Model.BusinessInfo); + ExtendedDataEntity[] array = extendedDataEntitySet.FindByEntityKey("FEntityToBill").ToArray(); + DynamicObject dataEntity = array[entryCurrentRowIndex].DataEntity; + DynamicObject dynamicObject = dataEntity["BARCODEFIELDRULE"] as DynamicObject; + int num = 0; + if (dynamicObject != null) + { + num = Convert.ToInt32(dynamicObject["Id"]); + } + + int num2 = array.Count(); + for (int i = 0; i < num2; i++) + { + DynamicObject dataEntity2 = array[i].DataEntity; + dataEntity2["BARCODEFIELDRULE"] = dynamicObject; + dataEntity2["BARCODEFIELDRULE_Id"] = Convert.ToString(num); + } + + base.View.UpdateView("FEntityToBill"); + } + } + + private void BarcodePacking(long packCodeRuleId, DynamicObject[] detailCodes) + { + //IL_005d: Unknown result type (might be due to invalid IL or missing references) + //IL_0063: Expected O, but got Unknown + //IL_015b: Unknown result type (might be due to invalid IL or missing references) + //IL_0162: Expected O, but got Unknown + DynamicObjectType dynamicObjectType = base.View.BusinessInfo.GetEntryEntity("FEntityToBill").DynamicObjectType; + DynamicObject dynamicObject = new DynamicObject(dynamicObjectType); + dynamicObject["CreateNumber"] = 1; + dynamicObject["BARCODERULE_Id"] = packCodeRuleId; + ExtendedDataEntity[] sourceArray = new ExtendedDataEntity[1] + { + new ExtendedDataEntity(dynamicObject, 0, 0) + }; + BarCodeCreateResult val = new BarCodeCreateResult(); + ExtendedDataEntity[] array = new ExtendedDataEntity[1]; + Array.ConstrainedCopy(sourceArray, 0, array, 0, 1); + val = BarCodeCreateServiceHelper.BarCodeCreateByRule(base.Context, base.View.BusinessInfo, packCodeRuleId, array); + string text = ""; + if (val.AllDataRight) + { + Dictionary> value = val.BoxContrastNumbers[0].Value; + foreach (KeyValuePair> item4 in value) + { + List value2 = item4.Value; + List list = (from p in item4.Value.Distinct() + where !p.IsNullOrEmptyOrWhiteSpace() + select p).ToList(); + text = list[0].ToString(); + } + } + + if (!text.IsNullOrEmptyOrWhiteSpace()) + { + List list2 = new List(); + BarCodeBoxUpArgs val2 = new BarCodeBoxUpArgs(); + val2.OperationType = 0L; + val2.PackageBarCode = text; + foreach (DynamicObject dynamicObject2 in detailCodes) + { + string item = Convert.ToString(dynamicObject2["BarCode"]); + decimal item2 = Convert.ToDecimal(Convert.ToString(dynamicObject2["QtyToBar"])); + string item3 = ""; + val2.ListChilds.Add(item); + val2.ListChildsQty.Add(item2); + val2.ListChildsRemark.Add(item3); + } + + string[] array2 = DBServiceHelper.CreateTemporaryTableName(base.Context, 3); + string createSql = string.Format("IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = '{0}' ) \r\n CREATE TABLE {0}\r\n (\r\n FPACKAGING NVARCHAR(255) NOT NULL DEFAULT ' '\r\n );", array2[0]); + string createSql2 = string.Format("IF NOT EXISTS(SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = '{0}')\r\n CREATE TABLE {0}\r\n (\r\n\t FID INT NOT NULL DEFAULT(0),\r\n FENTRYID INT NOT NULL DEFAULT(0),\r\n\t FBARCODE NVARCHAR(255) NOT NULL DEFAULT ' '\r\n );", array2[1]); + DataTable dataTable = new DataTable(); + dataTable.TableName = array2[0]; + dataTable.Columns.Add("FPACKAGING", typeof(string)); + dataTable.BeginLoadData(); + DataTable dataTable2 = new DataTable(); + dataTable2.TableName = array2[1]; + dataTable2.Columns.Add("FID", typeof(int)); + dataTable2.Columns.Add("FENTRYID", typeof(int)); + dataTable2.Columns.Add("FBARCODE", typeof(string)); + dataTable2.BeginLoadData(); + List list3 = new List { dataTable, dataTable2 }; + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder = BarCodePackingServiceHelper.GetPackInfoSQL(base.Context, new List { val2 }, ref list2, ref list3); + list3[0].EndLoadData(); + DBServiceHelper.BulkInserts(base.Context, string.Empty, createSql, list3[0]); + list3[1].EndLoadData(); + DBServiceHelper.BulkInserts(base.Context, string.Empty, createSql2, list3[1]); + stringBuilder.AppendFormat("IF NOT EXISTS(SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = '{0}')\r\n CREATE TABLE {0}\r\n (\r\n FPACKAGING NVARCHAR(255) NOT NULL DEFAULT ' ',\r\n\t FSUMQTY DECIMAL(23,10) NOT NULL DEFAULT 0,\r\n\t FENTRYCOUNT INT NOT NULL DEFAULT 0\r\n );", array2[2]); + DBUtils.Execute(base.Context, stringBuilder.ToString()); + try + { + bool flag = BarCodePackingServiceHelper.UpdateUpPackage(base.Context, array2); + } + finally + { + DBServiceHelper.DeleteTemporaryTableName(base.Context, array2); + } + + if (list2 != null && list2.Count() > 0) + { + OpenUnPackagingForm(list2.FirstOrDefault()); + } + } + } + + private void OpenUnPackagingForm(string packagingId) + { + BillShowParameter billShowParameter = new BillShowParameter(); + billShowParameter.ParentPageId = base.View.PageId; + billShowParameter.MultiSelect = false; + billShowParameter.FormId = "UN_Packaging"; + billShowParameter.PKey = packagingId; + billShowParameter.Status = OperationStatus.EDIT; + billShowParameter.OpenStyle.ShowType = ShowType.Default; + base.View.ShowForm(billShowParameter); + } + + private void OpenBarcodePrintSplitCopyRowEdit(ExtendedDataEntity entity) + { + DynamicObject dataEntity = entity.DataEntity; + decimal num = Convert.ToDecimal(dataEntity["Qty"]); + int rowIndex = entity.RowIndex; + DynamicFormShowParameter dynamicFormShowParameter = new DynamicFormShowParameter(); + dynamicFormShowParameter.MultiSelect = false; + dynamicFormShowParameter.ParentPageId = base.View.PageId; + dynamicFormShowParameter.FormId = "BarCodePrintCopyRow"; + dynamicFormShowParameter.CustomParams.Add("srcQty", Convert.ToString(num)); + dynamicFormShowParameter.CustomParams.Add("srcIndex", rowIndex.ToString()); + base.View.ShowForm(dynamicFormShowParameter, AfterShowLock); + } + + protected void AfterShowLock(FormResult result) + { + if (result.ReturnData != null) + { + JObject val = (JObject)result.ReturnData; + string value = ((object)val["srcQty"]).ToString(); + string value2 = ((object)val["srcIndex"]).ToString(); + decimal num = Convert.ToDecimal(((object)val["newQty"]).ToString()); + decimal num2 = Convert.ToDecimal(((object)val["minPackCount"]).ToString()); + int num3 = Convert.ToInt32(((object)val["createNum"]).ToString()); + string text = Convert.ToString(val["copyLoc"]); + Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBill"); + base.View.Model.SetValue("FQty", Convert.ToDecimal(value), Convert.ToInt32(value2)); + int num4 = ((!text.IsNullOrEmptyOrWhiteSpace() && text.Equals("B")) ? base.View.Model.GetEntryRowCount("FEntityToBill") : (Convert.ToInt32(value2) + 1)); + AssociatedCopyRowUtil.CopyRow(base.View, "FEntityToBill", Convert.ToInt32(value2), num4, false, (OperationParmListParameter)null, true, (List)null); + DynamicObject entityDataObject = base.View.Model.GetEntityDataObject(entity, Convert.ToInt32(value2)); + DynamicObject entityDataObject2 = base.View.Model.GetEntityDataObject(entity, num4); + entityDataObject2["LOT_Id"] = entityDataObject["LOT_Id"]; + entityDataObject2["LOT"] = entityDataObject["LOT"]; + entityDataObject2["LOT_Text"] = entityDataObject["LOT_Text"]; + IDBService service = ServiceHelper.GetService(); + service.AutoSetPrimaryKey(base.Context, new DynamicObject[1] { entityDataObject2 }, entity.DynamicObjectType); + base.View.Model.SetValue("FQty", num, num4); + base.View.Model.SetValue("FMinPackCount", 1, num4); + base.View.Model.SetValue("FCreateNumber", 1, num4); + base.View.UpdateView("FEntityToBill"); + } + } + + public void SelectedTick(bool check) + { + List list = base.View.GetControl("FEntityToBill").GetSelectedRows().ToList(); + list.ForEach(delegate (int X) + { + Model.SetValue("FBillCheckBox", check, X); + }); + } + + public void BarcodeSelectedTick(bool check) + { + List list = base.View.GetControl("FEntityToBar").GetSelectedRows().ToList(); + list.ForEach(delegate (int X) + { + Model.SetValue("FBarCodeCheck", check, X); + }); + } + + private bool CreateBarCode(string sType) + { + BarCodeSysParamsModel barcodecreatesysparam = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + + + if (_isAutoPacking && _sBoxRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入默认包装条码规则!", "58d194b2aae944ca", "APP_ISVPAAC2016062210550")); + return true; + } + + if (_isThreePacking && _sCenterBoxRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入中包装条码规则!", "2d6674718ec34edf", "APP_ISVPAAC2016062210550")); + return true; + } + + ExtendedDataEntitySet extendedDataEntitySet = new ExtendedDataEntitySet(); + extendedDataEntitySet.Parse(new DynamicObject[1] { base.View.Model.DataObject }, base.View.Model.BusinessInfo); + ExtendedDataEntity[] entitys = (from p in extendedDataEntitySet.FindByEntityKey("FEntityToBill") + where p.DataEntity["BillCheckBox"].ToString().EqualsIgnoreCase("True") + select p).ToArray(); + if (entitys.Count() < 1) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择源单明细行!", "0011019000003163", SubSystemType.BASE)); + return true; + } + + caculateCountInfos = GetCountMsg(entitys, GetCaculateCount()); + int iCount = entitys.Count(); + int num = 0; + long num2 = 0L; + _ctrlBatchCreate = false; + HashSet hashSet = new HashSet(); + List list = new List(); + for (int i = 0; i < iCount; i++) + { + CheckCreateQty(entitys[i].RowIndex, barcodecreatesysparam); + DynamicObject dataEntity = entitys[i].DataEntity; + int num3 = ((dataEntity["CreateNumber"] != null) ? Convert.ToInt32(dataEntity["CreateNumber"]) : 0); + int num4 = ((dataEntity["MaterialId_Id"] != null) ? Convert.ToInt32(dataEntity["MaterialId_Id"]) : 0); + if (dataEntity["MinPackCount"] == null || Convert.ToDecimal(dataEntity["MinPackCount"]) <= 0m) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("最小包装数不可为零!", "2b03fcaca96444e5", "APP_ISVPAAC2016062210550")); + return true; + } + + DynamicObject dynamicObject = dataEntity["BARCODERULE"] as DynamicObject; + long num5 = ((dynamicObject != null) ? Convert.ToInt64(dynamicObject["Id"]) : 0); + if (hashSet.Add(num5) || list == null || list.Count <= 0) + { + list = GetRuleBarcodeItem(num5); + } + + if (list != null && list.Count() > 0) + { + string text = string.Empty; + foreach (string item in list) + { + Field field = base.View.BusinessInfo.GetField(item); + if (field == null || !field.IsMustInput()) + { + continue; + } + + string value = Convert.ToString(dataEntity[field.PropertyName]); + if (field is LotField && value.IsNullOrEmptyOrWhiteSpace()) + { + value = Convert.ToString(dataEntity[field.PropertyName + "_Text"]); + } + + if (!value.IsNullOrEmptyOrWhiteSpace()) + { + continue; + } + + if (field.FieldName.Equals("FLOT") || field.FieldName.Equals("FPRODUCTIONDATE") || field.FieldName.Equals("FEXPIRATIONDATE")) + { + if (IsWarningByMaterial(field, num4)) + { + text = text + field.Name.ToString(base.Context.UserLocale) + ","; + } + } + else + { + text = text + field.Name.ToString(base.Context.UserLocale) + ","; + } + } + + if (!text.IsNullOrEmptyOrWhiteSpace()) + { + base.View.ShowWarnningMessage(string.Format(ResManager.LoadKDString("存在必录字段{0}为空,不允许生成条码", "cfa79f2c6ec0488e", "APP_ISVPAAC2016062210550"), text.TrimEnd(','))); + return true; + } + } + + if (i == 0) + { + num2 = num5; + } + + if (i != 0 && dynamicObject != null && Convert.ToBoolean(dynamicObject["FBatchCreateBarcode"]) && !num2.Equals(num5)) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("条码规则允许批量生成条码时,不可以使用多个规则!", "429b4cf05c444463", "APP_ISVPAAC2016062210550")); + return true; + } + + if (dynamicObject != null && Convert.ToBoolean(dynamicObject["FBatchCreateBarcode"])) + { + _ctrlBatchCreate = true; + } + + num += num3; + } + + if (num > 10000 && !_ctrlBatchCreate) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("一次性生成条码数量过多可能会造成系统错误,建议一次生成条码总数不要超过10000!", "0011019000003983", SubSystemType.BASE)); + return true; + } + + if (num > 200000 && _ctrlBatchCreate) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("一次性生成条码数量过多可能会造成系统错误,建议一次生成条码总数不要超过200000!", "6ff0e30220d441f8", "APP_ISVPAAC2016062210550")); + return true; + } + + //UNWLogger.Info(base.Context, "BarCode EntryBarItemClick", "AllowScanCreate:" + barcodecreatesysparam.AllowScanCreate + "OrgID" + base.Context.CurrentOrganizationInfo.ID + "FormID" + _sFormId); + if (!barcodecreatesysparam.AllowScanCreate.EqualsIgnoreCase("1")) + { + string text2 = string.Empty; + string empty = string.Empty; + Dictionary> dictionary = new Dictionary>(); + for (int j = 0; j < iCount; j++) + { + DynamicObject dataEntity2 = entitys[j].DataEntity; + empty = ((dataEntity2["BILLCODE"] != null) ? Convert.ToString(dataEntity2["BILLCODE"]) : string.Empty); + if (!empty.IsEmpty()) + { + string key = empty + "," + dataEntity2["BILLSEQ"]; + if (dictionary.ContainsKey(key)) + { + List list2 = dictionary[key]; + list2.Add(j + 1); + } + else + { + List list3 = new List(); + list3.Add(j + 1); + dictionary.Add(key, list3); + } + } + } + + if (dictionary.Count() > 0) + { + string text3 = string.Join("','", dictionary.Keys.Select((string p) => p.Split(',')[0]).ToArray()); + string text4 = string.Join(",", dictionary.Keys.Select((string p) => p.Split(',')[1]).ToArray()); + DynamicObjectCollection dynamicObjectCollection = BarCodePrintServiceHelper.IsRepetPrinted(base.Context, text3, text4, _sFormId); + foreach (DynamicObject item2 in dynamicObjectCollection) + { + string text5 = Convert.ToString(item2["FBILLCODE"]); + string text6 = Convert.ToString(item2["FBILLSEQ"]); + string key2 = text5 + "," + text6; + if (dictionary.ContainsKey(key2)) + { + List values = dictionary[key2]; + text2 = text2 + "," + string.Join(",", values); + } + } + } + + //UNWLogger.Info(base.Context, "BarCode EntryBarItemClick", "isCreateMsg:" + text2); + if (!text2.IsEmpty() && text2.Length > 0) + { + if (barcodecreatesysparam.AllowScanCreate.EqualsIgnoreCase("3")) + { + base.View.ShowMessage(string.Format(ResManager.LoadKDString("当前行【{0}】对应的单据和物料已经生成过条码!", "53a1b34d8ef2408f", "APP_ISVPAAC2016062210550"), text2.Substring(1))); + return true; + } + + if (barcodecreatesysparam.AllowScanCreate.EqualsIgnoreCase("2")) + { + base.View.ShowMessage(string.Format(ResManager.LoadKDString("当前行【{0}】对应的单据和物料已经生成过条码!", "53a1b34d8ef2408f", "APP_ISVPAAC2016062210550"), text2.Substring(1)), MessageBoxOptions.YesNo, delegate (MessageBoxResult result) + { + if (result == MessageBoxResult.Yes) + { + if (barcodecreatesysparam.AsyncCreateBarCode) + { + AsyncCreateBarCode(entitys, iCount, sType); + } + else + { + SyncCreateBarCode(entitys, iCount, sType); + } + } + }); + } + } + else if (barcodecreatesysparam.AsyncCreateBarCode) + { + AsyncCreateBarCode(entitys, iCount, sType); + } + else + { + SyncCreateBarCode(entitys, iCount, sType); + } + } + else if (barcodecreatesysparam.AsyncCreateBarCode) + { + AsyncCreateBarCode(entitys, iCount, sType); + } + else + { + SyncCreateBarCode(entitys, iCount, sType); + } + + + + return false; + } + + private bool IsWarningByMaterial(Field field, long materialId) + { + try + { + if (materialId > 0) + { + string strSQL = "SELECT FISBATCHMANAGE,FISKFPERIOD FROM T_BD_MATERIAL T1\r\n INNER JOIN t_BD_MaterialStock T2 ON T1.FMASTERID=T2.FMATERIALID\r\n AND T1.FMATERIALID=@materialId AND T1.FUSEORGID=@useOrgId"; + SqlParam sqlParam = new SqlParam("@materialId", KDDbType.Int64, materialId); + SqlParam sqlParam2 = new SqlParam("@useOrgId", KDDbType.Int64, base.Context.CurrentOrganizationInfo.ID); + DynamicObject dynamicObject = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, sqlParam, sqlParam2).FirstOrDefault(); + if (dynamicObject != null) + { + string text = Convert.ToString(dynamicObject["FISBATCHMANAGE"]); + string text2 = Convert.ToString(dynamicObject["FISKFPERIOD"]); + if (text.Equals("1") && field is LotField && field.FieldName.Equals("FLOT")) + { + return true; + } + + if (text2.Equals("1") && field is DateTimeField && (field.FieldName.Equals("FPRODUCTIONDATE") || field.FieldName.Equals("FEXPIRATIONDATE"))) + { + return true; + } + } + } + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } + + return false; + } + + private int GetCaculateCount() + { + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, ""); + int result = 0; + if (barCodeBillSystemParameters.FCaculateCount == "2") + { + if (barCodeBillSystemParameters.AutoCreatePaking) + { + result = 2; + } + + if (barCodeBillSystemParameters.FThreeLevelPacking) + { + result = 3; + } + + if (!barCodeBillSystemParameters.AutoCreatePaking && !barCodeBillSystemParameters.FThreeLevelPacking) + { + result = 1; + } + } + + if (barCodeBillSystemParameters.FCaculateCount == "3") + { + if (barCodeBillSystemParameters.AutoCreatePaking) + { + result = 5; + } + + if (barCodeBillSystemParameters.FThreeLevelPacking) + { + result = 6; + } + + if (!barCodeBillSystemParameters.AutoCreatePaking && !barCodeBillSystemParameters.FThreeLevelPacking) + { + result = 4; + } + } + + return result; + } + + private List GetCountMsg(ExtendedDataEntity[] entitys, int count) + { + List list = new List(); + int num = entitys.Count(); + if (count == 1) + { + for (int i = 0; i < num; i++) + { + bool flag = false; + CaculateCountInfo caculateCountInfo = new CaculateCountInfo(); + caculateCountInfo.bigRule = "0"; + caculateCountInfo.midRule = "0"; + caculateCountInfo.materialId = 0; + caculateCountInfo.index = 0; + caculateCountInfo.caculateCount = 0; + DynamicObject dataEntity = entitys[i].DataEntity; + int num2 = ((dataEntity["CreateNumber"] != null) ? Convert.ToInt32(dataEntity["CreateNumber"]) : 0); + int MaterialId3 = ((dataEntity["MaterialId_Id"] != null) ? Convert.ToInt32(dataEntity["MaterialId_Id"]) : 0); + if (!(MaterialId3.ToString() != "0")) + { + continue; + } + + if (list.Where((CaculateCountInfo u) => u.materialId == MaterialId3).Count() > 0) + { + caculateCountInfo = list.Where((CaculateCountInfo u) => u.materialId == MaterialId3).FirstOrDefault(); + flag = true; + } + + caculateCountInfo.materialId = MaterialId3; + caculateCountInfo.caculateCount += num2; + if (!flag) + { + list.Add(caculateCountInfo); + } + } + } + + if (count == 4) + { + CaculateCountInfo caculateCountInfo2 = new CaculateCountInfo(); + caculateCountInfo2.bigRule = "0"; + caculateCountInfo2.midRule = "0"; + caculateCountInfo2.materialId = 0; + caculateCountInfo2.index = 0; + for (int j = 0; j < num; j++) + { + DynamicObject dataEntity2 = entitys[j].DataEntity; + int num3 = ((dataEntity2["CreateNumber"] != null) ? Convert.ToInt32(dataEntity2["CreateNumber"]) : 0); + caculateCountInfo2.caculateCount += num3; + } + + list.Add(caculateCountInfo2); + } + + if (count == 2) + { + for (int k = 0; k < num; k++) + { + bool flag2 = false; + CaculateCountInfo caculateCountInfo3 = new CaculateCountInfo(); + caculateCountInfo3.bigRule = "0"; + caculateCountInfo3.midRule = "0"; + caculateCountInfo3.barcodeboxrule = 0; + caculateCountInfo3.materialId = 0; + caculateCountInfo3.index = 0; + caculateCountInfo3.caculateCount = 0; + DynamicObject dataEntity3 = entitys[k].DataEntity; + int num4 = ((dataEntity3["CreateBoxNumber"] != null) ? Convert.ToInt32(dataEntity3["CreateBoxNumber"]) : 0); + int MaterialId2 = ((dataEntity3["MaterialId_Id"] != null) ? Convert.ToInt32(dataEntity3["MaterialId_Id"]) : 0); + int barcodeboxrule2 = ((dataEntity3["BARCODEBOXRULE_Id"] != null) ? Convert.ToInt32(dataEntity3["BARCODEBOXRULE_Id"]) : 0); + if (list.Where((CaculateCountInfo u) => u.materialId == MaterialId2 && u.barcodeboxrule == barcodeboxrule2).Count() > 0) + { + caculateCountInfo3 = list.Where((CaculateCountInfo u) => u.materialId == MaterialId2 && u.barcodeboxrule == barcodeboxrule2).FirstOrDefault(); + flag2 = true; + } + + caculateCountInfo3.materialId = MaterialId2; + caculateCountInfo3.caculateCount += num4; + caculateCountInfo3.barcodeboxrule = barcodeboxrule2; + if (!flag2) + { + list.Add(caculateCountInfo3); + } + } + } + + if (count == 5) + { + CaculateCountInfo caculateCountInfo4 = new CaculateCountInfo(); + bool flag3 = false; + caculateCountInfo4.bigRule = "0"; + caculateCountInfo4.midRule = "0"; + caculateCountInfo4.barcodeboxrule = 0; + caculateCountInfo4.materialId = 0; + caculateCountInfo4.index = 0; + caculateCountInfo4.caculateCount = 0; + for (int l = 0; l < num; l++) + { + DynamicObject dataEntity4 = entitys[l].DataEntity; + int num5 = ((dataEntity4["CreateBoxNumber"] != null) ? Convert.ToInt32(dataEntity4["CreateBoxNumber"]) : 0); + int barcodeboxrule = ((dataEntity4["BARCODEBOXRULE_Id"] != null) ? Convert.ToInt32(dataEntity4["BARCODEBOXRULE_Id"]) : 0); + if (list.Where((CaculateCountInfo u) => u.barcodeboxrule == barcodeboxrule).Count() > 0) + { + caculateCountInfo4 = list.Where((CaculateCountInfo u) => u.barcodeboxrule == barcodeboxrule).FirstOrDefault(); + flag3 = true; + } + + caculateCountInfo4.caculateCount += num5; + caculateCountInfo4.barcodeboxrule = barcodeboxrule; + if (!flag3) + { + list.Add(caculateCountInfo4); + } + } + } + + if (count == 3) + { + for (int m = 0; m < num; m++) + { + bool flag4 = false; + CaculateCountInfo caculateCountInfo5 = new CaculateCountInfo(); + caculateCountInfo5.bigRule = "0"; + caculateCountInfo5.midRule = "0"; + caculateCountInfo5.barcodeboxrule = 0; + caculateCountInfo5.materialId = 0; + caculateCountInfo5.index = 0; + caculateCountInfo5.caculateCount = 0; + DynamicObject dataEntity5 = entitys[m].DataEntity; + int num6 = ((dataEntity5["FCenterCreateNumber"] != null) ? Convert.ToInt32(dataEntity5["FCenterCreateNumber"]) : 0); + int num7 = ((dataEntity5["FBigCreateNumber"] != null) ? Convert.ToInt32(dataEntity5["FBigCreateNumber"]) : 0); + int MaterialId = ((dataEntity5["MaterialId_Id"] != null) ? Convert.ToInt32(dataEntity5["MaterialId_Id"]) : 0); + int midRule2 = ((dataEntity5["FCentreBoxRuleToBill_Id"] != null) ? Convert.ToInt32(dataEntity5["FCentreBoxRuleToBill_Id"]) : 0); + int bigRule2 = ((dataEntity5["FBigBoxRuleToBill_Id"] != null) ? Convert.ToInt32(dataEntity5["FBigBoxRuleToBill_Id"]) : 0); + if (bigRule2 != 0) + { + if (list.Where((CaculateCountInfo u) => u.materialId == MaterialId && u.bigRule == bigRule2.ToString()).Count() > 0) + { + caculateCountInfo5 = list.Where((CaculateCountInfo u) => u.materialId == MaterialId && u.bigRule == bigRule2.ToString()).FirstOrDefault(); + flag4 = true; + } + + caculateCountInfo5.materialId = MaterialId; + caculateCountInfo5.caculateCount += num7; + caculateCountInfo5.bigRule = bigRule2.ToString(); + if (!flag4) + { + list.Add(caculateCountInfo5); + } + + continue; + } + + if (list.Where((CaculateCountInfo u) => u.materialId == MaterialId && u.midRule == midRule2.ToString()).Count() > 0) + { + caculateCountInfo5 = list.Where((CaculateCountInfo u) => u.materialId == MaterialId && u.midRule == midRule2.ToString()).FirstOrDefault(); + flag4 = true; + } + + caculateCountInfo5.materialId = MaterialId; + caculateCountInfo5.caculateCount += num6; + caculateCountInfo5.midRule = midRule2.ToString(); + if (!flag4) + { + list.Add(caculateCountInfo5); + } + } + } + + if (count == 6) + { + for (int n = 0; n < num; n++) + { + bool flag5 = false; + CaculateCountInfo caculateCountInfo6 = new CaculateCountInfo(); + caculateCountInfo6.bigRule = "0"; + caculateCountInfo6.midRule = "0"; + caculateCountInfo6.barcodeboxrule = 0; + caculateCountInfo6.materialId = 0; + caculateCountInfo6.index = 0; + caculateCountInfo6.caculateCount = 0; + DynamicObject dataEntity6 = entitys[n].DataEntity; + int num8 = ((dataEntity6["FCenterCreateNumber"] != null) ? Convert.ToInt32(dataEntity6["FCenterCreateNumber"]) : 0); + int num9 = ((dataEntity6["FBigCreateNumber"] != null) ? Convert.ToInt32(dataEntity6["FBigCreateNumber"]) : 0); + int midRule = ((dataEntity6["FCentreBoxRuleToBill_Id"] != null) ? Convert.ToInt32(dataEntity6["FCentreBoxRuleToBill_Id"]) : 0); + int bigRule = ((dataEntity6["FBigBoxRuleToBill_Id"] != null) ? Convert.ToInt32(dataEntity6["FBigBoxRuleToBill_Id"]) : 0); + if (bigRule != 0) + { + if (list.Where((CaculateCountInfo u) => u.bigRule == bigRule.ToString()).Count() > 0) + { + caculateCountInfo6 = list.Where((CaculateCountInfo u) => u.bigRule == bigRule.ToString()).FirstOrDefault(); + flag5 = true; + } + + caculateCountInfo6.caculateCount += num9; + caculateCountInfo6.bigRule = bigRule.ToString(); + if (!flag5) + { + list.Add(caculateCountInfo6); + } + + continue; + } + + if (list.Where((CaculateCountInfo u) => u.midRule == midRule.ToString()).Count() > 0) + { + caculateCountInfo6 = list.Where((CaculateCountInfo u) => u.midRule == midRule.ToString()).FirstOrDefault(); + flag5 = true; + } + + caculateCountInfo6.caculateCount += num8; + caculateCountInfo6.midRule = midRule.ToString(); + if (!flag5) + { + list.Add(caculateCountInfo6); + } + } + } + + return list; + } + + private void setCaculate() + { + int caculateCount = GetCaculateCount(); + DynamicObjectCollection dynamicObjectCollection = (DynamicObjectCollection)Model.DataObject["BD_BARCODEPRINTENTRYBAR"]; + if (caculateCount == 1) + { + int caculateCount2 = dynamicObjectCollection.Where((DynamicObject p) => Convert.ToString(p["MaterialIdToBar_Id"]).Equals("0")).Count(); + CaculateCountInfo caculateCountInfo = new CaculateCountInfo(); + caculateCountInfo.bigRule = "0"; + caculateCountInfo.midRule = "0"; + caculateCountInfo.materialId = 0; + caculateCountInfo.index = 0; + caculateCountInfo.caculateCount = caculateCount2; + caculateCountInfos.Add(caculateCountInfo); + for (int i = 0; i < dynamicObjectCollection.Count(); i++) + { + int materialId2 = Convert.ToInt32(dynamicObjectCollection[i]["MaterialIdToBar_Id"]); + CaculateCountInfo caculateCountInfo2 = caculateCountInfos.Where((CaculateCountInfo u) => u.materialId == materialId2).FirstOrDefault(); + if (caculateCountInfo2 != null) + { + caculateCountInfo2.index++; + dynamicObjectCollection[i]["FCaculateCountTobar"] = caculateCountInfo2.index + "/" + caculateCountInfo2.caculateCount; + } + } + } + + if (caculateCount == 4) + { + for (int j = 0; j < dynamicObjectCollection.Count(); j++) + { + int num = j + 1; + dynamicObjectCollection[j]["FCaculateCountTobar"] = num + "/" + caculateCountInfos[0].caculateCount; + } + } + + if (caculateCount == 2) + { + for (int k = 0; k < dynamicObjectCollection.Count(); k++) + { + int materialId3 = Convert.ToInt32(dynamicObjectCollection[k]["MaterialIdToBar_Id"]); + int barCodeRuleId4 = Convert.ToInt32(dynamicObjectCollection[k]["BarCodeRule_Id"]); + CaculateCountInfo caculateCountInfo3 = caculateCountInfos.Where((CaculateCountInfo u) => u.materialId == materialId3 && u.barcodeboxrule == barCodeRuleId4).FirstOrDefault(); + if (caculateCountInfo3 != null) + { + caculateCountInfo3.index++; + dynamicObjectCollection[k]["FCaculateCountTobar"] = caculateCountInfo3.index + "/" + caculateCountInfo3.caculateCount; + } + } + } + + if (caculateCount == 5) + { + for (int l = 0; l < dynamicObjectCollection.Count(); l++) + { + int barCodeRuleId3 = Convert.ToInt32(dynamicObjectCollection[l]["BarCodeRule_Id"]); + CaculateCountInfo caculateCountInfo4 = caculateCountInfos.Where((CaculateCountInfo u) => u.barcodeboxrule == barCodeRuleId3).FirstOrDefault(); + if (caculateCountInfo4 != null) + { + caculateCountInfo4.index++; + dynamicObjectCollection[l]["FCaculateCountTobar"] = caculateCountInfo4.index + "/" + caculateCountInfo4.caculateCount; + } + } + } + + if (caculateCount == 3) + { + for (int m = 0; m < dynamicObjectCollection.Count(); m++) + { + int materialId = Convert.ToInt32(dynamicObjectCollection[m]["MaterialIdToBar_Id"]); + string barCodeRuleId2 = Convert.ToString(dynamicObjectCollection[m]["BarCodeRule_Id"]); + string barcode = Convert.ToString(dynamicObjectCollection[m]["BarCode"]); + CaculateCountInfo caculateCountInfo5 = caculateCountInfos.Where((CaculateCountInfo u) => u.materialId == materialId && u.bigRule == barCodeRuleId2).FirstOrDefault(); + if (caculateCountInfo5 != null) + { + caculateCountInfo5.index++; + dynamicObjectCollection[m]["FCaculateCountTobar"] = caculateCountInfo5.index + "/" + caculateCountInfo5.caculateCount; + continue; + } + + CaculateCountInfo caculateCountInfo6 = caculateCountInfos.Where((CaculateCountInfo u) => u.materialId == materialId && u.midRule == barCodeRuleId2).FirstOrDefault(); + if (caculateCountInfo6 != null && !CheckBarcodeIsHaveBox(barcode)) + { + caculateCountInfo6.index++; + dynamicObjectCollection[m]["FCaculateCountTobar"] = caculateCountInfo6.index + "/" + caculateCountInfo6.caculateCount; + } + } + } + + if (caculateCount != 6) + { + return; + } + + for (int n = 0; n < dynamicObjectCollection.Count(); n++) + { + int num2 = Convert.ToInt32(dynamicObjectCollection[n]["MaterialIdToBar_Id"]); + string barCodeRuleId = Convert.ToString(dynamicObjectCollection[n]["BarCodeRule_Id"]); + CaculateCountInfo caculateCountInfo7 = caculateCountInfos.Where((CaculateCountInfo u) => u.bigRule == barCodeRuleId).FirstOrDefault(); + string barcode2 = Convert.ToString(dynamicObjectCollection[n]["BarCode"]); + if (caculateCountInfo7 != null) + { + caculateCountInfo7.index++; + dynamicObjectCollection[n]["FCaculateCountTobar"] = caculateCountInfo7.index + "/" + caculateCountInfo7.caculateCount; + continue; + } + + CaculateCountInfo caculateCountInfo8 = caculateCountInfos.Where((CaculateCountInfo u) => u.midRule == barCodeRuleId).FirstOrDefault(); + if (caculateCountInfo8 != null && !CheckBarcodeIsHaveBox(barcode2)) + { + caculateCountInfo8.index++; + dynamicObjectCollection[n]["FCaculateCountTobar"] = caculateCountInfo8.index + "/" + caculateCountInfo8.caculateCount; + } + } + } + + private bool CheckBarcodeIsHaveBox(string barcode) + { + bool result = false; + List list = new List(); + string strSQL = "select * from t_UN_PackagingEntry where FENTRYBARCODE=@barcode;"; + List list2 = new List(); + list2.Add(new SqlParam("@barcode", KDDbType.String, barcode)); + DynamicObjectCollection dynamicObjectCollection = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, list2.ToArray()); + if (dynamicObjectCollection != null && dynamicObjectCollection.Count() > 0) + { + result = true; + } + + return result; + } + + private List GetRuleBarcodeItem(long ruleId) + { + List list = new List(); + string strSQL = @" +SELECT T.FBARCODEFIELDKEY +FROM T_BD_BARCODERULEENTRY R + INNER JOIN T_BD_BARCODEITEM T ON R.FBARCODEPROPERTYID = T.FID +WHERE R.FID = @ruleId; "; + List list2 = new List(); + list2.Add(new SqlParam("@ruleId", KDDbType.Int64, ruleId)); + DynamicObjectCollection dynamicObjectCollection = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, list2.ToArray()); + if (dynamicObjectCollection != null && dynamicObjectCollection.Count() > 0) + { + foreach (DynamicObject item in dynamicObjectCollection) + { + list.Add(Convert.ToString(item["FBARCODEFIELDKEY"])); + } + } + + return list; + } + + private void SyncCreateBarCode(ExtendedDataEntity[] entitys, int iCount, string sType) + { + //IL_001e: Unknown result type (might be due to invalid IL or missing references) + //IL_0024: Expected O, but got Unknown + try + { + DateTime now = DateTime.Now; + //UNWLogger.Info(base.Context, "BarCodePrintEdit", "CreateBarCode Start"); + BarCodeCreateResult val = new BarCodeCreateResult(); + int num = (iCount - 1) / 1000; + ExtendedDataEntity[] array = new ExtendedDataEntity[1000]; + for (int i = 1; i <= num + 1; i++) + { + if (1000 * i < iCount) + { + DateTime now2 = DateTime.Now; + Array.ConstrainedCopy(entitys, (i - 1) * 1000, array, 0, 1000); + val = BarCodeCreateServiceHelper.BarCodeCreateByRule(base.Context, base.View.BusinessInfo, _sRuleId, array, _sFormId, (Dictionary)null, false); + CaculateTime(now2, i, ResManager.LoadKDString("条码生成完成", "8b2aa21f52404b8f", "APP_ISVPAAC2016062210550")); + if (!val.AllDataRight) + { + base.View.ShowErrMessage(val.ErrInfo); + return; + } + + if (!_ctrlBatchCreate) + { + DateTime now3 = DateTime.Now; + SetBarCodeValue(val.BoxContrastNumbers, val.SecurityCodes, sType, val.FieldCodes, val.CodeQtyDic, val.BarCodeCorrespondings, (i - 1) * 1000, val.ExistedNumbers); + CaculateTime(now2, i, ResManager.LoadKDString("条码明细绑定完成", "039a8fe456064630", "APP_ISVPAAC2016062210550")); + //UNWLogger.Info(base.Context, "BarCodePrintEdit", ResManager.LoadKDString("CreateBarCode SetBarCodeValue 完成", "a6f0846f8a86458c", "APP_ISVPAAC2016062210550")); + } + } + else + { + DateTime now4 = DateTime.Now; + array = new ExtendedDataEntity[iCount - (i - 1) * 1000]; + Array.ConstrainedCopy(entitys, (i - 1) * 1000, array, 0, iCount - (i - 1) * 1000); + val = BarCodeCreateServiceHelper.BarCodeCreateByRule(base.Context, base.View.BusinessInfo, _sRuleId, array, _sFormId, (Dictionary)null, false); + CaculateTime(now4, i, ResManager.LoadKDString("条码生成完成", "8b2aa21f52404b8f", "APP_ISVPAAC2016062210550")); + if (!val.AllDataRight) + { + base.View.ShowErrMessage(val.ErrInfo); + return; + } + + if (!_ctrlBatchCreate) + { + DateTime now5 = DateTime.Now; + SetBarCodeValue(val.BoxContrastNumbers, val.SecurityCodes, sType, val.FieldCodes, val.CodeQtyDic, val.BarCodeCorrespondings, (i - 1) * 1000, val.ExistedNumbers); + CaculateTime(now4, i, ResManager.LoadKDString("条码明细绑定完成", "039a8fe456064630", "APP_ISVPAAC2016062210550")); + } + } + } + + SetComboItems(); + barcodeSysParm = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barcodeSysParm.AutoSavePrintRecord) + { + OperateOption option = OperateOption.Create(); + option.SetCacheMetadata(value: false); + DynamicObject dataObject = Model.DataObject; + dataObject["FFormId"] = Model.BillBusinessInfo.GetForm().Id; + IOperationResult operationResult = BusinessDataServiceHelper.Save(base.Context, Model.BillBusinessInfo, dataObject, option); + base.View.UpdateView("FBILLCODEHEAD"); + Model.DataChanged = false; + } + + WriteBackBarcodeToBill(); + DateTime now6 = DateTime.Now; + TimeSpan timeSpan = now6 - now; + //UNWLogger.Info(base.Context, "BarCodePrintEdit", "CreateBarCode End" + timeSpan.ToString("g")); + base.View.GetControl("FTab").SelectedIndex = 1; + List billRowLocked = entitys.Select((ExtendedDataEntity p) => Convert.ToInt32(p.DataEntity["Seq"])).ToList(); + SetBillRowLocked(billRowLocked); + base.View.UpdateView("FEntityToBar"); + base.View.ShowMessage(ResManager.LoadKDString("条码生成成功", "c7bb1e5475fc4589", "APP_ISVPAAC2016062210550")); + UpdateQtyToQuaty(val); + } + catch (Exception ex) + { + //UNWLogger.Info(base.Context, "BarCodePrintEdit", string.Format(ResManager.LoadKDString("CreateBarCode错误:{0}", "b0e764f5c3874f24", "APP_ISVPAAC2016062210550"), ex.Message)); + base.View.Model.DeleteEntryData("FEntityToBar"); + base.View.ShowErrMessage(ex.Message); + } + } + + private void CaculateTime(DateTime dtstart, int i, string desc) + { + double num = DateTime.Now.Subtract(dtstart).Duration().TotalMilliseconds / 1000.0; + Msg = Msg + Environment.NewLine + ResManager.LoadKDString("第", "5e2976b208924f20", "APP_ISVPAAC2016062210550") + i + ResManager.LoadKDString("页", "963b741b750d4763", "APP_ISVPAAC2016062210550") + desc + ResManager.LoadKDString(",耗时", "e8940ad77237459a", "APP_ISVPAAC2016062210550") + Convert.ToString(num) + ResManager.LoadKDString("秒", "1c66015500d04260", "APP_ISVPAAC2016062210550"); + } + + private void AsyncCreateBarCode(ExtendedDataEntity[] entitys, int iCount, string sType) + { + DateTime currfirstTime = DateTime.Now; + DynamicFormShowParameter processForm = base.View.ShowProcessForm(delegate + { + }, bUseTruePro: true, ResManager.LoadKDString("正在加载界面", "cabf052101c44f41", "APP_ISVPAAC2016062210550")); + base.View.Session["ProcessRateValue"] = 0; + MainWorker.QuequeTask(base.Context, delegate + { + //IL_001d: Unknown result type (might be due to invalid IL or missing references) + //IL_0023: Expected O, but got Unknown + try + { + //UNWLogger.Info(base.Context, "BarCodePrintEdit", "AsyncCreateBarCode Start"); + BarCodeCreateResult val = new BarCodeCreateResult(); + int num = (iCount - 1) / 1000; + ExtendedDataEntity[] array = new ExtendedDataEntity[1000]; + _proIncrement = ((num > 0) ? (99 / num) : 99); + for (int i = 1; i <= num + 1; i++) + { + if (1000 * i < iCount) + { + Array.ConstrainedCopy(entitys, (i - 1) * 1000, array, 0, 1000); + DateTime now2 = DateTime.Now; + val = BarCodeCreateServiceHelper.BarCodeCreateByRule(base.Context, base.View.BusinessInfo, _sRuleId, array, _sFormId, (Dictionary)null, false); + CaculateTime(now2, i, ResManager.LoadKDString("条码生成完成", "8b2aa21f52404b8f", "APP_ISVPAAC2016062210550")); + if (!val.AllDataRight) + { + base.View.ShowErrMessage(val.ErrInfo); + return; + } + + if (_ctrlBatchCreate) + { + continue; + } + + DateTime now3 = DateTime.Now; + SetBarCodeValue(val.BoxContrastNumbers, val.SecurityCodes, sType, val.FieldCodes, val.CodeQtyDic, val.BarCodeCorrespondings, (i - 1) * 1000, val.ExistedNumbers); + //UNWLogger.Info(base.Context, "BarCodePrintEdit", ResManager.LoadKDString("AsyncCreateBarCode SetBarCodeValue 结束", "e68d6317957045b2", "APP_ISVPAAC2016062210550")); + CaculateTime(now3, i, ResManager.LoadKDString("条码明细绑定完成", "039a8fe456064630", "APP_ISVPAAC2016062210550")); + } + else + { + array = new ExtendedDataEntity[iCount - (i - 1) * 1000]; + Array.ConstrainedCopy(entitys, (i - 1) * 1000, array, 0, iCount - (i - 1) * 1000); + DateTime now4 = DateTime.Now; + val = BarCodeCreateServiceHelper.BarCodeCreateByRule(base.Context, base.View.BusinessInfo, _sRuleId, array, _sFormId, (Dictionary)null, false); + CaculateTime(now4, i, ResManager.LoadKDString("条码生成完成", "8b2aa21f52404b8f", "APP_ISVPAAC2016062210550")); + //UNWLogger.Info(base.Context, "BarCodePrintEdit", ResManager.LoadKDString("AsyncCreateBarCode BarCodeCreateByRule 结束", "83caaae197f245ca", "APP_ISVPAAC2016062210550")); + if (!val.AllDataRight) + { + base.View.ShowErrMessage(val.ErrInfo); + return; + } + + if (_ctrlBatchCreate) + { + continue; + } + + DateTime now5 = DateTime.Now; + SetBarCodeValue(val.BoxContrastNumbers, val.SecurityCodes, sType, val.FieldCodes, val.CodeQtyDic, val.BarCodeCorrespondings, (i - 1) * 1000, val.ExistedNumbers); + CaculateTime(now5, i, ResManager.LoadKDString("条码明细绑定完成", "039a8fe456064630", "APP_ISVPAAC2016062210550")); + } + + base.View.Session["ProcessRateValue"] = i * _proIncrement; + } + + WriteBackBarcodeToBill(); + SetComboItems(); + UpdateQtyToQuaty(val); + } + catch (Exception ex) + { + //UNWLogger.Info(base.Context, "BarCodePrintEdit", string.Format(ResManager.LoadKDString("CreateBarCode错误:{0}", "b0e764f5c3874f24", "APP_ISVPAAC2016062210550"), ex.Message)); + throw ex; + } + }, delegate (AsynResult result) + { + base.View.Session["ProcessRateValue"] = 101; + IDynamicFormView view = base.View.GetView(processForm.PageId); + if (view != null) + { + view.Close(); + base.View.SendDynamicFormAction(view); + } + + if (!result.Success) + { + base.View.Model.DeleteEntryData("FEntityToBar"); + if (result.Exception != null) + { + if (result.Exception.InnerException != null) + { + base.View.ShowErrMessage(result.Exception.InnerException.Message); + } + else + { + base.View.ShowErrMessage(result.Exception.Message); + } + } + } + else + { + base.View.UpdateView("FEntityToBar"); + List billRowLocked = entitys.Select((ExtendedDataEntity p) => Convert.ToInt32(p.DataEntity["Seq"])).ToList(); + SetBillRowLocked(billRowLocked); + base.View.GetControl("FTab").SelectedIndex = 1; + barcodeSysParm = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barcodeSysParm.AutoSavePrintRecord) + { + OperateOption option = OperateOption.Create(); + option.SetCacheMetadata(value: false); + DynamicObject dataObject = Model.DataObject; + dataObject["FFormId"] = Model.BillBusinessInfo.GetForm().Id; + IOperationResult operationResult = BusinessDataServiceHelper.Save(base.Context, Model.BillBusinessInfo, dataObject, option); + base.View.UpdateView("FBILLCODEHEAD"); + Model.DataChanged = false; + } + } + + DateTime now = DateTime.Now; + TimeSpan timeSpan = now - currfirstTime; + //UNWLogger.Info(base.Context, "BarCodePrintEdit", ResManager.LoadKDString("AsyncCreateBarCode End 耗时:", "af1a7988425d4c2a", "APP_ISVPAAC2016062210550") + timeSpan.ToString("g")); + }); + } + + private void UpdateQtyToQuaty(BarCodeCreateResult barcode) + { + StringBuilder stringBuilder = new StringBuilder(); + string strSQL = "SELECT * FROM T_BD_BARCODERULEENTRY WHERE FID=@ruleId AND FBARCODEPROPERTYID =61"; + List list = new List(); + list.Add(new SqlParam("@ruleId", KDDbType.Int64, _sRuleId)); + DynamicObjectCollection dynamicObjectCollection = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, list.ToArray()); + Dictionary codeQtyDic = barcode.CodeQtyDic; + if ((!(_sFormId == "SFC_OperationPlanning") && !(_sFormId == "SFC_OperationReport") && !(_sFormId == "SFC_OperationTransfer")) || dynamicObjectCollection.Count != 0) + { + return; + } + + for (int i = 0; i < barcode.CodeNumbers.Count(); i++) + { + foreach (KeyValuePair item in codeQtyDic) + { + stringBuilder.AppendFormat("UPDATE T_BD_BARCODEMAIN SET FQuaQty = {0} WHERE FBARCODE = '{1}'", item.Value, item.Key); + } + } + + DBUtils.Execute(base.Context, stringBuilder.ToString()); + } + + //public override void OnAfterPrint(AfterPrintEventArgs e) + //{ + // try + // { + // base.OnAfterPrint(e); + // JObject jsonObj = BarCodePrintService.GetJsonObj(e); + // if (jsonObj == null || jsonObj["Items"] == null) + // { + // return; + // } + + // JToken obj = jsonObj["Items"]; + // JArray val = (JArray)(object)((obj is JArray) ? obj : null); + // foreach (JToken item in (IEnumerable)val) + // { + // if (Convert.ToString(item[(object)"isSuccessfull"]).Equals("True")) + // { + // UpdatePrintCountAfterPrintOP(); + // printOperationType = string.Empty; + // printDatas = new List(); + // newPrintDatas = new List(); + // } + // } + // } + // catch (Exception ex) + // { + // //UNWLogger.Error(base.Context, "BarCodePrintEdit", "OnAfterPrint error:" + ex.Message + ex.StackTrace, ex); + // throw ex; + // } + //} + + public override void OnPrepareNotePrintData(PreparePrintDataEventArgs e) + { + //UNWLogger.Info(base.Context, "OnPrepareNotePrintData:", "Start DataSourceId=" + e.DataSourceId + " Id=" + string.Join(",", e.BillIds)); + try + { + if (e.DataSourceId.Equals("FEntityToBar", StringComparison.OrdinalIgnoreCase)) + { + List list = new List(); + string value = e.BillIds.FirstOrDefault(); + if (newPrintDatas != null && newPrintDatas.Count > 0) + { + DynamicObject dynamicObject = newPrintDatas[Convert.ToInt32(value)]; + if (dynamicObject != null) + { + //UNWLogger.Info(base.Context, "OnPrepareNotePrintData:", dynamicObject["BarCode"].ToString()); + DynamicObject dynamicObject2 = new DynamicObject(e.DynamicObjectType); + foreach (object field2 in e.Fields) + { + string text = field2.ToString(); + if (text == "FExpPeriod") + { + continue; + } + + object obj = ""; + string text2 = ""; + bool flag = false; + bool flag2 = false; + string text3 = string.Empty; + if (text.Contains(".")) + { + string[] array = text.Split('.'); + string text4 = array[0]; + string text5 = array[1]; + if (array.Count() > 2) + { + text3 = array[2]; + } + + if (base.View.BusinessInfo.GetField(text4) == null) + { + continue; + } + + text2 = base.View.BusinessInfo.GetField(text4).PropertyName; + if (!(dynamicObject[text2] is DynamicObject dynamicObject3)) + { + if (text2.EqualsIgnoreCase("LotToBar") || text4.EqualsIgnoreCase("FLotToBar")) + { + obj = dynamicObject[text2 + "_Text"]; + text = $"{text4}_{text5}"; + dynamicObject2[text] = obj; + } + + continue; + } + + if (dynamicObject3.DynamicObjectType.Properties.Contains("Image") && dynamicObject3["Image"] == null) + { + RepackData(dynamicObject3); + } + + if (dynamicObject3.DynamicObjectType.Name.ToUpperInvariant() == "BD_FLEXSITEMDETAILV") + { + flag = true; + } + + if (dynamicObject3.DynamicObjectType.Name.ToUpperInvariant() == "BD_FLEXVALUESDETAIL") + { + flag2 = true; + } + + text = string.Format("{0}_{1}{2}", text4, text5, text3.IsNullOrEmptyOrWhiteSpace() ? "" : ("_" + text3)); + if (dynamicObject3.DynamicObjectType.Properties.Contains(text5.Remove(0, 1))) + { + obj = dynamicObject3[text5.Remove(0, 1)]; + } + else if (dynamicObject3.DynamicObjectType.Properties.Contains(text5)) + { + obj = dynamicObject3[text5]; + } + else if (field2.Equals("FMaterialIdToBar.FStockPlaceId") && dynamicObject3.DynamicObjectType.Properties.Contains("MaterialStock") && dynamicObject3["MaterialStock"] is DynamicObjectCollection) + { + obj = (dynamicObject3["MaterialStock"] as DynamicObjectCollection)[0]; + } + + if (obj.IsNullOrEmptyOrWhiteSpace() && base.View.BusinessInfo.GetField(text4) is BaseDataField) + { + string formId = ((BaseDataField)base.View.BusinessInfo.GetField(text4)).LookUpObject.FormId; + obj = GetBaseDataPropByBaseData(formId, text5, dynamicObject3); + } + } + else if (base.View.BusinessInfo.GetField(text) is BasePropertyField) + { + string controlFieldKey = base.View.BusinessInfo.GetField(text).ControlFieldKey; + text2 = base.View.BusinessInfo.GetField(text).PropertyName; + string name = base.View.BusinessInfo.GetField(text).ControlField.DynamicProperty.Name; + if (dynamicObject[name] is DynamicObject dynamicObject4) + { + obj = Convert.ToString(dynamicObject4[text2]); + } + } + else if (base.View.BusinessInfo.GetField(text) != null) + { + text2 = base.View.BusinessInfo.GetField(text).PropertyName; + obj = dynamicObject[text2]; + } + + if (obj is DynamicObject) + { + if (flag) + { + text3 = (text3.IsNullOrEmptyOrWhiteSpace() ? "FDataValue" : text3); + if ((obj as DynamicObject).DynamicObjectType.Properties.Contains(text3)) + { + dynamicObject2[text] = (obj as DynamicObject)[text3].ToString(); + string text6 = text.Split('_')[0]; + if (dynamicObject2.DynamicObjectType.Properties.Contains(text6)) + { + string propertyName = base.View.BusinessInfo.GetField(text6).PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName + "_Id")) + { + dynamicObject2[text6] = dynamicObject[propertyName + "_Id"]; + } + } + + if (dynamicObject2.DynamicObjectType.Properties.Contains("FMaterialIdToBar_Ref")) + { + string propertyName2 = base.View.BusinessInfo.GetField("FMaterialIdToBar").PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName2) && dynamicObject.DynamicObjectType.Properties.Contains(propertyName2 + "_Id")) + { + dynamicObject2["FMaterialIdToBar_Ref"] = dynamicObject[propertyName2]; + dynamicObject2["FMaterialIdToBar_Id"] = dynamicObject[propertyName2 + "_Id"]; + } + } + } + else + { + text3 = ((text3.IsNullOrEmptyOrWhiteSpace() || !text3.Contains("Number")) ? "Name" : "Number"); + if ((obj as DynamicObject).DynamicObjectType.Properties.Contains(text3)) + { + dynamicObject2[text] = (obj as DynamicObject)[text3].ToString(); + } + } + } + else if (flag2) + { + text3 = (text3.IsNullOrEmptyOrWhiteSpace() ? "Name" : text3); + if (text.StartsWith("FSTOCKLOCIDToBar_FF") && text.EndsWith("_FNumber")) + { + text3 = text3.Remove(0, 1); + } + + if ((obj as DynamicObject).DynamicObjectType.Properties.Contains(text3)) + { + dynamicObject2[text] = (obj as DynamicObject)[text3].ToString(); + string text7 = text.Split('_')[0]; + if (dynamicObject2.DynamicObjectType.Properties.Contains(text7)) + { + string propertyName3 = base.View.BusinessInfo.GetField(text7).PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName3 + "_Id")) + { + dynamicObject2[text7] = dynamicObject[propertyName3 + "_Id"]; + } + } + + if (dynamicObject2.DynamicObjectType.Properties.Contains("FStockIdToBar_Ref")) + { + string propertyName4 = base.View.BusinessInfo.GetField("FStockIdToBar").PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName4) && dynamicObject.DynamicObjectType.Properties.Contains(propertyName4 + "_Id")) + { + dynamicObject2["FStockIdToBar_Ref"] = dynamicObject[propertyName4]; + dynamicObject2["FStockIdToBar_Id"] = dynamicObject[propertyName4 + "_Id"]; + } + } + + if (dynamicObject2.DynamicObjectType.Properties.Contains("FINSTOCKIDToBar_Ref")) + { + string propertyName5 = base.View.BusinessInfo.GetField("FINSTOCKIDToBar").PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName5) && dynamicObject.DynamicObjectType.Properties.Contains(propertyName5 + "_Id")) + { + dynamicObject2["FINSTOCKIDToBar_Ref"] = dynamicObject[propertyName5]; + dynamicObject2["FINSTOCKIDToBar_Id"] = dynamicObject[propertyName5 + "_Id"]; + } + } + } + } + else if (field2.ToString() == "FSTOCKLOCIDToBar" || field2.ToString().Equals("FAuxPropIdToBar")) + { + string value2 = (obj as DynamicObject)["Id"].ToString(); + dynamicObject2[text] = value2; + } + else + { + text3 = (text3.IsNullOrEmptyOrWhiteSpace() ? "Name" : text3); + if ((obj as DynamicObject).DynamicObjectType.Properties.Contains(text3)) + { + dynamicObject2[text] = (obj as DynamicObject)[text3].ToString(); + } + else if (field2.Equals("FMaterialIdToBar.FStockPlaceId") && dynamicObject2.DynamicObjectType.Properties.Contains("FMaterialIdToBar_Ref")) + { + string propertyName6 = base.View.BusinessInfo.GetField("FMaterialIdToBar").PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName6) && dynamicObject.DynamicObjectType.Properties.Contains(propertyName6 + "_Id")) + { + dynamicObject2["FMaterialIdToBar_Ref"] = dynamicObject[propertyName6]; + dynamicObject2["FMaterialIdToBar_Id"] = dynamicObject[propertyName6 + "_Id"]; + } + } + } + } + else if (dynamicObject2.DynamicObjectType.Properties.Contains(text)) + { + if (obj.IsNullOrEmptyOrWhiteSpace() && text.Contains("_")) + { + string[] array2 = text.Split('_'); + string text8 = ""; + text8 = array2[1].Remove(0, 1); + if (!text8.Equals("") && dynamicObject.DynamicObjectType.Properties.Contains(text8)) + { + obj = dynamicObject[text8]; + } + } + + dynamicObject2[text] = obj; + if (flag) + { + dynamicObject2[text] = obj; + string text9 = text.Split('_')[0]; + Field field = base.View.BusinessInfo.GetField(text9); + if (field is RelatedFlexGroupField && obj != null) + { + RelatedFlexGroupField element = (RelatedFlexGroupField)field; + dynamicObject2[text] = GetElementValue(element, obj); + } + + if (dynamicObject2.DynamicObjectType.Properties.Contains(text9)) + { + string propertyName7 = base.View.BusinessInfo.GetField(text9).PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName7 + "_Id")) + { + dynamicObject2[text9] = dynamicObject[propertyName7 + "_Id"]; + } + } + + if (dynamicObject2.DynamicObjectType.Properties.Contains("FMaterialIdToBar_Ref")) + { + string propertyName8 = base.View.BusinessInfo.GetField("FMaterialIdToBar").PropertyName; + if (dynamicObject.DynamicObjectType.Properties.Contains(propertyName8) && dynamicObject.DynamicObjectType.Properties.Contains(propertyName8 + "_Id")) + { + dynamicObject2["FMaterialIdToBar_Ref"] = dynamicObject[propertyName8]; + dynamicObject2["FMaterialIdToBar_Id"] = dynamicObject[propertyName8 + "_Id"]; + } + } + } + } + + if (dynamicObject2[text] is LocaleValue && !dynamicObject2[text].IsNullOrEmptyOrWhiteSpace()) + { + List list2 = new List(); + list2.Add(dynamicObject2[text] as LocaleValue); + List value3 = list2; + dynamicObject2[text] = value3; + } + } + + if (dynamicObject2.Contains("FMaterialIdToBar_FImageFileServer")) + { + object ret = new object(); + GetImageByte(dynamicObject2["FMaterialIdToBar_FImageFileServer"], ref ret); + dynamicObject2["FMaterialIdToBar_FImageFileServer"] = ret; + } + + list.Add(dynamicObject2); + } + } + + e.DataObjects = list.ToArray(); + } + + base.OnPrepareNotePrintData(e); + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "OnPrepareNotePrintData error:" + ex.Message + ex.StackTrace, ex); + } + } + + private object GetElementValue(RelatedFlexGroupField element, object data) + { + IOrderedEnumerable orderedEnumerable = from p in element.RelateFlexBusinessInfo.GetFieldList() + orderby p.Tabindex + select p; + JSONArray jSONArray = new JSONArray(); + foreach (Field item in orderedEnumerable) + { + element.GetBindSinleValue(item.Key, data as DynamicObject, jSONArray, 0); + } + + return element.GetDisplayName(jSONArray, "."); + } + + public void GetImageByte(object value, ref object ret) + { + //IL_009a: Unknown result type (might be due to invalid IL or missing references) + //IL_009f: Unknown result type (might be due to invalid IL or missing references) + //IL_00ac: Unknown result type (might be due to invalid IL or missing references) + //IL_00c0: Expected O, but got Unknown + //IL_00c1: Unknown result type (might be due to invalid IL or missing references) + Guid result = Guid.Empty; + if (!Guid.TryParse(value.ToString(), out result)) + { + string text = ObjectUtils.Object2String(value); + if (string.IsNullOrWhiteSpace(text)) + { + return; + } + + text = text.Replace("nail=1", "nail=0"); + UriBuilder uriBuilder = new UriBuilder(); + Uri uri = uriBuilder.Uri; + WebClient webClient = new WebClient(); + try + { + byte[] array = webClient.DownloadData(uri); + ret = array; + return; + } + catch (Exception ex) + { + ex.StackTrace.ToString(); + return; + } + } + + try + { + TFileInfo val = new TFileInfo + { + FileId = value.ToString(), + CTX = base.View.Context + }; + ret = new UpDownloadService().GetFileData(val); + } + catch (Exception ex2) + { + ex2.StackTrace.ToString(); + } + } + + private void RepackData(DynamicObject tempObj) + { + try + { + string strSQL = "SELECT FUSEORGID,FCREATEORGID FROM T_BD_MATERIAL WHERE FMATERIALID=@materilId AND FNUMBER=@number"; + SqlParam sqlParam = new SqlParam("@materilId", KDDbType.Int64, Convert.ToInt64(tempObj["Id"])); + SqlParam sqlParam2 = new SqlParam("@number", KDDbType.String, Convert.ToString(tempObj["Number"])); + DynamicObject dynamicObject = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, sqlParam, sqlParam2).FirstOrDefault(); + if (dynamicObject != null && Convert.ToInt64(dynamicObject["FUSEORGID"]) != Convert.ToInt64(dynamicObject["FCREATEORGID"])) + { + string strSQL2 = "SELECT FIMAGE FROM T_BD_MATERIAL WHERE FCREATEORGID=FUSEORGID AND FNUMBER=@number"; + SqlParam sqlParam3 = new SqlParam("@number", KDDbType.String, Convert.ToString(tempObj["Number"])); + DynamicObject dynamicObject2 = DBUtils.ExecuteDynamicObject(base.Context, strSQL2, null, null, CommandType.Text, sqlParam3).FirstOrDefault(); + if (dynamicObject2 != null) + { + tempObj["Image"] = dynamicObject2["FIMAGE"]; + } + } + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } + } + + private object GetBaseDataPropByBaseData(string formId, string fieldProp, DynamicObject itemValue) + { + try + { + FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.View.Context, Convert.ToString(formId)); + BusinessInfo businessInfo = formMetadata.BusinessInfo; + Field field = businessInfo.GetField(fieldProp); + object oriValue = BarCodeCommonService.GetItemValueFromBaseData(field, itemValue); + if (field is ComboField) + { + ComboField comboField = field as ComboField; + EnumObject enumObject = comboField.EnumObject; + EnumItem enumItem = enumObject.Items.FirstOrDefault((EnumItem p) => p.Value.Equals(oriValue)); + if (enumItem != null && enumItem.Caption != null) + { + oriValue = enumItem.Caption.ToString(base.Context.UserLocale); + } + } + else if (field is GroupField) + { + GroupField groupField = field as GroupField; + } + else if (oriValue == null) + { + itemValue = BusinessDataServiceHelper.Load(base.Context, businessInfo.GetDynamicObjectType(), null).FirstOrDefault(); + oriValue = BarCodeCommonService.GetItemValueFromBaseData(field, itemValue); + } + + return oriValue; + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCode OnPrepareNotePrintData", "error:" + ex.Message + ex.StackTrace, ex); + return null; + } + } + + private void SetComboValue() + { + int entryRowCount = base.View.Model.GetEntryRowCount("FEntityToBar"); + string model = Convert.ToString(base.View.Model.GetValue("FBarCodeModel")); + string boxmodel = Convert.ToString(base.View.Model.GetValue("FBarCodeBoxModel")); + string cboxmodel = Convert.ToString(base.View.Model.GetValue("FCenterBoxModel")); + string bboxmodel = Convert.ToString(base.View.Model.GetValue("FBigBoxModel")); + if (_noteTemplates.Count() > 0) + { + EnumItem enumItem = _noteTemplates.FirstOrDefault(); + if (enumItem != null) + { + string enumId = enumItem.EnumId; + if (_noteTemplates.Where((EnumItem p) => p.EnumId.EqualsIgnoreCase(model)).ToList().Count() == 0) + { + base.View.Model.SetValue("FBarCodeModel", enumId); + } + + if (_noteTemplates.Where((EnumItem p) => p.EnumId.EqualsIgnoreCase(boxmodel)).ToList().Count() == 0) + { + base.View.Model.SetValue("FBarCodeBoxModel", enumId); + } + + if (_noteTemplates.Where((EnumItem p) => p.EnumId.EqualsIgnoreCase(cboxmodel)).ToList().Count() == 0) + { + base.View.Model.SetValue("FCenterBoxModel", enumId); + } + + if (_noteTemplates.Where((EnumItem p) => p.EnumId.EqualsIgnoreCase(bboxmodel)).ToList().Count() == 0) + { + base.View.Model.SetValue("FBigBoxModel", enumId); + } + } + } + + if (entryRowCount <= 0) + { + return; + } + + for (int i = 0; i < entryRowCount; i++) + { + string modeltobar = Convert.ToString(base.View.Model.GetValue("FBarCodeModelToBar", i)); + if (_noteTemplates.Where((EnumItem p) => p.EnumId.EqualsIgnoreCase(modeltobar)).ToList().Count() == 0) + { + base.View.Model.SetValue("FBarCodeModelToBar", model, i); + } + } + } + + public override void DataChanged(DataChangedEventArgs e) + { + try + { + int entryRowCount = base.View.Model.GetEntryRowCount("FEntityToBill"); + int entryRowCount2 = base.View.Model.GetEntryRowCount("FEntityToBar"); + switch (e.Field.Key.ToUpperInvariant()) + { + case "FCUSTOMER": + { + string text2 = Model.GetValue("FTempRadioGroup").ToString(); + if (text2.Equals("1")) + { + long num10 = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId_Customer(base.Context, "UHIK_BAR_BarCodePrint", num10); + if (_noteTemplates == null || _noteTemplates.Count == 0) + { + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId(base.View.Context, "UHIK_BAR_BarCodePrint"); + } + + SetComboField(); + SetComboItems(); + SetComboValue(); + } + + break; + } + case "FASSISTANT": + { + string text2 = Model.GetValue("FTempRadioGroup").ToString(); + if (text2.Equals("2")) + { + string text3 = ((e.NewValue == null) ? "" : Convert.ToString(e.NewValue)); + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId_Assist(base.Context, "UHIK_BAR_BarCodePrint", text3); + if (_noteTemplates == null || _noteTemplates.Count == 0) + { + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId(base.View.Context, "UHIK_BAR_BarCodePrint"); + } + + SetComboField(); + SetComboItems(); + SetComboValue(); + } + + break; + } + case "FTEMPRADIOGROUP": + ControlTempRadio(); + _noteTemplates = BarCodeCommonServiceHelper.GetValidNoteTemplatesByBillId(base.View.Context, "UHIK_BAR_BarCodePrint"); + SetComboField(); + SetComboItems(); + SetComboValue(); + break; + case "FBILLID": + _sFormId = ((e.NewValue == null) ? "" : e.NewValue.ToString()); + SetDefRuleId(); + IsAutoPacking(); + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + break; + case "FBARCODEBOXRULE": + _sBoxRuleId = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + break; + case "FBARCODEFIELDRULE": + _sFieldRuleId = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + break; + case "FBIGBOXRULE": + _sBigBoxRuleId = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + break; + case "FCENTREBOXRULE": + _sCenterBoxRuleId = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + break; + case "FBARCODERULE": + _sRuleId = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + break; + case "FBARCODEMODEL": + { + if (entryRowCount > 0) + { + for (int i = 0; i < entryRowCount; i++) + { + base.View.Model.SetValue("FBARCODEMODELToBill", e.NewValue, i); + } + } + + if (entryRowCount2 <= 0) + { + break; + } + + for (int j = 0; j < entryRowCount2; j++) + { + if (base.View.Model.GetValue("FBarCodeModelToBar", j).IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetValue("FBarCodeModelToBar", e.NewValue, j); + } + } + + break; + } + case "FBARCODERULETOBILL": + { + long num11 = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + DynamicObject dynamicObject6 = base.View.Model.GetValue("FBARCODEFIELDRULEToBill", e.Row) as DynamicObject; + if (num11 > 0 && num11 != _sRuleId) + { + SetBillData(num11, (dynamicObject6 != null) ? Convert.ToInt64(dynamicObject6["Id"]) : 0, e.Row); + } + + break; + } + case "FBARCODEFIELDRULETOBILL": + { + long num9 = ((e.NewValue == null) ? 0 : Convert.ToInt64(e.NewValue)); + if (base.View.Model.GetValue("FBARCODERULEToBill", e.Row) is DynamicObject dynamicObject5 && num9 > 0 && num9 != _sFieldRuleId) + { + SetBillData(Convert.ToInt64(dynamicObject5["Id"]), num9, e.Row); + } + + break; + } + case "FMATERIALID": + { + decimal num4 = Convert.ToDecimal(base.View.Model.GetValue("FQty", e.Row)); + decimal num5 = Convert.ToDecimal(base.View.Model.GetValue("FMinPackCount", e.Row)); + if (num5 <= 0m && base.View.Model.GetValue("FMaterialId", e.Row) is DynamicObject dynamicObject3 && dynamicObject3["MaterialPurchase"] is DynamicObjectCollection dynamicObjectCollection2 && dynamicObjectCollection2.Count > 0) + { + DynamicObject dynamicObject4 = dynamicObjectCollection2[0]; + if (dynamicObject4 != null) + { + num5 = ((dynamicObject4["MinPackCount"] != null) ? Convert.ToDecimal(dynamicObject4["MinPackCount"]) : 1m); + } + } + + if (num4 > 0m && num5 > 0m) + { + decimal num6 = num4 / num5; + int num7 = 0; + int num8 = Convert.ToInt32(num6); + num7 = ((!((decimal)num8 < num6)) ? num8 : (num8 + 1)); + base.View.Model.SetValue("FCreateNumber", num7, e.Row); + base.View.Model.SetValue("FCreateNumber", 1, e.Row); + } + + CalcCreateNumber2(e.Row); + CenterCalcCreateNumber(e.Row); + BigCalcCreateNumber(e.Row); + break; + } + case "FPRINTADDRESS": + { + string text = Convert.ToString(e.NewValue); + if (!string.IsNullOrEmpty(text)) + { + SavePrintAddress(text); + } + + break; + } + case "FQTYTOBAR": + case "FMATERIALIDTOBAR": + { + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FQtyToBar", e.Row)); + DynamicObject dynamicObject = base.View.Model.GetValue("FMaterialIdToBar", e.Row) as DynamicObject; + if (!(num > 0m) || dynamicObject == null || !(dynamicObject["MaterialPurchase"] is DynamicObjectCollection dynamicObjectCollection) || dynamicObjectCollection.Count <= 0) + { + break; + } + + DynamicObject dynamicObject2 = dynamicObjectCollection[0]; + if (dynamicObject2 != null) + { + int num2 = ((dynamicObject2["MinPackCount"] == null) ? 1 : Convert.ToInt32(dynamicObject2["MinPackCount"])); + int num3 = ((dynamicObject2["PrintCount"] == null) ? 1 : Convert.ToInt32(dynamicObject2["PrintCount"])); + if (num2 > 0 && num3 > 0) + { + base.View.Model.SetValue("FPrintNumber", num3, e.Row); + } + } + + break; + } + case "FQTY": + case "FBOXQTY": + case "FMINPACKCOUNT": + CalcCreateNumber2(e.Row); + CenterCalcCreateNumber(e.Row); + BigCalcCreateNumber(e.Row); + break; + case "FCREATENUMBER": + if (!_isEditQty) + { + CalcPackCount(e.Row); + } + + _isEditQty = false; + CenterCalcCreateNumber(e.Row); + BigCalcCreateNumber(e.Row); + break; + case "FCENTERBOXQTY": + CenterCalcCreateNumber(e.Row); + BigCalcCreateNumber(e.Row); + break; + case "FBIGBOXQTY": + BigCalcCreateNumber(e.Row); + break; + } + + base.DataChanged(e); + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "DataChanged error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public override void BeforeF7Select(BeforeF7SelectEventArgs e) + { + try + { + switch (e.FieldKey.ToUpper()) + { + case "FBARCODERULE": + case "FBARCODEBOXRULE": + { + if (GetBarCodeFilter(out var filter)) + { + if (string.IsNullOrEmpty(e.ListFilterParameter.Filter)) + { + e.ListFilterParameter.Filter = filter; + break; + } + + IRegularFilterParameter listFilterParameter = e.ListFilterParameter; + listFilterParameter.Filter = listFilterParameter.Filter + " AND " + filter; + } + + break; + } + } + + base.BeforeF7Select(e); + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "BeforeF7Select error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public override void BeforeSetItemValueByNumber(BeforeSetItemValueByNumberArgs e) + { + try + { + string text = e.BaseDataFieldKey.ToUpper(); + if (text == "FBARCODERULE" && GetBarCodeFilter(out var filter)) + { + if (string.IsNullOrEmpty(e.Filter)) + { + e.Filter = filter; + } + else + { + e.Filter = e.Filter + " AND " + filter; + } + } + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "BeforeSetItemValueByNumber error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public override void AfterSave(AfterSaveEventArgs e) + { + try + { + base.View.UpdateView("FBILLCODEHEAD"); + base.AfterSave(e); + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "AfterSave error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public override void ButtonClick(ButtonClickEventArgs e) + { + try + { + base.ButtonClick(e); + string text = e.Key.ToUpperInvariant(); + if (text == "FBTNSELECTPRINTER") + { + JSONArray jSONArray = new JSONArray(); + jSONArray.Add(0); + base.View.AddAction("SelectPrinterExt", jSONArray); + } + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "ButtonClick error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + public override void CustomEvents(CustomEventsArgs e) + { + try + { + base.CustomEvents(e); + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.FOpenBarPrintChainReq && e.EventName == "Custom.SetClientParams.SeqReqEnabled") + { + JSONObject jSONObject = new JSONObject(); + jSONObject["SeqReqEnabled"] = true; + JSONArray jSONArray = new JSONArray(); + jSONArray.Add(jSONObject); + base.View.AddAction("SetClientParams", jSONArray); + } + + switch (e.EventName.ToUpper()) + { + case "RETURNANDCLEARDATACOLLECTION": + case "TBRETURNANDCLEAR": + GetReturnDataFromSession(clearSessionData: true); + ((IListView)base.View.GetView(billPageId)).Close(); + break; + case "RETURNDETAILDATA": + GetReturnData(); + ((IListView)base.View.GetView(billPageId)).Close(); + break; + case "CLOSEDATACOLLECTIONANDRETURN": + GetReturnDataFrom(clear: false); + ((IListView)base.View.GetView(billPageId)).Close(); + break; + case "CLOSEWINDOWBYDETAIL": + ((IListView)base.View.GetView(billPageId)).Close(); + break; + case "SELECTPRINTER": + { + JSONObject jSONObject2 = JSONObject.Parse(e.EventArgs); + if (jSONObject2 == null) + { + break; + } + + string value = jSONObject2.GetValue("Data", "{}"); + if (!(value != "{}")) + { + break; + } + + JSONObject jSONObject3 = JSONObject.Parse(value); + if (jSONObject3 == null) + { + break; + } + + if (jSONObject3.GetValue("Selected", defaultValue: false)) + { + string value2 = jSONObject3.GetValue("PrinterName", ""); + base.View.Model.SetValue("FPrintAddress", value2); + break; + } + + string value3 = jSONObject3.GetValue("Message", ""); + if (!string.IsNullOrWhiteSpace(value3)) + { + base.View.ShowErrMessage(value3); + } + + break; + } + } + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrintEdit", "CustomEvents error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + private void GetReturnData() + { + ApplyReturnData(((IListView)base.View.GetView(billPageId)).SelectedRowsInfo); + } + + private void GetReturnDataFromSession(bool clearSessionData) + { + bool flag = false; + if (_sFormId == "STK_Inventory") + { + flag = true; + } + + List list = new List(); + IListView listView = (IListView)base.View.GetView(billPageId); + if (listView.Session == null || !listView.Session.ContainsKey("Data_Collection")) + { + return; + } + + if (listView.Session["Data_Collection"] is Dictionary dictionary && dictionary.Count > 0) + { + foreach (string key in dictionary.Keys) + { + ListSelectedRow listSelectedRow = dictionary[key]; + if (listSelectedRow.Selected && listSelectedRow.PrimaryKeyValue != null && !string.IsNullOrWhiteSpace(listSelectedRow.PrimaryKeyValue)) + { + list.Add(listSelectedRow.PrimaryKeyValue); + if (flag) + { + listData.Add(listSelectedRow); + } + } + } + } + + if (clearSessionData) + { + listView.Session["Data_Collection"] = null; + } + + if (list.Count >= 1) + { + _sourceId = string.Join(",", list); + _isFromBill = 1; + _billFormMetaData = (FormMetadata)MetaDataServiceHelper.Load(base.Context, _sFormId); + BindBillData(); + } + } + + private void GetReturnDataFrom(bool clear) + { + bool flag = false; + if (_sFormId == "STK_Inventory") + { + flag = true; + } + + List list = new List(); + IListView listView = (IListView)base.View.GetView(billPageId); + if (listView.Session == null || !listView.Session.ContainsKey("Data_Collection")) + { + return; + } + + if ((listView.Session["returnData"] as Dictionary)["ReturnData"] is Dictionary dictionary && dictionary.Count > 0) + { + foreach (string key in dictionary.Keys) + { + ListSelectedRow listSelectedRow = dictionary[key]; + if (listSelectedRow.Selected && listSelectedRow.PrimaryKeyValue != null && !string.IsNullOrWhiteSpace(listSelectedRow.PrimaryKeyValue)) + { + list.Add(listSelectedRow.PrimaryKeyValue); + if (flag) + { + listData.Add(listSelectedRow); + } + } + } + } + + if (clear) + { + listView.Session["Data_Collection"] = null; + } + + if (list.Count >= 1) + { + _sourceId = string.Join(",", list); + _isFromBill = 1; + _billFormMetaData = (FormMetadata)MetaDataServiceHelper.Load(base.Context, _sFormId); + BindBillData(); + } + } + + private void LockPrintInfo() + { + base.View.GetMainBarItem("tbNew").Enabled = true; + base.View.GetMainBarItem("tbSave").Enabled = true; + base.View.GetMainBarItem("tbChooseBill").Enabled = false; + base.View.GetMainBarItem("tbExit").Enabled = true; + base.View.GetBarItem("FEntityToBill", "tbButton").Enabled = false; + base.View.GetBarItem("FEntityToBill", "tbDeleteRow").Enabled = false; + base.View.GetBarItem("FEntityToBill", "tbBatchFill").Enabled = false; + base.View.GetBarItem("FEntityToBill", "tbCreBarCodeSum").Enabled = false; + base.View.GetBarItem("FEntityToBill", "tbCreBarCodeRow").Enabled = false; + base.View.GetBarItem("FEntityToBill", "tbGetNewData").Enabled = false; + base.View.GetBarItem("FEntityToBill", "tbDeleteList").Enabled = false; + Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBill"); + base.View.StyleManager.SetEnabled(entity, "", value: false); + base.View.StyleManager.SetEnabled("FBillId", "FBillId", value: false); + base.View.StyleManager.SetEnabled("FBarCodeRule", "FBarCodeRule", value: false); + base.View.StyleManager.SetEnabled("FBILLCODEHEAD", "FBILLCODEHEAD", value: false); + base.View.GetControl("FCustomer").Enabled = false; + base.View.GetControl("FAssistantType").Enabled = false; + base.View.GetControl("FAssistant").Enabled = false; + } + + private bool GetBarCodeFilter(out string filter) + { + filter = $"\r\n FID IN (SELECT DISTINCT FID from T_BD_BARCODERULETOBILL\r\n WHERE FBILLID = '{_sFormId}'\r\n )"; + return !string.IsNullOrWhiteSpace(filter); + } + + private void SetBillRowLocked(List lSeq) + { + EntryEntity entryEntity = base.View.BusinessInfo.GetEntryEntity("FEntityToBill"); + foreach (int item in lSeq) + { + foreach (Field item2 in entryEntity.Fields.ToList()) + { + base.View.GetFieldEditor(item2.Key, item - 1).Enabled = false; + base.View.Model.SetValue("FBillCheckBox", 0, item - 1); + } + } + } + + private void SetDefData() + { + if (_isFromPrintList == 1) + { + return; + } + + if (_isFromBill == 1) + { + base.View.Model.SetValue("FBillId", _sFormId); + } + + Field field = base.View.BusinessInfo.GetField("FBarCodeModel"); + List modelFieldKeys = new List { "FBarCodeModel", "FBarCodeBoxModel", "FCenterBoxModel", "FBigBoxModel" }; + List list = (from p in base.View.BusinessInfo.GetFieldList() + where modelFieldKeys.Contains(p.Key) + select p).ToList(); + DynamicObject dataObject = base.View.Model.DataObject; + if (dataObject == null) + { + return; + } + + DynamicObject lastPrintTemplates = BarCodePrintServiceHelper.GetLastPrintTemplates(base.Context); + string text = Convert.ToString(dataObject[field.PropertyName]).Replace(" ", ""); + if (text == "" && _noteTemplates.Count > 0) + { + EnumItem enumItem = _noteTemplates.FirstOrDefault(); + foreach (Field item in list) + { + string empty = string.Empty; + if (enumItem == null) + { + continue; + } + + empty = enumItem.Value; + if (lastPrintTemplates != null) + { + string lastModelId = Convert.ToString(lastPrintTemplates[item.FieldName]); + EnumItem enumItem2 = _noteTemplates.FirstOrDefault((EnumItem p) => p.Value.Equals(lastModelId)); + if (enumItem2 != null) + { + empty = enumItem2.Value; + } + } + + base.View.Model.SetValue(item.Key, empty); + } + } + + bool flag = lastPrintTemplates != null && Convert.ToBoolean(Convert.ToInt32(lastPrintTemplates["FMERGEBILLDATA"].ToString())); + base.View.Model.SetValue("FMergeBillData", flag); + if (_isFromBill != 1 && lastPrintTemplates != null && !lastPrintTemplates["FBILLID"].IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetValue("FBILLID", Convert.ToString(lastPrintTemplates["FBILLID"])); + } + + if (_isFromBill != 1 && lastPrintTemplates != null && !lastPrintTemplates["FBARCODERULE"].IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetValue("FBARCODERULE", Convert.ToString(lastPrintTemplates["FBARCODERULE"])); + } + + if (lastPrintTemplates != null && !lastPrintTemplates["FCENTREBOXRULE"].IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetValue("FCENTREBOXRULE", Convert.ToString(lastPrintTemplates["FCENTREBOXRULE"])); + } + + if (lastPrintTemplates != null && !lastPrintTemplates["FBIGBOXRULE"].IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetValue("FBIGBOXRULE", Convert.ToString(lastPrintTemplates["FBIGBOXRULE"])); + } + + if (_isAutoPacking && lastPrintTemplates != null && !lastPrintTemplates["FBARCODEBOXRULE"].IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetValue("FBARCODEBOXRULE", Convert.ToString(lastPrintTemplates["FBARCODEBOXRULE"])); + } + } + + private string GetDefaultPrinter() + { + long userId = base.Context.UserId; + long iD = base.Context.CurrentOrganizationInfo.ID; + string text = base.Context.IpAddress; + if (!string.IsNullOrWhiteSpace(text)) + { + Regex regex = new Regex("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); + text = Convert.ToString(regex.Match(text)); + } + + return BarCodePrintServiceHelper.GetDefaultPrinter(base.View.Context, userId, iD, text, (string)null); + } + + private void BindBillData() + { + if (_isFromBill != 1) + { + return; + } + + if (string.IsNullOrEmpty(_sFormId) || _sRuleId == 0L || string.IsNullOrEmpty(_sourceId)) + { + if (string.IsNullOrEmpty(_sFormId)) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入源单单据名称!", "0011019000003164", SubSystemType.BASE)); + } + else if (_sRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入默认条码规则!", "0011019000003092", SubSystemType.BASE)); + } + else if (string.IsNullOrEmpty(_sourceId)) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择源单数据!", "0011019000003165", SubSystemType.BASE)); + } + } + else if (_isAutoPacking && _sBoxRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入默认包装条码规则!", "58d194b2aae944ca", "APP_ISVPAAC2016062210550")); + } + else if (_isThreePacking && _sCenterBoxRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("当前为三层装箱,请先录入中包条码规则!", "821ceb6207164fb8", "APP_ISVPAAC2016062210550")); + } + else + { + SetBillData(_sRuleId, _sFieldRuleId, -1); + DynamicObject dynamicObject = base.View.Model.GetValue("FBarCodeRule") as DynamicObject; + if (Convert.ToBoolean(dynamicObject["FIsAutoGenerateLot"])) + { + GetFlotBill(base.Context, base.View, "FLOT"); + } + } + } + + protected virtual void SetBillData(long eRuleId, long eFieldRuleId, int row) + { + string text = string.Empty; + string text2 = string.Empty; + FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.Context, _sFormId); + if (_isFromBill == 1 && formMetadata.BusinessInfo.GetEntity(_sEntityKey) != null) + { + text = formMetadata.BusinessInfo.GetEntity(_sEntityKey).EntryName; + } + + if (listData != null && listData.Count > 0) + { + string entryEntityKey = listData[0].EntryEntityKey; + if (!string.IsNullOrWhiteSpace(entryEntityKey) && formMetadata.BusinessInfo.GetEntity(entryEntityKey) != null) + { + text = formMetadata.BusinessInfo.GetEntity(entryEntityKey).EntryName; + } + } + + Dictionary DicFieldStrMap = BarCodeCommonServiceHelper.GetBarCodeItemFieldDic(base.Context, _sFormId, eRuleId); + if (eFieldRuleId > 0) + { + Dictionary fieldRules = BarCodeCommonServiceHelper.GetFieldRules(base.Context, Convert.ToInt64(eFieldRuleId)); + foreach (KeyValuePair item in fieldRules) + { + Dictionary barCodeItemFieldDic = BarCodeCommonServiceHelper.GetBarCodeItemFieldDic(base.Context, _sFormId, (long)Convert.ToInt32(item.Value)); + DicFieldStrMap = DicFieldStrMap.Union(barCodeItemFieldDic).ToDictionary((KeyValuePair p) => p.Key, (KeyValuePair p) => p.Value); + } + } + + Dictionary dictionary = new Dictionary(); + List list = new List(); + List list2 = new List(); + Field field = null; + Field field2 = null; + Entity entity = base.View.BillBusinessInfo.GetEntity("FEntityToBill"); + foreach (string sbarcodefield in DicFieldStrMap.Keys.ToList()) + { + field = entity.Fields.FirstOrDefault((Field p) => string.Equals(p.Key, sbarcodefield, StringComparison.OrdinalIgnoreCase)); + if (field.IsNullOrEmpty()) + { + continue; + } + + string text3 = DicFieldStrMap[sbarcodefield]; + string billBaseDataFieldKey = GetBillBaseDataFieldKey(text3); + string baseDataSubFieldKey = GetBaseDataSubFieldKey(text3); + bool flag = IsSubField(text3); + bool isBaseDataPropFieldInBill = false; + if (flag) + { + field2 = _billFormMetaData.BusinessInfo.GetField(billBaseDataFieldKey); + } + else + { + field2 = _billFormMetaData.BusinessInfo.GetField(text3); + if (field is BasePropertyField && field2 is BasePropertyField) + { + isBaseDataPropFieldInBill = true; + Field controlField = field.ControlField; + Field controlField2 = field2.ControlField; + if (!DicFieldStrMap.Keys.Contains(controlField.Key) && controlField != null && controlField2 != null) + { + DicFieldStrMap.Add(controlField.Key, controlField2.Key); + if (!dictionary.ContainsKey(controlField.Key)) + { + BarCodeBillCorrespondInfo barCodeBillCorrespondInfo = new BarCodeBillCorrespondInfo(); + barCodeBillCorrespondInfo.BarCodeFieldKey = controlField.Key; + barCodeBillCorrespondInfo.BarCodeField = controlField; + barCodeBillCorrespondInfo.CorrespondFieldKey = controlField2.Key; + barCodeBillCorrespondInfo.BillFieldKey = controlField2.Key; + barCodeBillCorrespondInfo.BaseDataSubFieldKey = ""; + barCodeBillCorrespondInfo.BillField = controlField2; + barCodeBillCorrespondInfo.IsBaseDataSubField = false; + barCodeBillCorrespondInfo.IsBaseDataPropFieldInBill = false; + dictionary.Add(sbarcodefield, barCodeBillCorrespondInfo); + } + } + + if (!list.Contains(controlField2.Key)) + { + list.Add(controlField2.Key); + } + } + } + + if (!dictionary.ContainsKey(sbarcodefield) && field2 != null) + { + BarCodeBillCorrespondInfo barCodeBillCorrespondInfo2 = new BarCodeBillCorrespondInfo(); + barCodeBillCorrespondInfo2.BarCodeFieldKey = sbarcodefield; + barCodeBillCorrespondInfo2.BarCodeField = field; + barCodeBillCorrespondInfo2.CorrespondFieldKey = text3; + barCodeBillCorrespondInfo2.BillFieldKey = billBaseDataFieldKey; + barCodeBillCorrespondInfo2.BaseDataSubFieldKey = baseDataSubFieldKey; + barCodeBillCorrespondInfo2.BillField = field2; + barCodeBillCorrespondInfo2.IsBaseDataSubField = flag; + barCodeBillCorrespondInfo2.IsBaseDataPropFieldInBill = isBaseDataPropFieldInBill; + dictionary.Add(sbarcodefield, barCodeBillCorrespondInfo2); + } + + if (!list.Contains(billBaseDataFieldKey)) + { + list.Add(billBaseDataFieldKey); + } + + if (field2 != null && !list2.Contains(field2.Entity.EntryName)) + { + list2.Add(field2.Entity.EntryName); + if (field2.Entity is SubEntryEntity && !list2.Contains((field2.Entity as SubEntryEntity).ParentEntity.EntryName)) + { + list2.Add((field2.Entity as SubEntryEntity).ParentEntity.EntryName); + } + } + } + + string primaryField = string.Empty; + if (_sFormId.EqualsIgnoreCase("FA_CARD")) + { + if (list2.Contains("CardDetail")) + { + list2.Remove("CardDetail"); + list2.Insert(0, "CardDetail"); + } + + if (list2.Contains("Allocation")) + { + list2.Remove("Allocation"); + list2.Insert(1, "Allocation"); + } + + primaryField = "FWtAssetNumber"; + if (!list.Contains("FAllocAssetNO")) + { + list.Add("FAllocAssetNO"); + } + + if (!list.Contains("FAllocRatio")) + { + list.Add("FAllocRatio"); + } + } + else if (_sFormId.EqualsIgnoreCase("STK_Inventory")) + { + if (!list.Contains("FLot")) + { + list.Add("FLot"); + } + + if (!list.Contains("FBaseQty")) + { + list.Add("FBaseQty"); + } + + if (!list.Contains("FBaseAVBQty")) + { + list.Add("FBaseAVBQty"); + } + } + + if (barcodeSysParm != null && barcodeSysParm.FTemplatePolicyType.Equals("3")) + { + text2 = GetField(); + if (!list.Contains(text2) && !text2.IsNullOrEmptyOrWhiteSpace()) + { + list.Add(text2); + } + } + + string sSeq = "FBILLSEQ"; + if (DicFieldStrMap.Keys.Contains(sSeq)) + { + field = base.View.BillBusinessInfo.GetField(sSeq); + if (!dictionary.ContainsKey(sSeq)) + { + List source = _billFormMetaData.BusinessInfo.Entrys.Select((Entity p) => p.EntryName).ToList(); + string sEntitykey = string.Empty; + if (_sFormId == "SFC_OperationPlanning") + { + string key = DicFieldStrMap[sSeq].Split('F')[0]; + List source2 = source.Where((string p) => DicFieldStrMap[sSeq].IndexOf(p + "F") > -1).ToList(); + sEntitykey = source2.Where((string p) => p.Equals(key)).FirstOrDefault(); + } + else + { + sEntitykey = source.Where((string p) => DicFieldStrMap[sSeq].IndexOf(p + "F") > -1).FirstOrDefault(); + } + + if (!string.IsNullOrEmpty(sEntitykey)) + { + field2 = new Field + { + EntityKey = sEntitykey, + FieldName = DicFieldStrMap[sSeq].Replace(sEntitykey, ""), + PropertyName = "Seq" + }; + string text4 = DicFieldStrMap[sSeq]; + BarCodeBillCorrespondInfo barCodeBillCorrespondInfo3 = new BarCodeBillCorrespondInfo(); + barCodeBillCorrespondInfo3.BarCodeFieldKey = sSeq; + barCodeBillCorrespondInfo3.BarCodeField = field; + barCodeBillCorrespondInfo3.CorrespondFieldKey = text4; + barCodeBillCorrespondInfo3.BillFieldKey = text4; + barCodeBillCorrespondInfo3.BaseDataSubFieldKey = ""; + if (_sFormId == "SFC_OperationPlanning") + { + field2.Entity = _billFormMetaData.BusinessInfo.Entrys.Where((Entity p) => p.EntryName.Equals(sEntitykey)).FirstOrDefault(); + } + + barCodeBillCorrespondInfo3.BillField = field2; + barCodeBillCorrespondInfo3.IsBaseDataSubField = false; + barCodeBillCorrespondInfo3.IsBaseDataPropFieldInBill = false; + dictionary.Add(sSeq, barCodeBillCorrespondInfo3); + if (field2 != null && !list2.Contains(sEntitykey)) + { + list2.Add(sEntitykey); + } + } + } + } + + string pkFieldName = _billFormMetaData.BusinessInfo.GetForm().PkFieldName; + DynamicObject dynamicObject = base.View.Model.GetValue("FBillId") as DynamicObject; + if (dynamicObject == null && string.IsNullOrWhiteSpace(_sFormId)) + { + return; + } + + if (dynamicObject != null && dynamicObject.DynamicObjectType.Properties.Contains("MODELTYPEID") && Convert.ToInt32(dynamicObject["MODELTYPEID"]) == 400) + { + string text5 = "FBASEDATAID"; + field = base.View.BillBusinessInfo.GetField(text5); + if (!dictionary.ContainsKey(text5)) + { + string text6 = text5; + if (DicFieldStrMap.ContainsKey(text5)) + { + text6 = DicFieldStrMap[text5]; + } + + field2 = new Field + { + FieldName = pkFieldName, + PropertyName = "Id" + }; + BarCodeBillCorrespondInfo barCodeBillCorrespondInfo4 = new BarCodeBillCorrespondInfo(); + barCodeBillCorrespondInfo4.BarCodeFieldKey = text5; + barCodeBillCorrespondInfo4.BarCodeField = field; + barCodeBillCorrespondInfo4.CorrespondFieldKey = text6; + barCodeBillCorrespondInfo4.BillFieldKey = text6; + barCodeBillCorrespondInfo4.BaseDataSubFieldKey = ""; + barCodeBillCorrespondInfo4.BillField = field2; + barCodeBillCorrespondInfo4.IsBaseDataSubField = false; + barCodeBillCorrespondInfo4.IsBaseDataPropFieldInBill = false; + dictionary.Add(text5, barCodeBillCorrespondInfo4); + } + } + + DynamicObject[] array = null; + array = GetSourceBillData(_billFormMetaData, list, _sourceId, _sourceEntryId); + Field seqField = (dictionary.ContainsKey(sSeq) ? dictionary[sSeq].BillField : null); + if (seqField != null && !seqField.EntityKey.IsNullOrEmptyOrWhiteSpace()) + { + DynamicObject[] array2 = array; + foreach (DynamicObject dynamicObject2 in array2) + { + DynamicObjectCollection dynamicObjectCollection = (dynamicObject2.DynamicObjectType.Properties.ContainsKey(seqField.EntityKey) ? (dynamicObject2[seqField.EntityKey] as DynamicObjectCollection) : null); + if (dynamicObjectCollection != null && dynamicObjectCollection.Count > 0) + { + dynamicObjectCollection.Sort((DynamicObject it) => Convert.ToInt32(it[seqField.PropertyName])); + } + } + } + + Dictionary dictionary2 = new Dictionary(); + if ((listData == null || listData.Count() <= 0) && !_sourceEntryId.IsNullOrEmptyOrWhiteSpace()) + { + List list3 = _sourceEntryId.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (list3 == null || list3.Count == 0) + { + list3 = _sourceId.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + } + + int num = 0; + foreach (string item2 in list3) + { + dictionary2.Add(num, item2); + num++; + } + } + else if (listData != null && listData.Count() > 0) + { + for (int j = 0; j < listData.Count; j++) + { + string value = (listData[j].EntryPrimaryKeyValue.IsNullOrEmptyOrWhiteSpace() ? "" : listData[j].EntryPrimaryKeyValue); + if (_sFormId.Equals("SFC_OperationPlanning") && listData[j].FieldValues.ContainsKey("FSubEntity")) + { + value = listData[j].FieldValues["FSubEntity"]; + } + + dictionary2.Add(j, value); + } + } + + if (!string.IsNullOrWhiteSpace(text) && array.Count() > 0 && array[0].DynamicObjectType.Properties.Contains(text)) + { + DynamicObject[] array3 = array; + foreach (DynamicObject dynamicObject3 in array3) + { + DynamicObjectCollection dynamicObjectCollection2 = dynamicObject3[text] as DynamicObjectCollection; + List list4 = new List(); + if (_isFromBill == 1 && (listData == null || listData.Count() <= 0) && !_sourceEntryId.IsNullOrEmptyOrWhiteSpace()) + { + List list5 = _sourceEntryId.Split(',').ToList(); + foreach (string item3 in list5) + { + int num2 = 0; + foreach (DynamicObject item4 in dynamicObjectCollection2) + { + string text7 = Convert.ToString(item4["Id"]); + if (text7 == item3) + { + list4.Add(num2); + break; + } + + num2++; + } + } + } + else + { + for (int l = 0; l < listData.Count; l++) + { + string entryPrimaryKeyValue = listData[l].EntryPrimaryKeyValue; + int num3 = 0; + foreach (DynamicObject item5 in dynamicObjectCollection2) + { + string text8 = Convert.ToString(item5["Id"]); + if (text8 == entryPrimaryKeyValue) + { + list4.Add(num3); + break; + } + + num3++; + } + } + } + + foreach (DynamicObject item6 in dynamicObjectCollection2) + { + foreach (string item7 in list2) + { + if (!(item7 != text) || !item6.DynamicObjectType.Properties.Contains(item7)) + { + continue; + } + + DynamicObjectCollection dynamicObjectCollection3 = item6[item7] as DynamicObjectCollection; + foreach (DynamicObject item8 in dynamicObjectCollection3) + { + if (!dictionary2.Values.Contains(Convert.ToString(item8["Id"]))) + { + dictionary2.Add(dictionary2.Count(), Convert.ToString(item8["Id"])); + } + } + } + } + + List list6 = new List(); + foreach (int item9 in list4) + { + list6.Add(dynamicObjectCollection2[item9]); + } + + dynamicObjectCollection2.Clear(); + for (int m = 0; m < list6.Count; m++) + { + dynamicObjectCollection2.Add(list6[m]); + } + } + } + + Entity entity2 = base.View.BusinessInfo.GetEntity("FEntityToBill"); + EntryEntity entryEntity = base.View.BusinessInfo.GetEntryEntity("FEntityToBar"); + DynamicObjectType dynamicObjectType = entity2.DynamicObjectType; + DynamicObject dybill = new DynamicObject(dynamicObjectType); + DynamicObjectCollection dybillCol = new DynamicObjectCollection(dynamicObjectType); + dybillCol = GetDynamicRows(array, null, dybillCol, dictionary, list2, dynamicObjectType, dybill, 0, 0, primaryField); + if (base.View.Model.GetValue("FBarCodeRule") is DynamicObject dynamicObject4 && dynamicObject4.Contains("FPrintSummaryEntry") && Convert.ToBoolean(dynamicObject4["FPrintSummaryEntry"])) + { + dybillCol = MergeSourceBill(dynamicObjectType, dybillCol.ToArray(), dictionary); + } + + if (dybillCol != null && dybillCol.Count() > 0 && dictionary2 != null && dictionary2.Count() > 0) + { + List list7 = new List(); + foreach (string entryId in dictionary2.Values) + { + DynamicObject dynamicObject5 = dybillCol.Where((DynamicObject p) => Convert.ToString(p["SrcEntryId"]).Equals(entryId)).FirstOrDefault(); + if (dynamicObject5 != null) + { + list7.Add(dynamicObject5); + } + } + + if (list7 != null && list7.Count() > 0 && _sFormId != "BD_SerialMainFile" && _sFormId != "BD_MATERIAL") + { + dybillCol.Clear(); + for (int n = 0; n < list7.Count; n++) + { + dybillCol.Add(list7[n]); + } + } + } + + bool flag2 = Convert.ToBoolean(base.View.Model.GetValue("FMergeBillData")); + if (row == -1) + { + if (flag2) + { + dybillCol = MergeEntries(dynamicObjectType, dybillCol, dictionary); + } + + EntryEntity entity3 = (EntryEntity)base.View.BillBusinessInfo.GetEntity("FEntityToBill"); + CreateBillRows(dybillCol, entity3, dictionary); + } + else + { + int index = Convert.ToInt32(base.View.Model.GetValue("FSrcIndex", row)); + DynamicObject detil = dybillCol[index]; + ModifyBillRow(detil, dictionary, row); + } + + OQLFilter ofilter = OQLFilter.CreateHeadEntityFilter($"FID = '{eRuleId}'"); + DynamicObject dynamicObject6 = BusinessDataServiceHelper.Load(base.Context, "BD_BarCodeRule", null, ofilter).FirstOrDefault(); + if (dynamicObject6 != null) + { + DynamicObjectCollection source3 = dynamicObject6["BD_BARCODERULEENTRY"] as DynamicObjectCollection; + List list8 = source3.Select((DynamicObject s) => Convert.ToString((s["BarCodePropertyId"] as DynamicObject)["BARCODEFIELDKEY"])).ToList(); + if (list8 != null && list8.Count > 0 && list8.Contains("FBILLCODE") && list8.Contains("FOPBILLNO")) + { + int entryRowCount = Model.GetEntryRowCount("FEntityToBill"); + for (int num4 = 0; num4 < entryRowCount; num4++) + { + Model.SetValue("FOPBILLNO", Model.GetValue("FBILLCODE", num4), num4); + } + } + } + + if (barcodeSysParm != null && barcodeSysParm.FTemplatePolicyType.Equals("3") && !text2.IsNullOrEmptyOrWhiteSpace()) + { + SetCustmerToBarcodePrint(text2, array); + } + } + + private string GetField() + { + string result = string.Empty; + string text = $"SELECT FFIELDKEY FROM T_BD_BARCODEITEM t1\r\n INNER JOIN T_BD_BARCODEITEMENTRY t2 ON t1.FID = t2.FID\r\n AND t1.FBARCODEFIELDKEY = 'FCUSTID'\r\n AND FBILLFORMID = '{_sFormId}' "; + DynamicObject dynamicObject = DBServiceHelper.ExecuteDynamicObject(base.Context, text).FirstOrDefault(); + if (dynamicObject != null) + { + result = Convert.ToString(dynamicObject["FFIELDKEY"]); + } + + return result; + } + + private void SetCustmerToBarcodePrint(string keyCustomer, DynamicObject[] dySoruceObjsColl) + { + Field field = _billFormMetaData.BusinessInfo.GetField(keyCustomer); + if (field == null) + { + return; + } + + DynamicObject dynamicObject = dySoruceObjsColl[dySoruceObjsColl.Count() - 1]; + Entity entity = field.Entity; + if (entity is EntryEntity) + { + string propertyName = Convert.ToString(entity.DynamicObjectType); + if (dynamicObject[propertyName] is DynamicObjectCollection dynamicObjectCollection && dynamicObjectCollection.Count > 0 && dynamicObjectCollection[0].DynamicObjectType.Properties.Contains(field.PropertyName)) + { + Model.SetValue("FCustomer", dynamicObjectCollection[0][field.PropertyName]); + } + } + else if (dynamicObject.DynamicObjectType.Properties.Contains(field.PropertyName)) + { + Model.SetValue("FCustomer", dynamicObject[field.PropertyName]); + } + } + + protected virtual DynamicObjectCollection MergeEntries(DynamicObjectType dotype, DynamicObjectCollection dybillCol, Dictionary DicFieldCorresMap) + { + DynamicObjectCollection dynamicObjectCollection = new DynamicObjectCollection(dotype); + Dictionary> dictionary = new Dictionary>(); + Dictionary dictionary2 = new Dictionary(); + int num = 0; + foreach (DynamicObject item in dybillCol) + { + Dictionary dictionary3 = new Dictionary(); + string text = ""; + Dictionary dictionary4 = new Dictionary(); + foreach (BarCodeBillCorrespondInfo value7 in DicFieldCorresMap.Values) + { + Field barCodeField = value7.BarCodeField; + if (barCodeField.DynamicProperty == null || !item.DynamicObjectType.Properties.Contains(barCodeField.PropertyName)) + { + continue; + } + + if (barCodeField is QtyField) + { + decimal value = (item[barCodeField.PropertyName].IsNullOrEmptyOrWhiteSpace() ? 0m : Convert.ToDecimal(item[barCodeField.PropertyName])); + dictionary4.Add(barCodeField, value); + } + else if (barCodeField is BaseDataField || barCodeField is RelatedFlexGroupField) + { + if (barCodeField is LotField) + { + if (Convert.ToString(item[barCodeField.PropertyName + "_Text"]).IsNullOrEmptyOrWhiteSpace()) + { + if (item[barCodeField.PropertyName] != null) + { + DynamicObject dynamicObject = item[barCodeField.PropertyName] as DynamicObject; + text += Convert.ToString(dynamicObject["Number"]).Trim(); + } + else + { + text += ""; + } + } + else + { + text += Convert.ToString(item[barCodeField.PropertyName + "_Text"]).Trim(); + } + + continue; + } + + if (barCodeField is RelatedFlexGroupField) + { + DynamicObject dynamicObject2 = item[barCodeField.PropertyName] as DynamicObject; + string text2 = ""; + if (dynamicObject2 != null) + { + long num2 = Convert.ToInt64(dynamicObject2["Id"]); + string text3 = Convert.ToString(((RelatedFlexGroupField)barCodeField).RefFormDynamicObjectType); + string text4 = ""; + if ("BD_FLEXVALUESDETAIL".EqualsIgnoreCase(text3)) + { + text2 = BarCodeBaseInfoServiceHelper.GetFlexValues(base.Context, num2, text3, out text4); + } + else if ("BD_FLEXSITEMDETAILV".EqualsIgnoreCase(text3)) + { + text2 = BarCodeBaseInfoServiceHelper.GetFlexValues(base.Context, num2, text3, out text4); + } + } + + text += text2; + continue; + } + + string text5 = Convert.ToString(item[barCodeField.PropertyName + "_Id"]); + EnumPkFieldType pkFieldType = ((BaseDataField)barCodeField).LookUpObject.PkFieldType; + if (!text5.IsNullOrEmptyOrWhiteSpace()) + { + if (barCodeField is AssistantField) + { + string propertyName = ((AssistantField)barCodeField).NumberProperty.PropertyName; + DynamicObject dynamicObject3 = BusinessDataServiceHelper.LoadSingle(base.Context, text5, ((BaseDataField)barCodeField).RefFormDynamicObjectType); + string text6 = string.Empty; + if (dynamicObject3 != null && dynamicObject3.Contains(propertyName)) + { + text6 = Convert.ToString(dynamicObject3[propertyName]); + } + + text += text6; + } + else if (barCodeField is BaseDataField) + { + if (!pkFieldType.Equals(EnumPkFieldType.STRING) && Convert.ToInt64(text5) <= 0) + { + text += ""; + continue; + } + + LookUpObject lookUpObject = null; + if (barCodeField is ItemClassField) + { + ItemClassTypeField itemClassTypeField = ((ItemClassField)barCodeField).ControlField as ItemClassTypeField; + string text7 = Convert.ToString(item[itemClassTypeField.PropertyName]); + if (text7.IsNullOrEmptyOrWhiteSpace() && !text5.IsNullOrEmptyOrWhiteSpace()) + { + throw new Exception(string.Format(ResManager.LoadKDString("{0}字段不可以为空!", "f0e7cc43f9c54a52", "APP_ISVPAAC2016062210550"), itemClassTypeField.Name.ToString(base.Context.UserLocale))); + } + + lookUpObject = itemClassTypeField.GetLookUpObject(text7); + } + else + { + lookUpObject = ((BaseDataField)barCodeField).LookUpObject; + } + + string propertyName2 = ((BaseDataField)barCodeField).NumberProperty.PropertyName; + DynamicObject dynamicObject4 = BusinessDataServiceHelper.LoadSingle(base.Context, text5, ((BaseDataField)barCodeField).RefFormDynamicObjectType); + string text8 = string.Empty; + if (dynamicObject4.Contains(propertyName2)) + { + text8 = Convert.ToString(dynamicObject4[propertyName2]); + } + + text += text8; + } + else + { + text += ""; + } + } + else + { + text += ""; + } + } + else + { + string text9 = Convert.ToString(item[barCodeField.PropertyName]); + if (barCodeField is DecimalField) + { + DecimalField decimalField = barCodeField as DecimalField; + int fieldScale = decimalField.FieldScale; + decimal d = Convert.ToDecimal(item[barCodeField.PropertyName]); + text9 = decimal.Round(d, fieldScale).ToString(); + } + + text += text9; + } + } + + if (dictionary2.ContainsKey(text)) + { + string value2 = ""; + dictionary2.TryGetValue(text, out value2); + Dictionary value3 = new Dictionary(); + dictionary.TryGetValue(text, out value3); + if (!value2.IsNullOrEmptyOrWhiteSpace()) + { + foreach (KeyValuePair item2 in dictionary4) + { + Field key = item2.Key; + decimal value4 = item2.Value; + decimal num3 = default(decimal); + decimal num4 = default(decimal); + num3 = value3[key]; + num4 = value4 + num3; + value3[key] = num4; + } + + dictionary2[text] = dictionary2[text] + "," + num; + } + } + else + { + dictionary.Add(text, dictionary4); + dictionary2.Add(text, num.ToString()); + } + + num++; + } + + foreach (KeyValuePair item3 in dictionary2) + { + string key2 = item3.Key; + string value5 = item3.Value.Split(',').ToArray().FirstOrDefault(); + int index = Convert.ToInt32(value5); + Dictionary value6 = new Dictionary(); + dictionary.TryGetValue(key2, out value6); + foreach (KeyValuePair item4 in value6) + { + dybillCol[index][item4.Key.PropertyName] = item4.Value; + } + + dynamicObjectCollection.Add(dybillCol[index]); + } + + return dynamicObjectCollection; + } + + protected virtual DynamicObjectCollection MergeSourceBill(DynamicObjectType dotype, DynamicObject[] dybillCol, Dictionary DicFieldCorresMap) + { + DynamicObjectCollection dynamicObjectCollection = new DynamicObjectCollection(dotype); + Dictionary> dictionary = new Dictionary>(); + Dictionary dictionary2 = new Dictionary(); + if (MergeID.Count > 0) + { + MergeID.Clear(); + } + + int num = 0; + foreach (DynamicObject dynamicObject in dybillCol) + { + Dictionary dictionary3 = new Dictionary(); + string text = ""; + Dictionary dictionary4 = new Dictionary(); + foreach (BarCodeBillCorrespondInfo value7 in DicFieldCorresMap.Values) + { + Field barCodeField = value7.BarCodeField; + if (barCodeField.DynamicProperty == null || !dynamicObject.DynamicObjectType.Properties.Contains(barCodeField.PropertyName)) + { + continue; + } + + if (barCodeField is QtyField) + { + decimal value = (dynamicObject[barCodeField.PropertyName].IsNullOrEmptyOrWhiteSpace() ? 0m : Convert.ToDecimal(dynamicObject[barCodeField.PropertyName])); + dictionary4.Add(barCodeField, value); + continue; + } + + if (barCodeField is BaseDataField || barCodeField is RelatedFlexGroupField) + { + if (barCodeField is LotField) + { + if (Convert.ToString(dynamicObject[barCodeField.PropertyName + "_Text"]).IsNullOrEmptyOrWhiteSpace()) + { + if (dynamicObject[barCodeField.PropertyName] != null) + { + DynamicObject dynamicObject2 = dynamicObject[barCodeField.PropertyName] as DynamicObject; + text += Convert.ToString(dynamicObject2["Number"]).Trim(); + } + else + { + text += ""; + } + } + else + { + text += Convert.ToString(dynamicObject[barCodeField.PropertyName + "_Text"]).Trim(); + } + + continue; + } + + if (barCodeField is RelatedFlexGroupField) + { + DynamicObject dynamicObject3 = dynamicObject[barCodeField.PropertyName] as DynamicObject; + string text2 = ""; + if (dynamicObject3 != null) + { + long num2 = Convert.ToInt64(dynamicObject3["Id"]); + string text3 = Convert.ToString(((RelatedFlexGroupField)barCodeField).RefFormDynamicObjectType); + string text4 = ""; + if ("BD_FLEXVALUESDETAIL".EqualsIgnoreCase(text3)) + { + text2 = BarCodeBaseInfoServiceHelper.GetFlexValues(base.Context, num2, text3, out text4); + } + else if ("BD_FLEXSITEMDETAILV".EqualsIgnoreCase(text3)) + { + text2 = BarCodeBaseInfoServiceHelper.GetFlexValues(base.Context, num2, text3, out text4); + } + } + + text += text2; + continue; + } + + string text5 = Convert.ToString(dynamicObject[barCodeField.PropertyName + "_Id"]); + EnumPkFieldType pkFieldType = ((BaseDataField)barCodeField).LookUpObject.PkFieldType; + if (!text5.IsNullOrEmptyOrWhiteSpace()) + { + if (barCodeField is AssistantField) + { + string propertyName = ((AssistantField)barCodeField).NumberProperty.PropertyName; + DynamicObject dynamicObject4 = BusinessDataServiceHelper.LoadSingle(base.Context, text5, ((BaseDataField)barCodeField).RefFormDynamicObjectType); + string text6 = string.Empty; + if (dynamicObject4 != null && dynamicObject4.Contains(propertyName)) + { + text6 = Convert.ToString(dynamicObject4[propertyName]); + } + + text += text6; + } + else if (barCodeField is BaseDataField) + { + if (!pkFieldType.Equals(EnumPkFieldType.STRING) && Convert.ToInt64(text5) <= 0) + { + text += ""; + continue; + } + + LookUpObject lookUpObject = null; + if (barCodeField is ItemClassField) + { + ItemClassTypeField itemClassTypeField = ((ItemClassField)barCodeField).ControlField as ItemClassTypeField; + string text7 = Convert.ToString(dynamicObject[itemClassTypeField.PropertyName]); + if (text7.IsNullOrEmptyOrWhiteSpace() && !text5.IsNullOrEmptyOrWhiteSpace()) + { + throw new Exception(string.Format(ResManager.LoadKDString("{0}字段不可以为空!", "f0e7cc43f9c54a52", "APP_ISVPAAC2016062210550"), itemClassTypeField.Name.ToString(base.Context.UserLocale))); + } + + lookUpObject = itemClassTypeField.GetLookUpObject(text7); + } + else + { + lookUpObject = ((BaseDataField)barCodeField).LookUpObject; + } + + string propertyName2 = ((BaseDataField)barCodeField).NumberProperty.PropertyName; + DynamicObject dynamicObject5 = BusinessDataServiceHelper.LoadSingle(base.Context, text5, ((BaseDataField)barCodeField).RefFormDynamicObjectType); + string text8 = string.Empty; + if (dynamicObject5.Contains(propertyName2)) + { + text8 = Convert.ToString(dynamicObject5[propertyName2]); + } + + text += text8; + } + else + { + text += ""; + } + } + else + { + text += ""; + } + + continue; + } + + string text9 = Convert.ToString(dynamicObject[barCodeField.PropertyName]); + if (barCodeField.PropertyName.EqualsIgnoreCase("BILLSEQ")) + { + int result = 0; + if (int.TryParse(text9, out result)) + { + dictionary4.Add(barCodeField, result); + } + + continue; + } + + if (barCodeField is DecimalField) + { + DecimalField decimalField = barCodeField as DecimalField; + int fieldScale = decimalField.FieldScale; + decimal d = Convert.ToDecimal(dynamicObject[barCodeField.PropertyName]); + text9 = decimal.Round(d, fieldScale).ToString(); + } + + text += text9; + } + + if (dictionary2.ContainsKey(text)) + { + string value2 = ""; + dictionary2.TryGetValue(text, out value2); + Dictionary value3 = new Dictionary(); + dictionary.TryGetValue(text, out value3); + if (!value2.IsNullOrEmptyOrWhiteSpace()) + { + foreach (KeyValuePair item in dictionary4) + { + Field key = item.Key; + if (!key.FieldName.EqualsIgnoreCase("FBILLSEQ")) + { + decimal value4 = item.Value; + decimal num3 = default(decimal); + decimal num4 = default(decimal); + num3 = value3[key]; + num4 = value4 + num3; + value3[key] = num4; + } + } + + dictionary2[text] = dictionary2[text] + "," + num; + } + } + else + { + dictionary.Add(text, dictionary4); + dictionary2.Add(text, num.ToString()); + } + + num++; + } + + foreach (KeyValuePair item2 in dictionary2) + { + string key2 = item2.Key; + string value5 = item2.Value.Split(',').ToArray().FirstOrDefault(); + int num5 = Convert.ToInt32(value5); + Dictionary value6 = new Dictionary(); + dictionary.TryGetValue(key2, out value6); + foreach (KeyValuePair item3 in value6) + { + dybillCol[num5][item3.Key.PropertyName] = item3.Value; + } + + dynamicObjectCollection.Add(dybillCol[num5]); + if (Convert.ToInt64(dybillCol[num5]["Id"]) > 0) + { + MergeID.Add(dybillCol[num5]["SrcEntryId"]); + } + } + + if (_sFormId == "STK_Inventory") + { + DynamicObjectCollection dynamicObjectCollection2 = KUtil.Clone(dynamicObjectCollection); + dynamicObjectCollection2.Clear(); + for (int j = 0; j < listData.Count(); j++) + { + string text10 = Convert.ToString(listData[j].PrimaryKeyValue); + foreach (DynamicObject item4 in dynamicObjectCollection) + { + string text11 = item4["SrcEntryId"].ToString(); + if (text10 == text11) + { + dynamicObjectCollection2.Add(item4); + } + } + } + + dynamicObjectCollection = dynamicObjectCollection2; + } + + return dynamicObjectCollection; + } + + protected virtual DynamicObject[] GetSourceBillData(FormMetadata _billFormMetaData, List lstFieldKey, string sourceId, string sourceEntryId) + { + DynamicObject[] array = null; + if (_sFormId.EqualsIgnoreCase("STK_Inventory")) + { + object[] pkArray = ((IEnumerable)sourceId.Split(',')).ToArray(); + DynamicObject[] array2 = BusinessDataServiceHelper.Load(base.Context, pkArray, _billFormMetaData.BusinessInfo.GetDynamicObjectType()); + return BarCodeCommonServiceHelper.GetInventoryDatas(base.Context, array2); + } + + string pkFieldName = _billFormMetaData.BusinessInfo.GetForm().PkFieldName; + EnumPkFieldType pkFieldType = _billFormMetaData.BusinessInfo.GetForm().PkFieldType; + List list = new List(); + foreach (string item in lstFieldKey) + { + list.Add(new SelectorItemInfo(item)); + } + + string text = ""; + text = ((!pkFieldType.Equals(EnumPkFieldType.STRING)) ? $"{pkFieldName} IN ( {sourceId} )" : string.Format("{0} IN ( '{1}' )", pkFieldName, string.Join("','", sourceId.Split(',').ToList()))); + OQLFilter ofilter = OQLFilter.CreateHeadEntityFilter(text); + if (list.Count > 0) + { + return BusinessDataServiceHelper.Load(base.Context, _sFormId, list, ofilter); + } + + return BusinessDataServiceHelper.Load(base.Context, _sFormId, null, ofilter); + } + + private bool IsSubField(string fieldKey) + { + int num = fieldKey.IndexOf("^"); + if (num > 0) + { + return true; + } + + return false; + } + + private string GetBillBaseDataFieldKey(string fieldKey) + { + int num = fieldKey.IndexOf("^"); + if (num > 0) + { + return fieldKey.Substring(0, num); + } + + return fieldKey; + } + + private string GetBaseDataSubFieldKey(string fieldKey) + { + int num = fieldKey.IndexOf("^"); + if (num > 0) + { + return fieldKey.Substring(num + 1, fieldKey.Length - num - 1); + } + + return ""; + } + + private BusinessInfo GetFormBusinessInfo(string formId) + { + if (!_baseBusinessInfo.ContainsKey(formId)) + { + BusinessInfo businessInfo = (MetaDataServiceHelper.Load(base.View.Context, formId) as FormMetadata).BusinessInfo; + _baseBusinessInfo.Add(formId, businessInfo); + return businessInfo; + } + + return _baseBusinessInfo[formId]; + } + + private DynamicObject GetBaseDataDynamicObject(string formId, string pkId) + { + string key = $"{formId}#{pkId}"; + if (!_baseDataInfo.ContainsKey(key)) + { + BusinessInfo formBusinessInfo = GetFormBusinessInfo(formId); + DynamicObject dynamicObject = BusinessDataServiceHelper.LoadSingle(base.View.Context, pkId, formBusinessInfo, null); + _baseDataInfo.Add(key, dynamicObject); + return dynamicObject; + } + + return _baseDataInfo[key]; + } + + private object GetBaseDataSubFieldValue(DynamicObject dy, BusinessInfo info, string key) + { + object result = null; + Field field = info.GetField(key); + string entryName = field.Entity.EntryName; + if (dy.DynamicObjectType.Name == entryName) + { + result = field.DynamicProperty.GetValue(dy); + } + else if (dy.DynamicObjectType.Properties.Contains(entryName)) + { + DynamicObjectCollection dynamicObjectCollection = dy[entryName] as DynamicObjectCollection; + if (!dynamicObjectCollection.IsNullOrEmpty() && dynamicObjectCollection.Count > 0) + { + result = field.DynamicProperty.GetValue(dynamicObjectCollection[0]); + } + } + + return result; + } + + public DynamicObjectCollection GetDynamicRows(DynamicObject[] dySoruceObjsColl, DynamicObject dyRootSoruceObj, DynamicObjectCollection dybillCol, Dictionary DicFieldCorresMap, List lEntryNames, DynamicObjectType dotype, DynamicObject dybill, int iCurLevel, int iMaxLevel, string primaryField) + { + List list = new List(lEntryNames); + Dictionary dictionary = new Dictionary(DicFieldCorresMap); + DynamicObjectCollection dynamicObjectCollection = new DynamicObjectCollection(dotype); + bool flag = dyRootSoruceObj.IsNullOrEmptyOrWhiteSpace(); + decimal num = Convert.ToDecimal(dybill["Qty"]); + dynamicObjectCollection = dybillCol; + string text = string.Empty; + if (dySoruceObjsColl != null && dySoruceObjsColl.Count() > 0) + { + foreach (DynamicObject dynamicObject in dySoruceObjsColl) + { + DynamicObject newDynamicObject = GetNewDynamicObject(dybill); + if (flag) + { + dyRootSoruceObj = dynamicObject; + } + + object primaryValue = null; + int num2 = 0; + foreach (string lEntryName in lEntryNames) + { + if (!primaryField.IsNullOrEmptyOrWhiteSpace()) + { + if (dyRootSoruceObj.DynamicObjectType.Properties.Contains(lEntryName)) + { + num2++; + text = lEntryName; + list.Remove(lEntryName); + break; + } + } + else if (dynamicObject.DynamicObjectType.Properties.Contains(lEntryName)) + { + num2++; + text = lEntryName; + list.Remove(lEntryName); + } + } + + if (!primaryField.IsNullOrEmptyOrWhiteSpace() && (!new string[3] { "", "CardDetail", "Allocation" }.Contains(text) || list.Count() > 2)) + { + num2 = 2; + } + + if (num2 >= 2) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("在同一个条码规则中的条码属性字段,需要符合一定的规则才能生成条码打印数据:\r\n1、各属性字段都在同一个单据头,如单据头上的所有字段;\r\n2、各属性字段都在同一个单据体,例如物料明细上的所有字段;\r\n3、各属性字段虽然处于不同的单据头或单据体,但它们之间具有关联关系,例如 单据头+物料、单据头+物料+序列号、物料+序列号等。", "0011019000003272", SubSystemType.BASE)); + break; + } + + if (num2 == 1) + { + foreach (BarCodeBillCorrespondInfo item in DicFieldCorresMap.Values.ToList()) + { + string barCodeFieldKey = item.BarCodeFieldKey; + Field barCodeField = item.BarCodeField; + bool isBaseDataSubField = item.IsBaseDataSubField; + Field billField = item.BillField; + if (billField is MulBaseDataField || billField is MulAssistantField) + { + throw new Exception(string.Format(ResManager.LoadKDString("不支持多选资料字段({0})!", "4c6c1dcb8e6e4ea5", "APP_ISVPAAC2016062210550"), billField)); + } + + if (isBaseDataSubField) + { + if ((billField.Entity.IsNullOrEmpty() || dynamicObject.DynamicObjectType.Name.Equals(billField.Entity.EntryName) || dynamicObject.DynamicObjectType.Name.Equals(billField.Entity.DynamicObjectType.Name)) && dynamicObject.DynamicObjectType.Properties.Contains(billField.PropertyName) && !string.IsNullOrWhiteSpace(barCodeField.FieldName)) + { + string baseDataSubFieldKey = item.BaseDataSubFieldKey; + string formId = (billField as BaseDataField).LookUpObject.FormId; + BusinessInfo formBusinessInfo = GetFormBusinessInfo(formId); + DynamicObject dynamicObject2 = dynamicObject[billField.PropertyName] as DynamicObject; + string pkId = Convert.ToString(dynamicObject2["Id"]); + DynamicObject baseDataDynamicObject = GetBaseDataDynamicObject(formId, pkId); + object baseDataSubFieldValue = GetBaseDataSubFieldValue(dynamicObject2, formBusinessInfo, baseDataSubFieldKey); + newDynamicObject[barCodeField.PropertyName] = baseDataSubFieldValue; + dictionary.Remove(barCodeFieldKey); + if (baseDataSubFieldValue != null && dynamicObject.DynamicObjectType.Properties.Contains(billField.PropertyName + "_Id") && newDynamicObject.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + newDynamicObject[barCodeField.PropertyName + "_Id"] = (baseDataSubFieldValue as DynamicObject)["Id"]; + } + } + } + else + { + if ((!billField.Entity.IsNullOrEmpty() && !dynamicObject.DynamicObjectType.Name.Equals(billField.Entity.EntryName) && !dynamicObject.DynamicObjectType.Name.Equals(billField.Entity.DynamicObjectType.Name)) || !dynamicObject.DynamicObjectType.Properties.Contains(billField.PropertyName) || string.IsNullOrWhiteSpace(barCodeField.FieldName)) + { + continue; + } + + if (barCodeFieldKey.EqualsIgnoreCase(primaryField)) + { + primaryValue = dynamicObject[billField.PropertyName]; + } + + if (dynamicObject[billField.PropertyName] != null && dynamicObject[billField.PropertyName].GetType().Name.EqualsIgnoreCase("OrmLocaleValue")) + { + newDynamicObject[barCodeField.PropertyName] = dynamicObject[billField.PropertyName].ToString(); + } + else if (dynamicObject[billField.PropertyName] is DynamicObjectCollection) + { + DynamicObjectCollection dynamicObjectCollection2 = dynamicObject[billField.PropertyName] as DynamicObjectCollection; + DynamicObjectCollection dynamicObjectCollection3 = newDynamicObject[barCodeField.PropertyName] as DynamicObjectCollection; + if (dynamicObjectCollection3 == null) + { + dynamicObjectCollection3 = new DynamicObjectCollection(dynamicObjectCollection2.DynamicCollectionItemPropertyType); + newDynamicObject[barCodeField.PropertyName] = dynamicObjectCollection3; + } + + foreach (DynamicObject item2 in dynamicObjectCollection2) + { + dynamicObjectCollection3.Add(item2); + } + } + else + { + newDynamicObject[barCodeField.PropertyName] = dynamicObject[billField.PropertyName]; + } + + dictionary.Remove(barCodeFieldKey); + if (dynamicObject.DynamicObjectType.Properties.Contains(billField.PropertyName + "_Id") && newDynamicObject.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + newDynamicObject[barCodeField.PropertyName + "_Id"] = dynamicObject[billField.PropertyName + "_Id"]; + } + } + } + + if (!flag && newDynamicObject.DynamicObjectType.Properties.Contains("SrcEntryId") && dynamicObject.DynamicObjectType.Properties.Contains("Id") && !_sFormId.IsNullOrEmptyOrWhiteSpace() && (_sFormId != "SFC_OperationPlanning" || (dynamicObject.GetDataEntityType().Name.Equals("SubEntity") && _sFormId == "SFC_OperationPlanning")) && !string.Equals(_sFormId, "FA_CARD", StringComparison.OrdinalIgnoreCase)) + { + newDynamicObject["SrcEntryId"] = Convert.ToString(dynamicObject["Id"]); + } + + iCurLevel++; + if (iCurLevel > iMaxLevel) + { + iMaxLevel = iCurLevel; + } + + DynamicObjectCollection dynamicObjectCollection4 = null; + if (!primaryField.IsNullOrEmptyOrWhiteSpace()) + { + dynamicObjectCollection4 = (DynamicObjectCollection)dyRootSoruceObj[text]; + } + else + { + dynamicObjectCollection4 = (DynamicObjectCollection)dynamicObject[text]; + if (text == "SubEntity" && _sFormId == "SFC_OperationPlanning" && IsCheck == 1) + { + DynamicObject dynamicObject3 = dynamicObjectCollection4[0].Clone() as DynamicObject; + DynamicObjectCollection dynamicObjectCollection5 = new DynamicObjectCollection(dynamicObject3.DynamicObjectType); + int num3 = 0; + foreach (DynamicObject item3 in dynamicObjectCollection4) + { + string value = Convert.ToString(item3["id"]); + if (SelectRowId.Keys.Contains(value)) + { + dynamicObjectCollection5.Add(item3); + } + } + + dynamicObjectCollection4 = dynamicObjectCollection5; + } + } + + List list2 = dynamicObjectCollection4.ToList(); + if (!primaryValue.IsNullOrEmptyOrWhiteSpace()) + { + list2 = list2.Where((DynamicObject p) => p["AllocAssetNO"].ToString().EqualsIgnoreCase(primaryValue.ToString())).ToList(); + } + + GetDynamicRows(list2.ToArray(), dyRootSoruceObj, dynamicObjectCollection, dictionary, list, dotype, newDynamicObject, iCurLevel, iMaxLevel, primaryField); + iCurLevel--; + continue; + } + + foreach (BarCodeBillCorrespondInfo item4 in DicFieldCorresMap.Values.ToList()) + { + string barCodeFieldKey2 = item4.BarCodeFieldKey; + Field barCodeField2 = item4.BarCodeField; + bool isBaseDataSubField2 = item4.IsBaseDataSubField; + Field billField2 = item4.BillField; + if (billField2 is MulBaseDataField || billField2 is MulAssistantField) + { + throw new Exception(string.Format(ResManager.LoadKDString("不支持多选资料字段({0})!", "4c6c1dcb8e6e4ea5", "APP_ISVPAAC2016062210550"), billField2)); + } + + if (isBaseDataSubField2) + { + if ((billField2.Entity.IsNullOrEmpty() || dynamicObject.DynamicObjectType.Name.Equals(billField2.Entity.EntryName) || dynamicObject.DynamicObjectType.Name.Equals(billField2.Entity.DynamicObjectType.Name)) && dynamicObject.DynamicObjectType.Properties.Contains(billField2.PropertyName) && !string.IsNullOrWhiteSpace(barCodeField2.FieldName)) + { + string baseDataSubFieldKey2 = item4.BaseDataSubFieldKey; + string formId2 = (billField2 as BaseDataField).LookUpObject.FormId; + BusinessInfo formBusinessInfo2 = GetFormBusinessInfo(formId2); + DynamicObject dynamicObject4 = dynamicObject[billField2.PropertyName] as DynamicObject; + object baseDataSubFieldValue2; + if (dynamicObject4.DynamicObjectType.Properties.Contains(formBusinessInfo2.GetField(baseDataSubFieldKey2).PropertyName)) + { + baseDataSubFieldValue2 = GetBaseDataSubFieldValue(dynamicObject4, formBusinessInfo2, baseDataSubFieldKey2); + } + else + { + string pkId2 = Convert.ToString(dynamicObject4["Id"]); + DynamicObject baseDataDynamicObject2 = GetBaseDataDynamicObject(formId2, pkId2); + baseDataSubFieldValue2 = GetBaseDataSubFieldValue(baseDataDynamicObject2, formBusinessInfo2, baseDataSubFieldKey2); + } + + newDynamicObject[barCodeField2.PropertyName] = baseDataSubFieldValue2; + dictionary.Remove(barCodeFieldKey2); + if (dynamicObject.DynamicObjectType.Properties.Contains(billField2.PropertyName + "_Id") && newDynamicObject.DynamicObjectType.Properties.Contains(barCodeField2.PropertyName + "_Id") && baseDataSubFieldValue2 != null) + { + newDynamicObject[barCodeField2.PropertyName + "_Id"] = (baseDataSubFieldValue2 as DynamicObject)["Id"]; + } + } + } + else if ((billField2.Entity.IsNullOrEmpty() || dynamicObject.DynamicObjectType.Name.Equals(billField2.Entity.EntryName) || dynamicObject.DynamicObjectType.Name.Equals(billField2.Entity.DynamicObjectType.Name)) && dynamicObject.DynamicObjectType.Properties.Contains(billField2.PropertyName) && !string.IsNullOrWhiteSpace(barCodeField2.FieldName)) + { + if (dynamicObject[billField2.PropertyName] != null && dynamicObject[billField2.PropertyName].GetType().Name.EqualsIgnoreCase("OrmLocaleValue")) + { + newDynamicObject[barCodeField2.PropertyName] = dynamicObject[billField2.PropertyName].ToString(); + } + else + { + newDynamicObject[barCodeField2.PropertyName] = dynamicObject[billField2.PropertyName]; + } + + if (billField2 is LotField && barCodeField2 is LotField) + { + newDynamicObject[barCodeField2.PropertyName + "_Text"] = dynamicObject[billField2.PropertyName + "_Text"]; + } + + dictionary.Remove(barCodeFieldKey2); + if (dynamicObject.DynamicObjectType.Properties.Contains(billField2.PropertyName + "_Id") && newDynamicObject.DynamicObjectType.Properties.Contains(barCodeField2.PropertyName + "_Id")) + { + newDynamicObject[barCodeField2.PropertyName + "_Id"] = dynamicObject[billField2.PropertyName + "_Id"]; + } + } + } + + if (newDynamicObject.DynamicObjectType.Properties.Contains("SrcEntryId") && dynamicObject.DynamicObjectType.Properties.Contains("Id") && !_sFormId.IsNullOrEmptyOrWhiteSpace() && (_sFormId != "SFC_OperationPlanning" || (dynamicObject.GetDataEntityType().Name.Equals("SubEntity") && _sFormId == "SFC_OperationPlanning")) && _sFormId != "FA_CARD") + { + newDynamicObject["SrcEntryId"] = Convert.ToString(dynamicObject["Id"]); + } + + if (!primaryField.IsNullOrEmptyOrWhiteSpace() && dynamicObject.DynamicObjectType.Name.EqualsIgnoreCase("Allocation")) + { + newDynamicObject["Qty"] = num * Convert.ToDecimal(dynamicObject["AllocRatio"]) / 100m; + } + + SetBillEntryValueExtend(dynamicObject, newDynamicObject); + if (iCurLevel == iMaxLevel) + { + dynamicObjectCollection.Add(GetNewDynamicObject(newDynamicObject)); + } + } + } + else if (iCurLevel == iMaxLevel) + { + dynamicObjectCollection.Add(GetNewDynamicObject(dybill)); + } + + return dynamicObjectCollection; + } + + private void setInventoryField(DynamicObject dybill, DynamicObject dySoruceObjs, Field barcodeField, Field billField) + { + //IL_015b: Unknown result type (might be due to invalid IL or missing references) + //IL_0160: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Unknown result type (might be due to invalid IL or missing references) + //IL_0181: Unknown result type (might be due to invalid IL or missing references) + //IL_0199: Unknown result type (might be due to invalid IL or missing references) + //IL_01b3: Expected O, but got Unknown + if (billField is DateTimeField) + { + object value = dySoruceObjs[billField.PropertyName]; + if (value.IsNullOrEmptyOrWhiteSpace() && (barcodeField.FieldName.Equals("FPRODUCTIONDATE") || barcodeField.FieldName.Equals("FEXPIRATIONDATE")) && dySoruceObjs["Lot"] is DynamicObject dynamicObject) + { + if (barcodeField.FieldName.Equals("FPRODUCTIONDATE")) + { + dybill[barcodeField.PropertyName] = dynamicObject["HProduceDate"]; + } + + if (barcodeField.FieldName.Equals("FEXPIRATIONDATE")) + { + dybill[barcodeField.PropertyName] = dynamicObject["HExpiryDate"]; + } + } + } + else + { + if (!(billField is QtyField) || !(dySoruceObjs["MaterialID"] is DynamicObject dynamicObject2)) + { + return; + } + + DynamicObject dynamicObject3 = (dynamicObject2["MaterialStock"] as DynamicObjectCollection)[0]["StoreUnitID"] as DynamicObject; + DynamicObject dynamicObject4 = (dynamicObject2["MaterialBase"] as DynamicObjectCollection)[0]["BaseUnitId"] as DynamicObject; + GetUnitConvertRateArgs val = new GetUnitConvertRateArgs + { + PrimaryKey = 1L, + MasterId = Convert.ToInt64(dynamicObject2["msterID"]), + SourceUnitId = Convert.ToInt64(dynamicObject4["Id"]), + DestUnitId = Convert.ToInt64(dynamicObject3["Id"]) + }; + UnitConvert unitConvertRate = UnitConvertServiceHelper.GetUnitConvertRate(base.Context, val); + if (billField.Key.EqualsIgnoreCase("FQty")) + { + decimal num = decimal.Parse(dySoruceObjs["FBaseQty"].ToString()); + decimal num2 = unitConvertRate.ConvertQty(num, ""); + dybill[barcodeField.PropertyName] = num2; + } + else if (billField.Key.EqualsIgnoreCase("FAVBQty")) + { + decimal num3 = default(decimal); + InvQueryRetRecord val2 = StockServiceHelper.GetInventoryDatas(base.Context, dySoruceObjs["Id"].ToString(), base.Context.CurrentOrganizationInfo.ID).FirstOrDefault(); + if (val2 != null) + { + decimal num4 = val2.BaseQty - val2.BaseLockQty; + num3 = unitConvertRate.ConvertQty(num4, ""); + } + + dybill[barcodeField.PropertyName] = num3; + } + else if (billField.Key.EqualsIgnoreCase("FBaseAVBQty")) + { + decimal num5 = default(decimal); + InvQueryRetRecord val3 = StockServiceHelper.GetInventoryDatas(base.Context, dySoruceObjs["Id"].ToString(), base.Context.CurrentOrganizationInfo.ID).FirstOrDefault(); + if (val3 != null) + { + decimal num6 = val3.BaseQty - val3.BaseLockQty; + } + + dybill[barcodeField.PropertyName] = num5; + } + } + } + + public DynamicObject GetNewDynamicObject(DynamicObject dybill) + { + DynamicObject dynamicObject = new DynamicObject(dybill.DynamicObjectType); + foreach (DynamicProperty property in dybill.DynamicObjectType.Properties) + { + if (dybill[property] is DynamicObjectCollection) + { + DynamicObjectCollection dynamicObjectCollection = dybill[property] as DynamicObjectCollection; + DynamicObjectCollection dynamicObjectCollection2 = dynamicObject[property] as DynamicObjectCollection; + if (dynamicObjectCollection2 == null) + { + dynamicObjectCollection2 = (DynamicObjectCollection)(dynamicObject[property] = new DynamicObjectCollection(dynamicObjectCollection.DynamicCollectionItemPropertyType)); + } + + foreach (DynamicObject item in dynamicObjectCollection) + { + dynamicObjectCollection2.Add(item); + } + } + else + { + dynamicObject[property] = dybill[property]; + } + } + + return dynamicObject; + } + + protected virtual bool GetEnabled(string name) + { + bool result = false; + string strSQL = "SELECT FVALUE FROM T_BAS_SYSTEMPROFILE WHERE FCATEGORY = 'UNSN' AND FKEY = @name"; + List list = new List(); + list.Add(new SqlParam("@name", KDDbType.String, name)); + DynamicObjectCollection source = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, list.ToArray()); + if (source.Count() > 0) + { + result = true; + } + + return result; + } + + private Dictionary GetMaterialParamsfilednull(List materialIdlist) + { + Dictionary dictionary = new Dictionary(); + if (materialIdlist.Count() == 0) + { + materialIdlist.Add(0); + } + + string strSQL = string.Format("SELECT T1.FIsSNManage,T1.FISBATCHMANAGE,T1.FISKFPERIOD ,T1.FMATERIALID FROM \r\n (SELECT {0} FID FROM TABLE(fn_StrSplit(@list,',',1))SS) T0 INNER JOIN T_BD_MATERIALSTOCK T1 ON T1.FMATERIALID = T0.FID;", SCMCommonUtil.GetCardinalityString(base.Context, "SS", (long)materialIdlist.Count())); + SqlParam sqlParam = new SqlParam("@list", KDDbType.udt_inttable, materialIdlist.ToArray()); + DynamicObjectCollection dynamicObjectCollection = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text, sqlParam); + foreach (DynamicObject item in dynamicObjectCollection) + { + int num = Convert.ToInt32(item["FMATERIALID"]); + if (!dictionary.Keys.Contains(num)) + { + dictionary.Add(num, item); + } + } + + return dictionary; + } + + private Dictionary GetMaterialParams(List materialIdlist) + { + Dictionary dictionary = new Dictionary(); + if (materialIdlist.Count() == 0) + { + materialIdlist.Add(0); + } + + string text = ""; + string arg = string.Join(",", materialIdlist); + text = $" SELECT S.FMATERIALID,S.FISSNMANAGE,S.FISBATCHMANAGE,S.FISKFPERIOD,P.FBOXQTY FROM T_BD_MATERIALSTOCK S\r\n INNER JOIN T_BD_MATERIALPURCHASE P ON S.FMATERIALID=P.FMATERIALID\r\n WHERE S.FMATERIALID in ({arg}) "; + DynamicObjectCollection dynamicObjectCollection = DBUtils.ExecuteDynamicObject(base.Context, text, null, null, CommandType.Text); + foreach (DynamicObject item in dynamicObjectCollection) + { + int num = Convert.ToInt32(item["FMATERIALID"]); + if (!dictionary.Keys.Contains(num)) + { + dictionary.Add(num, item); + } + } + + return dictionary; + } + + private void CreateBillRows(DynamicObjectCollection billDetils, EntryEntity entity, Dictionary DicFieldCorresMap) + { + bool flag = GetEnabled("BARCODE_PRINT_QUICKBIND"); + try + { + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.Context, "BD_MATERIAL"); + int num = Model.GetEntryRowCount("FEntityToBill"); + string value = base.View.Model.GetValue("FBARCODEMODEL").ToString(); + DynamicObject dynamicObject = base.View.Model.GetValue("FBarCodeRule") as DynamicObject; + DynamicObject dynamicObject2 = base.View.Model.GetValue("FBarCodeBoxRule") as DynamicObject; + DynamicObject dynamicObject3 = base.View.Model.GetValue("FBarCodeFieldRule") as DynamicObject; + DynamicObject dynamicObject4 = base.View.Model.GetValue("FCentreBoxRule") as DynamicObject; + DynamicObject dynamicObject5 = base.View.Model.GetValue("FBigBoxRule") as DynamicObject; + DynamicObject dObject = base.View.Model.GetValue("FBillId") as DynamicObject; + bool flag2 = false; + List source = null; + if (dObject != null && dObject.DynamicObjectType.Properties.Contains("MODELTYPEID") && dObject.DynamicObjectType.Properties.Contains("Id")) + { + flag2 = Convert.ToInt32(dObject["MODELTYPEID"]) == 400; + if (flag2) + { + source = (from p in base.View.BusinessInfo.GetEntity("FEntityToBill").Fields + select p as BaseDataField into p + where p != null + select p).ToList(); + } + } + + BarCodeLog.Info("CreateBillRows", "BatchCreateNewEntryRow"); + base.View.Model.BatchCreateNewEntryRow("FEntityToBill", billDetils.Count()); + BarCodeLog.Info("CreateBillRows", "BatchCreateNewEntryRow"); + Field field = formMetadata.BusinessInfo.GetField("FBoxQty"); + string value2 = ""; + bool flag3 = false; + object[] array = null; + List materialIdlist = new List(); + BarCodeBillCorrespondInfo barCodeBillCorrespondInfo = DicFieldCorresMap.Values.FirstOrDefault((BarCodeBillCorrespondInfo p) => p.BarCodeField.Key.EqualsIgnoreCase("FMaterialId")); + if (barCodeBillCorrespondInfo != null) + { + string fname = barCodeBillCorrespondInfo.BarCodeField.PropertyName + "_Id"; + array = billDetils.Select((DynamicObject p) => p[fname]).Distinct().ToArray(); + materialIdlist = billDetils.Select((DynamicObject p) => Convert.ToInt32(p[fname])).Distinct().ToList(); + } + + Dictionary dictionary = ((field == null) ? GetMaterialParamsfilednull(materialIdlist) : GetMaterialParams(materialIdlist)); + BaseDataField baseDataField = base.View.BusinessInfo.GetField("FMaterialId") as BaseDataField; + DynamicObject[] array2 = ((array == null) ? null : BusinessDataServiceHelper.Load(base.Context, array, baseDataField.RefFormDynamicObjectType)); + if (array2 == null || dictionary.Count() <= 0) + { + flag = false; + } + + List list = billDetils.ToList(); + if (_sFormId == "STK_Inventory") + { + DynamicObjectCollection dynamicObjectCollection = KUtil.Clone(billDetils); + dynamicObjectCollection.Clear(); + for (int i = 0; i < listData.Count(); i++) + { + string text = Convert.ToString(listData[i].PrimaryKeyValue); + foreach (DynamicObject item in list) + { + string text2 = item["SrcEntryId"].ToString(); + if (text2 == text) + { + dynamicObjectCollection.Add(item); + } + } + } + + list = dynamicObjectCollection.ToList(); + } + + foreach (DynamicObject item2 in list) + { + DynamicObject entityDataObject = base.View.Model.GetEntityDataObject(entity, num); + foreach (BarCodeBillCorrespondInfo value7 in DicFieldCorresMap.Values) + { + Field barCodeField = value7.BarCodeField; + if (barCodeField.DynamicProperty == null || !item2.DynamicObjectType.Properties.Contains(barCodeField.PropertyName)) + { + continue; + } + + try + { + if (barCodeField is LotField) + { + if ((barCodeField as LotField).InputModel != 0) + { + DynamicObject dynamicObject6 = null; + string value3 = string.Empty; + if (barCodeField.DynamicProperty.GetValue(item2) is DynamicObject) + { + dynamicObject6 = (DynamicObject)barCodeField.DynamicProperty.GetValue(item2); + } + + if (dynamicObject6 != null) + { + value3 = Convert.ToString(dynamicObject6["number"]); + } + + if (value3.IsNullOrEmptyOrWhiteSpace()) + { + value3 = Convert.ToString(item2[barCodeField.PropertyName + "_Text"]); + } + + if (dynamicObject != null && Convert.ToBoolean(dynamicObject["IsAutoFillFlot"]) && value3.IsNullOrEmptyOrWhiteSpace() && flag3) + { + value3 = DateTime.Now.ToString("yyyyMMdd"); + } + + base.View.Model.SetValue(barCodeField.Key, value3, num); + ((LotField)barCodeField).DynamicProperty.SetValue(entityDataObject, dynamicObject6); + ((LotField)barCodeField).RefIDDynamicProperty.SetValue(entityDataObject, item2[barCodeField.PropertyName + "_Id"]); + } + else if (item2.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + base.View.Model.SetItemValueByID(barCodeField.Key, item2[barCodeField.PropertyName + "_Id"], num); + } + } + else if (barCodeField is RelatedFlexGroupField) + { + DynamicObject dynamicObject7 = barCodeField.DynamicProperty.GetValue(item2) as DynamicObject; + if (flag) + { + if (Regex.IsMatch(item2[barCodeField.PropertyName + "_Id"].ToString(), "^[+-]?\\d*$")) + { + entityDataObject[barCodeField.PropertyName + "_Id"] = (dynamicObject7.IsNullOrEmptyOrWhiteSpace() ? ((object)0) : dynamicObject7["Id"]); + } + else + { + entityDataObject[barCodeField.PropertyName + "_Id"] = (dynamicObject7.IsNullOrEmptyOrWhiteSpace() ? "" : dynamicObject7["Id"]); + } + + entityDataObject[barCodeField.PropertyName] = dynamicObject7; + } + else if (Regex.IsMatch(item2[barCodeField.PropertyName + "_Id"].ToString(), "^[+-]?\\d*$")) + { + base.View.Model.SetItemValueByID(barCodeField.Key, dynamicObject7.IsNullOrEmptyOrWhiteSpace() ? ((object)0) : dynamicObject7["Id"], num); + } + else + { + base.View.Model.SetItemValueByID(barCodeField.Key, dynamicObject7.IsNullOrEmptyOrWhiteSpace() ? "" : dynamicObject7["Id"], num); + } + } + else + { + if (!barCodeField.Key.EqualsIgnoreCase("FMaterialId")) + { + base.View.Model.SetValue(barCodeField.Key, barCodeField.DynamicProperty.GetValue(item2), num); + } + + if (item2.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + DynamicObject dynamicObject8 = item2[barCodeField.PropertyName] as DynamicObject; + object baseDataId = item2[barCodeField.PropertyName + "_Id"]; + if (barCodeField.Key.EqualsIgnoreCase("FMaterialId") && Convert.ToInt32(baseDataId) > 0) + { + DynamicObject dynamicObject9 = (flag ? dictionary[Convert.ToInt32(baseDataId)] : GetMaterialParams(Convert.ToInt64(baseDataId), field)); + flag3 = Convert.ToBoolean(dynamicObject9["FISBATCHMANAGE"].Equals("1")); + if (field != null) + { + value2 = Convert.ToString(dynamicObject9["FBOXQTY"]); + } + } + + DynamicObject dynamicObject10 = null; + if (dynamicObject8 != null) + { + string name = ((BaseDataField)barCodeField).LookUpObject.Name; + string propertyName = ((BaseDataField)barCodeField).NumberProperty.PropertyName; + if (flag) + { + if (barCodeField.Key == "FMaterialId") + { + DynamicObject value4 = array2.Where((DynamicObject p) => Convert.ToInt32(p["Id"]) == Convert.ToInt32(baseDataId)).FirstOrDefault(); + entityDataObject["MaterialId"] = value4; + entityDataObject["MaterialId_Id"] = Convert.ToString(baseDataId); + } + else + { + base.View.Model.SetValue(barCodeField.Key, baseDataId, num); + } + } + else + { + base.View.Model.SetValue(barCodeField.Key, baseDataId, num); + } + } + else + { + base.View.Model.SetValue(barCodeField.Key, baseDataId, num); + } + } + } + + if (!flag2 || !barCodeField.Key.EqualsIgnoreCase("FBASEDATAID")) + { + continue; + } + + base.View.Model.SetValue("FBASEDATATYPE", dObject["Id"], num); + if (_sFormId == "BD_SerialMainFile" && dObject["Id"].ToString() == "BD_SerialMainFile") + { + DynamicObject value5 = BusinessDataServiceHelper.LoadSingle(base.View.Context, barCodeField.DynamicProperty.GetValue(item2), _billFormMetaData.BusinessInfo.GetDynamicObjectType()); + base.View.Model.SetValue("FSerialNo", value5, num); + } + + BaseDataField baseDataField2 = source.Where((BaseDataField p) => p.LookUpObject != null && p.LookUpObject.FormId.EqualsIgnoreCase(dObject["Id"].ToString())).FirstOrDefault(); + if (baseDataField2 == null) + { + continue; + } + + base.View.Model.SetValue(baseDataField2.Key, barCodeField.DynamicProperty.GetValue(item2), num); + DynamicObject dynamicObject11 = BusinessDataServiceHelper.LoadSingle(base.View.Context, barCodeField.DynamicProperty.GetValue(item2), _billFormMetaData.BusinessInfo.GetDynamicObjectType()); + if (dynamicObject11 == null) + { + continue; + } + + if (baseDataField2 is LotField) + { + if ((baseDataField2 as LotField).InputModel != 0) + { + string value6 = Convert.ToString(dynamicObject11["number"]); + base.View.Model.SetValue(baseDataField2.Key, value6, num); + ((LotField)baseDataField2).DynamicProperty.SetValue(entityDataObject, dynamicObject11); + ((LotField)baseDataField2).RefIDDynamicProperty.SetValue(entityDataObject, dynamicObject11["Id"]); + } + else + { + base.View.Model.SetItemValueByID(baseDataField2.Key, dynamicObject11["Id"], num); + } + } + else + { + base.View.Model.SetValue(baseDataField2.Key, dynamicObject11, num); + } + } + catch (Exception ex) + { + //UNWLogger.Error(base.Context, "BarCodePrint", barCodeField.Key + " error:" + ex.Message + ex.StackTrace, ex); + throw ex; + } + } + + CalcCreateNumber(num); + base.View.Model.SetValue("FBARCODEMODELToBill", value, num); + base.View.Model.SetValue("FSrcIndex", num, num); + if (dynamicObject != null) + { + base.View.Model.SetValue("FBARCODERULEToBill", dynamicObject, num); + } + + if (dynamicObject2 != null) + { + base.View.Model.SetValue("FBARCODEBOXRULEToBill", dynamicObject2, num); + } + + if (dynamicObject3 != null) + { + base.View.Model.SetValue("FBARCODEFIELDRULEToBill", dynamicObject3, num); + } + + if (dynamicObject4 != null) + { + base.View.Model.SetValue("FCentreBoxRuleTOBILL", dynamicObject4, num); + } + + if (dynamicObject5 != null) + { + base.View.Model.SetValue("FBigBoxRuleToBill", dynamicObject5, num); + } + + CalcCanCreateQty(num, barCodeBillSystemParameters); + if (field != null) + { + base.View.Model.SetValue("FBoxQty", value2, num); + } + + CalcCreateNumberExtend(num, item2); + num++; + } + + int entryRowCount = Model.GetEntryRowCount("FEntityToBill"); + for (int j = 0; j < entryRowCount; j++) + { + base.View.InvokeFieldUpdateService("FMaterialId", j); + } + } + catch (Exception ex2) + { + base.View.Model.DeleteEntryData("FEntityToBill"); + base.View.Model.DeleteEntryData("FEntityToBar"); + throw ex2; + } + + if (flag) + { + base.View.UpdateView("FEntityToBill"); + } + } + + private DynamicObject GetMaterialParams(long materialId, Field boxQtyValue) + { + string text = ""; + text = ((boxQtyValue != null) ? "SELECT S.FMATERIALID, S.FISSNMANAGE,S.FISBATCHMANAGE,S.FISKFPERIOD,P.FBOXQTY FROM T_BD_MATERIALSTOCK S\r\n INNER JOIN T_BD_MATERIALPURCHASE P ON S.FMATERIALID=P.FMATERIALID\r\n WHERE S.FMATERIALID=@materialId " : "select FIsSNManage,FISBATCHMANAGE,FISKFPERIOD from T_BD_MATERIALSTOCK where FMATERIALID=@materialId "); + List list = new List(); + list.Add(new SqlParam("@materialId", KDDbType.Int64, materialId)); + return DBUtils.ExecuteDynamicObject(base.Context, text, null, null, CommandType.Text, list.ToArray()).FirstOrDefault(); + } + + private void ModifyBillRow(DynamicObject detil, Dictionary DicFieldCorresMap, int RowIndex) + { + DynamicObject dObject = base.View.Model.GetValue("FBillId") as DynamicObject; + bool flag = false; + List source = null; + if (dObject != null && dObject.DynamicObjectType.Properties.Contains("MODELTYPEID") && dObject.DynamicObjectType.Properties.Contains("Id")) + { + flag = Convert.ToInt32(dObject["MODELTYPEID"]) == 400; + if (flag) + { + source = (from p in base.View.BusinessInfo.GetEntity("FEntityToBill").Fields + select p as BaseDataField into p + where p != null + select p).ToList(); + } + } + + foreach (BarCodeBillCorrespondInfo value in DicFieldCorresMap.Values) + { + Field barCodeField = value.BarCodeField; + if (barCodeField.DynamicProperty == null || !detil.DynamicObjectType.Properties.Contains(barCodeField.PropertyName)) + { + continue; + } + + try + { + if (barCodeField.Key.EqualsIgnoreCase("FMaterialId")) + { + if (detil.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + base.View.Model.SetValue(barCodeField.Key, detil[barCodeField.PropertyName + "_Id"], RowIndex); + } + else + { + base.View.Model.SetValue(barCodeField.Key, barCodeField.DynamicProperty.GetValue(detil), RowIndex); + } + } + else if (barCodeField is LotField) + { + if ((barCodeField as LotField).InputModel != 0) + { + DynamicObject dynamicObject = null; + string empty = string.Empty; + if (barCodeField.DynamicProperty.GetValue(detil) is DynamicObject) + { + dynamicObject = (DynamicObject)barCodeField.DynamicProperty.GetValue(detil); + } + + empty = ((dynamicObject == null) ? (detil.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Text") ? Convert.ToString(detil[barCodeField.PropertyName + "_Text"]) : " ") : Convert.ToString(dynamicObject["number"])); + base.View.Model.SetValue(barCodeField.Key, empty, RowIndex); + } + else if (detil.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + base.View.Model.SetValue(barCodeField.Key, detil[barCodeField.PropertyName + "_Id"], RowIndex); + } + } + else + { + base.View.Model.SetValue(barCodeField.Key, barCodeField.DynamicProperty.GetValue(detil), RowIndex); + if (detil.DynamicObjectType.Properties.Contains(barCodeField.PropertyName + "_Id")) + { + base.View.Model.SetValue(barCodeField.Key, detil[barCodeField.PropertyName + "_Id"], RowIndex); + } + } + + if (!flag || !barCodeField.Key.EqualsIgnoreCase("FBASEDATAID")) + { + continue; + } + + base.View.Model.SetValue("FBASEDATATYPE", dObject["Id"], RowIndex); + BaseDataField baseDataField = source.Where((BaseDataField p) => p.LookUpObject.FormId.EqualsIgnoreCase(dObject["Id"].ToString())).FirstOrDefault(); + if (baseDataField != null) + { + base.View.Model.SetValue(baseDataField.Key, barCodeField.DynamicProperty.GetValue(detil), RowIndex); + DynamicObject dynamicObject2 = BusinessDataServiceHelper.LoadSingle(base.View.Context, barCodeField.DynamicProperty.GetValue(detil), _billFormMetaData.BusinessInfo.GetDynamicObjectType()); + if (dynamicObject2 != null) + { + base.View.Model.SetValue(baseDataField.Key, dynamicObject2, RowIndex); + } + } + } + catch (Exception ex) + { + ex.StackTrace.ToString(); + } + } + } + + private void InitCustParam(InitializeEventArgs e) + { + int.TryParse((e.Paramter.GetCustomParameter("isFromBill") == null) ? string.Empty : e.Paramter.GetCustomParameter("isFromBill").ToString(), out _isFromBill); + int.TryParse((e.Paramter.GetCustomParameter("isFromPrintList") == null) ? string.Empty : e.Paramter.GetCustomParameter("isFromPrintList").ToString(), out _isFromPrintList); + if (_isFromBill == 1) + { + var ruleId = e.Paramter.GetCustomParameter("RuleId"); + _sFormId = ((e.Paramter.GetCustomParameter("SourceFormId") == null) ? "" : e.Paramter.GetCustomParameter("SourceFormId").ToString()); + _sourceId = ((e.Paramter.GetCustomParameter("SourceId") == null) ? "" : e.Paramter.GetCustomParameter("SourceId").ToString()); + _sRuleId = ((e.Paramter.GetCustomParameter("RuleId") != null) ? Convert.ToInt32(ruleId) : 0); + _billFormMetaData = (FormMetadata)MetaDataServiceHelper.Load(base.Context, _sFormId); + _sourceEntryId = ((e.Paramter.GetCustomParameter("SourceEntryId") == null) ? "" : e.Paramter.GetCustomParameter("SourceEntryId").ToString()); + _sEntityKey = ((e.Paramter.GetCustomParameter("EntityKey") == null) ? "" : e.Paramter.GetCustomParameter("EntityKey").ToString()); + listData = e.Paramter.GetCustomParameter("SelectedRows") as ListSelectedRowCollection; + base.View.Model.SetValue("FBillId", _sFormId); + base.View.Model.SetValue("FBarCodeRule", _sRuleId); + } + } + + public void SetComboField() + { + ComboFieldEditor comboFieldEditor = null; + comboFieldEditor = base.View.GetFieldEditor("FBarCodeModel", 0); + comboFieldEditor.SetComboItems(_noteTemplates); + comboFieldEditor = base.View.GetFieldEditor("FBarCodeBoxModel", 0); + comboFieldEditor.SetComboItems(_noteTemplates); + comboFieldEditor = base.View.GetFieldEditor("FCenterBoxModel", 0); + comboFieldEditor.SetComboItems(_noteTemplates); + comboFieldEditor = base.View.GetFieldEditor("FBigBoxModel", 0); + comboFieldEditor.SetComboItems(_noteTemplates); + } + + public void OpenBarCodeGetBill() + { + if (string.IsNullOrEmpty(_sFormId)) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入源业务对象!", "0011019000003167", SubSystemType.BASE)); + return; + } + + string text = _sFormId; + if (text.EqualsIgnoreCase("BD_OverASerialView")) + { + text = "BD_SerialMainFile"; + } + + //List permissionOrg = PermissionServiceHelper.GetPermissionOrg(base.View.Context, new BusinessObject + //{ + // Id = text + //}, "6e44119a58cb4a8e86f6c385e14a17ad"); + //if (!permissionOrg.Contains(base.Context.CurrentOrganizationInfo.ID)) + //{ + // base.View.ShowWarnningMessage(ResManager.LoadKDString("当前组织下没有源业务对象的查看权限,不允许选单!", "0011019000003231", SubSystemType.BASE)); + // return; + //} + + if (_sRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入默认条码规则!", "0011019000003092", SubSystemType.BASE)); + return; + } + + if (_isAutoPacking && _sBoxRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先录入默认包装条码规则!", "58d194b2aae944ca", "APP_ISVPAAC2016062210550")); + return; + } + + if (_isThreePacking && _sCenterBoxRuleId == 0) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("当前为三层装箱,请先录入中包条码规则!", "821ceb6207164fb8", "APP_ISVPAAC2016062210550")); + return; + } + + ListShowParameter listShowParameter = new ListShowParameter(); + billPageId = SequentialGuid.NewGuid().ToString(); + listShowParameter.IsLookUp = true; + listShowParameter.ParentPageId = base.View.PageId; + listShowParameter.FormId = _sFormId; + listShowParameter.MultiSelect = true; + listShowParameter.PageId = billPageId; + listShowParameter.IsIsolationOrg = true; + listShowParameter.UseOrgId = base.Context.CurrentOrganizationInfo.ID; + if (_sFormId.EqualsIgnoreCase("BD_MATERIAL")) + { + listShowParameter.ListType = Convert.ToInt32(BOSEnums.Enu_ListType.BaseList); + } + + if (_sFormId.EqualsIgnoreCase("ENG_WorkCenter")) + { + listShowParameter.CustomParams.Add("WorkCenterType", "D"); + } + + if (_sFormId.EqualsIgnoreCase("STK_Inventory")) + { + listShowParameter.CustomParams.Add("NeedReturnData", "1"); + listShowParameter.CustomParams.Add("IsFromStockQuery", "True"); + listShowParameter.CustomParams.Add("QueryMode", "1"); + listShowParameter.CustomParams.Add("IsShowExit", "True"); + listShowParameter.CustomParams.Add("IsFromQuery", "True"); + } + + + string text2 = string.Empty; + List list = new List(); + list.Add("PUR_PurchaseOrder"); + list.Add("SAL_SaleOrder"); + list.Add("SAL_DELIVERYNOTICE"); + if (list.Contains(_sFormId)) + { + text2 = " t0.FCLOSESTATUS='A' "; + } + + if (_sFormId == "PRD_MO") + { + text2 = " t1_A.FSTATUS!=6 "; + } + + if (_sFormId == "SUB_SUBREQORDER") + { + text2 = " t1.FSTATUS!=6 "; + } + + if (_sFormId == "STK_LOTADJUST") + { + text2 += (text2.IsNullOrEmptyOrWhiteSpace() ? " FConvertType='B' " : " AND FConvertType='B' "); + } + + if (_sFormId == "FA_CARD") + { + text2 = "FISNEWREC=2"; + } + + if (_sFormId.EqualsIgnoreCase("UHIK_PRD_PACKAGE_INSTOCK")) + { + text2 = @" +FDocumentStatus = 'C' And FProductType = '1' + AND ( Exists ( + SELECT 1 FROM T_PLN_FORECAST et0 + INNER JOIN T_PLN_FORECASTENTRY et0e on et0.FID = et0e.FID + INNER JOIN T_PRD_MOENTRY et1e on et1e.FSALEORDERENTRYSEQ = et0e.FSEQ AND et1e.FSALEORDERNO = et0.FBILLNO + WHERE et0e.FPARENTROWID = t1.FROWID + )) +"; + } + if (!string.IsNullOrWhiteSpace(text2)) + { + if (string.IsNullOrEmpty(listShowParameter.ListFilterParameter.Filter)) + { + listShowParameter.ListFilterParameter.Filter = text2; + } + else + { + IRegularFilterParameter listFilterParameter = listShowParameter.ListFilterParameter; + listFilterParameter.Filter = listFilterParameter.Filter + " AND " + text2; + } + } + + base.View.ShowForm(listShowParameter, delegate (FormResult result) + { + if (result != null) + { + ApplyReturnData(result.ReturnData); + } + }); + } + + protected virtual bool ChooseBillCtrl(string formId) + { + return false; + } + + private void ApplyReturnData(object ret) + { + if (ret == null) + { + return; + } + + if (!(ret is ListSelectedRowCollection)) + { + return; + } + + SelectRowId = new Dictionary(); + listData = ret as ListSelectedRowCollection; + List list = new List(); + foreach (ListSelectedRow listDatum in listData) + { + if (listDatum.Selected && listDatum.PrimaryKeyValue != null && !string.IsNullOrWhiteSpace(listDatum.PrimaryKeyValue)) + { + list.Add(listDatum.PrimaryKeyValue); + } + + if (_sFormId == "SFC_OperationPlanning" && listDatum.DataRow != null) + { + IsCheck = 1; + DynamicObject dynamicObject = ((DynamicObjectDataRow)listDatum.DataRow).DynamicObject; + if (!SelectRowId.Keys.Contains(Convert.ToString(dynamicObject["t2_FDETAILID"]))) + { + SelectRowId.Add(Convert.ToString(dynamicObject["t2_FDETAILID"]), "t2_FDETAILID"); + } + } + } + + if (list != null && list.Count() >= 1) + { + _sourceId = string.Join(",", list); + _isFromBill = 1; + _billFormMetaData = (FormMetadata)MetaDataServiceHelper.Load(base.Context, _sFormId); + BindBillData(); + } + //拓展功能--返回源单单号-2025-4-8 + DynamicObject billtype = base.View.Model.GetValue("FBillId") as DynamicObject; + string formid = billtype["Id"].ToString(); + if (formid == "PUR_ReceiveBill") + { + int j = 1; + DynamicObject dobject = this.View.Model.DataObject; + DynamicObjectCollection entityObjs = dobject["BD_BARCODEPRINTENTRYBILL"] as DynamicObjectCollection; + foreach (dynamic obj in entityObjs) + { + string strSQL = string.Format(@"select FBILLNO,FSEQ,FSRCBILLNO from T_PUR_ReceiveEntry t1 +left join T_PUR_Receive t2 on t1.FID = t2.FID +join T_PUR_RECEIVEENTRY_L t3 on t1.FENTRYID = t3.FENTRYID +where FBILLNO = '{0}' and FSEQ = '{1}'", obj["BILLCODE"].ToString(), obj["BILLSEQ"].ToString()); + DynamicObjectCollection res = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text); + if (res.Count > 0) + { + DynamicObject srcObject = res.FirstOrDefault(); + string text = Convert.ToString(srcObject["FSRCBILLNO"]); + this.View.Model.SetValue("FSRCBillNo", text, j - 1); + j++; + } + } + } + if (formid == "PRD_MORPT") + { + int j = 1; + DynamicObject dobject = this.View.Model.DataObject; + DynamicObjectCollection entityObjs = dobject["BD_BARCODEPRINTENTRYBILL"] as DynamicObjectCollection; + foreach (dynamic obj in entityObjs) + { + string strSQL = string.Format(@"select FBILLNO,FSEQ,FMOBILLNO,F_VHUB_TEXT from T_PRD_MORPTENTRY t1 +left join T_PRD_MORPT t2 on t1.FID = t2.FID +where FBILLNO = '{0}' and FSEQ = '{1}'", obj["BILLCODE"].ToString(), obj["BILLSEQ"].ToString()); + DynamicObjectCollection res = DBUtils.ExecuteDynamicObject(base.Context, strSQL, null, null, CommandType.Text); + if (res.Count > 0) + { + DynamicObject srcObject = res.FirstOrDefault(); + string mo = Convert.ToString(srcObject["FMOBILLNO"]); + string sn = Convert.ToString(srcObject["F_VHUB_TEXT"]); + this.View.Model.SetValue("FSRCBillNo", mo, j - 1); + this.View.Model.SetValue("FFSerialNoText", sn, j - 1); + j++; + } + } + } + ////拓展功能--返回源单单号 + } + + private bool CheckSelectRows() + { + EntryEntity entity = (EntryEntity)base.View.BusinessInfo.GetEntity("FEntityToBill"); + DynamicObjectCollection source = (from p in base.View.Model.GetEntityDataObject(entity) + where p["BillCheckBox"].ToString().EqualsIgnoreCase("True") + select p) as DynamicObjectCollection; + if (source.Count() > 1) + { + return true; + } + + return false; + } + + private void WriteBackBarcodeToBill() + { + string empty = string.Empty; + Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBar"); + DynamicObjectCollection entityDataObject = base.View.Model.GetEntityDataObject(entity); + IEnumerable> enumerable = from b in entityDataObject + group b by b["BILLCODEToBar"]; + if (_billFormMetaData == null) + { + _billFormMetaData = (FormMetadata)MetaDataServiceHelper.Load(base.Context, Convert.ToString(_sFormId)); + BindBillData(); + } + + Field billNoField = _billFormMetaData.BusinessInfo.GetBillNoField(); + if (billNoField.IsNullOrEmptyOrWhiteSpace()) + { + return; + } + + foreach (IGrouping item in enumerable) + { + DynamicObject dynamicObject = null; + foreach (DynamicObject item2 in item.ToList()) + { + DynamicObject doRule = item2["BarCodeRule"] as DynamicObject; + string barcodeWriteBackKey = GetBarcodeWriteBackKey(doRule); + if (barcodeWriteBackKey.IsNullOrEmptyOrWhiteSpace()) + { + continue; + } + + Field field = _billFormMetaData.BusinessInfo.GetField(barcodeWriteBackKey); + string text = string.Empty; + string text2 = string.Empty; + if (field != null) + { + text = field.PropertyName; + text2 = field.Entity.EntryName; + } + + string text3 = string.Empty; + string operNum = string.Empty; + if (_sFormId.EqualsIgnoreCase("SFC_OperationPlanning") && field.Entity is SubEntryEntity) + { + text3 = (field.Entity as SubEntryEntity).ParentEntity.EntryName; + operNum = Convert.ToString(item2["OperNumberToBar"]); + } + + if (text.IsNullOrEmptyOrWhiteSpace()) + { + continue; + } + + string arg = Convert.ToString(item2["BILLCODEToBar"]); + int seq = Convert.ToInt32(item2["BillSeqToBar"]); + string value = Convert.ToString(item2["BarCode"]); + if (dynamicObject == null) + { + string empty2 = string.Empty; + empty2 = ((!_sFormId.Equals("FA_CARD")) ? $"{billNoField.Key} = '{arg}' " : $"{billNoField.Key} = '{arg}' AND FISNEWREC= '2' "); + OQLFilter ofilter = OQLFilter.CreateHeadEntityFilter(empty2); + dynamicObject = BusinessDataServiceHelper.Load(base.Context, _sFormId, null, ofilter).FirstOrDefault(); + } + + if (seq > 0) + { + if (text2.IsNullOrEmptyOrWhiteSpace()) + { + continue; + } + + if (dynamicObject.Contains(text2) && dynamicObject[text2] != null && (dynamicObject[text2] as DynamicObjectCollection).FirstOrDefault() != null && (dynamicObject[text2] as DynamicObjectCollection)[seq - 1].Contains(text) && (dynamicObject[text2] as DynamicObjectCollection).FirstOrDefault().Contains("Seq")) + { + List source = (dynamicObject[text2] as DynamicObjectCollection).ToList(); + DynamicObject dynamicObject2 = source.Where((DynamicObject u) => Convert.ToString(u["Seq"]) == seq.ToString()).FirstOrDefault(); + dynamicObject2[text] = value; + } + else if (dynamicObject.Contains(text2) && dynamicObject[text2] != null && (dynamicObject[text2] as DynamicObjectCollection)[seq - 1] != null && (dynamicObject[text2] as DynamicObjectCollection)[seq - 1].Contains(text)) + { + (dynamicObject[text2] as DynamicObjectCollection)[seq - 1][text] = value; + } + else + { + if (!_sFormId.EqualsIgnoreCase("SFC_OperationPlanning") || !(field.Entity is SubEntryEntity) || !dynamicObject.Contains(text3) || operNum.IsNullOrEmptyOrWhiteSpace() || (dynamicObject[text3] as DynamicObjectCollection).Count() < seq - 1 || (dynamicObject[text3] as DynamicObjectCollection)[seq - 1] == null || !(dynamicObject[text3] as DynamicObjectCollection)[seq - 1].Contains(text2)) + { + continue; + } + + DynamicObjectCollection source2 = (dynamicObject[text3] as DynamicObjectCollection)[seq - 1][text2] as DynamicObjectCollection; + DynamicObject dynamicObject3 = source2.Where((DynamicObject p) => Convert.ToString(p["OperNumber"]).Equals(operNum)).FirstOrDefault(); + int num = 0; + if (dynamicObject3 != null && dynamicObject3.Contains("Seq")) + { + num = Convert.ToInt32(dynamicObject3["Seq"]); + if (num > 0) + { + ((dynamicObject[text3] as DynamicObjectCollection)[seq - 1][text2] as DynamicObjectCollection)[num - 1][text] = value; + } + } + } + } + else if (dynamicObject.Contains(text)) + { + dynamicObject[text] = value; + } + } + + if (dynamicObject != null) + { + BusinessDataServiceHelper.Save(base.Context, dynamicObject); + } + } + } + + private string GetBarcodeWriteBackKey(DynamicObject doRule) + { + string result = string.Empty; + if (doRule != null) + { + DynamicObjectCollection dynamicObjectCollection = doRule["BD_BARCODERULEENTRYToBill"] as DynamicObjectCollection; + foreach (DynamicObject item in dynamicObjectCollection) + { + string str = Convert.ToString(item["BillId_Id"]); + if (str.EqualsIgnoreCase(_sFormId)) + { + string text = Convert.ToString(item["FieldKey"]); + if (!text.IsNullOrEmptyOrWhiteSpace()) + { + result = text; + } + + break; + } + } + } + + return result; + } + + public void SetBarCodeValue(List>>> AllBoxContrastNumbers, List>> securityCodes, string sType, List>>> fieldCodes, Dictionary qtyDic, List>> BarCodeCorrespondings, List existedNumbers = null) + { + SetBarCodeValue(AllBoxContrastNumbers, securityCodes, sType, fieldCodes, qtyDic, BarCodeCorrespondings, 0, existedNumbers); + } + + public void SetBarCodeValue(List>>> AllBoxContrastNumbers, List>> securityCodes, string sType, List>>> fieldCodes, Dictionary qtyDic, List>> BarCodeCorrespondings, int billIndex, List existedNumbers = null) + { + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + //UNWLogger.Info(base.Context, "SetBarCodeValue", string.Format(ResManager.LoadKDString("生成条码分录数据开始", "c40bc32ce96a4219", "APP_ISVPAAC2016062210550"))); + EntryEntity entryEntity = (EntryEntity)base.View.BusinessInfo.GetEntity("FEntityToBill"); + DynamicObject[] array = (from p in base.View.Model.GetEntityDataObject(entryEntity) + where p["BillCheckBox"].ToString().EqualsIgnoreCase("True") + select p).ToArray(); + List fields = entryEntity.Fields; + string strFilter = $" FID='{_sRuleId}' "; + OQLFilter ofilter = OQLFilter.CreateHeadEntityFilter(strFilter); + DynamicObject dynamicObject = BusinessDataServiceHelper.Load(base.Context, "BD_BarCodeRule", null, ofilter).FirstOrDefault(); + DynamicObjectCollection source = dynamicObject["BD_BARCODERULEENTRY"] as DynamicObjectCollection; + List list = source.OrderBy((DynamicObject p) => p["Seq"]).ToList(); + EntryEntity entryEntity2 = (EntryEntity)base.View.BusinessInfo.GetEntity("FEntityToBar"); + List fields2 = entryEntity2.Fields; + Dictionary dictionary = new Dictionary(); + foreach (DynamicObject item in list) + { + string barcodeFieldkey = (item["BarCodePropertyId"] as DynamicObject)["BARCODEFIELDKEY"].ToString(); + Field field = fields2.FirstOrDefault((Field p) => p.FieldName.EqualsIgnoreCase(barcodeFieldkey)); + if (field != null && (!dictionary.Keys.Contains(field) || field.Key.EqualsIgnoreCase("FBarCodeRuleToBar") || field.Key.EqualsIgnoreCase("FBarCodeModelToBar") || field.Key.EqualsIgnoreCase("FDetailBillCodeToBar"))) + { + dictionary.Add(field, fields.Where((Field p) => p.FieldName.EqualsIgnoreCase(field.FieldName)).FirstOrDefault()); + } + } + + int num = 0; + List list2 = null; + List list3 = new List(); + StringBuilder stringBuilder = new StringBuilder(); + List list4 = new List(); + List list5 = new List(); + int num2 = 0; + decimal num3 = default(decimal); + int num4 = 0; + int num5 = _proIncrement; + int num6 = 1; + if (AllBoxContrastNumbers.Count() > 0) + { + num5 = _proIncrement / AllBoxContrastNumbers.Count(); + } + + if (num5 <= 0) + { + num5 = 1; + num6 = AllBoxContrastNumbers.Count() / _proIncrement; + } + + int num7 = 0; + int barRowCount = 0; + if (sType.Equals("TBCREBARCODEROW")) + { + AllBoxContrastNumbers.ForEach(delegate (KeyValuePair>> p) + { + p.Value.ToList().ForEach(delegate (KeyValuePair> k) + { + barRowCount += k.Value.Where((string j) => !j.IsNullOrEmptyOrWhiteSpace()).Count() + ((!k.Key.IsNullOrEmptyOrWhiteSpace()) ? 1 : 0); + }); + }); + } + else + { + AllBoxContrastNumbers.ForEach(delegate (KeyValuePair>> p) + { + p.Value.Distinct().ToList().ForEach(delegate (KeyValuePair> k) + { + barRowCount += (from j in k.Value.Distinct() + where !j.IsNullOrEmptyOrWhiteSpace() + select j).Count() + ((!k.Key.IsNullOrEmptyOrWhiteSpace()) ? 1 : 0); + }); + }); + } + + base.View.Model.BatchCreateNewEntryRow("FEntityToBar", barRowCount); + bool enabled = GetEnabled("BARCODE_PRINT_QUICKGENER"); + DynamicObjectCollection dynamicObjectCollection = (DynamicObjectCollection)Model.DataObject["BD_BARCODEPRINTENTRYBAR"]; + num = Model.GetEntryCurrentRowIndex("FEntityToBar"); + //尾行数量处理--2025-04-18 + decimal qtyCount = 0; + + foreach (KeyValuePair>> AllBoxContrastNumber in AllBoxContrastNumbers) + { + Dictionary> value = AllBoxContrastNumber.Value; + int num8 = value.Where((KeyValuePair> p) => !p.Key.IsNullOrEmptyOrWhiteSpace()).ToList().Count(); + Dictionary value2 = securityCodes[AllBoxContrastNumber.Key].Value; + List value3 = BarCodeCorrespondings[AllBoxContrastNumber.Key].Value; + Dictionary> dictionary2 = null; + if (fieldCodes != null && fieldCodes.Count() > AllBoxContrastNumber.Key) + { + dictionary2 = fieldCodes[AllBoxContrastNumber.Key].Value; + } + + int num9 = num5; + int num10 = 1; + if (num8 > 0) + { + num9 = num5 / num8; + } + + if (num9 <= 0) + { + num9 = 1; + num10 = num8 / num5; + } + + int num11 = 0; + int num12 = 0; + foreach (KeyValuePair> item2 in value) + { + DynamicObject dynamicObject2 = null; + int num13 = -1; + decimal num14 = default(decimal); + if (billIndex >= array.Count()) + { + break; + } + + dynamicObject2 = array[billIndex]; + if (billIndex == AllBoxContrastNumber.Key) + { + List value4 = item2.Value; + int num15 = value4.Distinct().Count(); + if ((num15 <= 1 || num15 != value4.Count) && sType.Equals("TBCREBARCODEROW") && num15 != 1) + { + } + } + + if (item2.Value != null) + { + list2 = ((!sType.Equals("TBCREBARCODEROW")) ? (from p in item2.Value.Distinct() + where !p.IsNullOrEmptyOrWhiteSpace() + select p).ToList() : item2.Value.Where((string p) => !p.IsNullOrEmptyOrWhiteSpace()).ToList()); + bool flag = false; + if (!item2.Key.IsNullOrEmptyOrWhiteSpace()) + { + list2.Insert(0, item2.Key); + flag = true; + } + + int num16 = list2.Where((string p) => !p.IsNullOrEmptyOrWhiteSpace()).ToList().Count(); + int num17 = num9; + int num18 = 1; + if (num16 > 0) + { + num17 = num9 / num16; + } + + if (num17 <= 0) + { + num17 = 1; + num18 = num16 / num9; + } + + int num19 = 0; + List list6 = new List(); + //if (!flag && !barCodeBillSystemParameters.FThreeLevelPacking && !barCodeBillSystemParameters.FBarcodeOrderType.Equals("1")) + //{ + // list2.Sort(); + //} + if (!flag && !barCodeBillSystemParameters.FThreeLevelPacking) + { + list2.Sort(); + } + + foreach (string barcode in list2) + { + if (barcode.IsNullOrEmptyOrWhiteSpace()) + { + continue; + } + + string value5 = (value2.IsNullOrEmptyOrWhiteSpace() ? "" : (from q in value2 + where q.Key == barcode + select q.Value).FirstOrDefault()); + BarCodeCorrespondingValue val = value3?.Where((BarCodeCorrespondingValue p) => p.BarCode == barcode).FirstOrDefault(); + num2++; + Dictionary dictionary3 = new Dictionary(); + if (dictionary2 != null && dictionary2.ContainsKey(barcode)) + { + dictionary3 = dictionary2[barcode]; + } + + if (list3 == null || (list3 != null && !list3.Contains(barcode))) + { + foreach (KeyValuePair item3 in dictionary) + { + Field key = item3.Key; + Field field2 = dictionary[key]; + if (field2 == null || field2.DynamicProperty == null) + { + continue; + } + + if (field2 is LotField) + { + if ((field2 as LotField).InputModel != 0) + { + DynamicObject dynamicObject3 = null; + string value6 = string.Empty; + if (field2.DynamicProperty.GetValue(dynamicObject2) is DynamicObject) + { + dynamicObject3 = (DynamicObject)field2.DynamicProperty.GetValue(dynamicObject2); + } + + if (dynamicObject3 != null) + { + value6 = Convert.ToString(dynamicObject3["number"]); + } + else if (dynamicObject2.DynamicObjectType.Properties.Contains(field2.PropertyName + "_Text")) + { + value6 = Convert.ToString(dynamicObject2[field2.PropertyName + "_Text"]); + } + + if (dynamicObject3 != null) + { + (base.View.Model.DataObject["BD_BARCODEPRINTENTRYBAR"] as DynamicObjectCollection)[num]["LotToBar"] = dynamicObject3; + (base.View.Model.DataObject["BD_BARCODEPRINTENTRYBAR"] as DynamicObjectCollection)[num]["LotToBar_Id"] = dynamicObject3["Id"]; + (base.View.Model.DataObject["BD_BARCODEPRINTENTRYBAR"] as DynamicObjectCollection)[num]["LotToBar_Text"] = dynamicObject3["Number"]; + } + else + { + base.View.Model.SetValue(key.Key, value6, num); + } + } + else if (dynamicObject2.DynamicObjectType.Properties.Contains(field2.PropertyName + "_Id")) + { + base.View.Model.SetValue(key.Key, dynamicObject2[field2.PropertyName + "_Id"], num); + } + } + else if (field2 is RelatedFlexGroupField) + { + if (Regex.IsMatch(dynamicObject2[field2.PropertyName + "_Id"].ToString(), "^[+-]?\\d*$")) + { + DynamicObject dynamicObject4 = field2.DynamicProperty.GetValue(dynamicObject2) as DynamicObject; + dynamicObjectCollection[num][key.PropertyName] = dynamicObject4; + if (dynamicObject4 != null) + { + dynamicObjectCollection[num][key.PropertyName + "_Id"] = dynamicObject4["Id"]; + } + + base.View.InvokeFieldUpdateService(key.Key, num); + continue; + } + + DynamicObject dynamicObject5 = field2.DynamicProperty.GetValue(dynamicObject2) as DynamicObject; + if (enabled) + { + dynamicObjectCollection[num][key.PropertyName] = dynamicObject5; + if (dynamicObject5 != null) + { + dynamicObjectCollection[num][key.PropertyName + "_Id"] = dynamicObject5["Id"]; + } + } + else + { + base.View.Model.SetItemValueByID(key.Key, dynamicObject5.IsNullOrEmptyOrWhiteSpace() ? "" : dynamicObject5["Id"], num); + } + } + else if (enabled) + { + dynamicObjectCollection[num][key.PropertyName] = dynamicObject2[field2.PropertyName]; + if (dynamicObject2.DynamicObjectType.Properties.Contains(field2.PropertyName + "_Id") && !dynamicObject2[field2.PropertyName + "_Id"].IsNullOrEmptyOrWhiteSpace()) + { + dynamicObjectCollection[num][key.PropertyName + "_Id"] = dynamicObject2[field2.PropertyName + "_Id"]; + } + } + else + { + base.View.Model.SetValue(key.Key, field2.DynamicProperty.GetValue(dynamicObject2), num); + if (dynamicObject2.DynamicObjectType.Properties.Contains(field2.PropertyName + "_Id") && !dynamicObject2[field2.PropertyName + "_Id"].IsNullOrEmptyOrWhiteSpace()) + { + base.View.Model.SetItemValueByID(key.Key, dynamicObject2[field2.PropertyName + "_Id"], num); + } + } + } + + foreach (KeyValuePair fieldCodeKV in dictionary3) + { + Field field3 = fields2.FirstOrDefault((Field p) => p.FieldName.EqualsIgnoreCase(fieldCodeKV.Key)); + if (field3 != null) + { + base.View.Model.SetValue(field3.Key, fieldCodeKV.Value, num); + } + } + + if (enabled) + { + dynamicObjectCollection[num]["BarCode"] = barcode; + dynamicObjectCollection[num]["SecurityCode"] = value5; + } + else + { + base.View.Model.SetValue("FBARCODE", barcode, num); + base.View.Model.SetValue("FDOCUMENTSTATUS", "", num); + base.View.Model.SetValue("FSecurityCode", value5, num); + } + + if (val != null) + { + if (enabled) + { + dynamicObjectCollection[num]["RandomCode"] = val.RandomCode; + dynamicObjectCollection[num]["FLowNo"] = val.FlowNo; + dynamicObjectCollection[num]["FShortFlowNo"] = val.ShortFlowNo; + dynamicObjectCollection[num]["FGuidCode"] = val.GuidCode; + } + else + { + base.View.Model.SetValue("FRandomCode", val.RandomCode, num); + base.View.Model.SetValue("FLowNo", val.FlowNo, num); + base.View.Model.SetValue("FShortFlowNo", val.ShortFlowNo, num); + base.View.Model.SetValue("FGuidCode", val.GuidCode, num); + } + } + + if (enabled) + { + dynamicObjectCollection[num]["BarCodeRule"] = dynamicObject; + dynamicObjectCollection[num]["BarCodeRule_Id"] = Convert.ToString(dynamicObject["Id"]); + object value7 = base.View.Model.GetValue("FBarCodeModel"); + dynamicObjectCollection[num]["BARCODEMODEL"] = value7; + } + else + { + base.View.Model.SetValue("FBarCodeRuleToBar", dynamicObject, num); + object value8 = base.View.Model.GetValue("FBarCodeModel"); + base.View.Model.SetValue("FBarCodeModelToBar", value8, num); + } + + if (barCodeBillSystemParameters.FThreeLevelPacking) + { + string strFilter2 = $" FBARCODE=N'{barcode}' "; + OQLFilter ofilter2 = OQLFilter.CreateHeadEntityFilter(strFilter2); + DynamicObject dynamicObject6 = BusinessDataServiceHelper.Load(base.Context, "BD_BarCodeMainFile", null, ofilter2).FirstOrDefault(); + if (!dynamicObject6.IsNullOrEmptyOrWhiteSpace() && dynamicObject6.Contains("BOXCAPACITY") && !dynamicObject6["BOXCAPACITY"].ToString().Equals("0")) + { + if (enabled) + { + dynamicObjectCollection[num]["QtyToBar"] = dynamicObject6["Qty"]; + } + else + { + base.View.Model.SetValue("FQtyToBar", dynamicObject6["Qty"], num); + } + + DynamicObject dynamicObject7 = dynamicObject2["FBigBoxRuleToBill"] as DynamicObject; + DynamicObject dynamicObject8 = dynamicObject2["FCentreBoxRuleToBill"] as DynamicObject; + DynamicObject dynamicObject9 = dynamicObject6["BarCodeRule"] as DynamicObject; + if (!dynamicObject7.IsNullOrEmptyOrWhiteSpace() && !dynamicObject9.IsNullOrEmptyOrWhiteSpace() && Convert.ToInt64(dynamicObject7["Id"]) == Convert.ToInt64(dynamicObject9["Id"])) + { + if (enabled) + { + dynamicObjectCollection[num]["BarCodeRule"] = dynamicObject7; + dynamicObjectCollection[num]["BarCodeRule_Id"] = Convert.ToString(dynamicObject7["Id"]); + object value9 = base.View.Model.GetValue("FBigBoxModel"); + dynamicObjectCollection[num]["BARCODEMODEL"] = value9; + } + else + { + base.View.Model.SetValue("FBarCodeRuleToBar", dynamicObject7, num); + object value10 = base.View.Model.GetValue("FBigBoxModel"); + base.View.Model.SetValue("FBarCodeModelToBar", value10, num); + } + } + + if (!dynamicObject8.IsNullOrEmptyOrWhiteSpace() && !dynamicObject9.IsNullOrEmptyOrWhiteSpace() && Convert.ToInt64(dynamicObject8["Id"]) == Convert.ToInt64(dynamicObject9["Id"])) + { + base.View.Model.SetValue("FBarCodeRuleToBar", dynamicObject8, num); + object value11 = base.View.Model.GetValue("FCenterBoxModel"); + if (enabled) + { + dynamicObjectCollection[num]["BARCODEMODEL"] = value11; + } + else + { + base.View.Model.SetValue("FBarCodeModelToBar", value11, num); + } + } + + num13 = num; + } + else + { + num4++; + decimal num20 = ((dynamicObject2["Qty"] != null) ? Convert.ToDecimal(dynamicObject2["Qty"]) : 0m); + decimal num21 = ((dynamicObject2["MinPackCount"] != null) ? Convert.ToDecimal(dynamicObject2["MinPackCount"]) : 1m); + if (num20 > 0m && num21 > 0m) + { + decimal num22 = qtyDic[barcode]; + if (enabled) + { + if (num22 < num21) + { + dynamicObjectCollection[num]["FIsLastBox"] = true; + } + + dynamicObjectCollection[num]["QtyToBar"] = num22; + } + else + { + if (num22 < num21) + { + base.View.Model.SetValue("FIsLastBox", true, num); + } + + base.View.Model.SetValue("FQtyToBar", num22, num); + } + + num14 += num22; + } + } + + if (enabled) + { + dynamicObjectCollection[num]["FIsLastBox"] = Convert.ToBoolean(dynamicObject6["IsLastBox"]); + } + else + { + base.View.Model.SetValue("FIsLastBox", Convert.ToBoolean(dynamicObject6["IsLastBox"]), num); + } + } + else if (flag) + { + decimal num23 = ((dynamicObject2["CreateNumber"] != null) ? Convert.ToDecimal(dynamicObject2["CreateNumber"]) : 0m); + decimal num24 = ((dynamicObject2["BoxQty"] != null) ? Convert.ToDecimal(dynamicObject2["BoxQty"]) : 0m); + decimal num25 = ((dynamicObject2["Qty"] != null) ? Convert.ToDecimal(dynamicObject2["Qty"]) : 0m); + decimal num26 = qtyDic[barcode]; + if (enabled) + { + dynamicObjectCollection[num]["QtyToBar"] = num26; + if (num26 > (decimal)(list2.Count() - 1)) + { + dynamicObjectCollection[num]["FIsLastBox"] = true; + } + + DynamicObject dynamicObject10 = dynamicObject2["BARCODEBOXRULE"] as DynamicObject; + dynamicObjectCollection[num]["BarCodeRule"] = dynamicObject10; + dynamicObjectCollection[num]["BarCodeRule_Id"] = Convert.ToString(dynamicObject10["Id"]); + object value12 = base.View.Model.GetValue("FBarCodeBoxModel"); + dynamicObjectCollection[num]["BARCODEMODEL"] = value12; + } + else + { + base.View.Model.SetValue("FQtyToBar", num26, num); + if (num26 > (decimal)(list2.Count() - 1)) + { + base.View.Model.SetValue("FIsLastBox", true, num); + } + + DynamicObject value13 = dynamicObject2["BARCODEBOXRULE"] as DynamicObject; + base.View.Model.SetValue("FBarCodeRuleToBar", value13, num); + object value14 = base.View.Model.GetValue("FBarCodeBoxModel"); + base.View.Model.SetValue("FBarCodeModelToBar", value14, num); + } + + flag = false; + num13 = num; + } + else + { + num4++; + decimal num27 = ((dynamicObject2["Qty"] != null) ? Convert.ToDecimal(dynamicObject2["Qty"]) : 0m); + decimal num28 = ((dynamicObject2["MinPackCount"] != null) ? Convert.ToDecimal(dynamicObject2["MinPackCount"]) : 1m); + if (num27 > 0m && num28 > 0m) + { + decimal num29 = qtyDic[barcode]; + if (enabled) + { + if (num29 < num28) + { + dynamicObjectCollection[num]["FIsLastBox"] = true; + } + + dynamicObjectCollection[num]["QtyToBar"] = num29; + } + else + { + if (num29 < num28) + { + base.View.Model.SetValue("FIsLastBox", true, num); + } + + //base.View.Model.SetValue("FQtyToBar", num29, num); + //尾行数量处理--2025-04018 + if (qtyCount + num29 > num27) + { + base.View.Model.SetValue("FQtyToBar", num27 % num28, num); + qtyCount = 0; + } + else if (qtyCount + num29 == num27) + { + base.View.Model.SetValue("FQtyToBar", num29, num); + qtyCount = 0; + } + else + { + base.View.Model.SetValue("FQtyToBar", num29, num); + qtyCount += num29; + } + + + } + + num14 += num29; + } + } + + base.View.Model.SetValue("FBILLNAME", _sFormId, num); + base.View.InvokeFieldUpdateService("FQtyToBar", num); + base.View.InvokeFieldUpdateService("FBillCodeToBar", num); + if (sType.Equals("TBCREBARCODESUM")) + { + list3?.Add(barcode); + } + + if (existedNumbers != null && existedNumbers.Contains(barcode)) + { + EntryGrid control = base.View.GetControl("FEntityToBar"); + control.SetForecolor("FBarCode", "#FF0000", num); + list6.Add(barcode); + } + + num++; + } + else + { + base.View.Model.DeleteEntryRow("FEntityToBar", num); + } + + num19++; + if (num19 % num18 == 0) + { + base.View.Session["ProcessRateValue"] = num12 + num19 % num18 * num17; + } + } + } + + if (num13 != -1) + { + decimal num30 = ((dynamicObject2["BoxQty"] != null) ? Convert.ToDecimal(dynamicObject2["BoxQty"]) : 0m); + if (enabled) + { + dynamicObjectCollection[num13]["QtyToBar"] = num14; + if (num30 > num14) + { + dynamicObjectCollection[num13]["FIsLastBox"] = true; + } + } + else + { + base.View.Model.SetValue("FBoxQtyToBar", num14, num13); + if (num30 > num14) + { + base.View.Model.SetValue("FIsLastBox", true, num13); + } + } + + num2++; + } + + num11++; + if (num11 % num10 == 0) + { + num12 = num7 + num11 % num10 * num9; + base.View.Session["ProcessRateValue"] = num12; + } + } + + billIndex++; + if (billIndex % num6 == 0) + { + num7 = billIndex % num6 * num5; + base.View.Session["ProcessRateValue"] = num7; + } + + //UNWLogger.Info(base.Context, "SetBarCodeValue", string.Format(ResManager.LoadKDString("源单分录{0}行 全部生成分录数据完成", "2fb244890b1043ab", "APP_ISVPAAC2016062210550"), billIndex)); + } + + if (enabled) + { + base.View.UpdateView("FEntityToBar"); + } + + setCaculate(); + // TODO 同步条码主档 + SynchronizeCodeMain(); + } + + public void SetDefRuleId() + { + if (!string.IsNullOrEmpty(_sFormId)) + { + _sRuleId = BarCodeCommonServiceHelper.GetDefRuleIdbyFormId(base.View.Context, _sFormId, (string)null); + base.View.Model.SetValue("FBARCODERULE", _sRuleId); + } + else + { + base.View.Model.SetValue("FBARCODERULE", 0); + } + } + + private void SavingPrintBarCode() + { + string text = DateTime.Now.ToString("yyyyMMddhhmmssfff"); + string text2 = string.Concat(base.View.Model.GetPKValue(), text); + if (CreateSavingPrintBarCode(text2)) + { + ListShowParameter listShowParameter = new ListShowParameter(); + ListRegularFilterParameter listRegularFilterParameter = new ListRegularFilterParameter(); + listRegularFilterParameter.Filter = $"FPRINTID='{text2}'"; + listRegularFilterParameter.OrderBy = " FPRINTSEQ "; + listShowParameter.ListFilterParameter = listRegularFilterParameter; + listShowParameter.IsLookUp = false; + listShowParameter.ListType = Convert.ToInt32(BOSEnums.Enu_ListType.BaseList); + listShowParameter.IsShowUsed = false; + listShowParameter.IsShowApproved = false; + listShowParameter.ParentPageId = base.View.PageId; + listShowParameter.MultiSelect = true; + listShowParameter.FormId = "BD_BarCodePool"; + base.View.ShowForm(listShowParameter); + } + } + + private bool CreateSavingPrintBarCode(string key) + { + //IL_0003: Unknown result type (might be due to invalid IL or missing references) + //IL_0009: Expected O, but got Unknown + bool result = false; + BarCoder val = new BarCoder(); + DynamicObjectCollection source = base.View.Model.DataObject["BD_BARCODEPRINTENTRYBAR"] as DynamicObjectCollection; + DynamicObject[] array = source.Where((DynamicObject p) => p["BarCodeCheck"].ToString().EqualsIgnoreCase("True")).ToArray(); + if (array.Count() < 1) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择打印数据行!", "0011019000003158", SubSystemType.BASE)); + return false; + } + + EntryEntity entryEntity = (EntryEntity)base.View.BusinessInfo.GetEntity("FEntityToBar"); + List fields = entryEntity.Fields; + val.DeleteBarCodePoolAtRegularTime(base.Context); + val.DeleteBarCodePool(base.Context, base.View.Model.GetPKValue()); + if (array.Count() > 0) + { + result = true; + } + + FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.Context, "BD_BarCodePool"); + DynamicObjectType dynamicObjectType = formMetadata.BusinessInfo.GetDynamicObjectType(); + Entity entity = formMetadata.BusinessInfo.GetEntity(0); + List fields2 = entity.Fields; + List list = new List(); + foreach (Field item in fields2) + { + if (!string.IsNullOrWhiteSpace(item.FieldName) && !list.Contains(item.FieldName) && !"FPRINTID".EqualsIgnoreCase(item.FieldName) && "T_BD_BARCODEPOOL".Equals(item.TableName) && !(item is MultiLangTextField) && !"FPRINTSEQ".EqualsIgnoreCase(item.FieldName)) + { + list.Add(item.FieldName); + } + + if (item.FieldName.ToUpper() == "FLOT") + { + list.Add("FLOT_Text"); + } + } + + string text = string.Join(",", list); + val.CreateBarCodePool(base.Context, (object)key, array, fields, formMetadata, dynamicObjectType, fields2, text); + return result; + } + + private void PrintBarCode(string printType) + { + try + { + printDatas = new List(); + newPrintDatas = new List(); + string defaultBarCodeModel = Convert.ToString(base.View.Model.GetValue("FBarCodeModel")); + BarCodePrintOperation printOperation = new BarCodePrintOperation(); + if (printType == "print") + { + string printAddress = Convert.ToString(base.View.Model.GetValue("FPrintAddress")).Trim().ToLowerInvariant(); + if (string.IsNullOrWhiteSpace(printAddress)) + { + base.View.ShowNotificationMessage(ResManager.LoadKDString("请填写打印机名称!", "0011019000003156", SubSystemType.BASE)); + } + else + { + if (!CheckPrintData() || printDatas == null || printDatas.Count <= 0) + { + return; + } + + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.IsBarcodePrintConfirm) + { + base.View.ShowMessage(ResManager.LoadKDString("当前共选择" + printDatas.Count + ResManager.LoadKDString("个条码,确认发送打印?", "0dfe9ea5f48f4a2f", "APP_ISVPAAC2016062210550"), "16be439445c94dea", "APP_ISVPAAC2016062210550"), MessageBoxOptions.YesNo, delegate (MessageBoxResult results) + { + if (results == MessageBoxResult.Yes) + { + List list7 = new List(); + List list8 = new List(); + List list9 = new List(); + int num4 = 0; + foreach (DynamicObject printData in printDatas) + { + if (printData != null) + { + int num5 = Convert.ToInt32(printData["PrintNumber"]); + for (int j = 0; j < num5; j++) + { + newPrintDatas.Add(printData); + string item3 = Convert.ToString(printData["BarCode"]); + string text3 = Convert.ToString(printData["BARCODEMODEL"]); + text3 = (string.IsNullOrWhiteSpace(text3) ? defaultBarCodeModel : text3); + text3 = text3.Replace(" ", ""); + list9.Add(text3); + list7.Add(item3); + list8.Add(num4.ToString()); + num4++; + } + } + } + + //UNWLogger.Info(base.Context, "PrintBarCode:", "printDataId=" + string.Join(",", list8)); + //UNWLogger.Info(base.Context, "PrintBarCode:", ResManager.LoadKDString("总数量:", "14512b12f13e4f85", "APP_ISVPAAC2016062210550") + list7.Count() + "," + printType + ",BarCode=" + string.Join(",", list7)); + printOperation.BarCodePrintDoAction(this, null, list8, list9, printType, printAddress); + printOperationType = printType; + } + }); + return; + } + + List list = new List(); + List list2 = new List(); + List list3 = new List(); + int num = 0; + foreach (DynamicObject printData2 in printDatas) + { + if (printData2 != null) + { + int num2 = Convert.ToInt32(printData2["PrintNumber"]); + for (int i = 0; i < num2; i++) + { + newPrintDatas.Add(printData2); + string item = Convert.ToString(printData2["BarCode"]); + string text = Convert.ToString(printData2["BARCODEMODEL"]); + text = (string.IsNullOrWhiteSpace(text) ? defaultBarCodeModel : text); + text = text.Replace(" ", ""); + list2.Add(text); + list3.Add(item); + list.Add(num.ToString()); + num++; + } + } + } + + //UNWLogger.Info(base.Context, "PrintBarCode:", "printDataId=" + string.Join(",", list)); + //UNWLogger.Info(base.Context, "PrintBarCode:", ResManager.LoadKDString("总数量:", "14512b12f13e4f85", "APP_ISVPAAC2016062210550") + list3.Count() + "," + printType + ",BarCode=" + string.Join(",", list3)); + printOperation.BarCodePrintDoAction(this, null, list, list2, printType, printAddress); + printOperationType = printType; + } + } + else + { + if (!(printType == "preview") || !CheckPrintData() || printDatas == null || printDatas.Count <= 0) + { + return; + } + + List list4 = new List(); + List list5 = new List(); + List list6 = new List(); + int num3 = 0; + foreach (DynamicObject printData3 in printDatas) + { + if (printData3 != null) + { + newPrintDatas.Add(printData3); + string item2 = Convert.ToString(printData3["BarCode"]); + string text2 = Convert.ToString(printData3["BARCODEMODEL"]); + text2 = (string.IsNullOrWhiteSpace(text2) ? defaultBarCodeModel : text2); + text2 = text2.Replace(" ", ""); + list5.Add(text2); + list6.Add(item2); + list4.Add(num3.ToString()); + num3++; + } + } + + //UNWLogger.Info(base.Context, "PrintBarCode:", "printDataId=" + string.Join(",", list4)); + //UNWLogger.Info(base.Context, "PrintBarCode:", ResManager.LoadKDString("总数量:", "14512b12f13e4f85", "APP_ISVPAAC2016062210550") + list6.Count() + "," + printType + ",BarCode=" + string.Join(",", list6)); + printOperation.BarCodePrintDoAction(this, null, list4, list5, printType, ""); + printOperationType = printType; + } + } + catch (Exception ex) + { + ex.StackTrace.ToString(); + } + } + + public void OpenPrintProcessForm() + { + _pPageId = Guid.NewGuid().ToString(); + DynamicFormShowParameter dynamicFormShowParameter = new DynamicFormShowParameter(); + dynamicFormShowParameter.FormId = "UN_BarcodePrintProcess"; + dynamicFormShowParameter.LayoutId = Guid.NewGuid().ToString(); + dynamicFormShowParameter.ParentPageId = base.View.PageId; + dynamicFormShowParameter.PageId = _pPageId; + dynamicFormShowParameter.OpenStyle.ShowType = ShowType.Modal; + dynamicFormShowParameter.OpenStyle.OpenType = OpenType.DefaultOpen; + dynamicFormShowParameter.CustomParams.Add("$Task", "1"); + base.View.ShowForm(dynamicFormShowParameter); + } + + public void ClosePrintProcessForm() + { + IDynamicFormView view = base.View.GetView(_pPageId); + view.Close(); + base.View.SendDynamicFormAction(view); + } + + private bool CheckPrintData() + { + bool flag = true; + ExtendedDataEntitySet extendedDataEntitySet = new ExtendedDataEntitySet(); + extendedDataEntitySet.Parse(new DynamicObject[1] { base.View.Model.DataObject }, base.View.Model.BusinessInfo); + ExtendedDataEntity[] array = (from p in extendedDataEntitySet.FindByEntityKey("FEntityToBar") + where p.DataEntity["BarCodeCheck"].ToString().EqualsIgnoreCase("True") + select p).ToArray(); + if (array.Count() < 1) + { + base.View.ShowWarnningMessage(ResManager.LoadKDString("请先选择打印数据行!", "0011019000003158", SubSystemType.BASE)); + flag = false; + } + + string text = Convert.ToString(base.View.Model.GetValue("FBarCodeModel")); + List list = new List(); + List list2 = new List(); + for (int i = 0; i < array.Count(); i++) + { + DynamicObject dataEntity = array[i].DataEntity; + printDatas.Add(dataEntity); + string text2 = Convert.ToString(dataEntity["BARCODEMODEL"]); + text2 = (string.IsNullOrWhiteSpace(text2) ? text : text2); + text2 = text2.Replace(" ", ""); + string value = Convert.ToString(dataEntity["BarCode"]); + int item = Convert.ToInt32(dataEntity["Seq"]); + if (string.IsNullOrWhiteSpace(value)) + { + list.Add(item); + flag = false; + } + + if (string.IsNullOrWhiteSpace(text2)) + { + list2.Add(item); + flag = false; + } + } + + string text3 = ""; + if (list.Count > 0) + { + for (int j = 0; j < list.Count; j++) + { + text3 = ((j < list.Count - 1) ? (list[j] + "、") : list[j].ToString()); + } + } + + text3 = (string.IsNullOrWhiteSpace(text3) ? "" : string.Format(ResManager.LoadKDString(ResManager.LoadKDString("第", "5e2976b208924f20", "APP_ISVPAAC2016062210550"), "0011019000003159", SubSystemType.BASE) + text3 + ResManager.LoadKDString("行条形码尚未生成!", "0011019000003160", SubSystemType.BASE))); + string text4 = ""; + if (list2.Count > 0) + { + for (int k = 0; k < list2.Count; k++) + { + text4 = ((k < list2.Count - 1) ? (list2[k] + "、") : list2[k].ToString()); + } + } + + text4 = (string.IsNullOrWhiteSpace(text4) ? "" : string.Format(ResManager.LoadKDString(ResManager.LoadKDString("第", "5e2976b208924f20", "APP_ISVPAAC2016062210550"), "0011019000003159", SubSystemType.BASE) + text4 + ResManager.LoadKDString("行条形码未设置条码模板!", "0011019000003161", SubSystemType.BASE))); + if (!string.IsNullOrWhiteSpace(text3 + text4)) + { + base.View.ShowNotificationMessage(text3 + text4); + } + + if (!flag) + { + printDatas = new List(); + } + + return flag; + } + + private void SavePrintAddress(string printAddress) + { + long userId = base.Context.UserId; + long iD = base.Context.CurrentOrganizationInfo.ID; + string text = base.Context.IpAddress; + if (!string.IsNullOrWhiteSpace(text)) + { + Regex regex = new Regex("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); + text = Convert.ToString(regex.Match(text)); + } + + if (!string.IsNullOrWhiteSpace(printAddress)) + { + BarCodePrintServiceHelper.SavePrintAddress(base.Context, printAddress, userId, iD, text, (string)null); + } + } + + private void UpdatePrintCountAfterPrintOP() + { + long userId = base.View.Context.UserId; + DateTime now = DateTime.Now; + for (int i = 0; i < printDatas.Count; i++) + { + DynamicObject dynamicObject = printDatas[i]; + string text = Convert.ToString(dynamicObject["BarCode"]); + int num = Convert.ToInt32(dynamicObject["PrintNumber"]); + long num2 = ((!(dynamicObject["BarCodeRule"] is DynamicObject dynamicObject2)) ? 0 : Convert.ToInt64(dynamicObject2["Id"])); + BarCodePrintServiceHelper.UpdatePrintCountToMain(base.View.Context, text, userId, now, num2, num, 1); + } + + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (!barCodeBillSystemParameters.IsPrintNoCanPrint) + { + return; + } + + Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBar"); + DynamicObjectCollection entityDataObject = base.View.Model.GetEntityDataObject(entity); + for (int j = 0; j < entityDataObject.Count(); j++) + { + if (Convert.ToBoolean(entityDataObject[j]["BarCodeCheck"])) + { + entityDataObject[j]["BarCodeCheck"] = false; + entityDataObject[j]["IsPrinted"] = true; + } + } + + base.View.UpdateView("FEntityToBar"); + } + + private void WirteBackBarcodeSign(Context ctx) + { + BarCodeLog.Debug("BarcodePrintEdit", "Call WirteBackBarcodeSign"); + string mainFieldKey = GetMainFieldKey(ctx, _sFormId); + if (mainFieldKey.IsNullOrEmptyOrWhiteSpace()) + { + return; + } + + FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(ctx, _sFormId); + Entity entity = ((formMetadata != null && formMetadata.BusinessInfo.GetField(mainFieldKey) != null) ? formMetadata.BusinessInfo.GetField(mainFieldKey).Entity : null); + if (entity == null || !IsContainField(ctx, entity.TableName.ToUpper(), "FISCREBARCODE")) + { + return; + } + + Entity entity2 = base.View.BusinessInfo.GetEntity("FEntityToBill"); + DynamicObjectCollection entityDataObject = base.View.Model.GetEntityDataObject(entity2); + Dictionary> dictionary = new Dictionary>(); + if (entityDataObject != null && entityDataObject.Count() > 0) + { + foreach (DynamicObject item2 in entityDataObject) + { + if (item2["BARCODERULE"] is DynamicObject dynamicObject && dynamicObject.DynamicObjectType.Properties.Contains("FWirteBackBarcodeSign") && Convert.ToBoolean(dynamicObject["FWirteBackBarcodeSign"]) && item2.DynamicObjectType.Properties.Contains("BILLCODE") && !item2["BILLCODE"].IsNullOrEmptyOrWhiteSpace() && item2.DynamicObjectType.Properties.Contains("BILLSEQ") && !item2["BILLSEQ"].IsNullOrEmptyOrWhiteSpace()) + { + string key = Convert.ToString(item2["BILLCODE"]); + string item = Convert.ToString(item2["BILLSEQ"]); + if (dictionary.ContainsKey(key)) + { + dictionary[key].Add(item); + continue; + } + + dictionary.Add(key, new List { item }); + } + } + } + + if (dictionary != null && dictionary.Count() > 0) + { + string fieldName = formMetadata.BusinessInfo.GetBillNoField().FieldName; + string seqFieldKey = entity.SeqFieldKey; + Entity entity3 = formMetadata.BusinessInfo.Entrys.Where((Entity P) => P.EntityType == 0).FirstOrDefault(); + UpdateIsCreBarcode(ctx, entity3.TableName, entity.TableName, fieldName, seqFieldKey, dictionary); + } + } + + private string GetMainFieldKey(Context ctx, string billFormId) + { + string strSql = (BarCodeConst.FORMIDTOENTRYMAINFIELD.ContainsKey(billFormId) ? "SELECT T0.FFIELDKEY FROM T_BD_BARCODEITEMENTRY T0\r\n INNER JOIN T_BD_BARCODEITEM T1 ON T0.FID=T1.FID\r\n WHERE (T1.FBARCODEFIELDKEY=@FBARCODEFIELDKEY OR T1.FBARCODEFIELDKEY=@FBARCODEFIELDKEYTWO) AND T0.FBILLFORMID=@billFormId;" : "SELECT T0.FFIELDKEY FROM T_BD_BARCODEITEMENTRY T0 where t0.FID=@MaterialId and t0.FBILLFORMID=@billFormId;"); + List list = new List(); + if (BarCodeConst.FORMIDTOENTRYMAINFIELD.ContainsKey(billFormId)) + { + list.Add(new SqlParam("@FBARCODEFIELDKEY", KDDbType.String, BarCodeConst.FORMIDTOENTRYMAINFIELD[billFormId])); + list.Add(new SqlParam("@FBARCODEFIELDKEYTWO", KDDbType.String, BarCodeConst.FORMIDTOENTRYMAINFIELD2[billFormId])); + } + else + { + list.Add(new SqlParam("@MaterialId", KDDbType.Int32, 4)); + } + + list.Add(new SqlParam("@billFormId", KDDbType.String, billFormId)); + return DBUtils.ExecuteScalar(ctx, strSql, "", list.ToArray()); + } + + private bool IsContainField(Context ctx, string tableName, string fieldName) + { + bool result = false; + string strSql = $" SELECT count(1) FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME =@tbName AND KSQL_COL_NAME IN ('{fieldName}') "; + List list = new List(); + list.Add(new SqlParam("@tbName", KDDbType.String, tableName)); + int num = DBUtils.ExecuteScalar(base.Context, strSql, 0, list.ToArray()); + BarCodeLog.Info("Barcode IsCreBarcode ", string.Format(ResManager.LoadKDString("单据体中是否包含自定义字段【FISCREBARCODE】字段{0}", "d7acf135203349b7", "APP_ISVPAAC2016062210550"), num)); + if (num > 0) + { + result = true; + } + + return result; + } + + private void UpdateIsCreBarcode(Context ctx, string headTableName, string entryTableName, string billNoFieldName, string seqFieldName, Dictionary> billCodeToSeqDic) + { + StringBuilder stringBuilder = new StringBuilder(); + foreach (KeyValuePair> item in billCodeToSeqDic) + { + if (!stringBuilder.IsNullOrEmptyOrWhiteSpace()) + { + stringBuilder.Append(" OR "); + } + + stringBuilder.AppendFormat(" (T0.{0}='{1}' AND T1.{2} IN ({3})) ", billNoFieldName, item.Key, seqFieldName, string.Join(",", item.Value)); + } + + if (!stringBuilder.IsNullOrEmptyOrWhiteSpace()) + { + string empty = string.Empty; + empty = ((!headTableName.Equals("T_SFC_OPERPLANNING")) ? string.Format("MERGE INTO {0} TA\r\n USING (\r\n\t SELECT T1.FID, T1.FENTRYID FROM {1} T0\r\n\t INNER JOIN {0} T1 ON T0.FID=T1.FID\r\n WHERE {2}\r\n ) TB ON (TA.FID=TB.FID AND TA.FENTRYID=TB.FENTRYID)\r\n WHEN MATCHED THEN \r\n UPDATE SET TA.FISCREBARCODE='1'", entryTableName, headTableName, stringBuilder.ToString()) : string.Format("MERGE INTO {0} TA\r\n USING (\r\n\t SELECT FDETAILID FROM {1} T0\r\n INNER JOIN T_SFC_OPERPLANNINGSEQ T2 ON T0.FID = T2.FID\r\n\t INNER JOIN {0} T1 ON T1.FENTRYID = t2.FENTRYID\r\n WHERE {2}\r\n ) TB ON (TA.FDETAILID=TB.FDETAILID)\r\n WHEN MATCHED THEN \r\n UPDATE SET TA.FISCREBARCODE='1'", entryTableName, headTableName, stringBuilder.ToString())); + DBUtils.Execute(ctx, empty); + } + } + + private void CalcCanCreateQty(int RowIndex, BarCodeSysParamsModel barcodecreatesysparam) + { + if (barcodecreatesysparam.FControlCreateNumber) + { + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex)); + string text = Convert.ToString(base.View.Model.GetValue("FBILLCODE", RowIndex)); + string text2 = Convert.ToString(base.View.Model.GetValue("FBILLSEQ", RowIndex)); + DynamicObject dynamicObject = base.View.Model.GetValue("FBARCODERULEToBill", RowIndex) as DynamicObject; + long ruleId = 0L; + if (dynamicObject != null) + { + ruleId = Convert.ToInt64(dynamicObject["Id"]); + } + + if (text.IsNullOrEmptyOrWhiteSpace()) + { + throw new Exception(ResManager.LoadKDString("条码生成规则中必须添加【单据编号】字段!", "cee4617af5b84c12", "APP_ISVPAAC2016062210550")); + } + + if (text2.IsNullOrEmptyOrWhiteSpace() || text2.Equals("0")) + { + throw new Exception(ResManager.LoadKDString("条码生成规则中必须添加【单据行号】字段!", "19fbc253a64640f5", "APP_ISVPAAC2016062210550")); + } + + decimal num2 = default(decimal); + //num2 = ((!barcodecreatesysparam.FCreateIsolation.Equals("1") && !barcodecreatesysparam.FCreateIsolation.IsNullOrEmptyOrWhiteSpace()) ? GetCreatedQtyByRule(text, text2, ruleId, barcodecreatesysparam.FGeneratorType) : GetCreatedQty(text, text2, barcodecreatesysparam.FGeneratorType)); + num2 = 0m; + decimal num3 = num - num2; + base.View.Model.SetValue("FCanCreateQty", num3, RowIndex); + base.View.Model.SetValue("FQty", num3, RowIndex); + base.View.Model.SetValue("FSourceQty", num, RowIndex); + } + } + + public void CheckCreateQty(int RowIndex, BarCodeSysParamsModel barcodecreatesysparam = null) + { + if (barcodecreatesysparam == null) + { + barcodecreatesysparam = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + } + + if (barcodecreatesysparam.FControlCreateNumber) + { + string billNo = base.View.Model.GetValue("FBILLCODE", RowIndex).ToString(); + string entrySeq = base.View.Model.GetValue("FBILLSEQ", RowIndex).ToString(); + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex)); + decimal num2 = Convert.ToDecimal(base.View.Model.GetValue("FSourceQty", RowIndex)); + DynamicObject dynamicObject = base.View.Model.GetValue("FBARCODERULEToBill", RowIndex) as DynamicObject; + long ruleId = 0L; + if (dynamicObject != null) + { + ruleId = Convert.ToInt64(dynamicObject["Id"]); + } + + decimal num3 = default(decimal); + //num3 = ((!barcodecreatesysparam.FCreateIsolation.Equals("1") && !barcodecreatesysparam.FCreateIsolation.IsNullOrEmptyOrWhiteSpace()) ? GetCreatedQtyByRule(billNo, entrySeq, ruleId, barcodecreatesysparam.FGeneratorType) : GetCreatedQty(billNo, entrySeq, barcodecreatesysparam.FGeneratorType)); + num3 = 0m; + if (num <= 0m) + { + throw new Exception(string.Format(ResManager.LoadKDString("第【{0}】行,生成数量必须大于零!", "84111187b34f44be", "APP_ISVPAAC2016062210550"), RowIndex + 1)); + } + + if (num2 - num3 < num) + { + throw new Exception(string.Format(ResManager.LoadKDString("第【{0}】行,生成数量超过可生成数量!", "ca891099848e4078", "APP_ISVPAAC2016062210550"), RowIndex + 1)); + } + } + } + + public int GetBoxNumber(Dictionary keyValues, string key) + { + if (keyValues.ContainsKey(key)) + { + keyValues[key]++; + } + else + { + keyValues.Add(key, 1); + } + + return keyValues[key]; + } + + public decimal GetCreatedQty(string billNo, string entrySeq, string generatorType) + { + string strSql = string.Empty; + if (generatorType.IsNullOrEmptyOrWhiteSpace() || generatorType.Equals("1")) + { + strSql = "select sum(FQTY) from T_BD_BARCODEMAIN where FBILLCODE=@billNo and FBILLSEQ=@entrySeq"; + } + else if (!generatorType.IsNullOrEmptyOrWhiteSpace() && generatorType.Equals("2")) + { + strSql = "select sum(FQTY) from T_BD_BARCODEPRINTENTRYBILL where FBILLCODE=@billNo and FBILLSEQ=@entrySeq"; + } + + List list = new List(); + list.Add(new SqlParam("@billNo", KDDbType.String, billNo)); + list.Add(new SqlParam("@entrySeq", KDDbType.String, entrySeq)); + return DBUtils.ExecuteScalar(base.Context, strSql, 0m, list.ToArray()); + } + + public decimal GetCreatedQtyByRule(string billNo, string entrySeq, long ruleId, string generatorType) + { + string strSql = string.Empty; + if (generatorType.IsNullOrEmptyOrWhiteSpace() || generatorType.Equals("1")) + { + strSql = "select sum(FQTY) from T_BD_BARCODEMAIN where FBILLCODE=@billNo and FBILLSEQ=@entrySeq and FBARCODERULE=@ruleId"; + } + else if (!generatorType.IsNullOrEmptyOrWhiteSpace() && generatorType.Equals("2")) + { + strSql = "SELECT SUM(t2.FQTY) FROM T_BD_BARCODEPRINTENTRYBILL t1\r\n INNER JOIN T_BD_BARCODEPRINTENTRYBAR t2\r\n ON t1.FENTRYID=t2.FENTRYID\r\n WHERE t1.FBILLCODE=@billNo AND t2.FBARCODERULE=@ruleId"; + } + + List list = new List(); + list.Add(new SqlParam("@billNo", KDDbType.String, billNo)); + list.Add(new SqlParam("@entrySeq", KDDbType.String, entrySeq)); + list.Add(new SqlParam("@ruleId", KDDbType.String, ruleId)); + return DBUtils.ExecuteScalar(base.Context, strSql, 0m, list.ToArray()); + } + + private void CalcCreateNumber(int RowIndex) + { + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FBoxQty", RowIndex)); + BarCodeSysParamsModel barCodeBillSystemParameters = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, _sFormId); + if (barCodeBillSystemParameters.CreateCountRule.Equals("1")) + { + decimal num2 = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex)); + decimal num3 = default(decimal); + num2 = ((num2 <= 0m) ? 1m : num2); + if (num3 <= 0m && base.View.Model.GetValue("FMaterialId", RowIndex) is DynamicObject dynamicObject && dynamicObject["MaterialPurchase"] is DynamicObjectCollection dynamicObjectCollection && dynamicObjectCollection.Count > 0) + { + DynamicObject dynamicObject2 = dynamicObjectCollection[0]; + if (dynamicObject2 != null) + { + num3 = ((dynamicObject2["MinPackCount"] != null) ? Convert.ToDecimal(dynamicObject2["MinPackCount"]) : 1m); + } + } + + if (num3 <= 0m) + { + num3 = Convert.ToDecimal(base.View.Model.GetValue("FMinPackCount", RowIndex)); + } + + if (num3 > 0m) + { + decimal num4 = num2 / num3; + int num5 = 0; + int num6 = Convert.ToInt32(num4); + num5 = ((!((decimal)num6 < num4)) ? num6 : (num6 + 1)); + if (num > num3) + { + decimal num7 = Math.Ceiling(num2 / num); + base.View.Model.SetValue("FCreateBoxNumber", num7, RowIndex); + } + else + { + base.View.Model.SetValue("FCreateBoxNumber", 0, RowIndex); + } + //重算生成数--2025-4-18 + base.View.Model.SetValue("FCreateNumber", num5, RowIndex); + //base.View.Model.SetValue("FCreateNumber", 1, RowIndex); + base.View.Model.SetValue("FMinPackCount", num3, RowIndex); + } + } + else + { + decimal num8 = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex)); + decimal num9 = Convert.ToDecimal(base.View.Model.GetValue("FMinPackCount", RowIndex)); + if (num9 <= 0m) + { + num9 = num8; + } + + base.View.Model.SetValue("FMinPackCount", num9, RowIndex); + base.View.Model.SetValue("FCreateNumber", 1, RowIndex); + if (num > num8) + { + decimal num10 = Math.Ceiling(num8 / num); + base.View.Model.SetValue("FCreateBoxNumber", num10, RowIndex); + } + else + { + base.View.Model.SetValue("FCreateBoxNumber", 0, RowIndex); + } + } + } + + protected virtual void SetBillEntryValueExtend(DynamicObject souceBillDy, DynamicObject printBilEntry) + { + } + + protected virtual void CalcCreateNumberExtend(int RowIndex, DynamicObject detil) + { + } + + private void CalcPackCount(int RowIndex) + { + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex)); + decimal num2 = Convert.ToDecimal(base.View.Model.GetValue("FBoxQty", RowIndex)); + int num3 = Convert.ToInt32(base.View.Model.GetValue("FCreateNumber", RowIndex)); + if (num3 > 0) + { + num = ((num <= 0m) ? 1m : num); + decimal num4 = num / (decimal)num3; + base.View.Model.SetValue("FMinPackCount", num4, RowIndex); + if (num2 > num4) + { + decimal num5 = Math.Ceiling(num / num2); + base.View.Model.SetValue("FCreateBoxNumber", num5, RowIndex); + } + else + { + base.View.Model.SetValue("FCreateBoxNumber", 0, RowIndex); + } + } + } + + private void CalcCreateNumber2(int RowIndex) + { + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex)); + decimal num2 = Convert.ToDecimal(base.View.Model.GetValue("FMinPackCount", RowIndex)); + decimal num3 = Convert.ToDecimal(base.View.Model.GetValue("FBoxQty", RowIndex)); + if (num2 > 0m) + { + num = ((num <= 0m) ? 1m : num); + decimal num4 = num / num2; + long num5 = 0L; + long num6 = Convert.ToInt64(num4); + num5 = ((!((decimal)num6 < num4)) ? num6 : (num6 + 1)); + _isEditQty = true; + //重算生成数--2025-4-18 + base.View.Model.SetValue("FCreateNumber", num5, RowIndex); + //base.View.Model.SetValue("FCreateNumber", 1, RowIndex); + if (num3 > num2) + { + decimal num7 = Math.Ceiling(num / num3); + base.View.Model.SetValue("FCreateBoxNumber", num7, RowIndex); + } + else + { + base.View.Model.SetValue("FCreateBoxNumber", 0, RowIndex); + } + + } + } + + private void CenterCalcCreateNumber(int RowIndex) + { + decimal num = Convert.ToDecimal(base.View.Model.GetValue("FCenterBoxQty", RowIndex)); + if (num > 0m) + { + decimal num2 = default(decimal); + if (barcodeSysParm.FThreeLevelPacking && barcodeSysParm.FCreateOrder.Equals("1")) + { + decimal num3 = Convert.ToDecimal(base.View.Model.GetValue("FCreateNumber", RowIndex)); + num2 = num3 / num; + } + else + { + decimal num4 = Convert.ToDecimal(base.View.Model.GetValue("FQTY", RowIndex)); + num2 = num4 / num; + } + + int num5 = 0; + int num6 = Convert.ToInt32(num2); + num5 = ((!((decimal)num6 < num2)) ? num6 : (num6 + 1)); + base.View.Model.SetValue("FCenterCreateNumber", num5, RowIndex); + } + else + { + base.View.Model.SetValue("FCenterCreateNumber", 0, RowIndex); + base.View.Model.SetValue("FCenterBoxQty", 0, RowIndex); + base.View.Model.SetValue("FBigCreateNumber", 0, RowIndex); + } + } + + private void BigCalcCreateNumber(int RowIndex) + { + decimal num = default(decimal); + num = ((!barcodeSysParm.FThreeLevelPacking || !barcodeSysParm.FCreateOrder.Equals("1")) ? Convert.ToDecimal(base.View.Model.GetValue("FQTY", RowIndex)) : Convert.ToDecimal(base.View.Model.GetValue("FCenterCreateNumber", RowIndex))); + decimal num2 = Convert.ToDecimal(base.View.Model.GetValue("FBigBoxQty", RowIndex)); + if (num2 > 0m && !base.View.Model.GetValue("FBigBoxRule", RowIndex).IsNullOrEmptyOrWhiteSpace()) + { + if (num2 > 0m && num > 0m) + { + decimal num3 = num / num2; + int num4 = 0; + int num5 = Convert.ToInt32(num3); + num4 = ((!((decimal)num5 < num3)) ? num5 : (num5 + 1)); + base.View.Model.SetValue("FBigCreateNumber", num4, RowIndex); + } + else + { + base.View.Model.SetValue("FBigCreateNumber", 0, RowIndex); + } + } + } + + public void GetFlotBill(Context ctx, IDynamicFormView view, string flotkey) + { + string entryName = string.Empty; + if (!_billFormMetaData.BusinessInfo.ContainsKey(flotkey) || _sFormId == "STK_Inventory") + { + return; + } + + FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.Context, _sFormId); + if (_isFromBill == 1 && formMetadata.BusinessInfo.GetEntity(_sEntityKey) != null) + { + entryName = formMetadata.BusinessInfo.GetEntity(_sEntityKey).EntryName; + } + + if (listData != null && listData.Count > 0) + { + string entryEntityKey = listData[0].EntryEntityKey; + if (!string.IsNullOrWhiteSpace(entryEntityKey) && formMetadata.BusinessInfo.GetEntity(entryEntityKey) != null) + { + entryName = formMetadata.BusinessInfo.GetEntity(entryEntityKey).EntryName; + } + } + + LotField lotField = _billFormMetaData.BusinessInfo.GetField(flotkey) as LotField; + ExtendedDataEntitySet extendedDataEntitySet = new ExtendedDataEntitySet(); + DynamicObject[] sourceBillData = GetSourceBillData(_billFormMetaData, new List(), _sourceId, _sourceEntryId); + GetEnrtysfilterEntryIds(entryName, sourceBillData); + extendedDataEntitySet.Parse(sourceBillData, _billFormMetaData.BusinessInfo); + ExtendedDataEntity[] array = extendedDataEntitySet.FindByEntityKey(lotField.EntityKey); + ExtendedDataEntity[] array2; + if (base.View.Model.GetValue("FBarCodeRule") is DynamicObject dynamicObject && dynamicObject.Contains("FPrintSummaryEntry") && Convert.ToBoolean(dynamicObject["FPrintSummaryEntry"])) + { + array2 = new ExtendedDataEntity[MergeID.Count()]; + int num = 0; + ExtendedDataEntity[] array3 = array; + for (int i = 0; i < array3.Length; i++) + { + ExtendedDataEntity extendedDataEntity = array3[i]; + if (MergeID.Contains(Convert.ToString(extendedDataEntity.DataEntity["Id"]))) + { + array2[num++] = extendedDataEntity; + } + } + } + else + { + array2 = array; + } + + CodeAppResult val = StockServiceHelper.GenerateLotMasterByCodeRule(ctx, _billFormMetaData.BusinessInfo, lotField, array2); + if (!val.AllDataRight) + { + return; + } + + List> codeNumbers = val.CodeNumbers; + for (int j = 0; j < codeNumbers.Count; j++) + { + if (!codeNumbers[j].Value.IsNullOrEmptyOrWhiteSpace()) + { + DynamicObject dynamicObject2 = base.View.Model.GetValue(flotkey, j) as DynamicObject; + if (dynamicObject2 == null) + { + base.View.Model.SetItemValueByNumber(flotkey, codeNumbers[j].Value[0], j); + } + } + } + + view.UpdateView(flotkey); + } + + public void GetEnrtysfilterEntryIds(string entryName, DynamicObject[] dySoruceObjsColl) + { + if (string.IsNullOrWhiteSpace(entryName) || dySoruceObjsColl.Count() <= 0 || !dySoruceObjsColl[0].DynamicObjectType.Properties.Contains(entryName)) + { + return; + } + + foreach (DynamicObject dynamicObject in dySoruceObjsColl) + { + DynamicObjectCollection dynamicObjectCollection = dynamicObject[entryName] as DynamicObjectCollection; + List list = new List(); + if (_isFromBill == 1 && (listData == null || listData.Count() <= 0) && !_sourceEntryId.IsNullOrEmptyOrWhiteSpace()) + { + List list2 = _sourceEntryId.Split(',').ToList(); + foreach (string item in list2) + { + int num = 0; + foreach (DynamicObject item2 in dynamicObjectCollection) + { + string text = Convert.ToString(item2["Id"]); + if (text == item) + { + list.Add(num); + break; + } + + num++; + } + } + } + else + { + for (int j = 0; j < listData.Count; j++) + { + string entryPrimaryKeyValue = listData[j].EntryPrimaryKeyValue; + int num2 = 0; + foreach (DynamicObject item3 in dynamicObjectCollection) + { + string text2 = Convert.ToString(item3["Id"]); + if (text2 == entryPrimaryKeyValue) + { + list.Add(num2); + break; + } + + num2++; + } + } + } + + int num3 = 0; + List list3 = new List(); + foreach (DynamicObject item4 in dynamicObjectCollection) + { + if (!list.Contains(num3)) + { + list3.Add(item4); + } + + num3++; + } + + for (int k = 0; k < list3.Count; k++) + { + dynamicObjectCollection.Remove(list3[k]); + } + } + } + + /// + /// 同步条码主档 2025/6/30 + /// + private void SynchronizeCodeMain() + { + var sourceFormId = "UHIK_BD_BarCodeMainFile"; + var entity = this.View.BusinessInfo.GetEntity("FEntityToBar"); + var entityDataObject = this.View.Model.GetEntityDataObject(entity); + if (entityDataObject == null && entityDataObject.Count == 0) + { + this.View.ShowErrMessage("没有找到条码明细,请生成条码明细!!!"); + } + var billId = this.View.Model.GetValue("FBillId") as DynamicObject; // 获取业务对象 + var srcData = entityDataObject.ToList(); + var ObjList = new List(); + var meta = MetaDataServiceHelper.Load(this.Context, sourceFormId) as FormMetadata; + + foreach (var item in srcData) + { + var count = ObjList.Where(n => n["BarCode"].ToString() == item["BarCode"].ToString()).ToList().Count; + if (count > 0) + { + continue; + } + var objType = meta.BusinessInfo.GetDynamicObjectType(); + var queryParameter = new QueryBuilderParemeter(); + var barCode = item["BarCode"]; + queryParameter.FilterClauseWihtKey = string.Format(" FBarCode = '{0}' ", barCode); + queryParameter.FormId = sourceFormId; + var newObj = new DynamicObject(objType); + var loadObjs = BusinessDataServiceHelper.Load(this.Context, objType, queryParameter); + if (loadObjs.Count() > 0) + { + newObj = loadObjs[0]; + } + // 物料 + newObj["MaterialId_Id"] = item["MaterialIdToBar_Id"]; + newObj["MaterialId"] = item["MaterialIdToBar"]; + // 条码规则 + newObj["BarCodeRule_Id"] = item["BarCodeRule_Id"]; + newObj["BarCodeRule"] = item["BarCodeRule"]; + // 条形码 + newObj["BarCode"] = item["BarCode"]; + // 单位 + newObj["UnitId_Id"] = item["UnitIDToBar_Id"]; + newObj["UnitId"] = item["UnitIDToBar"]; + // 批号 + newObj["Lot_Id"] = item["LotToBar_Id"]; + newObj["Lot"] = item["LotToBar"]; + newObj["Lot_Text"] = item["LotToBar_Text"]; + newObj["FLotText"] = item["LotToBar_Text"]; + // 供应商批号 + newObj["SupplierLot"] = item["SUPPLIERLOTTOBAR"]; + // 数量 + newObj["Qty"] = item["QtyToBar"]; + // 行号 + newObj["BillSeq"] = item["BillSeqToBar"]; + // 仓库 + newObj["StockId_Id"] = item["StockIdToBar_Id"]; + newObj["StockId"] = item["StockIdToBar"]; + newObj["StockLocId_Id"] = item["FSTOCKLOCIDToBar_Id"]; + newObj["StockLocId"] = item["FSTOCKLOCIDToBar"]; + // 单据编码 + newObj["BillCode"] = item["BILLCODEToBar"]; + // 禁用状态 + newObj["ForbidStatus"] = "A"; + // 计数流水号 + newObj["FLowNo"] = item["FLowNo"]; + // 辅助属性 + newObj["AuxPropId_Id"] = item["AuxPropIdToBar_Id"]; + newObj["AuxPropId"] = item["AuxPropIdToBar"]; + + + + // 以下非标准字段 + newObj["FMoEntryId_Id"] = item["FMOENTRYIDToBar_Id"]; + newObj["FMoEntryId"] = item["FMOENTRYIDToBar"]; + newObj["FBillId_Id"] = billId["Id"]; + newObj["FBillId"] = billId; + newObj["FMinPackCount"] = item["FMinPackCountToBar"]; + newObj["FMUJU_Id"] = item["FMUJUToBar_Id"]; + newObj["FMUJU"] = item["FMUJUToBar"]; + newObj["F_JT_Id"] = item["F_JTToBar_Id"]; + newObj["F_JT"] = item["F_JTToBar"]; + newObj["F_BZFS"] = item["F_BZFSToBar"]; + + ObjList.Add(newObj); + } + if (ObjList.Count > 0) + { + OperateOption saveOption = OperateOption.Create(); + //saveOption.SetInteractionFlag(this.Option.GetInteractionFlag()); + saveOption.SetIgnoreWarning(true); + saveOption.SetIgnoreInteractionFlag(true); + var saveRslt = BusinessDataServiceHelper.Save(this.Context, meta.BusinessInfo, ObjList.ToArray(), saveOption, "Save"); + if (saveRslt.IsSuccess) + { + var resRows = saveRslt.Rows.ToList(); + foreach (var res in resRows) + { + var index = resRows.IndexOf(res); + this.View.Model.SetValue("FBarCodeMD5ToBar", res.DataEntity["Id"].ToString(), index); + } + this.View.UpdateView("FEntityToBar"); + this.View.ShowMessage("同步成功,可以在条码主档# 中查看生成的条码."); + } + else + { + this.View.ShowErrMessage(string.Join(",\r\n", saveRslt.OperateResult.Select(n => n.Message))); + } + } + } + } +} diff --git a/Gatedge.ScanCode.Basis.PlugIn/Bill/BAR_Record/ServicePlugIn/Save.cs b/Gatedge.ScanCode.Basis.PlugIn/Bill/BAR_Record/ServicePlugIn/Save.cs new file mode 100644 index 0000000..9dd0807 --- /dev/null +++ b/Gatedge.ScanCode.Basis.PlugIn/Bill/BAR_Record/ServicePlugIn/Save.cs @@ -0,0 +1,45 @@ +using Kingdee.BOS.Core.DynamicForm.PlugIn; +using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; +using Kingdee.BOS.Orm.DataEntity; +using Kingdee.BOS.Util; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_Record.ServicePlugIn +{ + [Description("条码扫描记录-保存将条码明细行数写到单据头"), HotUpdate] + public class Save : AbstractOperationServicePlugIn + { + public override void OnPreparePropertys(PreparePropertysEventArgs e) + { + base.OnPreparePropertys(e); + e.FieldKeys.Add("FBarSum"); + e.FieldKeys.Add("FBarCount"); + e.FieldKeys.Add("FBarCode"); + e.FieldKeys.Add("FResultBillNo"); + e.FieldKeys.Add("FMOInfo"); + e.FieldKeys.Add("FBarMoEntryId"); + } + + public override void BeforeDoSaveExecute(BeforeDoSaveExecuteEventArgs e) + { + base.BeforeDoSaveExecute(e); + foreach (var bill in e.DataEntities) + { + var barEntityList = bill["FBarEntity"] as DynamicObjectCollection; + var resultEntityList = bill["FResultEntity"] as DynamicObjectCollection; + bill["FBarCount"] = barEntityList.Count; + bill["FResultCount"] = resultEntityList.Count; + var moList = barEntityList.Select(n => n["FBarMoEntryId"] as DynamicObject).ToList(); + var moNoList = moList.Select(n => n["Number"].ToString() + '/' + n["FMOEntrySeq"].ToString()).Distinct(); + + var moInfo = string.Join(",", moNoList); + bill["FMOInfo"] = moInfo.Substring(0, Math.Min(50, moInfo.Length)); + } + } + } +} diff --git a/Gatedge.ScanCode.Basis.PlugIn/Gatedge.ScanCode.Basis.PlugIn.csproj b/Gatedge.ScanCode.Basis.PlugIn/Gatedge.ScanCode.Basis.PlugIn.csproj new file mode 100644 index 0000000..277c195 --- /dev/null +++ b/Gatedge.ScanCode.Basis.PlugIn/Gatedge.ScanCode.Basis.PlugIn.csproj @@ -0,0 +1,192 @@ + + + + + Debug + AnyCPU + {C2252356-BCEC-48D8-80DF-6C45B4BDA1FC} + Library + Properties + Gatedge.ScanCode.Basis.PlugIn + Gatedge.ScanCode.Basis.PlugIn + v4.8 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Library\Kingdee.BOS.dll + + + ..\Library\Kingdee.BOS.App.dll + + + ..\Library\Kingdee.BOS.App.Core.dll + + + ..\Library\Kingdee.BOS.Business.Bill.dll + + + ..\Library\Kingdee.BOS.Contracts.dll + + + ..\Library\Kingdee.BOS.Core.dll + + + ..\Library\Kingdee.BOS.DataEntity.dll + + + ..\Library\Kingdee.BOS.Excel.dll + + + ..\Library\Kingdee.BOS.FileServer.Core.dll + + + ..\Library\Kingdee.BOS.FileServer.ProxyService.dll + + + ..\Library\Kingdee.BOS.ServiceHelper.dll + + + ..\Library\Kingdee.BOS.VerificationHelper.dll + + + ..\Library\Kingdee.BOS.Web.dll + + + ..\Library\Kingdee.BOS.Web.HTML.dll + + + ..\Library\Kingdee.BOS.Web.HTML.Core.dll + + + ..\Library\Kingdee.BOS.WebApi.FormService.dll + + + ..\Library\Kingdee.CDP.WebApi.SDK.dll + + + ..\Library\Kingdee.K3.BD.BarCode.App.dll + + + ..\Library\Kingdee.K3.BD.BarCode.App.Core.dll + + + ..\Library\Kingdee.K3.BD.BarCode.Business.PlugIn.dll + + + ..\Library\Kingdee.K3.BD.BarCode.Core.dll + + + ..\Library\Kingdee.K3.BD.BarCode.ServiceHelper.dll + + + ..\Library\Kingdee.K3.BD.Contracts.dll + + + ..\Library\Kingdee.K3.BD.NewCode.Core.dll + + + ..\Library\Kingdee.K3.BD.NewCode.Extension.dll + + + ..\Library\Kingdee.K3.BD.ServiceHelper.dll + + + ..\Library\Kingdee.K3.Core.dll + + + ..\Library\Kingdee.K3.FIN.Business.PlugIn.dll + + + ..\Library\Kingdee.K3.FIN.Core.dll + + + ..\Library\Kingdee.K3.FIN.HS.Business.PlugIn.dll + + + ..\Library\Kingdee.K3.FIN.HS.Common.BusinessEntity.dll + + + ..\Library\Kingdee.K3.FIN.HS.Contracts.dll + + + ..\Library\Kingdee.K3.FIN.HS.ServiceHelper.dll + + + ..\Library\Kingdee.K3.FIN.ServiceHelper.dll + + + ..\Library\Kingdee.K3.MFG.App.dll + + + ..\Library\Kingdee.K3.MFG.BusinessCommon.dll + + + ..\Library\Kingdee.K3.MFG.Contracts.dll + + + ..\Library\Kingdee.K3.MFG.PLN.App.Core.dll + + + ..\Library\Kingdee.K3.MFG.PLN.App.MrpModel.dll + + + ..\Library\Kingdee.K3.MFG.PLN.Business.PlugIn.dll + + + ..\Library\Kingdee.K3.MFG.PLN.Report.PlugIn.dll + + + ..\Library\Kingdee.K3.MFG.ServiceHelper.dll + + + ..\Library\Kingdee.K3.SCM.App.Core.dll + + + ..\Library\Kingdee.K3.SCM.Common.BusinessEntity.dll + + + ..\Library\Kingdee.K3.SCM.ServiceHelper.dll + + + False + ..\Library\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + copy $(TargetPath) "D:\Program Files (x86)\Kingdee\K3Cloud\WebSite\Bin\$(TargetFileName)" + + \ No newline at end of file diff --git a/Gatedge.ScanCode.Basis.PlugIn/Properties/AssemblyInfo.cs b/Gatedge.ScanCode.Basis.PlugIn/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7c6871f --- /dev/null +++ b/Gatedge.ScanCode.Basis.PlugIn/Properties/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Gatedge.ScanCode.Basis.PlugIn")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Gatedge.ScanCode.Basis.PlugIn")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("c2252356-bcec-48d8-80df-6c45b4bda1fc")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Gatedge.ScanCode/.config/dotnet-tools.json b/Gatedge.ScanCode/.config/dotnet-tools.json new file mode 100644 index 0000000..159811c --- /dev/null +++ b/Gatedge.ScanCode/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "9.0.1", + "commands": [ + "dotnet-ef" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/Common/AjaxResult.cs b/Gatedge.ScanCode/Common/AjaxResult.cs new file mode 100644 index 0000000..d45b55d --- /dev/null +++ b/Gatedge.ScanCode/Common/AjaxResult.cs @@ -0,0 +1,184 @@ +namespace Gatedge.ScanCode.Common +{ + /// + /// 通用返回类 + /// + public class AjaxResult : Dictionary + { + /// + /// 状态码 + /// + public static string CODE_TAG = "code"; + + /// + /// 返回内容 + /// + public static string MSG_TAG = "msg"; + + /// + /// 数据对象 + /// + public static string DATA_TAG = "data"; + + /// + /// 单据类型Id + /// + public static string BILLID_TAG = "billId"; + + /// + /// 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。 + /// + public AjaxResult() + { + } + + /// + /// 初始化一个新创建的 AjaxResult 对象 + /// + /// + /// + public AjaxResult(int code, string msg) + { + Add(CODE_TAG, code); + Add(MSG_TAG, msg); + } + + /// + /// 初始化一个新的带数据的 AjaxResult 对象 + /// + /// + /// + /// + public AjaxResult(int code, string msg, object? data) + { + Add(CODE_TAG, code); + Add(MSG_TAG, msg); + Add(DATA_TAG, data); + } + + /// + /// 返回一个成功响应对象 + /// + /// + public static AjaxResult Success() + { + return Success("操作成功"); + } + /// + /// 返回一个带消息成功响应对象 + /// + /// + + public static AjaxResult Success(object data) + { + return Success("操作成功", data); + } + /// + /// 返回一个带消息和数据的响应对象 + /// + /// + /// + /// + public static AjaxResult Success(string msg, object data) + { + return new AjaxResult(HttpStatus.SUCCESS, msg, data); + } + /// + /// 返回一个带消息的警告响应对象 + /// + /// + /// + public static AjaxResult Warn(string msg) + { + return Warn(msg, null); + } + /// + /// 返回一个带消息和数据的警告响应对象 + /// + /// + /// + /// + public static AjaxResult Warn(string msg, object? data) + { + return new AjaxResult(HttpStatus.WARN, msg, data); + } + /// + /// 返回一个错误响应对象 + /// + /// + public static AjaxResult Error() + { + return Error("操作失败"); + } + /// + /// 返回一个带消息的错误响应对象 + /// + /// + /// + public static AjaxResult Error(string msg) + { + return Error(msg, null); + } + /// + /// 返回一个带消息和数据的响应对象 + /// + /// + /// + /// + public static AjaxResult Error(string msg, object? data) + { + return new AjaxResult(HttpStatus.ERROR, msg, data); + } + + /// + /// 返回一个带错误代码和消息的错误响应对象 + /// + /// + /// + /// + public static AjaxResult Error(int code, string msg) + { + return new AjaxResult(code, msg, null); + } + + /// + /// 检查是否成功 + /// + /// + public bool IsSuccess() + { + return HttpStatus.SUCCESS == Convert.ToInt32(this[CODE_TAG]); + } + + + /// + /// 检查是否警告 + /// + /// + public bool IsWarn() + { + return HttpStatus.WARN == Convert.ToInt32(this[CODE_TAG]); + } + + + /// + /// 检查是否错误 + /// + /// + public bool IsError() + { + return HttpStatus.ERROR == Convert.ToInt32(this[CODE_TAG]); + } + + /// + /// 添加BillId + /// + public AjaxResult AddBillId(string billId) + { + Add(BILLID_TAG, billId); + return this; + } + + + } +} diff --git a/Gatedge.ScanCode/Common/FileLoggerProvider.cs b/Gatedge.ScanCode/Common/FileLoggerProvider.cs new file mode 100644 index 0000000..f6fc06f --- /dev/null +++ b/Gatedge.ScanCode/Common/FileLoggerProvider.cs @@ -0,0 +1,158 @@ +using System.Text; + +namespace Gatedge.ScanCode.Common +{ + /// + /// 文件日志帮助类 + /// + public class FileLogger : ILogger + { + private readonly string _categoryName; + private readonly string _filePath; + private readonly long _maxFileSize; // 最大文件大小(字节) + private readonly int _maxRetainedFiles; // 最大保留文件数 + + /// + /// 构造函数 + /// + /// + /// + /// + /// + public FileLogger(string categoryName, string filePath, long maxFileSize = 10 * 1024 * 1024, int maxRetainedFiles = 5) + { + _categoryName = categoryName; + _filePath = filePath; + _maxFileSize = maxFileSize; + _maxRetainedFiles = maxRetainedFiles; + } + + /// + /// 开始 + /// + /// + /// + /// + public IDisposable BeginScope(TState state) => null; + + /// + /// 检测日志等级是否启用 + /// + /// + /// + public bool IsEnabled(LogLevel logLevel) => true; + + /// + /// 写入日志 + /// + /// + /// + /// + /// + /// + /// + public void Log( + LogLevel logLevel, + EventId eventId, + TState state, + Exception exception, + Func formatter) + { + // 过滤日志级别(可选) + if (!IsEnabled(logLevel)) return; + + // 格式化日志消息 + var message = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss} [{logLevel}] {_categoryName}: {formatter(state, exception)}{Environment.NewLine}"; + + // 确保目录存在 + var directory = Path.GetDirectoryName(_filePath); + if (!Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + + // 检查文件大小并滚动 + RollFileIfNeeded(); + + // 写入日志 + File.AppendAllText(_filePath, message, Encoding.UTF8); + } + + /// + /// 文件滚动刷新 + /// + private void RollFileIfNeeded() + { + try + { + var fileInfo = new FileInfo(_filePath); + if (fileInfo.Exists && fileInfo.Length >= _maxFileSize) + { + // 滚动文件命名:logs/app_20231005_001.log + var timestamp = DateTime.Now.ToString("yyyyMMdd"); + var basePath = Path.Combine( + Path.GetDirectoryName(_filePath), + Path.GetFileNameWithoutExtension(_filePath) + ); + var newFilePath = $"{basePath}_{timestamp}_{Guid.NewGuid():n}{Path.GetExtension(_filePath)}"; + File.Move(_filePath, newFilePath); + + // 清理旧文件 + var directory = new DirectoryInfo(Path.GetDirectoryName(_filePath)); + var files = directory.GetFiles($"{Path.GetFileNameWithoutExtension(_filePath)}_*") + .OrderByDescending(f => f.CreationTime) + .Skip(_maxRetainedFiles - 1) + .ToList(); + + foreach (var file in files) + { + file.Delete(); + } + } + } + catch + { + // 处理文件操作异常(如权限不足) + } + } + } + + /// + /// 日志写入帮助类 + /// + public class FileLoggerProvider : ILoggerProvider + { + private readonly string _filePath; + private readonly long _maxFileSize; + private readonly int _maxRetainedFiles; + + /// + /// 构造函数 + /// + /// + /// + /// + public FileLoggerProvider(string filePath, long maxFileSize, int maxRetainedFiles) + { + _filePath = filePath; + _maxFileSize = maxFileSize; + _maxRetainedFiles = maxRetainedFiles; + } + /// + /// 创建日志写入器 + /// + /// + /// + public ILogger CreateLogger(string categoryName) + { + return new FileLogger(categoryName, _filePath, _maxFileSize, _maxRetainedFiles); + } + /// + /// 清理资源 + /// + public void Dispose() + { + // 清理资源(如需要) + } + } +} diff --git a/Gatedge.ScanCode/Common/HttpClients.cs b/Gatedge.ScanCode/Common/HttpClients.cs new file mode 100644 index 0000000..350bb80 --- /dev/null +++ b/Gatedge.ScanCode/Common/HttpClients.cs @@ -0,0 +1,61 @@ + +using System.Net; +using System.Text; + +namespace Gatedge.ScanCode.Common +{ + /// + /// http提交客户端 + /// + public class HttpClients + { + /// + /// Seivice URL + /// + public string Url { get; set; } + /// + /// 内容 + /// + public string Content { get; set; } + /// + /// Cookie,保证登录后,所有访问持有一个Cookie; + /// + static CookieContainer Cookie = new CookieContainer(); + + /// + /// HTTP访问 + /// + public string Post() + { + HttpWebRequest httpRequest = HttpWebRequest.Create(Url) as HttpWebRequest; + httpRequest.Method = "POST"; + httpRequest.ContentType = "application/json"; + httpRequest.CookieContainer = Cookie; + httpRequest.Timeout = 1000 * 60; //1min + + using (Stream reqStream = httpRequest.GetRequestStream()) + { + + string sContent = string.Empty; + 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()); + } + } + } + private static string ValidateResult(string responseText) + { + if (responseText.StartsWith("response_error:")) + { + return responseText.TrimStart("response_error:".ToCharArray()); + } + return responseText; + } + } +} diff --git a/Gatedge.ScanCode/Common/HttpStatus.cs b/Gatedge.ScanCode/Common/HttpStatus.cs new file mode 100644 index 0000000..0e7fcb2 --- /dev/null +++ b/Gatedge.ScanCode/Common/HttpStatus.cs @@ -0,0 +1,93 @@ +namespace Gatedge.ScanCode.Common +{ + /// + /// HTTP响应状态代码 + /// + public class HttpStatus + { + /// + /// 操作成功 + /// + public static int SUCCESS = 200; + + /// + /// 对象创建成功 + /// + public static int CREATED = 201; + + /// + /// 请求已经被接受 + /// + public static int ACCEPTED = 202; + + /// + /// 操作已经执行成功,但是没有返回数据 + /// + public static int NO_CONTENT = 204; + + /// + /// 资源已被移除 + /// + public static int MOVED_PERM = 301; + + /// + /// 重定向 + /// + public static int SEE_OTHER = 303; + + /// + /// 资源没有被修改 + /// + public static int NOT_MODIFIED = 304; + + /// + /// 参数列表错误(缺少,格式不匹配) + /// + public static int BAD_REQUEST = 400; + + /// + /// 未授权 + /// + public static int UNAUTHORIZED = 401; + + /// + /// 访问受限,授权过期 + /// + public static int FORBIDDEN = 403; + + /// + /// 资源,服务未找到 + /// + public static int NOT_FOUND = 404; + + /// + /// 不允许的http方法 + /// + public static int BAD_METHOD = 405; + + /// + /// 资源冲突,或者资源被锁 + /// + public static int CONFLICT = 409; + + /// + /// 不支持的数据,媒体类型 + /// + public static int UNSUPPORTED_TYPE = 415; + + /// + /// 系统内部错误 + /// + public static int ERROR = 500; + + /// + /// 接口未实现 + /// + public static int NOT_IMPLEMENTED = 501; + + /// + /// 系统警告消息 + /// + public static int WARN = 601; + } +} diff --git a/Gatedge.ScanCode/Config/appsettings.json b/Gatedge.ScanCode/Config/appsettings.json new file mode 100644 index 0000000..fdab58e --- /dev/null +++ b/Gatedge.ScanCode/Config/appsettings.json @@ -0,0 +1,15 @@ +{ + //测试环境 + //第三方系统登录授权的账套ID + "X-KDApi-AcctID": "65edc24ab975db", + //第三方系统登录授权的应用ID + "X-KDApi-AppID": "302967_20fp7YsL2kpWR9VG5Y3LSbUHzv3/SDmv", + //第三方系统登录授权的应用密钥 + "X-KDApi-AppSec": "5e38f16711514126ae1511ca4ead3232", + //第三方系统登录授权的用户 + "X-KDApi-UserName": "ERP1", + //账套语系,默认2052 + "X-KDApi-LCID": "2052", + //服务Url地址 (只有私有云用户需要配置Serverurl,公有云用户走网关不需要配置) + "X-KDApi-ServerUrl": "http://8.138.110.197/K3Cloud" +} diff --git a/Gatedge.ScanCode/Controllers/AccountController.cs b/Gatedge.ScanCode/Controllers/AccountController.cs new file mode 100644 index 0000000..4cbe0e9 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/AccountController.cs @@ -0,0 +1,206 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Exceptions; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Option; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Services.IServices; +using Kingdee.CDP.WebApi.SDK; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System.Data; +using System.Text.Json; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// + /// + [Route("api/[controller]")] + [ApiController] + public class AccountController : ControllerBase + { + private readonly IAccountService _accountService; + private readonly List _kingdeeOptions; + private readonly K3CloudApiUtils _utils; + + + /// + /// 初始化控制器,加载ICO对象 + /// + /// + /// + /// + public AccountController(K3CloudApiUtils utils, IAccountService accountService) + { + _utils = utils; + _accountService = accountService; + _kingdeeOptions = _utils.GetKingdeeOptions(); + } + + /// + /// 登录账号 + /// + /// + /// + [HttpPost("login")] + public AjaxResult Login(LoginInfo loginInfo) + { + var clienter = _utils.CreateDefaultK3CloudApi(loginInfo); + //数据中心DBID修改为由前端传参 + var loginValidate = clienter.Login(loginInfo.DBID, loginInfo.UserName, loginInfo.Password, loginInfo.LCId); + if (loginValidate) + { + var token = _accountService.Login(loginInfo); + var ajaxResult = AjaxResult.Success(); + ajaxResult.Add("token", token); + return ajaxResult; + } + return AjaxResult.Error(500, "登录失败"); + } + + /// + /// 获取登录描述信息 + /// + /// + /// + [HttpPost("getDetails")] + [Authorize] + public AjaxResult GetDetails(LoginInfo loginInfo) + { + // 初始化连接对象 + _utils.InitCloudApi(loginInfo); + K3CloudApi clienter = _utils.CreateDefaultK3CloudApi(loginInfo); + var loginValidate = clienter.ValidateLogin( + loginInfo.DBID, + loginInfo.UserName, + loginInfo.Password, + loginInfo.LCId + ); + var reuslt = JsonSerializer.Deserialize(loginValidate); + return AjaxResult.Success(reuslt); + } + + + /// + /// 获取账套数据中心信息 + /// + /// + /// + [HttpPost("GetDataCenterList")] + public AjaxResult GetDataCenterList(DataCenter jModel) + { + if (string.IsNullOrWhiteSpace(jModel.ServerUrl)) + { + return AjaxResult.Error(500, "ServerUrl为空"); + } + + //访问金蝶官方接口获取数据中心 + HttpClients httpClient = new HttpClients(); + httpClient.Url = jModel.ServerUrl + + "/Kingdee.BOS.ServiceFacade.ServicesStub.Account.AccountService.GetDataCenterList.common.kdsvc"; + string result = httpClient.Post(); + return AjaxResult.Success(JsonSerializer.Deserialize>>(result)); + } + + + /// + /// 根据用户名返回组织范围 + /// + /// + /// + [HttpPost("SearchOrg")] + public AjaxResult SearchOrg([FromBody] DataCenter dataCenter) + { + if (string.IsNullOrWhiteSpace(dataCenter.UserName)) + { + return AjaxResult.Error(500, "用户名为空"); + } + + if (string.IsNullOrWhiteSpace(dataCenter.DBID)) + { + return AjaxResult.Error(500, "DBID为空"); + } + + if (string.IsNullOrWhiteSpace(dataCenter.ServerUrl)) + { + return AjaxResult.Error(500, "ServerUrl为空"); + } + + K3CloudOption? kingdeeOption = _kingdeeOptions + .Where(n => n.AcctID == dataCenter.DBID + && n.ServerUrl.ToUpperInvariant() == dataCenter.ServerUrl.ToUpperInvariant()) + .FirstOrDefault(); + + if (kingdeeOption == null) + { + return AjaxResult.Error(500, "配置文件没有对应的第三方授权登录信息!"); + } + + //组装登录信息 + K3CloudApi client = new K3CloudApi(); + client.InitClient( + acctID: kingdeeOption.AcctID, + appID: kingdeeOption.AppID, + appSec: kingdeeOption.AppSec, + serverUrl: kingdeeOption.ServerUrl, + userName: kingdeeOption.UserName, + lcid: kingdeeOption.LCID, + orgNum: kingdeeOption.OrgNumber + ); + + Query queryParam = new Query() + { + FormId = "SEC_User", + FieldKeys = "FUserID,FName,FUserAccount,FOrgOrgId,FOrgOrgId.FNumber,FOrgOrgName", + }; + FilterList filterString = new FilterList(); + FilterItem FNameItem = new FilterItem("FUserAccount", "67", dataCenter.UserName, "0"); + filterString.AddFilterItem(FNameItem); + queryParam.FilterString = filterString.GetFilterString(); + + + var resultString = client.BillQuery(queryParam.ToString()); + // 包含ErrorCode认定为失败 + if (resultString.Contains("ErrorCode")) + { + var errorResult = JsonSerializer.Deserialize(resultString); + var responseStatus = errorResult?.Result?.ResponseStatus; + Exception error = new K3CloudException("查看单据列表出错", responseStatus); + throw error; + } + + List? result = JsonSerializer.Deserialize>(resultString); + if (result?.Count == 0) + { + return AjaxResult.Error(500, "用户名没有组织权限,或用户名不存在!"); + } + + return AjaxResult.Success(result); + } + + /// + /// 退出账号 + /// + /// + [HttpPost("logout")] + [Authorize] + public AjaxResult Logout() + { + // 初始化连接对象 + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + K3CloudApi clienter = _utils.GetApiClient(); + var isLogout = clienter.Logout(); + if (isLogout) + { + return AjaxResult.Success(); + } + + return AjaxResult.Error("未知错误"); + } + } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/Controllers/BarCodeMainFileController.cs b/Gatedge.ScanCode/Controllers/BarCodeMainFileController.cs new file mode 100644 index 0000000..c02f919 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/BarCodeMainFileController.cs @@ -0,0 +1,87 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.IdentityModel.Tokens; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 条码主档 + /// + [Route("api/[controller]")] + [Authorize] + [ApiController] + public class BarCodeMainFileController : ControllerBase + { + + private readonly string _FormName = "条码主档#"; + private readonly string _FormId = "UHIK_BD_BarCodeMainFile"; + private readonly K3CloudApiUtils _utils; + + /// + /// 构造函数 + /// + /// + public BarCodeMainFileController(K3CloudApiUtils utils) + { + _utils = utils; + } + + + /// + /// 查看根据条码主档 + /// + /// + /// + [HttpGet("ViewByBarCode")] + public AjaxResult View([FromQuery] BarCodeParam param) + { + var barCode = param.BarCode; + if (barCode.IsNullOrEmpty()) + { + string errMes = "条码编码不能为空"; + return AjaxResult.Error(errMes); + } + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IBarRecordService barRecordService = new BarRecordService(_utils); + var list = barRecordService.FindIdByCode(barCode); + IBarCodeMainFileService service = new BarCodeMainFileService(_utils); + var fid = service.GetIdByBarCode(barCode); + View viewBill = new View() + { + Id = fid + }; + var data = service.View(viewBill); + if (list.List.Count > 0) + { + + var scanerName = Convert.ToString(list.List.First()["FCreatorId.FName"]); + var warnInfo = string.Format("该条码已经被扫描过,扫描人:{0}", scanerName); + return AjaxResult.Warn("该条码已经被扫描过", data); + } + return AjaxResult.Success(data); + + } + + /// + /// 查看 + /// + /// + [HttpGet("View")] + public AjaxResult View([FromQuery] View Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IBarCodeMainFileService service = new BarCodeMainFileService(_utils); + var data = service.View(Param); + return AjaxResult.Success(data).AddBillId(_FormId); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/BarRecordController.cs b/Gatedge.ScanCode/Controllers/BarRecordController.cs new file mode 100644 index 0000000..3f065a8 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/BarRecordController.cs @@ -0,0 +1,155 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Models.Dto.BarRecord; +using Gatedge.ScanCode.Models.Dto.ScanRecords; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 条码扫描记录列表 + /// + [Route("api/[controller]")] + [Authorize] + [ApiController] + public class BarRecordController : ControllerBase + { + private readonly string _FormName = "条码扫描记录#"; + private readonly string _FormId = "ke3a69108a53e4baba04b1bf338355b6a"; + private readonly K3CloudApiUtils _utils; + + + /// + /// 构造函数 + /// + /// + public BarRecordController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 单据列表 + /// + /// + /// + [HttpGet("List")] + public AjaxResult List([FromQuery] BarRecordPageParam param) + { + if (param.PageSize <= 0) + { + var errMes = string.Format("传递的参数不合法,页大小需要大于0,当前 PageSize 为 {0}", param.PageSize); + return AjaxResult.Error(500, errMes); + } + if (param.PageIndex <= 0) + { + var errMes = string.Format("传递的参数不合法,页索引需要大于0,当前 PageIndex 为 {0}", param.PageIndex); + return AjaxResult.Error(500, errMes); + } + if (param.UserId == null) + { + var errMes = string.Format("传递的参数不合法,用户Id不能为空,当前 UserId 为 {0}", param.UserId); + return AjaxResult.Error(500, errMes); + } + + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = @"FID,FBillNO,FStatus,FOrgId,FCreatorId,FCreateDate,FErrorInfo,FIsPrinted,FBarCount,FBarSum,FMOInfo", + Limit = param.PageSize, + StartRow = param.PageSize * (param.PageIndex - 1), + FilterString = new List(), + OrderString = "FCreateDate DESC" + }; + FilterItem userItem = new FilterItem("FCreatorId", "67", param.UserId, "0"); + queryParam.FilterString.Add(userItem); + if (param.IsSubmit == null) + { + if (param.Status != null) + { + queryParam.FilterString.Add(new FilterItem("FStatus", "29", param.Status, "0")); + } + } + if (param.IsSubmit == false) + { + + queryParam.FilterString.Add(new FilterItem("FStatus", "29", "1", "0")); + + } + if (param.IsSubmit == true) + { + queryParam.FilterString.Add(new FilterItem("FStatus", "29", "2", "1") + { + Left = "((", + Right = ")" + }); + queryParam.FilterString.Add(new FilterItem("FStatus", "29", "3", "0") + { + Left = "(", + Right = "))" + }); + } + + + + queryParam.FilterString.Add(userItem); + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IBarRecordService service = new BarRecordService(_utils); + var data = service.List(queryParam); + return AjaxResult.Success(data); + } + + + + /// + /// 保存扫描记录 + /// + /// + [HttpPost("Save")] + public AjaxResult Save([FromBody] ArrayDto param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IBarRecordService service = new BarRecordService(_utils); + var result = service.Save(param.Data); + return AjaxResult.Success(result); + } + + /// + /// 查看 + /// + /// + [HttpGet("View")] + public AjaxResult View([FromQuery] View Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IBarRecordService service = new BarRecordService(_utils); + var data = service.View(Param); + return AjaxResult.Success(data).AddBillId(_FormId); + } + + /// + /// 打印成果单据 + /// + /// + [HttpPost("PrintResultBillNo")] + public AjaxResult PrintResultBillNo([FromBody] BarRecord barRecord) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IBarRecordService service = new BarRecordService(_utils); + service.PrintResultBillNo(barRecord); + return AjaxResult.Success("扫描记录更新成功."); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/MaterialController.cs b/Gatedge.ScanCode/Controllers/MaterialController.cs new file mode 100644 index 0000000..a2bccd6 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/MaterialController.cs @@ -0,0 +1,83 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 物料档案 + /// + [Route("api/[controller]")] + [Authorize] + [ApiController] + public class MaterialController : ControllerBase + { + private readonly string _FormName = "物料"; + private readonly string _FormId = "BD_MATERIAL"; + private readonly K3CloudApiUtils _utils; + + /// + /// 构造方法 + /// + /// + public MaterialController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 列表 + /// + /// + /// + [HttpGet("List")] + public AjaxResult List([FromQuery] PageParam Param) + { + if (Param.PageSize <= 0 || Param.PageIndex <= 0) + { + var errMes = string.Format("传递的参数不合法,请检查PageIndex:{0},PageSize:{1}", Param.PageIndex, Param.PageSize); + return AjaxResult.Error(500, errMes); + } + Query queryParam = new Query() + { + FormId = this._FormId, + // 物料ID、物料编码、物料名称 + FieldKeys = "FMATERIALID,FNUMBER,FNAME", + Limit = Param.PageSize, + StartRow = Param.PageSize * (Param.PageIndex - 1), + }; + // 已审核未禁用 + FilterList filterString = new FilterList().AddAuditedItems().AddNotCancelItems("FForbidStatus"); + if (Param.QueryString != string.Empty && Param.QueryString != null) + { + FilterItem NamefilterItem = new FilterItem("(", "FNAME", "17", Param.QueryString, "", "1"); + FilterItem NumberfilterItem = new FilterItem("", "FNUMBER", "17", Param.QueryString, ")", "0"); + filterString.AddFilterItem(NamefilterItem).AddFilterItem(NumberfilterItem); + queryParam.FilterString = filterString.GetFilterString(); + } + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + var data = _utils.QueryList(queryParam); + return AjaxResult.Success(data); + } + + /// + /// 查看 + /// + /// + /// + [HttpGet("View")] + public AjaxResult View([FromQuery] View Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + var result = _utils.Query(_FormId, Param); + return AjaxResult.Success(result); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/OrganizationsController.cs b/Gatedge.ScanCode/Controllers/OrganizationsController.cs new file mode 100644 index 0000000..a46f21d --- /dev/null +++ b/Gatedge.ScanCode/Controllers/OrganizationsController.cs @@ -0,0 +1,58 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Microsoft.AspNetCore.Mvc; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 组织机构 + /// + [Route("api/[controller]")] + [ApiController] + public class OrganizationsController : ControllerBase + { + private readonly string _FormName = "组织机构"; + private readonly string _FormId = "ORG_Organizations"; + private readonly K3CloudApiUtils _utils; + /// + /// 初始化控制器,加载ICO对象 + /// + /// + public OrganizationsController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 查询单据列表 + /// + /// + [HttpGet("List")] + public AjaxResult List([FromQuery] PageParam Param) + { + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = "FOrgID,FNumber,FName", + //Limit = Param.PageSize, + //StartRow = Param.PageSize * (Param.PageIndex - 1), + }; + FilterList filterString = new FilterList(); + if (Param.QueryString != string.Empty && Param.QueryString != null) + { + FilterItem filterItem = new FilterItem("FNumber", "17", Param.QueryString, "0"); + filterString.AddFilterItem(filterItem); + } + queryParam.FilterString = filterString.GetFilterString(); + + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + var data = _utils.QueryList(queryParam); + return AjaxResult.Success(data); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/ScanRecordsController.cs b/Gatedge.ScanCode/Controllers/ScanRecordsController.cs new file mode 100644 index 0000000..2298597 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/ScanRecordsController.cs @@ -0,0 +1,225 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Models.Dto.ScanRecords; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 暂存扫描记录 + /// + [Route("api/[controller]")] + [Authorize] + [ApiController] + public class ScanRecordsController : ControllerBase + { + private readonly string _FormName = "扫描记录#"; + private readonly string _FormId = "k4b27f8773ecb443da113e1a5e64ccaf9"; + private readonly K3CloudApiUtils _utils; + + /// + /// 构造函数 + /// + /// + public ScanRecordsController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 查看 + /// + /// + [HttpGet("View")] + public AjaxResult View([FromQuery] View Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + var data = service.View(Param); + return AjaxResult.Success(data).AddBillId(_FormId); + } + + + /// + /// 单据列表 + /// + /// + /// + [HttpGet("List")] + public AjaxResult List([FromQuery] ScanRecordsPageParam param) + { + if (param.PageSize <= 0) + { + var errMes = string.Format("传递的参数不合法,页大小需要大于0,当前 PageSize 为 {0}", param.PageSize); + return AjaxResult.Error(500, errMes); + } + if (param.PageIndex <= 0) + { + var errMes = string.Format("传递的参数不合法,页索引需要大于0,当前 PageIndex 为 {0}", param.PageIndex); + return AjaxResult.Error(500, errMes); + } + if (param.UserId == null) + { + var errMes = string.Format("传递的参数不合法,用户Id不能为空,当前 UserId 为 {0}", param.UserId); + return AjaxResult.Error(500, errMes); + } + + + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = @"FID,FStatus,FCreatorId,FCreateDate, +FBillId.FID,FBillId.FName,FBillNo,FBarCode,FEntryId,FMaterialId,FMaterialId.FNumber,FMaterialId.FName,FQty,FStockId,FStockId.FNumber,FStockId.FName,Flot,FJSON, +FErrorInfo,FSubmitLot, +FResultBillId.FID,FResultBillId.FName,FResultBillNo,FResultId,FResultIsChecked,FIsPrinted", + Limit = param.PageSize, + StartRow = param.PageSize * (param.PageIndex - 1), + FilterString = new List(), + OrderString = "FCreateDate DESC" + }; + FilterItem userItem = new FilterItem("FCreatorId", "67", param.UserId, "0"); + queryParam.FilterString.Add(userItem); + // 如果存在FormId,加到过滤条件中 + if (param.BillId != null) + { + queryParam.FilterString.Add(new FilterItem("FBillId.FID", "67", param.BillId, "0")); + } + // 如果存在FormId,加到过滤条件中 + if (param.BarCode != null) + { + queryParam.FilterString.Add(new FilterItem("FBarCode", "67", param.BarCode, "0")); + } + if (param.BillNo != null) + { + queryParam.FilterString.Add(new FilterItem("FBillNo", "67", param.BillNo, "0")); + } + if (param.Status != null) + { + queryParam.FilterString.Add(new FilterItem("FStatus", "29", param.Status, "0")); + } + if (param.SubmitLot != null) + { + queryParam.FilterString.Add(new FilterItem("FSubmitLot", "67", param.SubmitLot, "0")); + } + queryParam.FilterString.Add(userItem); + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + var data = service.List(queryParam); + return AjaxResult.Success(data); + } + + + + /// + /// 保存扫描记录 + /// + /// + [HttpPost("Save")] + public AjaxResult Save([FromBody] ScanRecordsSaveDto param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + service.Save(param); + return AjaxResult.Success("保存成功"); + } + + /// + /// 批量扫描记录 + /// + /// + [HttpPost("PatchSave")] + public AjaxResult PatchSave([FromBody] ArrayDto param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + service.PatchSave(param); + return AjaxResult.Success("保存成功"); + } + + /// + /// 删除扫描记录 + /// + /// + [HttpPost("Delete")] + public AjaxResult Delete([FromBody] Delete Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + service.Delete(Param); + return AjaxResult.Success("删除成功"); + } + + /// + /// 批量删除扫描记录 + /// + /// + [HttpPost("MultiDelete")] + public AjaxResult MultiDelete([FromBody] ScanRecordsPageParam Param) + { + if (Param.UserId == null) + { + var errMes = string.Format("传递的参数不合法,用户Id不能为空,当前 UserId 为 {0}", Param.UserId); + return AjaxResult.Error(500, errMes); + } + if (Param.BillId == null) + { + var errMes = string.Format("传递的参数不合法,表单Id不能为空,当前 FormId 为 {0}", Param.BillId); + return AjaxResult.Error(500, errMes); + } + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = "FID", + }; + FilterList filterString = new FilterList(); + FilterItem userItem = new FilterItem("FCreatorId", "67", Param.UserId, "0"); + filterString.AddFilterItem(userItem); + FilterItem formidItem = new FilterItem("FFromId", "67", Param.BillId, "0"); + filterString.AddFilterItem(formidItem); + queryParam.FilterString = filterString.GetFilterString(); + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + + var data = service.List(queryParam); + var mes = string.Format("删除成功。删除数量:{0}", data.List.Count); + if (data.List.Count == 0) + { + return AjaxResult.Success(mes); + } + Delete delete = new Delete() + { + Ids = string.Join(",", data.List.Select(n => n["FID"].ToString())) + }; + var result = service.Delete(delete); + return AjaxResult.Success(mes, result); + } + + /// + /// 打印成果单据 + /// + /// + [HttpPost("PrintResultBillNo")] + public AjaxResult PrintResultBillNo([FromBody] PrintRecord printRecord) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IScanRecordsService service = new ScanRecordsService(_utils); + var reuslt = service.PrintResultBillNo(printRecord.Ids); + return AjaxResult.Success("扫描记录更新成功."); + } + + } +} diff --git a/Gatedge.ScanCode/Controllers/StockController.cs b/Gatedge.ScanCode/Controllers/StockController.cs new file mode 100644 index 0000000..0c9d557 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/StockController.cs @@ -0,0 +1,93 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System.Security.Claims; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 仓库 + /// + [Route("api/[controller]")] + [ApiController] + [Authorize] + public class StockController : ControllerBase + { + private readonly string _FormName = "仓库"; + private readonly string _FormId = "BD_STOCK"; + private readonly K3CloudApiUtils _utils; + + /// + /// 构造函数 + /// + /// + public StockController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 获取列表 + /// + /// + /// + [HttpGet("List")] + public AjaxResult List([FromQuery] PageParam Param) + { + if (Param.PageSize <= 0 || Param.PageIndex <= 0) + { + var errMes = string.Format("传递的参数不合法,请检查PageIndex:{0},PageSize:{1}", Param.PageIndex, Param.PageSize); + return AjaxResult.Error(500, errMes); + } + Query queryParam = new Query() + { + FormId = this._FormId, + // 仓库Id、 + FieldKeys = "FSTOCKID,FNUMBER,FNAME,FIsOpenLocation,FFlexId,FFlexName,FStockFlexDetail_FDetailID,FFlexEntryName", + Limit = Param.PageSize, + StartRow = Param.PageSize * (Param.PageIndex - 1), + }; + // 已审核未禁用 + FilterList filterString = new FilterList().AddAuditedItems().AddNotCancelItems("FForbidStatus"); + if (Param.QueryString != string.Empty && Param.QueryString != null) + { + FilterItem NamefilterItem = new FilterItem("(", "FNAME", "17", Param.QueryString, "", "1"); + FilterItem NumberfilterItem = new FilterItem("", "FNUMBER", "17", Param.QueryString, ")", "0"); + //过滤名称和编码 + filterString.AddFilterItem(NamefilterItem).AddFilterItem(NumberfilterItem); + } + // 过滤组织 + FilterItem FOrgItem = new FilterItem("FUseOrgId.FNumber", "67", User.FindFirstValue("orgNum"), "0"); + filterString.AddFilterItem(FOrgItem); + queryParam.FilterString = filterString.GetFilterString(); + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IStockService service = new StockService(_utils); + var data = service.List(queryParam); + return AjaxResult.Success(data).AddBillId(_FormId); + } + + + /// + /// 查看 + /// + /// + /// + [HttpGet("View")] + public AjaxResult View([FromQuery] View Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IStockService service = new StockService(_utils); + var result = service.View(Param); + return AjaxResult.Success(result).AddBillId(_FormId); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/StockFlexDetailController.cs b/Gatedge.ScanCode/Controllers/StockFlexDetailController.cs new file mode 100644 index 0000000..0ad5c87 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/StockFlexDetailController.cs @@ -0,0 +1,76 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Models.Dto.ScanRecords; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 仓位 + /// + [Route("api/[controller]")] + [ApiController] + [Authorize] + public class StockFlexDetailController : ControllerBase + { + private readonly string _FormName = "仓位"; + private readonly string _FormId = "BD_FLEXVALUES"; + private readonly K3CloudApiUtils _utils; + + + /// + /// 构造函数 + /// + /// + public StockFlexDetailController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 查看列表 + /// + /// + /// + [HttpGet("List")] + public AjaxResult List([FromQuery] ScanRecordsPageParam Param) + { + View viewParam = new View(); + viewParam.Number = Param.Number; + //查询仓库 + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + IStockService stockService = new StockService(_utils); + var result = stockService.View(viewParam); + var dyobj = (dynamic)result; + var stockFlexItem = dyobj.GetProperty("StockFlexItem"); + //根据仓库StockFlexItem查询仓位 + Query queryParam = new Query() + { + FormId = "BD_FLEXVALUES", + FieldKeys = "FEntity_FEntryId,FID,FNUMBER,FNAME,FFlexValueNumber,FFlexValueName", + }; + FilterList filterString = new FilterList(); + if (Param.QueryString != string.Empty && Param.QueryString != null) + { + FilterItem filterItem = new FilterItem("FFlexValueName", "17", Param.QueryString, "0"); + filterString.AddFilterItem(filterItem); + } + for (int i = 0; i < stockFlexItem.GetArrayLength(); i++) + { + //循环追加过滤条件仓位集ID,0:并且,1;或者 + FilterItem fbillnoItem = new FilterItem("FID", "67", stockFlexItem[i].GetProperty("FlexId_Id").ToString(), "1"); + filterString.AddFilterItem(fbillnoItem); + } + queryParam.FilterString = filterString.GetFilterString(); + var data = _utils.QueryList(queryParam); + return AjaxResult.Success(data).AddBillId(_FormId); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/SupportingInformationController.cs b/Gatedge.ScanCode/Controllers/SupportingInformationController.cs new file mode 100644 index 0000000..d14cf05 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/SupportingInformationController.cs @@ -0,0 +1,82 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 辅助资料 + /// + [Route("api/[controller]")] + [Authorize] + [ApiController] + public class SupportingInformationController : ControllerBase + { + private readonly string _FormName = "辅助属性"; + private readonly string _FormId = "BOS_ASSISTANTDATA_DETAIL"; + private readonly K3CloudApiUtils _utils; + + /// + /// 构造方法 + /// + /// + public SupportingInformationController(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 辅助属性列表 + /// + /// + [HttpGet("PackagingMethodList")] + public AjaxResult PackagingMethodList() + { + Query queryParam = new Query() + { + FormId = this._FormId, + // 基础资料内码,基础资料编码 + FieldKeys = "FEntryID,FNumber,FDataValue", + Limit = 0, + StartRow = 0, + FilterString = new List() + }; + // 已审核未禁用 + queryParam.FilterString.Add(new FilterItem() + { + Left = "", + FieldName = "FId.FNumber", + Compare = "67", + Value = "01", + Right = "", + Logic = "", + }); + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + ISupportingInformationService service = new SupportingInformationService(_utils); + var data = service.List(queryParam); + return AjaxResult.Success(data); + } + + + /// + /// 查看 + /// + /// + /// + [HttpGet("View")] + public AjaxResult View([FromQuery] View Param) + { + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + _utils.InitCloudApi(loginInfo); + var result = _utils.Query(_FormId, Param); + return AjaxResult.Success(result); + } + } +} diff --git a/Gatedge.ScanCode/Controllers/VsersionController.cs b/Gatedge.ScanCode/Controllers/VsersionController.cs new file mode 100644 index 0000000..3264133 --- /dev/null +++ b/Gatedge.ScanCode/Controllers/VsersionController.cs @@ -0,0 +1,79 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json.Linq; + +namespace Gatedge.ScanCode.Controllers +{ + /// + /// 版本控制 + /// + [Route("api/[controller]")] + [Authorize] + [ApiController] + public class VsersionController : ControllerBase + { + private readonly string _FormName = "扫码APP版本"; + private readonly string _FormId = "k25663a1521d147669932af94b9146d86"; + private readonly K3CloudApiUtils _utils; + private readonly IK3FileService _k3FileService; + /// + /// 构造方法 + /// + /// + /// + public VsersionController(K3CloudApiUtils utils, IK3FileService k3FileService) + { + _utils = utils; + _k3FileService = k3FileService; + } + + /// + /// 获取最后的版本 + /// + /// + [HttpGet("LastVersion")] + public AjaxResult LastVersion() + { + + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = "FID", + OrderString = "FID desc" + }; + // 已审核 + FilterList filterString = new FilterList().AddAuditedItems(); + queryParam.FilterString = filterString.GetFilterString(); + var loginInfo = User.GetLoginInfoByClaimsPrincipal(); + // 需要获取具有BOS权限的用户 + var k3Apiutil = _utils.GetDefaultK3CloudApiUtil(loginInfo); + IVsersionService service = new VsersionService(k3Apiutil); + var data = service.List(queryParam); + if (data.List.Count == 0) + { + return AjaxResult.Error("没有找到App版本信息,请联系管理员!"); + } + var lastVersion = data.List.First(); + var dyobj = lastVersion; + var id = dyobj["FID"]; + View viewBill = new View(); + viewBill.Id = id.ToString(); + var billData = service.View(viewBill); + var file = billData.FAppFile_Files.First(); + _k3FileService.SetK3Util(k3Apiutil); + var fileFullName = _k3FileService.GetFilePath(billData.FAppFile_Files.First()); + var result = AjaxResult + .Success(billData) + .AddBillId(_FormId); + result.Add("downloadUrl", $"/Download/{file.FileName}"); + return result; + } + } +} diff --git a/Gatedge.ScanCode/Extension/K3CloudExtension.cs b/Gatedge.ScanCode/Extension/K3CloudExtension.cs new file mode 100644 index 0000000..0041872 --- /dev/null +++ b/Gatedge.ScanCode/Extension/K3CloudExtension.cs @@ -0,0 +1,30 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using System.Security.Claims; + +namespace Gatedge.ScanCode.Extension +{ + /// + /// 金蝶云星空扩展方法 + /// + public static class K3CloudExtension + { + /// + /// 通过验证信息获取UserInfo + /// + /// + /// + public static LoginInfo GetLoginInfoByClaimsPrincipal(this ClaimsPrincipal user) + { + var logInfo = new LoginInfo() + { + UserName = user.FindFirstValue("UserName"), + LCId = Convert.ToInt32(user.FindFirstValue("LCId")), + OrgNum = user.FindFirstValue("orgNum"), + DBID = user.FindFirstValue("DBID"), + ServerUrl = user.FindFirstValue("ServerUrl"), + }; + return logInfo; + + } + } +} diff --git a/Gatedge.ScanCode/Extension/OptionExtension.cs b/Gatedge.ScanCode/Extension/OptionExtension.cs new file mode 100644 index 0000000..f6df8de --- /dev/null +++ b/Gatedge.ScanCode/Extension/OptionExtension.cs @@ -0,0 +1,82 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Option; +using Gatedge.ScanCode.Options; +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Gatedge.ScanCode.Utils; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.IdentityModel.Tokens; +using System.Text; + +namespace Gatedge.ScanCode.Extension +{ + /// + /// 配置文件扩展类 + /// + public static class OptionExtension + { + + /// + /// 扩展金蝶云星空服务 + /// + /// 容器服务 + /// 配置文件 + public static void AddConfigureK3CloudApi(this IServiceCollection service, IConfiguration configuration) + { + var section = configuration.GetSection("Kingdee:Default"); + var option = section.Get>(); + service.AddScoped(s => + { + return new K3CloudApiUtils(option); + }); + + } + + /// + /// 验证jwt + /// + /// + /// + public static void ConfigureJwtContext(this IServiceCollection service, IConfiguration configuration) + { + var section = configuration.GetSection("Jwt:Default"); + var option = section.Get(); + Console.WriteLine(option); + service.AddAuthentication(options => { options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; }) + .AddJwtBearer(options => + { + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateIssuer = true, //是否验证Issuer + ValidIssuer = option.Issuer, //发行人Issuer + ValidateAudience = true, //是否验证Audience + ValidAudience = option.Audience, //订阅人Audience + ValidateIssuerSigningKey = true, //是否验证SecurityKey + IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(option.SecretKey)), //SecurityKey + ValidateLifetime = true, //是否验证失效时间 + ClockSkew = TimeSpan.FromSeconds(30), //过期时间容错值,解决服务器端时间不同步问题(秒) + RequireExpirationTime = true + }; + }); + service.AddSingleton(new JwtUtils(option)); + } + + + /// + /// 文件配置 + /// + /// + /// + public static void AddConfigureK3FileService(this IServiceCollection service, IConfiguration configuration) + { + var section = configuration.GetSection("FileConfig"); + var option = section.Get(); + service.AddScoped(s => + { + ILoggerFactory factory = LoggerFactory.Create(builder => builder.AddConsole()); + ILogger logger = new Logger(factory); + return new K3FileService(option, logger); + }); + } + } +} diff --git a/Gatedge.ScanCode/Extension/ServiceExtension.cs b/Gatedge.ScanCode/Extension/ServiceExtension.cs new file mode 100644 index 0000000..36d7c80 --- /dev/null +++ b/Gatedge.ScanCode/Extension/ServiceExtension.cs @@ -0,0 +1,38 @@ +using Gatedge.ScanCode.Services; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Authorization; +using System.Text.Json; + +namespace Gatedge.ScanCode.Extension +{ + /// + /// 服务扩展 + /// + public static class ServiceExtension + { + /// + /// 添加MVC服务,并配置默认的输出格式为JSON + /// + /// + public static void ConfigureServices(this IServiceCollection services) + { + // 添加MVC服务,并配置默认的输出格式为JSON + services.AddControllers().AddJsonOptions(options => + { + // 可以在这里配置JSON序列化选项,例如日期格式、驼峰命名等 + options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + options.JsonSerializerOptions.WriteIndented = true; + }); + } + + /// + /// 注册Bean服务 + /// + /// + public static void ConfigureCore(this IServiceCollection service) + { + service.AddSingleton(); + service.AddTransient(); + } + } +} diff --git a/Gatedge.ScanCode/Gatedge.ScanCode.csproj b/Gatedge.ScanCode/Gatedge.ScanCode.csproj new file mode 100644 index 0000000..cbcbad9 --- /dev/null +++ b/Gatedge.ScanCode/Gatedge.ScanCode.csproj @@ -0,0 +1,39 @@ + + + + net6.0 + enable + enable + True + Library + + + + + + + + + + + + + + + + + + + + + + + + + ..\Library\Kingdee.CDP.WebApi.SDK.dll + + + + + + diff --git a/Gatedge.ScanCode/K3CloudFile/appsettings.json b/Gatedge.ScanCode/K3CloudFile/appsettings.json new file mode 100644 index 0000000..fdab58e --- /dev/null +++ b/Gatedge.ScanCode/K3CloudFile/appsettings.json @@ -0,0 +1,15 @@ +{ + //测试环境 + //第三方系统登录授权的账套ID + "X-KDApi-AcctID": "65edc24ab975db", + //第三方系统登录授权的应用ID + "X-KDApi-AppID": "302967_20fp7YsL2kpWR9VG5Y3LSbUHzv3/SDmv", + //第三方系统登录授权的应用密钥 + "X-KDApi-AppSec": "5e38f16711514126ae1511ca4ead3232", + //第三方系统登录授权的用户 + "X-KDApi-UserName": "ERP1", + //账套语系,默认2052 + "X-KDApi-LCID": "2052", + //服务Url地址 (只有私有云用户需要配置Serverurl,公有云用户走网关不需要配置) + "X-KDApi-ServerUrl": "http://8.138.110.197/K3Cloud" +} diff --git a/Gatedge.ScanCode/K3CloudFile/huiweiapp.apk b/Gatedge.ScanCode/K3CloudFile/huiweiapp.apk new file mode 100644 index 0000000..b5ff797 Binary files /dev/null and b/Gatedge.ScanCode/K3CloudFile/huiweiapp.apk differ diff --git a/Gatedge.ScanCode/Middleware/AuthorizationMiddleware.cs b/Gatedge.ScanCode/Middleware/AuthorizationMiddleware.cs new file mode 100644 index 0000000..287c41c --- /dev/null +++ b/Gatedge.ScanCode/Middleware/AuthorizationMiddleware.cs @@ -0,0 +1,44 @@ +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authorization.Policy; +using Microsoft.AspNetCore.Identity; +using System.Security.Claims; + +namespace Gatedge.ScanCode.Middleware; + +/// +/// JWT鉴权中间件 +/// +public class AuthorizationMiddleware : IAuthorizationMiddlewareResultHandler +{ + /// + /// + /// + /// + /// + /// + /// + /// + public async Task HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) + { + //因为管道还没有走到Action 所以没有ActionResult使用 我们必须自己定义Response中的内容 + //这里授权是否成功 + if (!authorizeResult.Succeeded) + { + //将状态码定义为200 + context.Response.StatusCode = 200; + //使用 WriteAsJsonAsync 写入一个自定义的返回对象 自动完成Json的序列化操作 + //我这里用匿名类演示 实际项目中请替换成对应的返回对象 自定义状态码和提示信息 + //身份验证是否通过 + if (context?.User?.Identity?.IsAuthenticated == false) + await context.Response.WriteAsJsonAsync(AjaxResult.Error(401, "找不到会话信息,请先登录.")); + else + await context.Response.WriteAsJsonAsync(AjaxResult.Error(403, "改用户没有权限")); + //注意一定要return 在这里短路管道 不要走到next 否则线程会进入后续管道 到达action中 + return; + } + //如果授权成功 继续执行后续的中间件 记住一定记得next 否则会管道会短路 + await next(context); + } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/Middleware/GlobalExceptionMiddleware.cs b/Gatedge.ScanCode/Middleware/GlobalExceptionMiddleware.cs new file mode 100644 index 0000000..7fe93b0 --- /dev/null +++ b/Gatedge.ScanCode/Middleware/GlobalExceptionMiddleware.cs @@ -0,0 +1,66 @@ +using Gatedge.K3Cloud.Utils.Exceptions; +using Gatedge.ScanCode.Common; +using System.Text.Json; + +namespace Gatedge.ScanCode.Middleware +{ + /// + /// 自定义异常中间件 + /// + public class GlobalExceptionMiddleware + { + /// + /// 委托 + /// + private readonly RequestDelegate _next; + private readonly ILogger _logger; + + + /// + /// 构造方法 + /// + /// + /// + public GlobalExceptionMiddleware(RequestDelegate next, ILogger logger) + { + _next = next; + _logger = logger; + } + + /// + /// 拦截请求 + /// + /// + /// + public async Task Invoke(HttpContext context) + { + try + { + await _next(context); + } + catch (Exception ex) + { + var result = AjaxResult.Error(500, ex.Message); + var errTitle = ex.Message; + var errInfo = ex.Message; + if (ex is K3CloudException) + { + K3CloudException k3ViewException = (K3CloudException)ex; + result = AjaxResult.Error(ex.Message); + result.Add("error", k3ViewException.responseStatus.Errors); + errInfo = JsonSerializer.Serialize(k3ViewException.responseStatus.Errors); + } + var errMessage = @$" +================================================= +errTitle: {errTitle} +errInfo: {errInfo} +================================================= +"; + _logger.LogError(errMessage); + context.Response.ContentType = "application/problem+json"; + var stream = context.Response.Body; + await JsonSerializer.SerializeAsync(stream, result); + } + } + } +} diff --git a/Gatedge.ScanCode/Middleware/ResponseLoggingMiddleware.cs b/Gatedge.ScanCode/Middleware/ResponseLoggingMiddleware.cs new file mode 100644 index 0000000..27120e2 --- /dev/null +++ b/Gatedge.ScanCode/Middleware/ResponseLoggingMiddleware.cs @@ -0,0 +1,103 @@ +using System.Diagnostics; +using System.Text; + +namespace Gatedge.ScanCode.Middleware +{ + /// + /// 日志中间件 + /// + public class ResponseLoggingMiddleware + { + private readonly RequestDelegate _next; + private readonly ILogger _logger; + + /// + /// 构造函数 + /// + /// + /// + public ResponseLoggingMiddleware(RequestDelegate next, ILogger logger) + { + _next = next; + _logger = logger; + } + + /// + /// 中间件处理函数 + /// + /// + /// + public async Task Invoke(HttpContext context) + { + // 访问路径 + var path = context.Request.Path; + // 记录请求开始时间 + var startTime = Stopwatch.GetTimestamp(); + // 获取客户端 IP 地址(处理反向代理场景) + var ipAddress = context.Connection.RemoteIpAddress?.ToString(); + if (context.Request.Headers.TryGetValue("X-Forwarded-For", out var forwardedFor)) + { + ipAddress = forwardedFor.ToString(); + } + + // 记录请求体(JSON) + string RequestBody = string.Empty; + if (context.Request.ContentType?.Contains("application/json") == true) + { + context.Request.EnableBuffering(); + using var reader = new StreamReader(context.Request.Body, Encoding.UTF8, true, 1024, true); + RequestBody = await reader.ReadToEndAsync(); + context.Request.Body.Position = 0; + } + + // 捕获原始响应流 + var originalBodyStream = context.Response.Body; + // 使用内存流捕获响应 + using var responseBody = new MemoryStream(); + context.Response.Body = responseBody; + + // 调用下一个中间件 + await _next(context); + + // 记录响应体 + responseBody.Seek(0, SeekOrigin.Begin); + var bodyText = await new StreamReader(responseBody, Encoding.Default, true, 1024, true).ReadToEndAsync(); + + + // 将响应复制回原始流 + responseBody.Seek(0, SeekOrigin.Begin); + await responseBody.CopyToAsync(originalBodyStream); + context.Response.Body = originalBodyStream; + + // 记录请求结束时间 + var endTime = Stopwatch.GetTimestamp(); + + // 计算请求耗时 + var elapsed = (double)(endTime - startTime) / Stopwatch.Frequency * 1000.000; + // 记录日志 + // _logger.LogInformation( + //@"Request: {Method} {Path} | IP: {IP} | Status: {StatusCode} | Time: {Elapsed}ms + //RequestBody: {Request} + //ResponseBody: {Response} + //================================================================================", + // context.Request.Method, + // context.Request.Path, + // ipAddress, + // context.Response.Body, + // elapsed, + // RequestBody, + // bodyText + // ); + + // 记录日志 + + var method = context.Request.Method; + var statusCode = context.Response.Body; + _logger.LogInformation( +@$"Request: {method} {path} | IP: {ipAddress} | Status: {statusCode} | Time: {elapsed}ms +RequestBody: {RequestBody} +================================================================================" + ); + } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/ArrayDto.cs b/Gatedge.ScanCode/Models/Dto/ArrayDto.cs new file mode 100644 index 0000000..13384d8 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/ArrayDto.cs @@ -0,0 +1,13 @@ +namespace Gatedge.ScanCode.Models.Dto +{ + /// + /// 列表参数 + /// + public class ArrayDto + { + /// + /// 数据列表 + /// + public List Data { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/BarCode.cs b/Gatedge.ScanCode/Models/Dto/BarCode.cs new file mode 100644 index 0000000..2099330 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/BarCode.cs @@ -0,0 +1,14 @@ +namespace Gatedge.ScanCode.Models.Dto +{ + /// + /// 条码入参 + /// + public class BarCodeParam + { + + /// + /// 条码编码 + /// + public string? BarCode { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecord.cs b/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecord.cs new file mode 100644 index 0000000..7763e5c --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecord.cs @@ -0,0 +1,13 @@ +namespace Gatedge.ScanCode.Models.Dto.BarRecord +{ + /// + /// 条码扫描记录 + /// + public class BarRecord + { + /// + /// 条码扫描记录Id + /// + public int BarRecordId { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecordPageParam.cs b/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecordPageParam.cs new file mode 100644 index 0000000..0f12236 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecordPageParam.cs @@ -0,0 +1,23 @@ +namespace Gatedge.ScanCode.Models.Dto.BarRecord +{ + /// + /// 暂存扫描记录列表过滤条件 + /// + public class BarRecordPageParam : PageParam + { + /// + /// 用户Id + /// + public string? UserId { get; set; } + + /// + /// 状态 + /// + public string? Status { get; set; } + + /// + /// 是否提交过 + /// + public bool? IsSubmit { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecordsSaveDto.cs b/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecordsSaveDto.cs new file mode 100644 index 0000000..2869745 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/BarRecord/BarRecordsSaveDto.cs @@ -0,0 +1,55 @@ +namespace Gatedge.ScanCode.Models.Dto.BarRecord +{ + /// + /// 条码新增类 + /// + public class BarRecordsSaveDto + { + /// + /// 扫描单据ID + /// + public string? FBarBillId { get; set; } + + /// + /// 扫描单据编号 + /// + public string? FBarBillNo { get; set; } + /// + /// 行号 + /// + public int FBarSeq { get; set; } + + /// + /// 条码编码 + /// + public string? FBarCode { get; set; } + + /// + /// 物料编码 + /// + public int FBarMaterialId { get; set; } + + /// + /// 扫描数量 + /// + public decimal FBarQty { get; set; } + + + /// + /// 仓库 + /// + public int FBarStockId { get; set; } + + + + /// + /// 分录ID + /// + public int FMoEntryId { get; set; } + + /// + /// 辅助属性 + /// + public int FBarAuxpropId { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/DataCenter.cs b/Gatedge.ScanCode/Models/Dto/DataCenter.cs new file mode 100644 index 0000000..47abd79 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/DataCenter.cs @@ -0,0 +1,25 @@ +namespace Gatedge.ScanCode.Models.Dto +{ + /// + /// 数据中心 + /// + public class DataCenter + { + /// + /// 用户FName + /// + public string? UserName { get; set; } + + + /// + /// 数据中心DBID + /// + public string? DBID { get; set; } + + + /// + /// 金蝶地址 + /// + public string? ServerUrl { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/PageParam.cs b/Gatedge.ScanCode/Models/Dto/PageParam.cs new file mode 100644 index 0000000..5007eaa --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/PageParam.cs @@ -0,0 +1,21 @@ +namespace Gatedge.ScanCode.Models.Dto +{ + /// + /// 列表查询参数 + /// + public class PageParam + { + /// + /// 页大小 + /// + public int PageSize { get; set; } + /// + /// 页索引 + /// + public int PageIndex { get; set; } + /// + /// 搜索字符串 + /// + public string? QueryString { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/PrdInStock/PrdInStockInspect.cs b/Gatedge.ScanCode/Models/Dto/PrdInStock/PrdInStockInspect.cs new file mode 100644 index 0000000..9772bd1 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/PrdInStock/PrdInStockInspect.cs @@ -0,0 +1,17 @@ +namespace Gatedge.ScanCode.Models.Dto.PrdInStock +{ + /// + /// 生产入库单检验参数 + /// + public class PrdInStockInspect + { + /// + /// 单据编号 + /// + public string? Number { get; set; } + /// + /// 单据Id + /// + public string? Id { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/PrintRecord.cs b/Gatedge.ScanCode/Models/Dto/PrintRecord.cs new file mode 100644 index 0000000..7916911 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/PrintRecord.cs @@ -0,0 +1,14 @@ +namespace Gatedge.ScanCode.Models.Dto +{ + /// + /// 打印成果码 + /// + public class PrintRecord + { + /// + /// 打印成果码的扫码记录Id + /// + public List Ids { get; set; } + + } +} diff --git a/Gatedge.ScanCode/Models/Dto/ScanRecords/ScanRecordsPageParam.cs b/Gatedge.ScanCode/Models/Dto/ScanRecords/ScanRecordsPageParam.cs new file mode 100644 index 0000000..e9791fa --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/ScanRecords/ScanRecordsPageParam.cs @@ -0,0 +1,39 @@ +namespace Gatedge.ScanCode.Models.Dto.ScanRecords +{ + /// + /// 暂存扫描记录列表过滤条件 + /// + public class ScanRecordsPageParam : PageParam + { + /// + /// 单据表单ID + /// + public string? BillId { get; set; } + /// + /// 单据号 + /// + public string? BillNo { get; set; } + /// + /// 编号 + /// + public string? Number { get; set; } + /// + /// 条形码 + /// + public string? BarCode { get; set; } + /// + /// 用户Id + /// + public string? UserId { get; set; } + + /// + /// 状态 + /// + public string? Status { get; set; } + + /// + /// 提交批次 + /// + public string? SubmitLot { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Dto/ScanRecords/ScanRecordsSaveDto.cs b/Gatedge.ScanCode/Models/Dto/ScanRecords/ScanRecordsSaveDto.cs new file mode 100644 index 0000000..d7e1e34 --- /dev/null +++ b/Gatedge.ScanCode/Models/Dto/ScanRecords/ScanRecordsSaveDto.cs @@ -0,0 +1,104 @@ +namespace Gatedge.ScanCode.Models.Dto.ScanRecords +{ + /// + /// 条码新增类 + /// + public class ScanRecordsSaveDto + { + /// + /// 扫描单据ID + /// + public string? FID { get; set; } + + /// + /// 状态 + /// + public string? FStatus { get; set; } + /// + /// 扫描单据ID + /// + public string? FBillId { get; set; } + + /// + /// 扫描单据编号 + /// + public string? FBillNo { get; set; } + + /// + /// 条码编码 + /// + public string? FBarCode { get; set; } + + /// + /// 物料编码 + /// + public string? FMaterialId { get; set; } + + /// + /// 扫描数量 + /// + public decimal? FQty { get; set; } + + + /// + /// 仓库 + /// + public string? FStockId { get; set; } + + /// + /// 批号 + /// + public string? Flot { get; set; } + + /// + /// 分录ID + /// + public string? FEntryId { get; set; } + + /// + /// 下推JSON + /// + public string? FJSON { get; set; } + + /// + /// 错误信息 + /// + public string? FErrorInfo { get; set; } + + /// + /// 响应信息 + /// + public string? FResultInfo { get; set; } + + /// + /// 结果内码 + /// + public string? FResultId { get; set; } + + /// + /// 结果单号 + /// + public string? FResultBillNo { get; set; } + + /// + /// 是否已校验 + /// + public string? FResultIsChecked { get; set; } + + /// + /// 结果FormId + /// + public string? FResultBillId { get; set; } + + /// + /// 是否已打印 + /// + public string? FIsPrinted { get; set; } + + + /// + /// 提交批次 + /// + public string FSubmitLot { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/Auxprop/MaterialAuxprop.cs b/Gatedge.ScanCode/Models/K3Request/Auxprop/MaterialAuxprop.cs new file mode 100644 index 0000000..b1fad3e --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/Auxprop/MaterialAuxprop.cs @@ -0,0 +1,31 @@ +using Gatedge.ScanCode.Models.K3Request.SaveModel; + +namespace Gatedge.ScanCode.Models.K3Request.Auxprop +{ + /// + /// 物料辅助属性 + /// + public class MaterialAuxprop + { + /// + /// 辅助属性内码 + /// + public int? FID { get; set; } + + /// + /// 辅助属性1 + /// + public FBARAUXPROPID__FF100002? FBARAUXPROPID__FF100002 { get; set; } + } + + /// + /// 辅助属性一 + /// + public class FBARAUXPROPID__FF100002 + { + /// + /// 辅助属性编码 + /// + public string FNumber { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/BaseData/FormType.cs b/Gatedge.ScanCode/Models/K3Request/BaseData/FormType.cs new file mode 100644 index 0000000..5f69f92 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/BaseData/FormType.cs @@ -0,0 +1,13 @@ +namespace Gatedge.ScanCode.Models.K3Request.BaseData +{ + /// + /// 业务对象 + /// + public class FormType + { + /// + /// 业务对象Id + /// + public string? FID { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/BaseData/Material.cs b/Gatedge.ScanCode/Models/K3Request/BaseData/Material.cs new file mode 100644 index 0000000..827b445 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/BaseData/Material.cs @@ -0,0 +1,19 @@ +namespace Gatedge.ScanCode.Models.K3Request.BaseData +{ + /// + /// 物料 + /// + public class Material + { + + /// + /// 物料内码 + /// + public int? FMaterialId { get; set; } + /// + /// 物料编码 + /// + public string? FNUMBER { get; set; } + + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/BaseData/MoEntry.cs b/Gatedge.ScanCode/Models/K3Request/BaseData/MoEntry.cs new file mode 100644 index 0000000..ae4fe96 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/BaseData/MoEntry.cs @@ -0,0 +1,17 @@ +namespace Gatedge.ScanCode.Models.K3Request.BaseData +{ + /// + /// 生产订单镜像模型 + /// + public class MoEntry + { + /// + /// 分录Id + /// + public int? FEntryId { get; set; } + /// + /// 编码 + /// + public string? FNumber { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/BaseData/Org.cs b/Gatedge.ScanCode/Models/K3Request/BaseData/Org.cs new file mode 100644 index 0000000..9a232c8 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/BaseData/Org.cs @@ -0,0 +1,13 @@ +namespace Gatedge.ScanCode.Models.K3Request.BaseData +{ + /// + /// 组织 + /// + public class Org + { + /// + /// 组织Id + /// + public string? FNumber { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/BaseData/Stock.cs b/Gatedge.ScanCode/Models/K3Request/BaseData/Stock.cs new file mode 100644 index 0000000..d26c7e4 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/BaseData/Stock.cs @@ -0,0 +1,17 @@ +namespace Gatedge.ScanCode.Models.K3Request.BaseData +{ + /// + /// 仓库 + /// + public class Stock + { + /// + /// 仓库内码 + /// + public int? FStockId { get; set; } + /// + /// 仓库编码 + /// + public string? FNUMBER { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/BaseData/User.cs b/Gatedge.ScanCode/Models/K3Request/BaseData/User.cs new file mode 100644 index 0000000..28cd352 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/BaseData/User.cs @@ -0,0 +1,13 @@ +namespace Gatedge.ScanCode.Models.K3Request.BaseData +{ + /// + /// 用户 + /// + public class User + { + /// + /// 用户ID + /// + public string? FUserID { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/Enum/BarRecordStatus.cs b/Gatedge.ScanCode/Models/K3Request/Enum/BarRecordStatus.cs new file mode 100644 index 0000000..e5871c4 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/Enum/BarRecordStatus.cs @@ -0,0 +1,21 @@ +namespace Gatedge.ScanCode.Models.K3Request.Enum +{ + /// + /// 扫描记录状态 + /// + public enum BarRecordStatus + { + /// + /// 暂存 + /// + Draft = 1, + /// + /// 失败 + /// + Error = 2, + /// + /// 成功 + /// + Success = 3 + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/SaveModel/BarRecordSave.cs b/Gatedge.ScanCode/Models/K3Request/SaveModel/BarRecordSave.cs new file mode 100644 index 0000000..2cacc28 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/SaveModel/BarRecordSave.cs @@ -0,0 +1,144 @@ +using Gatedge.ScanCode.Models.K3Request.Auxprop; +using Gatedge.ScanCode.Models.K3Request.BaseData; +using Gatedge.ScanCode.Models.K3Request.Enum; + +namespace Gatedge.ScanCode.Models.K3Request.SaveModel +{ + /// + /// 条码扫描记录保存 + /// + public class BarRecordSave + { + /// + /// 记录内码 + /// + public int? FID { get; set; } + /// + /// 单据编号 + /// + public string? FBillNo { get; set; } + /// + /// 业务组织 + /// + public Org? FOrgId { get; set; } + /// + /// 创建者 + /// + public User? FCreatorId { get; set; } + /// + /// 创建时间 + /// + public DateTime? FCreateDate { get; set; } + /// + /// 修改者 + /// + public User? FModifierId { get; set; } + /// + /// 修改时间 + /// + public DateTime? FModifyDate { get; set; } + /// + /// 状态 + /// + public BarRecordStatus? FStatus { get; set; } + + /// + /// 是否打印:是 = 1 ,否 = 0 + /// + public string? FIsPrinted { get; set; } + /// + /// 错误信息 + /// + public string? FErrorInfo { get; set; } + + /// + /// 条码明细列表 + /// + public IEnumerable? FBarEntity { get; set; } + + /// + /// 结果明细列表 + /// + public IEnumerable? FResultEntity { get; set; } + + /// + /// 条码明细 + /// + public class BarEntry + { + /// + /// 分录Id + /// + public int? FEntryID { get; set; } + /// + /// 条码编码 + /// + public string? FBarCode { get; set; } + /// + /// 业务对象 + /// + public FormType FBarBillId { get; set; } + /// + /// 单据编号 + /// + public string? FBarBillNo { get; set; } + /// + /// 行号 + /// + public int? FBarSeq { get; set; } + /// + /// 物料 + /// + public Material? FBarMaterialId { get; set; } + /// + /// 辅助属性 + /// + public int? FBarAuxPropId { get; set; } + /// + /// 数量 + /// + public decimal? FBarQty { get; set; } + /// + /// 仓库 + /// + public Stock? FBarStockId { get; set; } + /// + /// 生产订单分录 + /// + public MoEntry? FBarMoEntryId { get; set; } + } + + /// + /// 结果明细 + /// + public class ResultEntry + { + /// + /// 明细内码 + /// + public int? FEntryID { get; set; } + /// + /// 业务对象 + /// + public FormType? FResultBillId { get; set; } + /// + /// 单据编号 + /// + public string? FResultBillNo { get; set; } + /// + /// 单据内码 + /// + public string? FResultId { get; set; } + + /// + /// 是否检验:是 = 1 ,否 = 0 + /// + public string? FResultIsChecked { get; set; } + + /// + /// 响应信息 + /// + public string? FResultText { get; set; } + } + } +} diff --git a/Gatedge.ScanCode/Models/K3Request/SaveModel/ScanRecordsSave.cs b/Gatedge.ScanCode/Models/K3Request/SaveModel/ScanRecordsSave.cs new file mode 100644 index 0000000..1aca228 --- /dev/null +++ b/Gatedge.ScanCode/Models/K3Request/SaveModel/ScanRecordsSave.cs @@ -0,0 +1,98 @@ +using Gatedge.ScanCode.Models.K3Request.BaseData; +using Gatedge.ScanCode.Models.K3Request.Enum; + +namespace Gatedge.ScanCode.Models.K3Request.SaveModel +{ + /// + /// 条码新增类 + /// + public class ScanRecordsSave + { + /// + /// 扫描单据ID + /// + public string? FID { get; set; } + /// + /// 下推json + /// + public string? FJSON { get; set; } + /// + /// 创建者 + /// + public User? FCreatorId { get; set; } + /// + /// 创建时间 + /// + public string? FCreateDate { get; set; } + /// + /// 条码 + /// + public string? FBarCode { get; set; } + /// + /// 仓库Id + /// + public Stock? FStockId { get; set; } + /// + /// 批号 + /// + public string? Flot { get; set; } + /// + /// 扫描单据编号 + /// + public string? FBillNo { get; set; } + /// + /// 扫描单据分录ID + /// + public string? FEntryId { get; set; } + /// + /// 扫描物料 + /// + public Material FMaterialId { get; set; } + /// + /// 扫描单据类型 + /// + public FormType FBillId { get; set; } + /// + /// 数量 + /// + public decimal? FQty { get; set; } + /// + /// 状态 + /// + public BarRecordStatus? FStatus { get; set; } + /// + /// 错误信息 + /// + public string? FErrorInfo { get; set; } + /// + /// 结果业务对象 + /// + public FormType? FResultBillId { get; set; } + /// + /// 结果单号 + /// + public string? FResultBillNo { get; set; } + /// + /// 结果单内码 + /// + public string? FResultId { get; set; } + /// + /// 响应信息 + /// + public string? FResultInfo { get; set; } + /// + /// 是否检验 + /// + public bool? FResultIsChecked { get; set; } + /// + /// 是否打印 + /// + public bool? FIsPrinted { get; set; } + + /// + /// 提交批次 + /// + public string FSubmitLot { get; set; } + } + +} diff --git a/Gatedge.ScanCode/Models/Vo/AppVersionVo.cs b/Gatedge.ScanCode/Models/Vo/AppVersionVo.cs new file mode 100644 index 0000000..67a6ee9 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/AppVersionVo.cs @@ -0,0 +1,73 @@ +using Gatedge.ScanCode.Models.Vo.BaseData; + +namespace Gatedge.ScanCode.Models.Vo +{ + /// + /// 扫描App版本 + /// + public class AppVersionVo + { + /// + /// 单据Id + /// + public int Id { get; set; } + /// + /// 单据编号 + /// + public string BillNo { get; set; } + /// + /// 数据状态 + /// + public string DocumentStatus { get; set; } + /// + /// 创建者 + /// + public UserVo FCreatorId { get; set; } + /// + /// 创建时间 + /// + public DateTime FCreateDate { get; set; } + /// + /// 修改者 + /// + public UserVo FModifierId { get; set; } + /// + /// 修改时间 + /// + public DateTime FModifyDate { get; set; } + /// + /// 审核者 + /// + public UserVo FApproverId { get; set; } + /// + /// 修改时间 + /// + public DateTime FApproveDate { get; set; } + /// + /// 版本号 + /// + public string FVersion { get; set; } + /// + /// 备注 + /// + public string FRemarks { get; set; } + /// + /// 版本名称 + /// + public string FVersionName { get; set; } + /// + /// 附件Id + /// + public string FAppFile { get; set; } + /// + /// 附件列表 + /// + public AttachmentFile[] FAppFile_Files { get; set; } + } + + + + + + +} diff --git a/Gatedge.ScanCode/Models/Vo/BarRecordVo.cs b/Gatedge.ScanCode/Models/Vo/BarRecordVo.cs new file mode 100644 index 0000000..86639b3 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BarRecordVo.cs @@ -0,0 +1,196 @@ +using Gatedge.ScanCode.Models.Vo.BaseData; +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo +{ + /// + /// 条码扫描记录 + /// + public class BarRecordVo + { + /// + /// 单据Id + /// + public int Id { get; set; } + /// + /// 单据编号 + /// + public string BillNo { get; set; } + /// + /// 单据状态 + /// + public string DocumentStatus { get; set; } + /// + /// 组织Id + /// + public int FOrgId_Id { get; set; } + /// + /// 组织 + /// + public OrgVo FOrgId { get; set; } + /// + /// 创建者Id + /// + public int FCreatorId_Id { get; set; } + /// + /// 创建者 + /// + public UserVo FCreatorId { get; set; } + /// + /// 创建时间 + /// + public DateTime FCreateDate { get; set; } + /// + /// 修改者Id + /// + public int FModifierId_Id { get; set; } + /// + /// 修改者 + /// + public UserVo FModifierId { get; set; } + /// + /// 修改时间 + /// + public DateTime FModifyDate { get; set; } + /// + /// 状态 + /// + public string FStatus { get; set; } + + /// + /// 是否打印 + /// + public bool FIsPrinted { get; set; } + /// + /// 错误信息 + /// + public string FErrorInfo { get; set; } + /// + /// 条码明细 + /// + public BarEntityVo[] FBarEntity { get; set; } + /// + /// 结果明细 + /// + public ResultEntityVo[] FResultEntity { get; set; } + + /// + /// 条码明细 + /// + public class BarEntityVo + { + /// + /// 条码明细Id + /// + public int Id { get; set; } + /// + /// 行号 + /// + public int Seq { get; set; } + /// + /// 业务对象Id + /// + public string FBarBillId_Id { get; set; } + /// + /// 业务对象 + /// + public FormTypeVo FBarBillId { get; set; } + /// + /// 单据编号 + /// + public string FBarBillNo { get; set; } + /// + /// 单据行号 + /// + public int FBarSeq { get; set; } + /// + /// 条码编码 + /// + public string FBarCode { get; set; } + /// + /// 物料Id + /// + public int FBarMaterialId_Id { get; set; } + /// + /// 物料名称 + /// + public MaterialVo FBarMaterialId { get; set; } + /// + /// 数量 + /// + public decimal FBarQty { get; set; } + /// + /// 仓库Id + /// + public int FBarStockId_Id { get; set; } + /// + /// 仓库 + /// + public StockVo FBarStockId { get; set; } + /// + /// 生产订单分录Id + /// + public int FBarMoEntryId_Id { get; set; } + /// + /// 生产订单分录 + /// + public MoEntryVo FBarMoEntryId { get; set; } + /// + /// 辅助属性Id + /// + public int FBarAuxPropId_Id { get; set; } + /// + /// 辅助属性 + /// + public Dictionary FBarAuxPropId { get; set; } + } + + + /// + /// 结果明细 + /// + public class ResultEntityVo + { + /// + /// 结果分录Id + /// + public int Id { get; set; } + /// + /// 结果分录序号 + /// + public int Seq { get; set; } + /// + /// 结果业务对象id + /// + public string FResultBillId_Id { get; set; } + /// + /// 结果业务对象 + /// + public FormTypeVo FResultBillId { get; set; } + /// + /// 单据编号 + /// + public string FResultBillNo { get; set; } + /// + /// 单据内码 + /// + public string FResultId { get; set; } + + /// + /// 是否检验 + /// + public bool FResultIsChecked { get; set; } + + /// + /// 检验信息 + /// + public string FResultText { get; set; } + } + } + + + + + + +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/AttachmentFile.cs b/Gatedge.ScanCode/Models/Vo/BaseData/AttachmentFile.cs new file mode 100644 index 0000000..bdd357d --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/AttachmentFile.cs @@ -0,0 +1,21 @@ +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 单据附件 + /// + public class AttachmentFile + { + /// + /// 文件Id + /// + public string FileID { get; set; } + /// + /// 文件名称 + /// + public string FileName { get; set; } + /// + /// 文件大小 + /// + public string FileSize { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/FormTypeVo.cs b/Gatedge.ScanCode/Models/Vo/BaseData/FormTypeVo.cs new file mode 100644 index 0000000..e89e2d8 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/FormTypeVo.cs @@ -0,0 +1,23 @@ +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 业务对象 + /// + public class FormTypeVo + { + /// + /// 业务对象Id + /// + public string Id { get; set; } + /// + /// 多语言 + /// + public MultiLanguageTextWithStringPKId[] MultiLanguageText { get; set; } + /// + /// 名称 + /// + public DataValue[] Name { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/MaterialVo.cs b/Gatedge.ScanCode/Models/Vo/BaseData/MaterialVo.cs new file mode 100644 index 0000000..3feb2de --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/MaterialVo.cs @@ -0,0 +1,149 @@ +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 物料 + /// + public class MaterialVo + { + /// + /// 物料Id + /// + public int Id { get; set; } + /// + /// 物料模板Id + /// + public int msterID { get; set; } + /// + /// 多语言 + /// + public MultiLanguageText[] MultiLanguageText { get; set; } + /// + /// 名称 + /// + public DataValue[] Name { get; set; } + /// + /// 编号 + /// + public string Number { get; set; } + /// + /// 使用组织Id + /// + public int UseOrgId_Id { get; set; } + /// + /// 使用组织 + /// + public OrgVo UseOrgId { get; set; } + + /// + /// 基础信息 + /// + public MaterialBaseVo[] MaterialBase { get; set; } + /// + /// 仓库信息 + /// + public MaterialStockVo[] MaterialStock { get; set; } + /// + /// 辅助属性 + /// + public MaterialAuxpty[] MaterialAuxPty { get; set; } + + /// + /// 物料基本信息 + /// + public class MaterialBaseVo + { + /// + /// 分表内码 + /// + public int Id { get; set; } + /// + /// 基本单位Id + /// + public int BaseUnitId_Id { get; set; } + /// + /// 基本单位 + /// + public Unit BaseUnitId { get; set; } + } + + /// + /// 物料库存信息 + /// + public class MaterialStockVo + { + /// + /// 库存分表内码 + /// + public int Id { get; set; } + /// + /// 库存单位Id + /// + public int StoreUnitID_Id { get; set; } + /// + /// 库存单位 + /// + public Unit StoreUnitID { get; set; } + /// + /// 批号附属信息 + /// + public bool IsExpParToFlot { get; set; } + } + + /// + /// 辅助属性 + /// + public class MaterialAuxpty + { + /// + /// 辅助属性项Id + /// + public int Id { get; set; } + /// + /// 是否启用 + /// + public bool IsEnable1 { get; set; } + /// + /// 组合控制 + /// + public bool IsComControl { get; set; } + /// + /// 辅助属性Id + /// + public int AuxPropertyId_Id { get; set; } + /// + /// 辅助属性 + /// + public AuxPropertyIdVo AuxPropertyId { get; set; } + + /// + /// 辅助属性项 + /// + public class AuxPropertyIdVo + { + /// + /// ID + /// + public int Id { get; set; } + /// + /// 模板Id + /// + public int msterID { get; set; } + /// + /// 编码 + /// + public string Number { get; set; } + /// + /// 多语言 + /// + public MultiLanguageText[] MultiLanguageText { get; set; } + /// + /// 名称 + /// + public DataValue[] Name { get; set; } + } + } + + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/MoEntryVo.cs b/Gatedge.ScanCode/Models/Vo/BaseData/MoEntryVo.cs new file mode 100644 index 0000000..7e6b5e8 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/MoEntryVo.cs @@ -0,0 +1,28 @@ +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 生产订单镜像模型 + /// + public class MoEntryVo + { + /// + /// 生产订单分录Id + /// + public int Id { get; set; } + /// + /// 多语言 + /// + public MultiLanguageText[] MultiLanguageText { get; set; } + /// + /// 名称 + /// + public DataValue[] Name { get; set; } + /// + /// 编码 + /// + public string Number { get; set; } + + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/OrgVo.cs b/Gatedge.ScanCode/Models/Vo/BaseData/OrgVo.cs new file mode 100644 index 0000000..71cda75 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/OrgVo.cs @@ -0,0 +1,28 @@ +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + + /// + /// 组织 + /// + public class OrgVo + { + /// + /// 组织Id + /// + public int Id { get; set; } + /// + /// 多语言 + /// + public MultiLanguageText[] MultiLanguageText { get; set; } + /// + /// 名称 + /// + public DataValue[] Name { get; set; } + /// + /// 编码 + /// + public string Number { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/StockVo.cs b/Gatedge.ScanCode/Models/Vo/BaseData/StockVo.cs new file mode 100644 index 0000000..7d43d9e --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/StockVo.cs @@ -0,0 +1,39 @@ +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 仓库 + /// + public class StockVo + { + /// + /// 仓库Id + /// + public int Id { get; set; } + /// + /// 仓库模板Id + /// + public int msterID { get; set; } + /// + /// 仓库多语言 + /// + public MultiLanguageText[] MultiLanguageText { get; set; } + /// + /// 仓库名称 + /// + public DataValue[] Name { get; set; } + /// + /// 仓库编码 + /// + public string Number { get; set; } + /// + /// 仓位维度数据列表显示格式 注:3=不需按值设置,2=严格按值设置,1=优先按值设置 + /// + public string LocListFormatter { get; set; } + /// + /// 仓位值集 + /// + public object[] StockFlexItem { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/Unit.cs b/Gatedge.ScanCode/Models/Vo/BaseData/Unit.cs new file mode 100644 index 0000000..11d77f2 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/Unit.cs @@ -0,0 +1,31 @@ +using Gatedge.ScanCode.Models.Vo.Field; + +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 单位 + /// + public class Unit + { + /// + /// 单位Id + /// + public int Id { get; set; } + /// + /// 模板Id + /// + public int msterID { get; set; } + /// + /// 单位编码 + /// + public string Number { get; set; } + /// + /// 多语言 + /// + public MultiLanguageText[] MultiLanguageText { get; set; } + /// + /// 名称 + /// + public DataValue[] Name { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/BaseData/UserVo.cs b/Gatedge.ScanCode/Models/Vo/BaseData/UserVo.cs new file mode 100644 index 0000000..c505041 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/BaseData/UserVo.cs @@ -0,0 +1,21 @@ +namespace Gatedge.ScanCode.Models.Vo.BaseData +{ + /// + /// 用户 + /// + public class UserVo + { + /// + /// 用户Id + /// + public int Id { get; set; } + /// + /// 用户名称 + /// + public string Name { get; set; } + /// + /// 用户账号 + /// + public string UserAccount { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/Field/DataValue.cs b/Gatedge.ScanCode/Models/Vo/Field/DataValue.cs new file mode 100644 index 0000000..21faa08 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/Field/DataValue.cs @@ -0,0 +1,17 @@ +namespace Gatedge.ScanCode.Models.Vo.Field +{ + /// + /// 名称 + /// + public class DataValue + { + /// + /// 语言Id + /// + public int Key { get; set; } + /// + /// 值 + /// + public string Value { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/Field/MultiLanguageText.cs b/Gatedge.ScanCode/Models/Vo/Field/MultiLanguageText.cs new file mode 100644 index 0000000..6809810 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/Field/MultiLanguageText.cs @@ -0,0 +1,21 @@ +namespace Gatedge.ScanCode.Models.Vo.Field +{ + /// + /// 多语言 + /// + public class MultiLanguageText + { + /// + /// 主键 + /// + public int PkId { get; set; } + /// + /// 语言Id + /// + public int LocaleId { get; set; } + /// + /// 名称 + /// + public string Name { get; set; } + } +} diff --git a/Gatedge.ScanCode/Models/Vo/Field/MultiLanguageTextWithStringPKId.cs b/Gatedge.ScanCode/Models/Vo/Field/MultiLanguageTextWithStringPKId.cs new file mode 100644 index 0000000..9cb62d0 --- /dev/null +++ b/Gatedge.ScanCode/Models/Vo/Field/MultiLanguageTextWithStringPKId.cs @@ -0,0 +1,21 @@ +namespace Gatedge.ScanCode.Models.Vo.Field +{ + /// + /// 多语言 + /// + public class MultiLanguageTextWithStringPKId + { + /// + /// 主键 + /// + public string PkId { get; set; } + /// + /// 语言Id + /// + public int LocaleId { get; set; } + /// + /// 名称 + /// + public string Name { get; set; } + } +} diff --git a/Gatedge.ScanCode/Options/FileOption.cs b/Gatedge.ScanCode/Options/FileOption.cs new file mode 100644 index 0000000..7cd7e58 --- /dev/null +++ b/Gatedge.ScanCode/Options/FileOption.cs @@ -0,0 +1,13 @@ +namespace Gatedge.ScanCode.Options +{ + /// + /// 文件配置类 + /// + public class FileOption + { + /// + /// 文件目录 + /// + public string DonwloadPath { get; set; } + } +} diff --git a/Gatedge.ScanCode/Options/JwtOption.cs b/Gatedge.ScanCode/Options/JwtOption.cs new file mode 100644 index 0000000..56a86d7 --- /dev/null +++ b/Gatedge.ScanCode/Options/JwtOption.cs @@ -0,0 +1,25 @@ +namespace Gatedge.ScanCode.Options; + +/// +/// JWT配置类 +/// +public class JwtOption +{ + /// + /// + /// + public string SecretKey { get; set; } + /// + /// + /// + public string Issuer { get; set; } + /// + /// + /// + public string Audience { get; set; } + + /// + /// 失效时间(秒) + /// + public long FailureTime { get; set; } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/Program.cs b/Gatedge.ScanCode/Program.cs new file mode 100644 index 0000000..922c7e8 --- /dev/null +++ b/Gatedge.ScanCode/Program.cs @@ -0,0 +1,149 @@ + +using Gatedge.ScanCode.Common; +using Gatedge.ScanCode.Extension; +using Gatedge.ScanCode.Middleware; +using Gatedge.ScanCode.Options; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.StaticFiles; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.FileProviders; +using Microsoft.IdentityModel.Tokens; +using Microsoft.OpenApi.Models; +using System.IO; +using System.Text; +using System.Text.Encodings.Web; +using System.Text.Unicode; + +namespace Gatedge.ScanCode +{ + /// + /// + /// + public class Program + { + /// + /// main + /// + /// + public static void Main(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + // K3CloudApi + builder.Services.AddConfigureK3CloudApi(builder.Configuration); + // Jwt + builder.Services.ConfigureJwtContext(builder.Configuration); + // ļ + builder.Services.AddConfigureK3FileService(builder.Configuration); + // json + //builder.Services.ConfigureServices(); + // Services + builder.Services.ConfigureCore(); + // Add services to the container. + builder.Services.AddControllers(); + + + // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle + builder.Services.AddEndpointsApiExplorer(); + builder.Services.AddSwaggerGen(option => + { + option.AddSecurityRequirement(new OpenApiSecurityRequirement() + { + + { + new OpenApiSecurityScheme + { + Reference = new OpenApiReference + { + Id = "Bearer", + Type = ReferenceType.SecurityScheme + } + }, + new List() + } + + }); + + // Bearer֤ + option.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme + { + Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"", + Name = "Authorization", + In = ParameterLocation.Header, + Type = SecuritySchemeType.ApiKey, + Scheme = "Bearer" + }); + + + + // swaggerע + var basePath = AppContext.BaseDirectory; + var xmlPath = Path.Combine(basePath, "Gatedge.ScanCode.xml"); + option.IncludeXmlComments(xmlPath); + + }); + + builder.Logging.AddProvider(new FileLoggerProvider( + filePath: "../logs/app.log", // ־ļ· + maxFileSize: 10 * 1024 * 1024, // 10MB + maxRetainedFiles: 1000 // 1000ļ + )); + + builder.Services.AddControllers().AddJsonOptions(options => + { + options.JsonSerializerOptions.PropertyNamingPolicy = null;//˴ǰȫд + options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);//˷ı + }); + + var app = builder.Build(); + + + + app.UseStaticFiles(); + + var filePath = Path.Combine(builder.Environment.ContentRootPath, "K3CloudFile"); + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + var fileProvider = new PhysicalFileProvider(filePath); + var provider = new FileExtensionContentTypeProvider(); + provider.Mappings[".apk"] = "application/vnd.android.package-archive"; + provider.Mappings[".wgt"] = "application/widget"; + var requestPath = "/Download"; + + // Enable displaying browser links. + app.UseStaticFiles(new StaticFileOptions + { + FileProvider = fileProvider, + RequestPath = requestPath, + ContentTypeProvider = provider + }); + + app.UseDirectoryBrowser(new DirectoryBrowserOptions + { + FileProvider = fileProvider, + RequestPath = requestPath, + }); + + + if (app.Environment.IsDevelopment()) + { + app.UseSwagger(); + app.UseSwaggerUI(); + } + /* + мע˳Ӱִ˳ע˳ = ִ˳쳣мӦ÷ + */ + // 1.Ȩ֤ + app.UseAuthentication(); //֤м + app.UseAuthorization(); //Ȩм + // ־м + app.UseMiddleware(); + // ȫ쳣м + app.UseMiddleware(); + //app.UseHttpsRedirection(); // תHTTPHTTPS + app.MapControllers(); + app.Run(); + } + } +} diff --git a/Gatedge.ScanCode/Properties/launchSettings.json b/Gatedge.ScanCode/Properties/launchSettings.json new file mode 100644 index 0000000..99436c3 --- /dev/null +++ b/Gatedge.ScanCode/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:5000", + "sslPort": 0 + } + }, + "profiles": { + "Gatedge.ScanCode": { + "commandName": "Project", + "dotnetRunMessages": false, + "launchBrowser": false, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": false, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Gatedge.ScanCode/Services/AccountService.cs b/Gatedge.ScanCode/Services/AccountService.cs new file mode 100644 index 0000000..3393eda --- /dev/null +++ b/Gatedge.ScanCode/Services/AccountService.cs @@ -0,0 +1,31 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Services.IServices; +using Gatedge.ScanCode.Utils; + +namespace Gatedge.ScanCode.Services +{ + /// + /// AccountService - 账号服务 + /// + public class AccountService : IAccountService + { + private readonly JwtUtils _jwtUtils; + /// + /// 注入Jwt + /// + /// + public AccountService(JwtUtils jwtUtils) + { + _jwtUtils = jwtUtils; + } + /// + /// 登录 + /// + /// + /// + public string Login(LoginInfo loginInfo) + { + return _jwtUtils.CreateToken(loginInfo); + } + } +} diff --git a/Gatedge.ScanCode/Services/BarCodeMainFileService.cs b/Gatedge.ScanCode/Services/BarCodeMainFileService.cs new file mode 100644 index 0000000..4d9b3c8 --- /dev/null +++ b/Gatedge.ScanCode/Services/BarCodeMainFileService.cs @@ -0,0 +1,92 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.ScanCode.Services.IServices; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 条码主档服务 + /// + public class BarCodeMainFileService : IBarCodeMainFileService + { + /// + /// 单据FormId + /// + private readonly string _FormId = "UHIK_BD_BarCodeMainFile"; + + /// + /// 金蝶云星空工具类 + /// + private readonly K3CloudApiUtils _utils; + + /// + /// 初始化工具类 + /// + /// + public BarCodeMainFileService(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 单据查看 + /// + /// + /// + public object View(View param) + { + return _utils.Query(_FormId, param); + } + + /// + /// 列表 + /// + /// + /// + public ListResult List(Query queryParam) + { + var result = _utils.QueryList(queryParam); + return result; + } + + /// + /// 根据条码查找条码主档Id + /// + /// + /// + public string GetIdByBarCode(string barCode) + { + //查询条码主档 + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = "FID,FBarCode", + + }; + // 过滤 + FilterList filterString = new FilterList(); + // 添加过滤条件// 条码 + filterString.AddFilterItem(new FilterItem() + { + Left = "", + FieldName = "FBarCode", + Compare = "67", + Value = barCode, + Right = "", + Logic = "0" + }); + queryParam.FilterString = filterString.GetFilterString(); + + var data = this.List(queryParam); + if (data.List.Count == 0) + { + throw new Exception("没有找到对应的条码主档,请前往条码打印页面生成条码!"); + } + var barMain = data.List[0]; // 条码主档# + var fid = barMain["FID"].ToString(); + return fid; + } + } +} diff --git a/Gatedge.ScanCode/Services/BarRecordService.cs b/Gatedge.ScanCode/Services/BarRecordService.cs new file mode 100644 index 0000000..2fc907c --- /dev/null +++ b/Gatedge.ScanCode/Services/BarRecordService.cs @@ -0,0 +1,253 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +using Gatedge.ScanCode.Models.Dto.BarRecord; +using Gatedge.ScanCode.Models.K3Request.Auxprop; +using Gatedge.ScanCode.Models.K3Request.BaseData; +using Gatedge.ScanCode.Models.K3Request.Enum; +using Gatedge.ScanCode.Models.K3Request.SaveModel; +using Gatedge.ScanCode.Models.Vo; +using Gatedge.ScanCode.Services.IServices; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Net.NetworkInformation; +using System.Security.Cryptography; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 条码扫描记录服务类 + /// + public class BarRecordService : IBarRecordService + { + /// + /// 单据FormId + /// + private readonly string _FormId = "ke3a69108a53e4baba04b1bf338355b6a"; + + /// + /// 金蝶云星空工具类 + /// + private readonly K3CloudApiUtils _utils; + + /// + /// 初始化工具类 + /// + /// + public BarRecordService(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 审核接口 + /// + /// + /// + public K3CloudResponseStatus Audit(Audit auditParam) + { + return _utils.Audit(this._FormId, auditParam); + } + + /// + /// 撤销接口 + /// + /// + /// + public K3CloudResponseStatus CancelAssign(CancelAssign cancelAssignBarRecord) + { + return _utils.CancelAssign(this._FormId, cancelAssignBarRecord); + } + + /// + /// 根据条码查找条码扫描记录 + /// + /// + /// + public ListResult FindIdByCode(string barCode) + { + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = "FID,FBillNo,FDocumentStatus,FOrgId.FNumber,FCreatorId,FCreatorId.FName,FCreateDate,FBarCode,FErrorInfo", + Limit = 2000, + StartRow = 0, + }; + FilterList filterString = new FilterList(); + FilterItem filterItem = new FilterItem("FBarCode", "67", barCode, "0"); + filterString.AddFilterItem(filterItem); + queryParam.FilterString = filterString.GetFilterString(); + return List(queryParam); + } + + /// + /// 查看列表接口 + /// + /// + /// + /// + public ListResult List(Query queryParam) + { + queryParam.FormId = this._FormId; + var result = _utils.QueryList(queryParam); + return result; + } + + /// + /// 打印条码接口 + /// + /// + /// + public void PrintResultBillNo(BarRecord barRecord) + { + + Save saveParam = new Save() + { + IsDeleteEntry = false, + Model = new BarRecordSave() + { + FID = barRecord.BarRecordId, + FIsPrinted = "1" + } + }; + this.Save(saveParam); + } + + /// + /// 保存条码扫描记录 + /// + /// + /// + public K3CloudResponseStatus Save(List param) + { + BarRecordSave barRecordSeve = new BarRecordSave() + { + FStatus = BarRecordStatus.Draft, + FIsPrinted = "0", + FErrorInfo = string.Empty, + FBarEntity = param.Select(n => new BarRecordSave.BarEntry() + { + FBarBillId = new FormType() + { + FID = n.FBarBillId + }, + FBarBillNo = n.FBarBillNo, + FBarSeq = n.FBarSeq, + FBarCode = n.FBarCode, + FBarMaterialId = n.FBarMaterialId == 0 ? null : new Material() + { + FMaterialId = n.FBarMaterialId, + }, + FBarStockId = n.FBarStockId == 0 ? null : new Stock() + { + FStockId = n.FBarStockId, + }, + FBarQty = n.FBarQty, + FBarMoEntryId = n.FMoEntryId == 0 ? null : new MoEntry() + { + FEntryId = n.FMoEntryId + }, + FBarAuxPropId = n.FBarAuxpropId == 0 ? null : n.FBarAuxpropId + + }), + }; + var billSave = new Save(); + billSave.Model = barRecordSeve; + var result = Save(billSave); + return result; + } + + /// + /// 标准保存接口 + /// + /// + /// + public K3CloudResponseStatus Save(Save param) + { + var result = _utils.Save(_FormId, param); + return result; + } + + /// + /// 保存错误信息 + /// + /// + /// + /// + public K3CloudResponseStatus SaveErrorInfo(int barRecordId, string ErrorInfo) + { + Save barRecordSave = new Save() + { + IsAutoSubmitAndAudit = false, + IsDeleteEntry = false, + Model = new BarRecordSave() + { + FID = barRecordId, + FStatus = BarRecordStatus.Error, + FErrorInfo = ErrorInfo + } + }; + return this.Save(barRecordSave); + + } + + /// + /// 提交扫描记录 + /// + /// + /// + public K3CloudResponseStatus Submit(Submit submitBarRecor) + { + return _utils.Submit(_FormId, submitBarRecor); + } + + /// + /// 提交成功信息 + /// + /// + /// + /// + /// + public K3CloudResponseStatus SubmitSuccess(int barRecordId, IEnumerable resultEntityList) + { + Save barRecordSave = new Save() + { + IsAutoSubmitAndAudit = false, + IsDeleteEntry = false, + Model = new BarRecordSave() + { + FID = barRecordId, + FStatus = BarRecordStatus.Success, + FErrorInfo = string.Empty, + FResultEntity = resultEntityList + + } + }; + this.Save(barRecordSave); + // 此时已经提交单据 + this.Submit(new Submit() + { + Ids = barRecordId.ToString() + }); + + return this.Audit(new Audit() + { + Ids = barRecordId.ToString() + }); + } + + + + + /// + /// 查看单据接口 + /// + /// + /// + public BarRecordVo View(View param) + { + return _utils.Query(_FormId, param); + } + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IAccountService.cs b/Gatedge.ScanCode/Services/IServices/IAccountService.cs new file mode 100644 index 0000000..6a67e4d --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IAccountService.cs @@ -0,0 +1,18 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 账号服务接口 + /// + public interface IAccountService + { + /// + /// 登录 + /// + /// + /// + string Login(LoginInfo loginInfo); + } +} + diff --git a/Gatedge.ScanCode/Services/IServices/IBarCodeMainFileService.cs b/Gatedge.ScanCode/Services/IServices/IBarCodeMainFileService.cs new file mode 100644 index 0000000..83b31e9 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IBarCodeMainFileService.cs @@ -0,0 +1,33 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 条码主档接口 + /// + public interface IBarCodeMainFileService + { + /// + /// 查看 + /// + /// + /// + public object View(View param); + + + /// + /// 列表接口 + /// + /// + /// + public ListResult List(Query queryParam); + + /// + /// 根据条码查找条码主档 + /// + /// + /// + public string GetIdByBarCode(string barCode); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IBarRecordService.cs b/Gatedge.ScanCode/Services/IServices/IBarRecordService.cs new file mode 100644 index 0000000..b77fa28 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IBarRecordService.cs @@ -0,0 +1,93 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +using Gatedge.ScanCode.Models.Dto.BarRecord; +using Gatedge.ScanCode.Models.Dto.ScanRecords; +using Gatedge.ScanCode.Models.K3Request.SaveModel; +using Gatedge.ScanCode.Models.Vo; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 条码扫描记录# 服务接口 + /// + public interface IBarRecordService + { + + + /// + /// 打印条码成果 + /// + /// + public void PrintResultBillNo(BarRecord barRecord); + + /// + /// 查看接口 + /// + /// + public ListResult List(Query queryParam); + + /// + /// 查看 + /// + /// + /// + public BarRecordVo View(View param); + + /// + /// 保存条码扫描记录 + /// + /// + /// + public K3CloudResponseStatus Save(List param); + + /// + /// 标准保存接口 + /// + /// + /// + public K3CloudResponseStatus Save(Save param); + + /// + /// 保存错误信息 + /// + /// + /// + public K3CloudResponseStatus SaveErrorInfo(int barRecordId, string ErrorInfo); + + /// + /// 保存错误信息 + /// + /// + /// + public K3CloudResponseStatus SubmitSuccess(int barRecordId, IEnumerable resultEntityList); + + /// + /// 根据条码查找记录 + /// + /// + /// + public ListResult FindIdByCode(string barCode); + + /// + /// 提交接口 + /// + /// + /// + public K3CloudResponseStatus Submit(Submit submitBarRecor); + + /// + /// 撤销接口 + /// + /// + /// + public K3CloudResponseStatus CancelAssign(CancelAssign cancelAssignBarRecord); + + /// + /// 审核接口 + /// + /// + /// + public K3CloudResponseStatus Audit(Audit auditParam); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IK3FileService.cs b/Gatedge.ScanCode/Services/IServices/IK3FileService.cs new file mode 100644 index 0000000..089c727 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IK3FileService.cs @@ -0,0 +1,22 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.ScanCode.Models.Vo.BaseData; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 金蝶文件服务类 + /// + public interface IK3FileService + { + /// + /// 获取文件路径 + /// + /// + /// + public string GetFilePath(AttachmentFile file); + /// + /// 配置金蝶云SDK + /// + public void SetK3Util(K3CloudApiUtils utils); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IPrdInStockService.cs b/Gatedge.ScanCode/Services/IServices/IPrdInStockService.cs new file mode 100644 index 0000000..6147d20 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IPrdInStockService.cs @@ -0,0 +1,61 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +using Gatedge.ScanCode.Models.Dto.PrdInStock; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 生产入库单接口 + /// + public interface IPrdInStockService + { + /// + /// 单据查看 + /// + /// + /// + public object View(View param); + + /// + /// 列表接口 + /// + /// + public ListResult List(Query queryParam); + + /// + /// 提交接口 + /// + /// + /// + public K3CloudResponseStatus CancelAssign(CancelAssign billCancelAssign); + + /// + /// 提交接口 + /// + /// + /// + public K3CloudResponseStatus Submit(Submit billSubmit); + + /// + /// 审核接口 + /// + /// + /// + public K3CloudResponseStatus Audit(Audit billAudit); + + /// + /// 提交并审核 + /// + /// + /// + public K3CloudResponseStatus SubmitAndAudit(PrdInStockInspect param); + + /// + /// 删除 + /// + /// + /// + public K3CloudResponseStatus Delete(Delete deleteParam); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IProductionOrderService.cs b/Gatedge.ScanCode/Services/IServices/IProductionOrderService.cs new file mode 100644 index 0000000..83cdab7 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IProductionOrderService.cs @@ -0,0 +1,29 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 生产订单接口 + /// + public interface IProductionOrderService + { + /// + /// 查看接口 + /// + /// + /// + public object View(View param); + + /// + /// 列表接口 + /// + /// + public ListResult List(Query queryParam); + + /// + /// 下推生产入库单 + /// + public K3CloudResponseStatus PushPrdInStock(int barRecordId); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IScanRecordsService.cs b/Gatedge.ScanCode/Services/IServices/IScanRecordsService.cs new file mode 100644 index 0000000..1aa08a5 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IScanRecordsService.cs @@ -0,0 +1,68 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Models.Dto.ScanRecords; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 暂存扫描记录服务接口 + /// + public interface IScanRecordsService + { + /// + /// 保存接口 + /// + public K3CloudResponseStatus Save(ScanRecordsSaveDto param); + + /// + /// 批量保存接口 + /// + public K3CloudResponseStatus PatchSave(ArrayDto param); + + /// + /// 查看接口 + /// + /// + public ListResult List(Query queryParam); + + /// + /// 删除接口 + /// + /// + public K3CloudResponseStatus Delete(Delete deleteParam); + /// + /// 查看 + /// + /// + /// + public object View(View param); + /// + /// 提交成功 + /// + /// + /// + /// + /// + public K3CloudResponseStatus SubmitSuccess(string ids, string resultBillId, K3CloudResponseStatus response); + /// + /// 提交失败,更新状态和错误信息 + /// + /// + /// + /// + public K3CloudResponseStatus SubmitError(string id, string errorInfo); + + /// + /// 根据条码查找记录 + /// + /// + public ListResult FindIdByCode(string barCode); + + /// + /// 打印条码成果 + /// + public K3CloudResponseStatus PrintResultBillNo(List ids); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IStockService.cs b/Gatedge.ScanCode/Services/IServices/IStockService.cs new file mode 100644 index 0000000..202fa69 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IStockService.cs @@ -0,0 +1,24 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 仓库接口 + /// + public interface IStockService + { + /// + /// 获取列表接口 + /// + /// + /// + public ListResult List(Query billQuery); + /// + /// 获取查看接口 + /// + /// + /// + public object View(View param); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/ISupportingInformationService.cs b/Gatedge.ScanCode/Services/IServices/ISupportingInformationService.cs new file mode 100644 index 0000000..25322b0 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/ISupportingInformationService.cs @@ -0,0 +1,25 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 基础资料服务接口 + /// + public interface ISupportingInformationService + { + /// + /// 单据查询接口 + /// + /// + /// + public dynamic View(View param); + + /// + /// 获取辅助资料列表接口 + /// + /// + /// + public ListResult List(Query billQuery); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IVsersionService.cs b/Gatedge.ScanCode/Services/IServices/IVsersionService.cs new file mode 100644 index 0000000..6c5a79c --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IVsersionService.cs @@ -0,0 +1,25 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.ScanCode.Models.Vo; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 版本控制接口 + /// + public interface IVsersionService + { + /// + /// 单据查看 + /// + /// + /// + public AppVersionVo View(View param); + + /// + /// 列表接口 + /// + /// + public ListResult List(Query queryParam); + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IZP_ProductionSchedulingPlanService.cs b/Gatedge.ScanCode/Services/IServices/IZP_ProductionSchedulingPlanService.cs new file mode 100644 index 0000000..458e933 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IZP_ProductionSchedulingPlanService.cs @@ -0,0 +1,28 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 装配车间排产计划接口 + /// + public interface IZP_ProductionSchedulingPlanService + { + /// + /// 单据查询接口 + /// + /// + /// + public dynamic View(View param); + + /// + /// 获取列表信息 + /// + /// + /// + public ListResult List(Query billQuery); + + + + } +} diff --git a/Gatedge.ScanCode/Services/IServices/IZS_ProductionSchedulingPlanService.cs b/Gatedge.ScanCode/Services/IServices/IZS_ProductionSchedulingPlanService.cs new file mode 100644 index 0000000..02703a2 --- /dev/null +++ b/Gatedge.ScanCode/Services/IServices/IZS_ProductionSchedulingPlanService.cs @@ -0,0 +1,25 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; + +namespace Gatedge.ScanCode.Services.IServices +{ + /// + /// 注塑排产计划服务接口 + /// + public interface IZS_ProductionSchedulingPlanService + { + /// + /// 单据查询接口 + /// + /// + /// + public dynamic View(View param); + + /// + /// 获取列表信息 + /// + /// + /// + public ListResult List(Query billQuery); + } +} diff --git a/Gatedge.ScanCode/Services/K3FileService.cs b/Gatedge.ScanCode/Services/K3FileService.cs new file mode 100644 index 0000000..b3c3e81 --- /dev/null +++ b/Gatedge.ScanCode/Services/K3FileService.cs @@ -0,0 +1,120 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Models.Vo.BaseData; +using Gatedge.ScanCode.Options; +using Gatedge.ScanCode.Services.IServices; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 金蝶k3服务类 + /// + public class K3FileService : IK3FileService + { + /// + /// 金蝶云星空工具类 + /// + private K3CloudApiUtils _utils; + private readonly FileOption _fileOption; + private readonly ILogger _logger; + + /// + /// 初始化工具类 + /// + /// + /// + public K3FileService(FileOption fileOption, ILogger logger) + { + _fileOption = fileOption; + _logger = logger; + } + /// + /// 下载物料 + /// + /// + private List DonwloadFile(AttachmentFile file) + { + var base64File = DonwloadFile(file, 0); + return base64File; + } + /// + /// 下载物料 + /// + /// + /// + private List DonwloadFile(AttachmentFile file, long startIndex) + { + FileParam fileParam = new FileParam() + { + FileId = file.FileID, + StartIndex = startIndex, + }; + var fileResponse = _utils.FileDonwload(fileParam); + var fileBytes = Convert.FromBase64String(fileResponse.FilePart).ToList(); + if (fileResponse.IsLast == false) + { + var nextStartIndex = Convert.ToInt64(fileResponse.StartIndex); + fileBytes.AddRange(DonwloadFile(file, nextStartIndex)); + return fileBytes; + } + return fileBytes; + } + + /// + /// Base64字符串转文件并保存 + /// + /// base64字符串 + /// 保存的文件名 + /// 是否转换并保存成功 + private bool Base64StringToFile(List dataBytes, string fileName) + { + try + { + string path = _fileOption.DonwloadPath; //文件保存路径 + string fullPath = _fileOption.DonwloadPath + '/' + fileName; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + File.WriteAllBytes(fullPath, dataBytes.ToArray()); + return File.Exists(fullPath); + } + catch (Exception e) + { + _logger.LogError("异常类型: \t" + e.GetType()); + _logger.LogError("异常描述:\t" + e.Message); + _logger.LogError("异常方法:\t" + e.TargetSite); + _logger.LogError("异常堆栈:\t" + e.StackTrace); + } + return false; + } + + /// + /// 获取文件路径,如果没有就会先下载,再返回路径 + /// + /// + /// + public string GetFilePath(AttachmentFile file) + { + string filePath = _fileOption.DonwloadPath + "/" + file.FileName; + if (!File.Exists(filePath)) + { + var fileBase64String = DonwloadFile(file); + var isSave = Base64StringToFile(fileBase64String, file.FileName); + if (!isSave) + { + throw new Exception("文件保存错误,请联系管理员"); + } + } + return filePath; + } + /// + /// 设置K3Util + /// + /// + public void SetK3Util(K3CloudApiUtils utils) + { + _utils = utils; + } + } +} diff --git a/Gatedge.ScanCode/Services/ScanRecordsService.cs b/Gatedge.ScanCode/Services/ScanRecordsService.cs new file mode 100644 index 0000000..73573ea --- /dev/null +++ b/Gatedge.ScanCode/Services/ScanRecordsService.cs @@ -0,0 +1,240 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Common; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.K3Cloud.Utils.Model.K3Result.Model; +using Gatedge.ScanCode.Models.Dto; +using Gatedge.ScanCode.Models.Dto.BarRecord; +using Gatedge.ScanCode.Models.Dto.ScanRecords; +using Gatedge.ScanCode.Models.K3Request.BaseData; +using Gatedge.ScanCode.Models.K3Request.Enum; +using Gatedge.ScanCode.Models.K3Request.SaveModel; +using Gatedge.ScanCode.Services.IServices; +using System.Reflection; +using System.Text.Json; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 暂存扫描记录 + /// + public class ScanRecordsService : IScanRecordsService + { + private readonly string _FormName = "扫描记录#"; + private readonly string _FormId = "k4b27f8773ecb443da113e1a5e64ccaf9"; + + /// + /// 金蝶云星空工具类 + /// + private readonly K3CloudApiUtils _utils; + + + + /// + /// 初始化工具类 + /// + /// + public ScanRecordsService(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 删除接口 + /// + /// + public K3CloudResponseStatus Delete(Delete deleteParam) + { + var result = _utils.Delete(_FormId, deleteParam); + return result; + } + + /// + /// 列表 + /// + /// + public ListResult List(Query queryParam) + { + var result = _utils.QueryList(queryParam); + return result; + } + + /// + /// 保存暂存记录 + /// + public K3CloudResponseStatus Save(ScanRecordsSaveDto param) + { + ScanRecordsSave saveModel = new ScanRecordsSave() + { + FBillNo = param.FBillNo, + FBarCode = param.FBarCode, + FQty = param.FQty, + Flot = param.Flot, + FEntryId = param.FEntryId, + FSubmitLot = param.FSubmitLot, + FJSON = param.FJSON, + + }; + if (param.FBillId != null) + { + saveModel.FBillId = new FormType() + { + FID = param.FBillId + }; + } + if (param.FMaterialId != null) + { + saveModel.FMaterialId = new Material() + { + FMaterialId = Convert.ToInt32(param.FMaterialId) + }; + } + if (param.FStockId != null) + { + saveModel.FStockId = new Stock() + { + FStockId = Convert.ToInt32(param.FStockId) + }; + + } + var billSave = new Save(); + billSave.Model = saveModel; + var result = _utils.Save(_FormId, billSave); + return result; + } + /// + /// 批量保存 + /// + /// + /// + public K3CloudResponseStatus PatchSave(ArrayDto param) + { + var saveList = param.Data.Select(n => new ScanRecordsSave() + { + FBillNo = n.FBillNo, + FBarCode = n.FBarCode, + FQty = n.FQty, + Flot = n.Flot, + FEntryId = n.FEntryId, + FJSON = n.FJSON, + FSubmitLot = n.FSubmitLot, + FBillId = new FormType() + { + FID = n.FBillId + }, + FMaterialId = new Material() + { + FMaterialId = Convert.ToInt32(n.FMaterialId) + }, + FStockId = new Stock() + { + FStockId = Convert.ToInt32(n.FStockId) + } + }).ToList(); + var billSave = new PatchSave(); + billSave.Model = saveList; + var result = _utils.BatchSave(_FormId, billSave); + return result; + } + + /// + /// 查看 + /// + /// + /// + public object View(View param) + { + return _utils.Query(_FormId, param); + } + + /// + /// 提交成功信息 + /// + /// 扫描记录Id,通过','连接 + /// + /// + /// + public K3CloudResponseStatus SubmitSuccess(string ids, string resultBillId, K3CloudResponseStatus response) + { + var saveList = ids.Split(',').Select(n => new ScanRecordsSave() + { + FID = n, + FStatus = BarRecordStatus.Success, + FErrorInfo = string.Empty, + FResultInfo = JsonSerializer.Serialize(response), + FResultBillNo = response.SuccessEntitys.First().Number, + FResultId = response.SuccessEntitys.First().Id.ToString(), + FResultBillId = new FormType + { + FID = resultBillId, + } + }); + + var billSave = new PatchSave() + { + Model = saveList + }; + var result = _utils.BatchSave(_FormId, billSave); + return result; + } + + /// + /// 提交失败,更新状态和错误信息 + /// + /// + /// + /// + public K3CloudResponseStatus SubmitError(string id, string errorInfo) + { + var saveParam = new Save() + { + Model = new ScanRecordsSave() + { + FID = id, + FStatus = BarRecordStatus.Error, + FErrorInfo = errorInfo, + } + }; + return _utils.Save(_FormId, saveParam); + } + + /// + /// 根据条码查找扫描记录 + /// + /// + /// + public ListResult FindIdByCode(string barCode) + { + Query queryParam = new Query() + { + FormId = this._FormId, + FieldKeys = "FID,FStatus,FBillId.FID,FBillId.FName,FBillNo,FCreatorId,FCreatorId.FName,FCreateDate,FBarCode,FEntryId,FMaterialId,FMaterialId.FNumber,FMaterialId.FName,FQty,FStockId,FStockId.FNumber,FStockId.FName,Flot,FJSON,FErrorInfo", + Limit = 2000, + StartRow = 0, + }; + FilterList filterString = new FilterList(); + FilterItem filterItem = new FilterItem("FBarCode", "67", barCode, "0"); + filterString.AddFilterItem(filterItem); + queryParam.FilterString = filterString.GetFilterString(); + return List(queryParam); + } + /// + /// 打印成果码 + /// + /// + public K3CloudResponseStatus PrintResultBillNo(List ids) + { + var patchSave = new PatchSave(); + var scanRecordsSaves = ids.Distinct().Select(n => new ScanRecordsSave() + { + FID = n, + FIsPrinted = true, + }).ToList(); + patchSave.Model = scanRecordsSaves; + return _utils.BatchSave(_FormId, patchSave); + } + + + + } +} diff --git a/Gatedge.ScanCode/Services/StockService.cs b/Gatedge.ScanCode/Services/StockService.cs new file mode 100644 index 0000000..01a93ee --- /dev/null +++ b/Gatedge.ScanCode/Services/StockService.cs @@ -0,0 +1,53 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.ScanCode.Services.IServices; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 仓库服务 + /// + public class StockService : IStockService + { + /// + /// 单据FormId + /// + private readonly string _FormId = "BD_STOCK"; + + /// + /// 金蝶云星空工具类 + /// + private readonly K3CloudApiUtils _utils; + + /// + /// 初始化工具类 + /// + /// + public StockService(K3CloudApiUtils utils) + { + _utils = utils; + } + + /// + /// 查询 + /// + /// + /// + public object View(View param) + { + return _utils.Query(_FormId, param); + } + + + /// + /// 获取列表信息 + /// + /// + /// + public ListResult List(Query billQuery) + { + return _utils.QueryList(billQuery); + } + } +} diff --git a/Gatedge.ScanCode/Services/SupportingInformationService.cs b/Gatedge.ScanCode/Services/SupportingInformationService.cs new file mode 100644 index 0000000..7bd66bb --- /dev/null +++ b/Gatedge.ScanCode/Services/SupportingInformationService.cs @@ -0,0 +1,50 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.ScanCode.Services.IServices; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 辅助资料服务 + /// + public class SupportingInformationService : ISupportingInformationService + { + private readonly string _FormName = "辅助属性"; + private readonly string _FormId = "BOS_ASSISTANTDATA_DETAIL"; + + /// + /// 金蝶云星空工具类 + /// + private readonly K3CloudApiUtils _utils; + + + + /// + /// 初始化工具类 + /// + /// + public SupportingInformationService(K3CloudApiUtils utils) + { + _utils = utils; + } + /// + /// 获取列表 + /// + /// + public ListResult List(Query billQuery) + { + return _utils.QueryList(billQuery); + } + + /// + /// 查看单据 + /// + /// + /// + public object View(View param) + { + return _utils.Query(_FormId, param); + } + } +} diff --git a/Gatedge.ScanCode/Services/VsersionService.cs b/Gatedge.ScanCode/Services/VsersionService.cs new file mode 100644 index 0000000..1743acc --- /dev/null +++ b/Gatedge.ScanCode/Services/VsersionService.cs @@ -0,0 +1,54 @@ +using Gatedge.K3Cloud.Utils; +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.K3Cloud.Utils.Model.K3Result; +using Gatedge.ScanCode.Models.Vo; +using Gatedge.ScanCode.Services.IServices; + +namespace Gatedge.ScanCode.Services +{ + /// + /// 版本控制服务 + /// + public class VsersionService : IVsersionService + { + /// + /// 单据FormId + /// + private readonly string _FormId = "k25663a1521d147669932af94b9146d86"; + + /// + /// 金蝶云星空工具类 + /// + private readonly K3CloudApiUtils _utils; + + /// + /// 初始化工具类 + /// + /// + public VsersionService(K3CloudApiUtils utils) + { + _utils = utils; + } + /// + /// 列表 + /// + /// + /// + public ListResult List(Query queryParam) + { + queryParam.FormId = _FormId; + var result = _utils.QueryList(queryParam); + return result; + } + + /// + /// 查看 + /// + /// + /// + public AppVersionVo View(View param) + { + return _utils.Query(_FormId, param); + } + } +} diff --git a/Gatedge.ScanCode/Utils/JwtUtils.cs b/Gatedge.ScanCode/Utils/JwtUtils.cs new file mode 100644 index 0000000..9725faf --- /dev/null +++ b/Gatedge.ScanCode/Utils/JwtUtils.cs @@ -0,0 +1,59 @@ +using Gatedge.K3Cloud.Utils.Model.K3Request; +using Gatedge.ScanCode.Options; +using Microsoft.IdentityModel.Tokens; +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; + +namespace Gatedge.ScanCode.Utils; + +/// +/// JWT帮助类 +/// +public class JwtUtils +{ + private readonly JwtOption _option; + /// + /// JwtUtils,option是从ICO容器中拿到的对象 + /// + public JwtUtils(JwtOption option) + { + _option = option; + } + + /// + /// 创建Token + /// + /// + /// + public string CreateToken(LoginInfo loginInfo) + { + // 1. 定义需要使用到的Claims + var claims = new[] + { + new Claim("UserName", loginInfo.UserName), + new Claim("LCId", loginInfo.LCId.ToString()), + new Claim("ServerUrl", loginInfo.ServerUrl), + new Claim("DBID", loginInfo.DBID), + new Claim("orgNum", loginInfo.OrgNum), + }; + // 2. 从 appsettings.json 中读取SecretKey + var secretKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_option.SecretKey)); + // 3. 选择加密算法 + var algorithm = SecurityAlgorithms.HmacSha256; + // 4. 生成Credentials + var signingCredentials = new SigningCredentials(secretKey, algorithm); + // 5. 根据以上,生成token + var jwtSecurityToken = new JwtSecurityToken( + _option.Issuer, //Issuer + _option.Audience, //Audience + claims, //Claims, + DateTime.Now, //notBefore + DateTime.Now.AddSeconds(_option.FailureTime), //expires + signingCredentials //Credentials + ); + // 6. 将token变为string + var token = new JwtSecurityTokenHandler().WriteToken(jwtSecurityToken); + return token; + } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/appsettings.Development.json b/Gatedge.ScanCode/appsettings.Development.json new file mode 100644 index 0000000..86d035b --- /dev/null +++ b/Gatedge.ScanCode/appsettings.Development.json @@ -0,0 +1,73 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + + // JWT 配置 + "Jwt": { + "Default": { + "SecretKey": "asdfjaksdjfioqwjfk1283943134-=./,asdfjk'a", + "Issuer": "WebAppIssuer", + "Audience": "WebAppAudience", + "FailureTime": 31536000 + } + }, + + // 金蝶第三方设置 + "Kingdee": { + "Default": [ + // 本地 + { + "AcctID": "68d01db42795be", + "AppID": "324230_369J07sG0qD51Zzo426Py9yMTMQVWrPE", + "AppSec": "3fc411a6b17644479ac8683e0a5751cc", + "UserName": "demo", + "LCID": 2052, + "ServerUrl": "http://127.0.0.1/K3Cloud", + "Timestamp": 30, + "OrgNumber": "100" + }, + //珠海市汇威精密制造有限公司 + { + "AcctID": "6324278eedcfa7", + "AppID": "317092_64cBxYhL1pG87f8G1+1PSbTvVs4WWNqs", + "AppSec": "77b7decc97aa4147a5c631f0dff13a08", + "UserName": "lbr", + "LCID": 2052, + "ServerUrl": "http://61.145.228.58:9656/k3cloud", + "Timestamp": 30, + "OrgNumber": "100" + }, + // 汇威测试20250801 + { + "AcctID": "688c36d57dd18c", + "AppID": "319753_Td5I16kEQmD56X9o263P26+GVrQ/xsOO", + "AppSec": "f7dc83340a1048a19f6b4b5c8e948a3b", + "UserName": "lbr", + "LCID": 2052, + "ServerUrl": "http://61.145.228.58:9656/k3cloud", + "Timestamp": 30, + "OrgNumber": "100" + }, + // 汇威测试20251020 + { + "AcctID": "68f749a8680a64", + "AppID": "326327_xYdCT6uOyrk57Z8E6+2M68/vQuRUTOnO", + "AppSec": "8b99a7bdc19b445ea3ffc0e91f9f9d78", + "UserName": "lbr", + "LCID": 2052, + "ServerUrl": "http://61.145.228.58:9656/k3cloud", + "Timestamp": 30, + "OrgNumber": "100" + } + ] + }, + // 系统设置 + "FileConfig": { + // 下载地址 + "DonwloadPath": "./K3CloudFile" + } +} diff --git a/Gatedge.ScanCode/appsettings.json b/Gatedge.ScanCode/appsettings.json new file mode 100644 index 0000000..a3e3b54 --- /dev/null +++ b/Gatedge.ScanCode/appsettings.json @@ -0,0 +1,63 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + + "AllowedHosts": "*", + + // JWT 配置 + "Jwt": { + "Default": { + "SecretKey": "asdfjaksdjfioqwjfk1283943134-=./,asdfjk'a", + "Issuer": "WebAppIssuer", + "Audience": "WebAppAudience", + "FailureTime": 604800 + } + }, + + // 金蝶第三方设置 + "Kingdee": { + "Default": [ + //珠海市汇威精密制造有限公司 + { + "AcctID": "6324278eedcfa7", + "AppID": "317092_64cBxYhL1pG87f8G1+1PSbTvVs4WWNqs", + "AppSec": "77b7decc97aa4147a5c631f0dff13a08", + "UserName": "lbr", + "LCID": 2052, + "ServerUrl": "http://61.145.228.58:9656/k3cloud", + "Timestamp": 30, + "OrgNumber": "100" + }, + // 汇威测试20250801 + { + "AcctID": "688c36d57dd18c", + "AppID": "319753_Td5I16kEQmD56X9o263P26+GVrQ/xsOO", + "AppSec": "f7dc83340a1048a19f6b4b5c8e948a3b", + "UserName": "lbr", + "LCID": 2052, + "ServerUrl": "http://61.145.228.58:9656/k3cloud", + "Timestamp": 30, + "OrgNumber": "100" + }, + // 汇威测试20251020 + { + "AcctID": "68f749a8680a64", + "AppID": "326327_xYdCT6uOyrk57Z8E6+2M68/vQuRUTOnO", + "AppSec": "8b99a7bdc19b445ea3ffc0e91f9f9d78", + "UserName": "lbr", + "LCID": 2052, + "ServerUrl": "http://61.145.228.58:9656/k3cloud", + "Timestamp": 30, + "OrgNumber": "100" + } + ] + }, + + "FileConfig": { + "DonwloadPath": "./K3CloudFile" + } +} diff --git a/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.dgspec.json b/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.dgspec.json new file mode 100644 index 0000000..95ab04f --- /dev/null +++ b/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.dgspec.json @@ -0,0 +1,209 @@ +{ + "format": 1, + "restore": { + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj": {} + }, + "projects": { + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "projectName": "Gatedge.K3Cloud.Utils", + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj", + "packagesPath": "C:\\Users\\海\\.nuget\\packages\\", + "outputPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" + ], + "configFilePaths": [ + "C:\\Users\\海\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "dependencies": { + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.3, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[6.0.36, 6.0.36]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" + } + } + }, + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj", + "projectName": "Gatedge.ScanCode", + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj", + "packagesPath": "C:\\Users\\海\\.nuget\\packages\\", + "outputPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" + ], + "configFilePaths": [ + "C:\\Users\\海\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": { + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj": { + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj" + } + } + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "dependencies": { + "Microsoft.AspNetCore.Authentication.JwtBearer": { + "target": "Package", + "version": "[6.0.36, )" + }, + "Microsoft.Extensions.Configuration": { + "target": "Package", + "version": "[9.0.1, )" + }, + "Microsoft.Extensions.Configuration.FileExtensions": { + "target": "Package", + "version": "[9.0.1, )" + }, + "Microsoft.Extensions.Configuration.Json": { + "target": "Package", + "version": "[9.0.1, )" + }, + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.3, )" + }, + "Swashbuckle.AspNetCore": { + "target": "Package", + "version": "[6.5.0, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[6.0.36, 6.0.36]" + } + ], + "frameworkReferences": { + "Microsoft.AspNetCore.App": { + "privateAssets": "none" + }, + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.g.props b/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.g.props new file mode 100644 index 0000000..5754fc9 --- /dev/null +++ b/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.g.props @@ -0,0 +1,24 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\海\.nuget\packages\;D:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\ + PackageReference + 6.12.1 + + + + + + + + + + + + C:\Users\海\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5 + + \ No newline at end of file diff --git a/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.g.targets b/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.g.targets new file mode 100644 index 0000000..653e449 --- /dev/null +++ b/Gatedge.ScanCode/obj/Gatedge.ScanCode.csproj.nuget.g.targets @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Gatedge.ScanCode/obj/project.assets.json b/Gatedge.ScanCode/obj/project.assets.json new file mode 100644 index 0000000..2652415 --- /dev/null +++ b/Gatedge.ScanCode/obj/project.assets.json @@ -0,0 +1,2113 @@ +{ + "version": 3, + "targets": { + "net6.0": { + "Microsoft.AspNetCore.Authentication.JwtBearer/6.0.36": { + "type": "package", + "dependencies": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.35.0" + }, + "compile": { + "lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": { + "related": ".xml" + } + }, + "frameworkReferences": [ + "Microsoft.AspNetCore.App" + ] + }, + "Microsoft.Bcl.AsyncInterfaces/9.0.1": { + "type": "package", + "compile": { + "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Bcl.AsyncInterfaces.targets": {} + } + }, + "Microsoft.CSharp/4.5.0": { + "type": "package", + "compile": { + "ref/netcoreapp2.0/_._": {} + }, + "runtime": { + "lib/netcoreapp2.0/_._": {} + } + }, + "Microsoft.Extensions.ApiDescription.Server/6.0.5": { + "type": "package", + "build": { + "build/Microsoft.Extensions.ApiDescription.Server.props": {}, + "build/Microsoft.Extensions.ApiDescription.Server.targets": {} + }, + "buildMultiTargeting": { + "buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.props": {}, + "buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.targets": {} + } + }, + "Microsoft.Extensions.Configuration/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "9.0.1", + "Microsoft.Extensions.Primitives": "9.0.1" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.targets": {} + } + }, + "Microsoft.Extensions.Configuration.Abstractions/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "9.0.1" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.Abstractions.targets": {} + } + }, + "Microsoft.Extensions.Configuration.FileExtensions/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Configuration": "9.0.1", + "Microsoft.Extensions.Configuration.Abstractions": "9.0.1", + "Microsoft.Extensions.FileProviders.Abstractions": "9.0.1", + "Microsoft.Extensions.FileProviders.Physical": "9.0.1", + "Microsoft.Extensions.Primitives": "9.0.1" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.FileExtensions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.FileExtensions.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.FileExtensions.targets": {} + } + }, + "Microsoft.Extensions.Configuration.Json/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Configuration": "9.0.1", + "Microsoft.Extensions.Configuration.Abstractions": "9.0.1", + "Microsoft.Extensions.Configuration.FileExtensions": "9.0.1", + "Microsoft.Extensions.FileProviders.Abstractions": "9.0.1", + "System.Text.Json": "9.0.1" + }, + "compile": { + "lib/netstandard2.1/Microsoft.Extensions.Configuration.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.1/Microsoft.Extensions.Configuration.Json.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.Json.targets": {} + } + }, + "Microsoft.Extensions.FileProviders.Abstractions/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "9.0.1" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Abstractions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Abstractions.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.FileProviders.Abstractions.targets": {} + } + }, + "Microsoft.Extensions.FileProviders.Physical/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "9.0.1", + "Microsoft.Extensions.FileSystemGlobbing": "9.0.1", + "Microsoft.Extensions.Primitives": "9.0.1" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Physical.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Physical.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.FileProviders.Physical.targets": {} + } + }, + "Microsoft.Extensions.FileSystemGlobbing/9.0.1": { + "type": "package", + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.FileSystemGlobbing.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.FileSystemGlobbing.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.FileSystemGlobbing.targets": {} + } + }, + "Microsoft.Extensions.Primitives/9.0.1": { + "type": "package", + "dependencies": { + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Primitives.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Primitives.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Primitives.targets": {} + } + }, + "Microsoft.IdentityModel.Abstractions/6.35.0": { + "type": "package", + "compile": { + "lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": { + "related": ".xml" + } + } + }, + "Microsoft.IdentityModel.JsonWebTokens/6.35.0": { + "type": "package", + "dependencies": { + "Microsoft.IdentityModel.Tokens": "6.35.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encodings.Web": "4.7.2", + "System.Text.Json": "4.7.2" + }, + "compile": { + "lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": { + "related": ".xml" + } + } + }, + "Microsoft.IdentityModel.Logging/6.35.0": { + "type": "package", + "dependencies": { + "Microsoft.IdentityModel.Abstractions": "6.35.0" + }, + "compile": { + "lib/net6.0/Microsoft.IdentityModel.Logging.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.IdentityModel.Logging.dll": { + "related": ".xml" + } + } + }, + "Microsoft.IdentityModel.Protocols/6.35.0": { + "type": "package", + "dependencies": { + "Microsoft.IdentityModel.Logging": "6.35.0", + "Microsoft.IdentityModel.Tokens": "6.35.0" + }, + "compile": { + "lib/net6.0/Microsoft.IdentityModel.Protocols.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.IdentityModel.Protocols.dll": { + "related": ".xml" + } + } + }, + "Microsoft.IdentityModel.Protocols.OpenIdConnect/6.35.0": { + "type": "package", + "dependencies": { + "Microsoft.IdentityModel.Protocols": "6.35.0", + "System.IdentityModel.Tokens.Jwt": "6.35.0" + }, + "compile": { + "lib/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": { + "related": ".xml" + } + } + }, + "Microsoft.IdentityModel.Tokens/6.35.0": { + "type": "package", + "dependencies": { + "Microsoft.CSharp": "4.5.0", + "Microsoft.IdentityModel.Logging": "6.35.0", + "System.Security.Cryptography.Cng": "4.5.0" + }, + "compile": { + "lib/net6.0/Microsoft.IdentityModel.Tokens.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Microsoft.IdentityModel.Tokens.dll": { + "related": ".xml" + } + } + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.1.0": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.OpenApi/1.2.3": { + "type": "package", + "compile": { + "lib/netstandard2.0/Microsoft.OpenApi.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/netstandard2.0/Microsoft.OpenApi.dll": { + "related": ".pdb;.xml" + } + } + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "compile": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + } + }, + "Swashbuckle.AspNetCore/6.5.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.ApiDescription.Server": "6.0.5", + "Swashbuckle.AspNetCore.Swagger": "6.5.0", + "Swashbuckle.AspNetCore.SwaggerGen": "6.5.0", + "Swashbuckle.AspNetCore.SwaggerUI": "6.5.0" + }, + "build": { + "build/Swashbuckle.AspNetCore.props": {} + } + }, + "Swashbuckle.AspNetCore.Swagger/6.5.0": { + "type": "package", + "dependencies": { + "Microsoft.OpenApi": "1.2.3" + }, + "compile": { + "lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": { + "related": ".pdb;.xml" + } + }, + "frameworkReferences": [ + "Microsoft.AspNetCore.App" + ] + }, + "Swashbuckle.AspNetCore.SwaggerGen/6.5.0": { + "type": "package", + "dependencies": { + "Swashbuckle.AspNetCore.Swagger": "6.5.0" + }, + "compile": { + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": { + "related": ".pdb;.xml" + } + } + }, + "Swashbuckle.AspNetCore.SwaggerUI/6.5.0": { + "type": "package", + "compile": { + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": { + "related": ".pdb;.xml" + } + }, + "frameworkReferences": [ + "Microsoft.AspNetCore.App" + ] + }, + "System.Buffers/4.5.1": { + "type": "package", + "compile": { + "ref/netcoreapp2.0/_._": {} + }, + "runtime": { + "lib/netcoreapp2.0/_._": {} + } + }, + "System.IdentityModel.Tokens.Jwt/6.35.0": { + "type": "package", + "dependencies": { + "Microsoft.IdentityModel.JsonWebTokens": "6.35.0", + "Microsoft.IdentityModel.Tokens": "6.35.0" + }, + "compile": { + "lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": { + "related": ".xml" + } + } + }, + "System.IO.Pipelines/9.0.1": { + "type": "package", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Threading.Tasks.Extensions": "4.5.4" + }, + "compile": { + "lib/netstandard2.0/System.IO.Pipelines.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/System.IO.Pipelines.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/System.IO.Pipelines.targets": {} + } + }, + "System.Memory/4.5.5": { + "type": "package", + "compile": { + "ref/netcoreapp2.1/_._": {} + }, + "runtime": { + "lib/netcoreapp2.1/_._": {} + } + }, + "System.Runtime/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": { + "related": ".xml" + } + } + }, + "System.Runtime.CompilerServices.Unsafe/6.0.0": { + "type": "package", + "compile": { + "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp3.1/_._": {} + } + }, + "System.Security.Cryptography.Cng/4.5.0": { + "type": "package", + "compile": { + "ref/netcoreapp2.1/System.Security.Cryptography.Cng.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll": {} + }, + "runtimeTargets": { + "runtimes/win/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Text.Encoding/4.3.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + }, + "compile": { + "ref/netstandard1.3/System.Text.Encoding.dll": { + "related": ".xml" + } + } + }, + "System.Text.Encodings.Web/9.0.1": { + "type": "package", + "dependencies": { + "System.Buffers": "4.5.1", + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + }, + "compile": { + "lib/netstandard2.0/System.Text.Encodings.Web.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/System.Text.Encodings.Web.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/System.Text.Encodings.Web.targets": {} + } + }, + "System.Text.Json/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "9.0.1", + "System.Buffers": "4.5.1", + "System.IO.Pipelines": "9.0.1", + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "9.0.1", + "System.Threading.Tasks.Extensions": "4.5.4" + }, + "compile": { + "lib/netstandard2.0/System.Text.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/System.Text.Json.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp2.0/System.Text.Json.targets": {} + } + }, + "System.Threading.Tasks.Extensions/4.5.4": { + "type": "package", + "compile": { + "ref/netcoreapp2.1/_._": {} + }, + "runtime": { + "lib/netcoreapp2.1/_._": {} + } + }, + "Gatedge.K3Cloud.Utils/1.0.0": { + "type": "project", + "framework": ".NETCoreApp,Version=v6.0", + "dependencies": { + "Newtonsoft.Json": "13.0.3" + }, + "compile": { + "bin/placeholder/Gatedge.K3Cloud.Utils.dll": {} + }, + "runtime": { + "bin/placeholder/Gatedge.K3Cloud.Utils.dll": {} + } + } + } + }, + "libraries": { + "Microsoft.AspNetCore.Authentication.JwtBearer/6.0.36": { + "sha512": "vGDqvZUehbtKdoUzVO32N0Lxon+1piGO6qFnA8FNXEzWhrLN5uum8ZyhWgrWYSA4b6JuCBJ/wAC7rV38wBvLew==", + "type": "package", + "path": "microsoft.aspnetcore.authentication.jwtbearer/6.0.36", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "THIRD-PARTY-NOTICES.TXT", + "lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll", + "lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.xml", + "microsoft.aspnetcore.authentication.jwtbearer.6.0.36.nupkg.sha512", + "microsoft.aspnetcore.authentication.jwtbearer.nuspec" + ] + }, + "Microsoft.Bcl.AsyncInterfaces/9.0.1": { + "sha512": "IVkmUqf+KzbuXKrxi2tyQlg11RArYk26t2eU5cHekff+7Ao09vH8vt8idC0BJSMnpiRV2OK66zM2EwJU6Tm5Cw==", + "type": "package", + "path": "microsoft.bcl.asyncinterfaces/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Bcl.AsyncInterfaces.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Bcl.AsyncInterfaces.targets", + "lib/net462/Microsoft.Bcl.AsyncInterfaces.dll", + "lib/net462/Microsoft.Bcl.AsyncInterfaces.xml", + "lib/netstandard2.0/Microsoft.Bcl.AsyncInterfaces.dll", + "lib/netstandard2.0/Microsoft.Bcl.AsyncInterfaces.xml", + "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll", + "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.xml", + "microsoft.bcl.asyncinterfaces.9.0.1.nupkg.sha512", + "microsoft.bcl.asyncinterfaces.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.CSharp/4.5.0": { + "sha512": "kaj6Wb4qoMuH3HySFJhxwQfe8R/sJsNJnANrvv8WdFPMoNbKY5htfNscv+LHCu5ipz+49m2e+WQXpLXr9XYemQ==", + "type": "package", + "path": "microsoft.csharp/4.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/Microsoft.CSharp.dll", + "lib/netcoreapp2.0/_._", + "lib/netstandard1.3/Microsoft.CSharp.dll", + "lib/netstandard2.0/Microsoft.CSharp.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/uap10.0.16299/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "microsoft.csharp.4.5.0.nupkg.sha512", + "microsoft.csharp.nuspec", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/Microsoft.CSharp.dll", + "ref/netcore50/Microsoft.CSharp.xml", + "ref/netcore50/de/Microsoft.CSharp.xml", + "ref/netcore50/es/Microsoft.CSharp.xml", + "ref/netcore50/fr/Microsoft.CSharp.xml", + "ref/netcore50/it/Microsoft.CSharp.xml", + "ref/netcore50/ja/Microsoft.CSharp.xml", + "ref/netcore50/ko/Microsoft.CSharp.xml", + "ref/netcore50/ru/Microsoft.CSharp.xml", + "ref/netcore50/zh-hans/Microsoft.CSharp.xml", + "ref/netcore50/zh-hant/Microsoft.CSharp.xml", + "ref/netcoreapp2.0/_._", + "ref/netstandard1.0/Microsoft.CSharp.dll", + "ref/netstandard1.0/Microsoft.CSharp.xml", + "ref/netstandard1.0/de/Microsoft.CSharp.xml", + "ref/netstandard1.0/es/Microsoft.CSharp.xml", + "ref/netstandard1.0/fr/Microsoft.CSharp.xml", + "ref/netstandard1.0/it/Microsoft.CSharp.xml", + "ref/netstandard1.0/ja/Microsoft.CSharp.xml", + "ref/netstandard1.0/ko/Microsoft.CSharp.xml", + "ref/netstandard1.0/ru/Microsoft.CSharp.xml", + "ref/netstandard1.0/zh-hans/Microsoft.CSharp.xml", + "ref/netstandard1.0/zh-hant/Microsoft.CSharp.xml", + "ref/netstandard2.0/Microsoft.CSharp.dll", + "ref/netstandard2.0/Microsoft.CSharp.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/uap10.0.16299/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.ApiDescription.Server/6.0.5": { + "sha512": "Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw==", + "type": "package", + "path": "microsoft.extensions.apidescription.server/6.0.5", + "hasTools": true, + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "build/Microsoft.Extensions.ApiDescription.Server.props", + "build/Microsoft.Extensions.ApiDescription.Server.targets", + "buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.props", + "buildMultiTargeting/Microsoft.Extensions.ApiDescription.Server.targets", + "microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512", + "microsoft.extensions.apidescription.server.nuspec", + "tools/Newtonsoft.Json.dll", + "tools/dotnet-getdocument.deps.json", + "tools/dotnet-getdocument.dll", + "tools/dotnet-getdocument.runtimeconfig.json", + "tools/net461-x86/GetDocument.Insider.exe", + "tools/net461-x86/GetDocument.Insider.exe.config", + "tools/net461-x86/Microsoft.Win32.Primitives.dll", + "tools/net461-x86/System.AppContext.dll", + "tools/net461-x86/System.Buffers.dll", + "tools/net461-x86/System.Collections.Concurrent.dll", + "tools/net461-x86/System.Collections.NonGeneric.dll", + "tools/net461-x86/System.Collections.Specialized.dll", + "tools/net461-x86/System.Collections.dll", + "tools/net461-x86/System.ComponentModel.EventBasedAsync.dll", + "tools/net461-x86/System.ComponentModel.Primitives.dll", + "tools/net461-x86/System.ComponentModel.TypeConverter.dll", + "tools/net461-x86/System.ComponentModel.dll", + "tools/net461-x86/System.Console.dll", + "tools/net461-x86/System.Data.Common.dll", + "tools/net461-x86/System.Diagnostics.Contracts.dll", + "tools/net461-x86/System.Diagnostics.Debug.dll", + "tools/net461-x86/System.Diagnostics.DiagnosticSource.dll", + "tools/net461-x86/System.Diagnostics.FileVersionInfo.dll", + "tools/net461-x86/System.Diagnostics.Process.dll", + "tools/net461-x86/System.Diagnostics.StackTrace.dll", + "tools/net461-x86/System.Diagnostics.TextWriterTraceListener.dll", + "tools/net461-x86/System.Diagnostics.Tools.dll", + "tools/net461-x86/System.Diagnostics.TraceSource.dll", + "tools/net461-x86/System.Diagnostics.Tracing.dll", + "tools/net461-x86/System.Drawing.Primitives.dll", + "tools/net461-x86/System.Dynamic.Runtime.dll", + "tools/net461-x86/System.Globalization.Calendars.dll", + "tools/net461-x86/System.Globalization.Extensions.dll", + "tools/net461-x86/System.Globalization.dll", + "tools/net461-x86/System.IO.Compression.ZipFile.dll", + "tools/net461-x86/System.IO.Compression.dll", + "tools/net461-x86/System.IO.FileSystem.DriveInfo.dll", + "tools/net461-x86/System.IO.FileSystem.Primitives.dll", + "tools/net461-x86/System.IO.FileSystem.Watcher.dll", + "tools/net461-x86/System.IO.FileSystem.dll", + "tools/net461-x86/System.IO.IsolatedStorage.dll", + "tools/net461-x86/System.IO.MemoryMappedFiles.dll", + "tools/net461-x86/System.IO.Pipes.dll", + "tools/net461-x86/System.IO.UnmanagedMemoryStream.dll", + "tools/net461-x86/System.IO.dll", + "tools/net461-x86/System.Linq.Expressions.dll", + "tools/net461-x86/System.Linq.Parallel.dll", + "tools/net461-x86/System.Linq.Queryable.dll", + "tools/net461-x86/System.Linq.dll", + "tools/net461-x86/System.Memory.dll", + "tools/net461-x86/System.Net.Http.dll", + "tools/net461-x86/System.Net.NameResolution.dll", + "tools/net461-x86/System.Net.NetworkInformation.dll", + "tools/net461-x86/System.Net.Ping.dll", + "tools/net461-x86/System.Net.Primitives.dll", + "tools/net461-x86/System.Net.Requests.dll", + "tools/net461-x86/System.Net.Security.dll", + "tools/net461-x86/System.Net.Sockets.dll", + "tools/net461-x86/System.Net.WebHeaderCollection.dll", + "tools/net461-x86/System.Net.WebSockets.Client.dll", + "tools/net461-x86/System.Net.WebSockets.dll", + "tools/net461-x86/System.Numerics.Vectors.dll", + "tools/net461-x86/System.ObjectModel.dll", + "tools/net461-x86/System.Reflection.Extensions.dll", + "tools/net461-x86/System.Reflection.Primitives.dll", + "tools/net461-x86/System.Reflection.dll", + "tools/net461-x86/System.Resources.Reader.dll", + "tools/net461-x86/System.Resources.ResourceManager.dll", + "tools/net461-x86/System.Resources.Writer.dll", + "tools/net461-x86/System.Runtime.CompilerServices.Unsafe.dll", + "tools/net461-x86/System.Runtime.CompilerServices.VisualC.dll", + "tools/net461-x86/System.Runtime.Extensions.dll", + "tools/net461-x86/System.Runtime.Handles.dll", + "tools/net461-x86/System.Runtime.InteropServices.RuntimeInformation.dll", + "tools/net461-x86/System.Runtime.InteropServices.dll", + "tools/net461-x86/System.Runtime.Numerics.dll", + "tools/net461-x86/System.Runtime.Serialization.Formatters.dll", + "tools/net461-x86/System.Runtime.Serialization.Json.dll", + "tools/net461-x86/System.Runtime.Serialization.Primitives.dll", + "tools/net461-x86/System.Runtime.Serialization.Xml.dll", + "tools/net461-x86/System.Runtime.dll", + "tools/net461-x86/System.Security.Claims.dll", + "tools/net461-x86/System.Security.Cryptography.Algorithms.dll", + "tools/net461-x86/System.Security.Cryptography.Csp.dll", + "tools/net461-x86/System.Security.Cryptography.Encoding.dll", + "tools/net461-x86/System.Security.Cryptography.Primitives.dll", + "tools/net461-x86/System.Security.Cryptography.X509Certificates.dll", + "tools/net461-x86/System.Security.Principal.dll", + "tools/net461-x86/System.Security.SecureString.dll", + "tools/net461-x86/System.Text.Encoding.Extensions.dll", + "tools/net461-x86/System.Text.Encoding.dll", + "tools/net461-x86/System.Text.RegularExpressions.dll", + "tools/net461-x86/System.Threading.Overlapped.dll", + "tools/net461-x86/System.Threading.Tasks.Parallel.dll", + "tools/net461-x86/System.Threading.Tasks.dll", + "tools/net461-x86/System.Threading.Thread.dll", + "tools/net461-x86/System.Threading.ThreadPool.dll", + "tools/net461-x86/System.Threading.Timer.dll", + "tools/net461-x86/System.Threading.dll", + "tools/net461-x86/System.ValueTuple.dll", + "tools/net461-x86/System.Xml.ReaderWriter.dll", + "tools/net461-x86/System.Xml.XDocument.dll", + "tools/net461-x86/System.Xml.XPath.XDocument.dll", + "tools/net461-x86/System.Xml.XPath.dll", + "tools/net461-x86/System.Xml.XmlDocument.dll", + "tools/net461-x86/System.Xml.XmlSerializer.dll", + "tools/net461-x86/netstandard.dll", + "tools/net461/GetDocument.Insider.exe", + "tools/net461/GetDocument.Insider.exe.config", + "tools/net461/Microsoft.Win32.Primitives.dll", + "tools/net461/System.AppContext.dll", + "tools/net461/System.Buffers.dll", + "tools/net461/System.Collections.Concurrent.dll", + "tools/net461/System.Collections.NonGeneric.dll", + "tools/net461/System.Collections.Specialized.dll", + "tools/net461/System.Collections.dll", + "tools/net461/System.ComponentModel.EventBasedAsync.dll", + "tools/net461/System.ComponentModel.Primitives.dll", + "tools/net461/System.ComponentModel.TypeConverter.dll", + "tools/net461/System.ComponentModel.dll", + "tools/net461/System.Console.dll", + "tools/net461/System.Data.Common.dll", + "tools/net461/System.Diagnostics.Contracts.dll", + "tools/net461/System.Diagnostics.Debug.dll", + "tools/net461/System.Diagnostics.DiagnosticSource.dll", + "tools/net461/System.Diagnostics.FileVersionInfo.dll", + "tools/net461/System.Diagnostics.Process.dll", + "tools/net461/System.Diagnostics.StackTrace.dll", + "tools/net461/System.Diagnostics.TextWriterTraceListener.dll", + "tools/net461/System.Diagnostics.Tools.dll", + "tools/net461/System.Diagnostics.TraceSource.dll", + "tools/net461/System.Diagnostics.Tracing.dll", + "tools/net461/System.Drawing.Primitives.dll", + "tools/net461/System.Dynamic.Runtime.dll", + "tools/net461/System.Globalization.Calendars.dll", + "tools/net461/System.Globalization.Extensions.dll", + "tools/net461/System.Globalization.dll", + "tools/net461/System.IO.Compression.ZipFile.dll", + "tools/net461/System.IO.Compression.dll", + "tools/net461/System.IO.FileSystem.DriveInfo.dll", + "tools/net461/System.IO.FileSystem.Primitives.dll", + "tools/net461/System.IO.FileSystem.Watcher.dll", + "tools/net461/System.IO.FileSystem.dll", + "tools/net461/System.IO.IsolatedStorage.dll", + "tools/net461/System.IO.MemoryMappedFiles.dll", + "tools/net461/System.IO.Pipes.dll", + "tools/net461/System.IO.UnmanagedMemoryStream.dll", + "tools/net461/System.IO.dll", + "tools/net461/System.Linq.Expressions.dll", + "tools/net461/System.Linq.Parallel.dll", + "tools/net461/System.Linq.Queryable.dll", + "tools/net461/System.Linq.dll", + "tools/net461/System.Memory.dll", + "tools/net461/System.Net.Http.dll", + "tools/net461/System.Net.NameResolution.dll", + "tools/net461/System.Net.NetworkInformation.dll", + "tools/net461/System.Net.Ping.dll", + "tools/net461/System.Net.Primitives.dll", + "tools/net461/System.Net.Requests.dll", + "tools/net461/System.Net.Security.dll", + "tools/net461/System.Net.Sockets.dll", + "tools/net461/System.Net.WebHeaderCollection.dll", + "tools/net461/System.Net.WebSockets.Client.dll", + "tools/net461/System.Net.WebSockets.dll", + "tools/net461/System.Numerics.Vectors.dll", + "tools/net461/System.ObjectModel.dll", + "tools/net461/System.Reflection.Extensions.dll", + "tools/net461/System.Reflection.Primitives.dll", + "tools/net461/System.Reflection.dll", + "tools/net461/System.Resources.Reader.dll", + "tools/net461/System.Resources.ResourceManager.dll", + "tools/net461/System.Resources.Writer.dll", + "tools/net461/System.Runtime.CompilerServices.Unsafe.dll", + "tools/net461/System.Runtime.CompilerServices.VisualC.dll", + "tools/net461/System.Runtime.Extensions.dll", + "tools/net461/System.Runtime.Handles.dll", + "tools/net461/System.Runtime.InteropServices.RuntimeInformation.dll", + "tools/net461/System.Runtime.InteropServices.dll", + "tools/net461/System.Runtime.Numerics.dll", + "tools/net461/System.Runtime.Serialization.Formatters.dll", + "tools/net461/System.Runtime.Serialization.Json.dll", + "tools/net461/System.Runtime.Serialization.Primitives.dll", + "tools/net461/System.Runtime.Serialization.Xml.dll", + "tools/net461/System.Runtime.dll", + "tools/net461/System.Security.Claims.dll", + "tools/net461/System.Security.Cryptography.Algorithms.dll", + "tools/net461/System.Security.Cryptography.Csp.dll", + "tools/net461/System.Security.Cryptography.Encoding.dll", + "tools/net461/System.Security.Cryptography.Primitives.dll", + "tools/net461/System.Security.Cryptography.X509Certificates.dll", + "tools/net461/System.Security.Principal.dll", + "tools/net461/System.Security.SecureString.dll", + "tools/net461/System.Text.Encoding.Extensions.dll", + "tools/net461/System.Text.Encoding.dll", + "tools/net461/System.Text.RegularExpressions.dll", + "tools/net461/System.Threading.Overlapped.dll", + "tools/net461/System.Threading.Tasks.Parallel.dll", + "tools/net461/System.Threading.Tasks.dll", + "tools/net461/System.Threading.Thread.dll", + "tools/net461/System.Threading.ThreadPool.dll", + "tools/net461/System.Threading.Timer.dll", + "tools/net461/System.Threading.dll", + "tools/net461/System.ValueTuple.dll", + "tools/net461/System.Xml.ReaderWriter.dll", + "tools/net461/System.Xml.XDocument.dll", + "tools/net461/System.Xml.XPath.XDocument.dll", + "tools/net461/System.Xml.XPath.dll", + "tools/net461/System.Xml.XmlDocument.dll", + "tools/net461/System.Xml.XmlSerializer.dll", + "tools/net461/netstandard.dll", + "tools/netcoreapp2.1/GetDocument.Insider.deps.json", + "tools/netcoreapp2.1/GetDocument.Insider.dll", + "tools/netcoreapp2.1/GetDocument.Insider.runtimeconfig.json", + "tools/netcoreapp2.1/System.Diagnostics.DiagnosticSource.dll" + ] + }, + "Microsoft.Extensions.Configuration/9.0.1": { + "sha512": "VuthqFS+ju6vT8W4wevdhEFiRi1trvQtkzWLonApfF5USVzzDcTBoY3F24WvN/tffLSrycArVfX1bThm/9xY2A==", + "type": "package", + "path": "microsoft.extensions.configuration/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.Configuration.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.targets", + "lib/net462/Microsoft.Extensions.Configuration.dll", + "lib/net462/Microsoft.Extensions.Configuration.xml", + "lib/net8.0/Microsoft.Extensions.Configuration.dll", + "lib/net8.0/Microsoft.Extensions.Configuration.xml", + "lib/net9.0/Microsoft.Extensions.Configuration.dll", + "lib/net9.0/Microsoft.Extensions.Configuration.xml", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.dll", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.xml", + "microsoft.extensions.configuration.9.0.1.nupkg.sha512", + "microsoft.extensions.configuration.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.Configuration.Abstractions/9.0.1": { + "sha512": "+4hfFIY1UjBCXFTTOd+ojlDPq6mep3h5Vq5SYE3Pjucr7dNXmq4S/6P/LoVnZFz2e/5gWp/om4svUFgznfULcA==", + "type": "package", + "path": "microsoft.extensions.configuration.abstractions/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.Configuration.Abstractions.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.Abstractions.targets", + "lib/net462/Microsoft.Extensions.Configuration.Abstractions.dll", + "lib/net462/Microsoft.Extensions.Configuration.Abstractions.xml", + "lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll", + "lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.xml", + "lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll", + "lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.xml", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.xml", + "microsoft.extensions.configuration.abstractions.9.0.1.nupkg.sha512", + "microsoft.extensions.configuration.abstractions.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.Configuration.FileExtensions/9.0.1": { + "sha512": "QBOI8YVAyKqeshYOyxSe6co22oag431vxMu5xQe1EjXMkYE4xK4J71xLCW3/bWKmr9Aoy1VqGUARSLFnotk4Bg==", + "type": "package", + "path": "microsoft.extensions.configuration.fileextensions/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.Configuration.FileExtensions.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.FileExtensions.targets", + "lib/net462/Microsoft.Extensions.Configuration.FileExtensions.dll", + "lib/net462/Microsoft.Extensions.Configuration.FileExtensions.xml", + "lib/net8.0/Microsoft.Extensions.Configuration.FileExtensions.dll", + "lib/net8.0/Microsoft.Extensions.Configuration.FileExtensions.xml", + "lib/net9.0/Microsoft.Extensions.Configuration.FileExtensions.dll", + "lib/net9.0/Microsoft.Extensions.Configuration.FileExtensions.xml", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.FileExtensions.dll", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.FileExtensions.xml", + "microsoft.extensions.configuration.fileextensions.9.0.1.nupkg.sha512", + "microsoft.extensions.configuration.fileextensions.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.Configuration.Json/9.0.1": { + "sha512": "z+g+lgPET1JRDjsOkFe51rkkNcnJgvOK5UIpeTfF1iAi0GkBJz5/yUuTa8a9V8HUh4gj4xFT5WGoMoXoSDKfGg==", + "type": "package", + "path": "microsoft.extensions.configuration.json/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.Configuration.Json.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.Json.targets", + "lib/net462/Microsoft.Extensions.Configuration.Json.dll", + "lib/net462/Microsoft.Extensions.Configuration.Json.xml", + "lib/net8.0/Microsoft.Extensions.Configuration.Json.dll", + "lib/net8.0/Microsoft.Extensions.Configuration.Json.xml", + "lib/net9.0/Microsoft.Extensions.Configuration.Json.dll", + "lib/net9.0/Microsoft.Extensions.Configuration.Json.xml", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Json.dll", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Json.xml", + "lib/netstandard2.1/Microsoft.Extensions.Configuration.Json.dll", + "lib/netstandard2.1/Microsoft.Extensions.Configuration.Json.xml", + "microsoft.extensions.configuration.json.9.0.1.nupkg.sha512", + "microsoft.extensions.configuration.json.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.FileProviders.Abstractions/9.0.1": { + "sha512": "DguZYt1DWL05+8QKWL3b6bW7A2pC5kYFMY5iXM6W2M23jhvcNa8v6AU8PvVJBcysxHwr9/jax0agnwoBumsSwg==", + "type": "package", + "path": "microsoft.extensions.fileproviders.abstractions/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.FileProviders.Abstractions.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.FileProviders.Abstractions.targets", + "lib/net462/Microsoft.Extensions.FileProviders.Abstractions.dll", + "lib/net462/Microsoft.Extensions.FileProviders.Abstractions.xml", + "lib/net8.0/Microsoft.Extensions.FileProviders.Abstractions.dll", + "lib/net8.0/Microsoft.Extensions.FileProviders.Abstractions.xml", + "lib/net9.0/Microsoft.Extensions.FileProviders.Abstractions.dll", + "lib/net9.0/Microsoft.Extensions.FileProviders.Abstractions.xml", + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Abstractions.dll", + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Abstractions.xml", + "microsoft.extensions.fileproviders.abstractions.9.0.1.nupkg.sha512", + "microsoft.extensions.fileproviders.abstractions.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.FileProviders.Physical/9.0.1": { + "sha512": "TKDMNRS66UTMEVT38/tU9hA63UTMvzI3DyNm5mx8+JCf3BaOtxgrvWLCI1y3J52PzT5yNl/T2KN5Z0KbApLZcg==", + "type": "package", + "path": "microsoft.extensions.fileproviders.physical/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.FileProviders.Physical.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.FileProviders.Physical.targets", + "lib/net462/Microsoft.Extensions.FileProviders.Physical.dll", + "lib/net462/Microsoft.Extensions.FileProviders.Physical.xml", + "lib/net8.0/Microsoft.Extensions.FileProviders.Physical.dll", + "lib/net8.0/Microsoft.Extensions.FileProviders.Physical.xml", + "lib/net9.0/Microsoft.Extensions.FileProviders.Physical.dll", + "lib/net9.0/Microsoft.Extensions.FileProviders.Physical.xml", + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Physical.dll", + "lib/netstandard2.0/Microsoft.Extensions.FileProviders.Physical.xml", + "microsoft.extensions.fileproviders.physical.9.0.1.nupkg.sha512", + "microsoft.extensions.fileproviders.physical.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.FileSystemGlobbing/9.0.1": { + "sha512": "Mxcp9NXuQMvAnudRZcgIb5SqlWrlullQzntBLTwuv0MPIJ5LqiGwbRqiyxgdk+vtCoUkplb0oXy5kAw1t469Ug==", + "type": "package", + "path": "microsoft.extensions.filesystemglobbing/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.FileSystemGlobbing.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.FileSystemGlobbing.targets", + "lib/net462/Microsoft.Extensions.FileSystemGlobbing.dll", + "lib/net462/Microsoft.Extensions.FileSystemGlobbing.xml", + "lib/net8.0/Microsoft.Extensions.FileSystemGlobbing.dll", + "lib/net8.0/Microsoft.Extensions.FileSystemGlobbing.xml", + "lib/net9.0/Microsoft.Extensions.FileSystemGlobbing.dll", + "lib/net9.0/Microsoft.Extensions.FileSystemGlobbing.xml", + "lib/netstandard2.0/Microsoft.Extensions.FileSystemGlobbing.dll", + "lib/netstandard2.0/Microsoft.Extensions.FileSystemGlobbing.xml", + "microsoft.extensions.filesystemglobbing.9.0.1.nupkg.sha512", + "microsoft.extensions.filesystemglobbing.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.Extensions.Primitives/9.0.1": { + "sha512": "bHtTesA4lrSGD1ZUaMIx6frU3wyy0vYtTa/hM6gGQu5QNrydObv8T5COiGUWsisflAfmsaFOe9Xvw5NSO99z0g==", + "type": "package", + "path": "microsoft.extensions.primitives/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/Microsoft.Extensions.Primitives.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Primitives.targets", + "lib/net462/Microsoft.Extensions.Primitives.dll", + "lib/net462/Microsoft.Extensions.Primitives.xml", + "lib/net8.0/Microsoft.Extensions.Primitives.dll", + "lib/net8.0/Microsoft.Extensions.Primitives.xml", + "lib/net9.0/Microsoft.Extensions.Primitives.dll", + "lib/net9.0/Microsoft.Extensions.Primitives.xml", + "lib/netstandard2.0/Microsoft.Extensions.Primitives.dll", + "lib/netstandard2.0/Microsoft.Extensions.Primitives.xml", + "microsoft.extensions.primitives.9.0.1.nupkg.sha512", + "microsoft.extensions.primitives.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "Microsoft.IdentityModel.Abstractions/6.35.0": { + "sha512": "xuR8E4Rd96M41CnUSCiOJ2DBh+z+zQSmyrYHdYhD6K4fXBcQGVnRCFQ0efROUYpP+p0zC1BLKr0JRpVuujTZSg==", + "type": "package", + "path": "microsoft.identitymodel.abstractions/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/Microsoft.IdentityModel.Abstractions.dll", + "lib/net45/Microsoft.IdentityModel.Abstractions.xml", + "lib/net461/Microsoft.IdentityModel.Abstractions.dll", + "lib/net461/Microsoft.IdentityModel.Abstractions.xml", + "lib/net462/Microsoft.IdentityModel.Abstractions.dll", + "lib/net462/Microsoft.IdentityModel.Abstractions.xml", + "lib/net472/Microsoft.IdentityModel.Abstractions.dll", + "lib/net472/Microsoft.IdentityModel.Abstractions.xml", + "lib/net6.0/Microsoft.IdentityModel.Abstractions.dll", + "lib/net6.0/Microsoft.IdentityModel.Abstractions.xml", + "lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll", + "lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.xml", + "microsoft.identitymodel.abstractions.6.35.0.nupkg.sha512", + "microsoft.identitymodel.abstractions.nuspec" + ] + }, + "Microsoft.IdentityModel.JsonWebTokens/6.35.0": { + "sha512": "9wxai3hKgZUb4/NjdRKfQd0QJvtXKDlvmGMYACbEC8DFaicMFCFhQFZq9ZET1kJLwZahf2lfY5Gtcpsx8zYzbg==", + "type": "package", + "path": "microsoft.identitymodel.jsonwebtokens/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/Microsoft.IdentityModel.JsonWebTokens.dll", + "lib/net45/Microsoft.IdentityModel.JsonWebTokens.xml", + "lib/net461/Microsoft.IdentityModel.JsonWebTokens.dll", + "lib/net461/Microsoft.IdentityModel.JsonWebTokens.xml", + "lib/net462/Microsoft.IdentityModel.JsonWebTokens.dll", + "lib/net462/Microsoft.IdentityModel.JsonWebTokens.xml", + "lib/net472/Microsoft.IdentityModel.JsonWebTokens.dll", + "lib/net472/Microsoft.IdentityModel.JsonWebTokens.xml", + "lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll", + "lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.xml", + "lib/netstandard2.0/Microsoft.IdentityModel.JsonWebTokens.dll", + "lib/netstandard2.0/Microsoft.IdentityModel.JsonWebTokens.xml", + "microsoft.identitymodel.jsonwebtokens.6.35.0.nupkg.sha512", + "microsoft.identitymodel.jsonwebtokens.nuspec" + ] + }, + "Microsoft.IdentityModel.Logging/6.35.0": { + "sha512": "jePrSfGAmqT81JDCNSY+fxVWoGuJKt9e6eJ+vT7+quVS55nWl//jGjUQn4eFtVKt4rt5dXaleZdHRB9J9AJZ7Q==", + "type": "package", + "path": "microsoft.identitymodel.logging/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/Microsoft.IdentityModel.Logging.dll", + "lib/net45/Microsoft.IdentityModel.Logging.xml", + "lib/net461/Microsoft.IdentityModel.Logging.dll", + "lib/net461/Microsoft.IdentityModel.Logging.xml", + "lib/net462/Microsoft.IdentityModel.Logging.dll", + "lib/net462/Microsoft.IdentityModel.Logging.xml", + "lib/net472/Microsoft.IdentityModel.Logging.dll", + "lib/net472/Microsoft.IdentityModel.Logging.xml", + "lib/net6.0/Microsoft.IdentityModel.Logging.dll", + "lib/net6.0/Microsoft.IdentityModel.Logging.xml", + "lib/netstandard2.0/Microsoft.IdentityModel.Logging.dll", + "lib/netstandard2.0/Microsoft.IdentityModel.Logging.xml", + "microsoft.identitymodel.logging.6.35.0.nupkg.sha512", + "microsoft.identitymodel.logging.nuspec" + ] + }, + "Microsoft.IdentityModel.Protocols/6.35.0": { + "sha512": "BPQhlDzdFvv1PzaUxNSk+VEPwezlDEVADIKmyxubw7IiELK18uJ06RQ9QKKkds30XI+gDu9n8j24XQ8w7fjWcg==", + "type": "package", + "path": "microsoft.identitymodel.protocols/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/Microsoft.IdentityModel.Protocols.dll", + "lib/net45/Microsoft.IdentityModel.Protocols.xml", + "lib/net461/Microsoft.IdentityModel.Protocols.dll", + "lib/net461/Microsoft.IdentityModel.Protocols.xml", + "lib/net462/Microsoft.IdentityModel.Protocols.dll", + "lib/net462/Microsoft.IdentityModel.Protocols.xml", + "lib/net472/Microsoft.IdentityModel.Protocols.dll", + "lib/net472/Microsoft.IdentityModel.Protocols.xml", + "lib/net6.0/Microsoft.IdentityModel.Protocols.dll", + "lib/net6.0/Microsoft.IdentityModel.Protocols.xml", + "lib/netstandard2.0/Microsoft.IdentityModel.Protocols.dll", + "lib/netstandard2.0/Microsoft.IdentityModel.Protocols.xml", + "microsoft.identitymodel.protocols.6.35.0.nupkg.sha512", + "microsoft.identitymodel.protocols.nuspec" + ] + }, + "Microsoft.IdentityModel.Protocols.OpenIdConnect/6.35.0": { + "sha512": "LMtVqnECCCdSmyFoCOxIE5tXQqkOLrvGrL7OxHg41DIm1bpWtaCdGyVcTAfOQpJXvzND9zUKIN/lhngPkYR8vg==", + "type": "package", + "path": "microsoft.identitymodel.protocols.openidconnect/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", + "lib/net45/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", + "lib/net461/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", + "lib/net461/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", + "lib/net462/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", + "lib/net462/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", + "lib/net472/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", + "lib/net472/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", + "lib/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", + "lib/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", + "lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", + "lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.xml", + "microsoft.identitymodel.protocols.openidconnect.6.35.0.nupkg.sha512", + "microsoft.identitymodel.protocols.openidconnect.nuspec" + ] + }, + "Microsoft.IdentityModel.Tokens/6.35.0": { + "sha512": "RN7lvp7s3Boucg1NaNAbqDbxtlLj5Qeb+4uSS1TeK5FSBVM40P4DKaTKChT43sHyKfh7V0zkrMph6DdHvyA4bg==", + "type": "package", + "path": "microsoft.identitymodel.tokens/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/Microsoft.IdentityModel.Tokens.dll", + "lib/net45/Microsoft.IdentityModel.Tokens.xml", + "lib/net461/Microsoft.IdentityModel.Tokens.dll", + "lib/net461/Microsoft.IdentityModel.Tokens.xml", + "lib/net462/Microsoft.IdentityModel.Tokens.dll", + "lib/net462/Microsoft.IdentityModel.Tokens.xml", + "lib/net472/Microsoft.IdentityModel.Tokens.dll", + "lib/net472/Microsoft.IdentityModel.Tokens.xml", + "lib/net6.0/Microsoft.IdentityModel.Tokens.dll", + "lib/net6.0/Microsoft.IdentityModel.Tokens.xml", + "lib/netstandard2.0/Microsoft.IdentityModel.Tokens.dll", + "lib/netstandard2.0/Microsoft.IdentityModel.Tokens.xml", + "microsoft.identitymodel.tokens.6.35.0.nupkg.sha512", + "microsoft.identitymodel.tokens.nuspec" + ] + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "sha512": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "type": "package", + "path": "microsoft.netcore.platforms/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.platforms.1.1.0.nupkg.sha512", + "microsoft.netcore.platforms.nuspec", + "runtime.json" + ] + }, + "Microsoft.NETCore.Targets/1.1.0": { + "sha512": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", + "type": "package", + "path": "microsoft.netcore.targets/1.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "microsoft.netcore.targets.1.1.0.nupkg.sha512", + "microsoft.netcore.targets.nuspec", + "runtime.json" + ] + }, + "Microsoft.OpenApi/1.2.3": { + "sha512": "Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw==", + "type": "package", + "path": "microsoft.openapi/1.2.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net46/Microsoft.OpenApi.dll", + "lib/net46/Microsoft.OpenApi.pdb", + "lib/net46/Microsoft.OpenApi.xml", + "lib/netstandard2.0/Microsoft.OpenApi.dll", + "lib/netstandard2.0/Microsoft.OpenApi.pdb", + "lib/netstandard2.0/Microsoft.OpenApi.xml", + "microsoft.openapi.1.2.3.nupkg.sha512", + "microsoft.openapi.nuspec" + ] + }, + "Newtonsoft.Json/13.0.3": { + "sha512": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", + "type": "package", + "path": "newtonsoft.json/13.0.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.md", + "README.md", + "lib/net20/Newtonsoft.Json.dll", + "lib/net20/Newtonsoft.Json.xml", + "lib/net35/Newtonsoft.Json.dll", + "lib/net35/Newtonsoft.Json.xml", + "lib/net40/Newtonsoft.Json.dll", + "lib/net40/Newtonsoft.Json.xml", + "lib/net45/Newtonsoft.Json.dll", + "lib/net45/Newtonsoft.Json.xml", + "lib/net6.0/Newtonsoft.Json.dll", + "lib/net6.0/Newtonsoft.Json.xml", + "lib/netstandard1.0/Newtonsoft.Json.dll", + "lib/netstandard1.0/Newtonsoft.Json.xml", + "lib/netstandard1.3/Newtonsoft.Json.dll", + "lib/netstandard1.3/Newtonsoft.Json.xml", + "lib/netstandard2.0/Newtonsoft.Json.dll", + "lib/netstandard2.0/Newtonsoft.Json.xml", + "newtonsoft.json.13.0.3.nupkg.sha512", + "newtonsoft.json.nuspec", + "packageIcon.png" + ] + }, + "Swashbuckle.AspNetCore/6.5.0": { + "sha512": "FK05XokgjgwlCI6wCT+D4/abtQkL1X1/B9Oas6uIwHFmYrIO9WUD5aLC9IzMs9GnHfUXOtXZ2S43gN1mhs5+aA==", + "type": "package", + "path": "swashbuckle.aspnetcore/6.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "build/Swashbuckle.AspNetCore.props", + "swashbuckle.aspnetcore.6.5.0.nupkg.sha512", + "swashbuckle.aspnetcore.nuspec" + ] + }, + "Swashbuckle.AspNetCore.Swagger/6.5.0": { + "sha512": "XWmCmqyFmoItXKFsQSwQbEAsjDKcxlNf1l+/Ki42hcb6LjKL8m5Db69OTvz5vLonMSRntYO1XLqz0OP+n3vKnA==", + "type": "package", + "path": "swashbuckle.aspnetcore.swagger/6.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net5.0/Swashbuckle.AspNetCore.Swagger.dll", + "lib/net5.0/Swashbuckle.AspNetCore.Swagger.pdb", + "lib/net5.0/Swashbuckle.AspNetCore.Swagger.xml", + "lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll", + "lib/net6.0/Swashbuckle.AspNetCore.Swagger.pdb", + "lib/net6.0/Swashbuckle.AspNetCore.Swagger.xml", + "lib/net7.0/Swashbuckle.AspNetCore.Swagger.dll", + "lib/net7.0/Swashbuckle.AspNetCore.Swagger.pdb", + "lib/net7.0/Swashbuckle.AspNetCore.Swagger.xml", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.pdb", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.xml", + "lib/netstandard2.0/Swashbuckle.AspNetCore.Swagger.dll", + "lib/netstandard2.0/Swashbuckle.AspNetCore.Swagger.pdb", + "lib/netstandard2.0/Swashbuckle.AspNetCore.Swagger.xml", + "swashbuckle.aspnetcore.swagger.6.5.0.nupkg.sha512", + "swashbuckle.aspnetcore.swagger.nuspec" + ] + }, + "Swashbuckle.AspNetCore.SwaggerGen/6.5.0": { + "sha512": "Y/qW8Qdg9OEs7V013tt+94OdPxbRdbhcEbw4NiwGvf4YBcfhL/y7qp/Mjv/cENsQ2L3NqJ2AOu94weBy/h4KvA==", + "type": "package", + "path": "swashbuckle.aspnetcore.swaggergen/6.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net5.0/Swashbuckle.AspNetCore.SwaggerGen.dll", + "lib/net5.0/Swashbuckle.AspNetCore.SwaggerGen.pdb", + "lib/net5.0/Swashbuckle.AspNetCore.SwaggerGen.xml", + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll", + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.pdb", + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.xml", + "lib/net7.0/Swashbuckle.AspNetCore.SwaggerGen.dll", + "lib/net7.0/Swashbuckle.AspNetCore.SwaggerGen.pdb", + "lib/net7.0/Swashbuckle.AspNetCore.SwaggerGen.xml", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.pdb", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.xml", + "lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerGen.dll", + "lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerGen.pdb", + "lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerGen.xml", + "swashbuckle.aspnetcore.swaggergen.6.5.0.nupkg.sha512", + "swashbuckle.aspnetcore.swaggergen.nuspec" + ] + }, + "Swashbuckle.AspNetCore.SwaggerUI/6.5.0": { + "sha512": "OvbvxX+wL8skxTBttcBsVxdh73Fag4xwqEU2edh4JMn7Ws/xJHnY/JB1e9RoCb6XpDxUF3hD9A0Z1lEUx40Pfw==", + "type": "package", + "path": "swashbuckle.aspnetcore.swaggerui/6.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net5.0/Swashbuckle.AspNetCore.SwaggerUI.dll", + "lib/net5.0/Swashbuckle.AspNetCore.SwaggerUI.pdb", + "lib/net5.0/Swashbuckle.AspNetCore.SwaggerUI.xml", + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll", + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.pdb", + "lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.xml", + "lib/net7.0/Swashbuckle.AspNetCore.SwaggerUI.dll", + "lib/net7.0/Swashbuckle.AspNetCore.SwaggerUI.pdb", + "lib/net7.0/Swashbuckle.AspNetCore.SwaggerUI.xml", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.pdb", + "lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.xml", + "lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.dll", + "lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.pdb", + "lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.xml", + "swashbuckle.aspnetcore.swaggerui.6.5.0.nupkg.sha512", + "swashbuckle.aspnetcore.swaggerui.nuspec" + ] + }, + "System.Buffers/4.5.1": { + "sha512": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==", + "type": "package", + "path": "system.buffers/4.5.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/System.Buffers.dll", + "lib/net461/System.Buffers.xml", + "lib/netcoreapp2.0/_._", + "lib/netstandard1.1/System.Buffers.dll", + "lib/netstandard1.1/System.Buffers.xml", + "lib/netstandard2.0/System.Buffers.dll", + "lib/netstandard2.0/System.Buffers.xml", + "lib/uap10.0.16299/_._", + "ref/net45/System.Buffers.dll", + "ref/net45/System.Buffers.xml", + "ref/netcoreapp2.0/_._", + "ref/netstandard1.1/System.Buffers.dll", + "ref/netstandard1.1/System.Buffers.xml", + "ref/netstandard2.0/System.Buffers.dll", + "ref/netstandard2.0/System.Buffers.xml", + "ref/uap10.0.16299/_._", + "system.buffers.4.5.1.nupkg.sha512", + "system.buffers.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "System.IdentityModel.Tokens.Jwt/6.35.0": { + "sha512": "yxGIQd3BFK7F6S62/7RdZk3C/mfwyVxvh6ngd1VYMBmbJ1YZZA9+Ku6suylVtso0FjI0wbElpJ0d27CdsyLpBQ==", + "type": "package", + "path": "system.identitymodel.tokens.jwt/6.35.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net45/System.IdentityModel.Tokens.Jwt.dll", + "lib/net45/System.IdentityModel.Tokens.Jwt.xml", + "lib/net461/System.IdentityModel.Tokens.Jwt.dll", + "lib/net461/System.IdentityModel.Tokens.Jwt.xml", + "lib/net462/System.IdentityModel.Tokens.Jwt.dll", + "lib/net462/System.IdentityModel.Tokens.Jwt.xml", + "lib/net472/System.IdentityModel.Tokens.Jwt.dll", + "lib/net472/System.IdentityModel.Tokens.Jwt.xml", + "lib/net6.0/System.IdentityModel.Tokens.Jwt.dll", + "lib/net6.0/System.IdentityModel.Tokens.Jwt.xml", + "lib/netstandard2.0/System.IdentityModel.Tokens.Jwt.dll", + "lib/netstandard2.0/System.IdentityModel.Tokens.Jwt.xml", + "system.identitymodel.tokens.jwt.6.35.0.nupkg.sha512", + "system.identitymodel.tokens.jwt.nuspec" + ] + }, + "System.IO.Pipelines/9.0.1": { + "sha512": "uXf5o8eV/gtzDQY4lGROLFMWQvcViKcF8o4Q6KpIOjloAQXrnscQSu6gTxYJMHuNJnh7szIF9AzkaEq+zDLoEg==", + "type": "package", + "path": "system.io.pipelines/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/System.IO.Pipelines.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/System.IO.Pipelines.targets", + "lib/net462/System.IO.Pipelines.dll", + "lib/net462/System.IO.Pipelines.xml", + "lib/net8.0/System.IO.Pipelines.dll", + "lib/net8.0/System.IO.Pipelines.xml", + "lib/net9.0/System.IO.Pipelines.dll", + "lib/net9.0/System.IO.Pipelines.xml", + "lib/netstandard2.0/System.IO.Pipelines.dll", + "lib/netstandard2.0/System.IO.Pipelines.xml", + "system.io.pipelines.9.0.1.nupkg.sha512", + "system.io.pipelines.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "System.Memory/4.5.5": { + "sha512": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", + "type": "package", + "path": "system.memory/4.5.5", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/System.Memory.dll", + "lib/net461/System.Memory.xml", + "lib/netcoreapp2.1/_._", + "lib/netstandard1.1/System.Memory.dll", + "lib/netstandard1.1/System.Memory.xml", + "lib/netstandard2.0/System.Memory.dll", + "lib/netstandard2.0/System.Memory.xml", + "ref/netcoreapp2.1/_._", + "system.memory.4.5.5.nupkg.sha512", + "system.memory.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "System.Runtime/4.3.0": { + "sha512": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "type": "package", + "path": "system.runtime/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.runtime.4.3.0.nupkg.sha512", + "system.runtime.nuspec" + ] + }, + "System.Runtime.CompilerServices.Unsafe/6.0.0": { + "sha512": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==", + "type": "package", + "path": "system.runtime.compilerservices.unsafe/6.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.targets", + "buildTransitive/netcoreapp3.1/_._", + "lib/net461/System.Runtime.CompilerServices.Unsafe.dll", + "lib/net461/System.Runtime.CompilerServices.Unsafe.xml", + "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll", + "lib/net6.0/System.Runtime.CompilerServices.Unsafe.xml", + "lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll", + "lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.xml", + "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll", + "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml", + "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512", + "system.runtime.compilerservices.unsafe.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "System.Security.Cryptography.Cng/4.5.0": { + "sha512": "WG3r7EyjUe9CMPFSs6bty5doUqT+q9pbI80hlNzo2SkPkZ4VTuZkGWjpp77JB8+uaL4DFPRdBsAY+DX3dBK92A==", + "type": "package", + "path": "system.security.cryptography.cng/4.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Cng.dll", + "lib/net461/System.Security.Cryptography.Cng.dll", + "lib/net462/System.Security.Cryptography.Cng.dll", + "lib/net47/System.Security.Cryptography.Cng.dll", + "lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll", + "lib/netstandard1.3/System.Security.Cryptography.Cng.dll", + "lib/netstandard1.4/System.Security.Cryptography.Cng.dll", + "lib/netstandard1.6/System.Security.Cryptography.Cng.dll", + "lib/netstandard2.0/System.Security.Cryptography.Cng.dll", + "lib/uap10.0.16299/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Cng.dll", + "ref/net461/System.Security.Cryptography.Cng.dll", + "ref/net461/System.Security.Cryptography.Cng.xml", + "ref/net462/System.Security.Cryptography.Cng.dll", + "ref/net462/System.Security.Cryptography.Cng.xml", + "ref/net47/System.Security.Cryptography.Cng.dll", + "ref/net47/System.Security.Cryptography.Cng.xml", + "ref/netcoreapp2.0/System.Security.Cryptography.Cng.dll", + "ref/netcoreapp2.0/System.Security.Cryptography.Cng.xml", + "ref/netcoreapp2.1/System.Security.Cryptography.Cng.dll", + "ref/netcoreapp2.1/System.Security.Cryptography.Cng.xml", + "ref/netstandard1.3/System.Security.Cryptography.Cng.dll", + "ref/netstandard1.4/System.Security.Cryptography.Cng.dll", + "ref/netstandard1.6/System.Security.Cryptography.Cng.dll", + "ref/netstandard2.0/System.Security.Cryptography.Cng.dll", + "ref/netstandard2.0/System.Security.Cryptography.Cng.xml", + "ref/uap10.0.16299/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/win/lib/net46/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/net461/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/net462/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/net47/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/netcoreapp2.0/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/netstandard1.4/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/uap10.0.16299/_._", + "system.security.cryptography.cng.4.5.0.nupkg.sha512", + "system.security.cryptography.cng.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "System.Text.Encoding/4.3.0": { + "sha512": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "type": "package", + "path": "system.text.encoding/4.3.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Text.Encoding.dll", + "ref/netcore50/System.Text.Encoding.xml", + "ref/netcore50/de/System.Text.Encoding.xml", + "ref/netcore50/es/System.Text.Encoding.xml", + "ref/netcore50/fr/System.Text.Encoding.xml", + "ref/netcore50/it/System.Text.Encoding.xml", + "ref/netcore50/ja/System.Text.Encoding.xml", + "ref/netcore50/ko/System.Text.Encoding.xml", + "ref/netcore50/ru/System.Text.Encoding.xml", + "ref/netcore50/zh-hans/System.Text.Encoding.xml", + "ref/netcore50/zh-hant/System.Text.Encoding.xml", + "ref/netstandard1.0/System.Text.Encoding.dll", + "ref/netstandard1.0/System.Text.Encoding.xml", + "ref/netstandard1.0/de/System.Text.Encoding.xml", + "ref/netstandard1.0/es/System.Text.Encoding.xml", + "ref/netstandard1.0/fr/System.Text.Encoding.xml", + "ref/netstandard1.0/it/System.Text.Encoding.xml", + "ref/netstandard1.0/ja/System.Text.Encoding.xml", + "ref/netstandard1.0/ko/System.Text.Encoding.xml", + "ref/netstandard1.0/ru/System.Text.Encoding.xml", + "ref/netstandard1.0/zh-hans/System.Text.Encoding.xml", + "ref/netstandard1.0/zh-hant/System.Text.Encoding.xml", + "ref/netstandard1.3/System.Text.Encoding.dll", + "ref/netstandard1.3/System.Text.Encoding.xml", + "ref/netstandard1.3/de/System.Text.Encoding.xml", + "ref/netstandard1.3/es/System.Text.Encoding.xml", + "ref/netstandard1.3/fr/System.Text.Encoding.xml", + "ref/netstandard1.3/it/System.Text.Encoding.xml", + "ref/netstandard1.3/ja/System.Text.Encoding.xml", + "ref/netstandard1.3/ko/System.Text.Encoding.xml", + "ref/netstandard1.3/ru/System.Text.Encoding.xml", + "ref/netstandard1.3/zh-hans/System.Text.Encoding.xml", + "ref/netstandard1.3/zh-hant/System.Text.Encoding.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.text.encoding.4.3.0.nupkg.sha512", + "system.text.encoding.nuspec" + ] + }, + "System.Text.Encodings.Web/9.0.1": { + "sha512": "XkspqduP2t1e1x2vBUAD/xZ5ZDvmywuUwsmB93MvyQLospJfqtX0GsR/kU0vUL2h4kmvf777z3txV2W4NrQ9Qg==", + "type": "package", + "path": "system.text.encodings.web/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "buildTransitive/net461/System.Text.Encodings.Web.targets", + "buildTransitive/net462/_._", + "buildTransitive/net8.0/_._", + "buildTransitive/netcoreapp2.0/System.Text.Encodings.Web.targets", + "lib/net462/System.Text.Encodings.Web.dll", + "lib/net462/System.Text.Encodings.Web.xml", + "lib/net8.0/System.Text.Encodings.Web.dll", + "lib/net8.0/System.Text.Encodings.Web.xml", + "lib/net9.0/System.Text.Encodings.Web.dll", + "lib/net9.0/System.Text.Encodings.Web.xml", + "lib/netstandard2.0/System.Text.Encodings.Web.dll", + "lib/netstandard2.0/System.Text.Encodings.Web.xml", + "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll", + "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.xml", + "runtimes/browser/lib/net9.0/System.Text.Encodings.Web.dll", + "runtimes/browser/lib/net9.0/System.Text.Encodings.Web.xml", + "system.text.encodings.web.9.0.1.nupkg.sha512", + "system.text.encodings.web.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "System.Text.Json/9.0.1": { + "sha512": "eqWHDZqYPv1PvuvoIIx5pF74plL3iEOZOl/0kQP+Y0TEbtgNnM2W6k8h8EPYs+LTJZsXuWa92n5W5sHTWvE3VA==", + "type": "package", + "path": "system.text.json/9.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "PACKAGE.md", + "THIRD-PARTY-NOTICES.TXT", + "analyzers/dotnet/roslyn3.11/cs/System.Text.Json.SourceGeneration.dll", + "analyzers/dotnet/roslyn3.11/cs/cs/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/de/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/es/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/fr/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/it/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/ja/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/ko/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/pl/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/ru/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/tr/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn3.11/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/System.Text.Json.SourceGeneration.dll", + "analyzers/dotnet/roslyn4.0/cs/cs/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/de/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/es/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/fr/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/it/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/ja/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/ko/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/pl/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/ru/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/tr/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.0/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/System.Text.Json.SourceGeneration.dll", + "analyzers/dotnet/roslyn4.4/cs/cs/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/de/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/es/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/fr/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/it/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/ja/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/ko/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/pl/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/ru/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/tr/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll", + "analyzers/dotnet/roslyn4.4/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll", + "buildTransitive/net461/System.Text.Json.targets", + "buildTransitive/net462/System.Text.Json.targets", + "buildTransitive/net8.0/System.Text.Json.targets", + "buildTransitive/netcoreapp2.0/System.Text.Json.targets", + "buildTransitive/netstandard2.0/System.Text.Json.targets", + "lib/net462/System.Text.Json.dll", + "lib/net462/System.Text.Json.xml", + "lib/net8.0/System.Text.Json.dll", + "lib/net8.0/System.Text.Json.xml", + "lib/net9.0/System.Text.Json.dll", + "lib/net9.0/System.Text.Json.xml", + "lib/netstandard2.0/System.Text.Json.dll", + "lib/netstandard2.0/System.Text.Json.xml", + "system.text.json.9.0.1.nupkg.sha512", + "system.text.json.nuspec", + "useSharedDesignerContext.txt" + ] + }, + "System.Threading.Tasks.Extensions/4.5.4": { + "sha512": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", + "type": "package", + "path": "system.threading.tasks.extensions/4.5.4", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net461/System.Threading.Tasks.Extensions.dll", + "lib/net461/System.Threading.Tasks.Extensions.xml", + "lib/netcoreapp2.1/_._", + "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll", + "lib/netstandard1.0/System.Threading.Tasks.Extensions.xml", + "lib/netstandard2.0/System.Threading.Tasks.Extensions.dll", + "lib/netstandard2.0/System.Threading.Tasks.Extensions.xml", + "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll", + "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.xml", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/netcoreapp2.1/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.threading.tasks.extensions.4.5.4.nupkg.sha512", + "system.threading.tasks.extensions.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Gatedge.K3Cloud.Utils/1.0.0": { + "type": "project", + "path": "../Gatedge.K3Cloud.Utils/Gatedge.K3Cloud.Utils.csproj", + "msbuildProject": "../Gatedge.K3Cloud.Utils/Gatedge.K3Cloud.Utils.csproj" + } + }, + "projectFileDependencyGroups": { + "net6.0": [ + "Gatedge.K3Cloud.Utils >= 1.0.0", + "Microsoft.AspNetCore.Authentication.JwtBearer >= 6.0.36", + "Microsoft.Extensions.Configuration >= 9.0.1", + "Microsoft.Extensions.Configuration.FileExtensions >= 9.0.1", + "Microsoft.Extensions.Configuration.Json >= 9.0.1", + "Newtonsoft.Json >= 13.0.3", + "Swashbuckle.AspNetCore >= 6.5.0" + ] + }, + "packageFolders": { + "C:\\Users\\海\\.nuget\\packages\\": {}, + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj", + "projectName": "Gatedge.ScanCode", + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj", + "packagesPath": "C:\\Users\\海\\.nuget\\packages\\", + "outputPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" + ], + "configFilePaths": [ + "C:\\Users\\海\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": { + "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj": { + "projectPath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.K3Cloud.Utils\\Gatedge.K3Cloud.Utils.csproj" + } + } + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "dependencies": { + "Microsoft.AspNetCore.Authentication.JwtBearer": { + "target": "Package", + "version": "[6.0.36, )" + }, + "Microsoft.Extensions.Configuration": { + "target": "Package", + "version": "[9.0.1, )" + }, + "Microsoft.Extensions.Configuration.FileExtensions": { + "target": "Package", + "version": "[9.0.1, )" + }, + "Microsoft.Extensions.Configuration.Json": { + "target": "Package", + "version": "[9.0.1, )" + }, + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.3, )" + }, + "Swashbuckle.AspNetCore": { + "target": "Package", + "version": "[6.5.0, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.36, 6.0.36]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[6.0.36, 6.0.36]" + } + ], + "frameworkReferences": { + "Microsoft.AspNetCore.App": { + "privateAssets": "none" + }, + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/Gatedge.ScanCode/obj/project.nuget.cache b/Gatedge.ScanCode/obj/project.nuget.cache new file mode 100644 index 0000000..6cbdecd --- /dev/null +++ b/Gatedge.ScanCode/obj/project.nuget.cache @@ -0,0 +1,49 @@ +{ + "version": 2, + "dgSpecHash": "GoySDQ+sHIU=", + "success": true, + "projectFilePath": "D:\\格致金蝶\\澳门新东方置地\\Gatedge.NewOrientLandMark.BOS\\Gatedge.ScanCode\\Gatedge.ScanCode.csproj", + "expectedPackageFiles": [ + "C:\\Users\\海\\.nuget\\packages\\microsoft.aspnetcore.authentication.jwtbearer\\6.0.36\\microsoft.aspnetcore.authentication.jwtbearer.6.0.36.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\9.0.1\\microsoft.bcl.asyncinterfaces.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.csharp\\4.5.0\\microsoft.csharp.4.5.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.apidescription.server\\6.0.5\\microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.configuration\\9.0.1\\microsoft.extensions.configuration.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\9.0.1\\microsoft.extensions.configuration.abstractions.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\9.0.1\\microsoft.extensions.configuration.fileextensions.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.configuration.json\\9.0.1\\microsoft.extensions.configuration.json.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\9.0.1\\microsoft.extensions.fileproviders.abstractions.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\9.0.1\\microsoft.extensions.fileproviders.physical.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\9.0.1\\microsoft.extensions.filesystemglobbing.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.extensions.primitives\\9.0.1\\microsoft.extensions.primitives.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.identitymodel.abstractions\\6.35.0\\microsoft.identitymodel.abstractions.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\6.35.0\\microsoft.identitymodel.jsonwebtokens.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.identitymodel.logging\\6.35.0\\microsoft.identitymodel.logging.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.identitymodel.protocols\\6.35.0\\microsoft.identitymodel.protocols.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.identitymodel.protocols.openidconnect\\6.35.0\\microsoft.identitymodel.protocols.openidconnect.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.identitymodel.tokens\\6.35.0\\microsoft.identitymodel.tokens.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.netcore.platforms\\1.1.0\\microsoft.netcore.platforms.1.1.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.openapi\\1.2.3\\microsoft.openapi.1.2.3.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\swashbuckle.aspnetcore\\6.5.0\\swashbuckle.aspnetcore.6.5.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\swashbuckle.aspnetcore.swagger\\6.5.0\\swashbuckle.aspnetcore.swagger.6.5.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\swashbuckle.aspnetcore.swaggergen\\6.5.0\\swashbuckle.aspnetcore.swaggergen.6.5.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\swashbuckle.aspnetcore.swaggerui\\6.5.0\\swashbuckle.aspnetcore.swaggerui.6.5.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.identitymodel.tokens.jwt\\6.35.0\\system.identitymodel.tokens.jwt.6.35.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.io.pipelines\\9.0.1\\system.io.pipelines.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.security.cryptography.cng\\4.5.0\\system.security.cryptography.cng.4.5.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.text.encodings.web\\9.0.1\\system.text.encodings.web.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.text.json\\9.0.1\\system.text.json.9.0.1.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.4\\system.threading.tasks.extensions.4.5.4.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\6.0.36\\microsoft.windowsdesktop.app.ref.6.0.36.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.netcore.app.ref\\6.0.36\\microsoft.netcore.app.ref.6.0.36.nupkg.sha512", + "C:\\Users\\海\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\6.0.36\\microsoft.aspnetcore.app.ref.6.0.36.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file diff --git a/Library/Kingdee.BOS.App.Core.dll b/Library/Kingdee.BOS.App.Core.dll new file mode 100644 index 0000000..8faa445 Binary files /dev/null and b/Library/Kingdee.BOS.App.Core.dll differ diff --git a/Library/Kingdee.BOS.App.dll b/Library/Kingdee.BOS.App.dll new file mode 100644 index 0000000..b1467d2 Binary files /dev/null and b/Library/Kingdee.BOS.App.dll differ diff --git a/Library/Kingdee.BOS.Business.Bill.dll b/Library/Kingdee.BOS.Business.Bill.dll new file mode 100644 index 0000000..aaa3e24 Binary files /dev/null and b/Library/Kingdee.BOS.Business.Bill.dll differ diff --git a/Library/Kingdee.BOS.Contracts.dll b/Library/Kingdee.BOS.Contracts.dll new file mode 100644 index 0000000..2da2dc6 Binary files /dev/null and b/Library/Kingdee.BOS.Contracts.dll differ diff --git a/Library/Kingdee.BOS.Core.dll b/Library/Kingdee.BOS.Core.dll new file mode 100644 index 0000000..cedd95a Binary files /dev/null and b/Library/Kingdee.BOS.Core.dll differ diff --git a/Library/Kingdee.BOS.DataEntity.dll b/Library/Kingdee.BOS.DataEntity.dll new file mode 100644 index 0000000..d0baa93 Binary files /dev/null and b/Library/Kingdee.BOS.DataEntity.dll differ diff --git a/Library/Kingdee.BOS.Excel.dll b/Library/Kingdee.BOS.Excel.dll new file mode 100644 index 0000000..fb162ce Binary files /dev/null and b/Library/Kingdee.BOS.Excel.dll differ diff --git a/Library/Kingdee.BOS.FileServer.Core.dll b/Library/Kingdee.BOS.FileServer.Core.dll new file mode 100644 index 0000000..e57dae0 Binary files /dev/null and b/Library/Kingdee.BOS.FileServer.Core.dll differ diff --git a/Library/Kingdee.BOS.FileServer.ProxyService.dll b/Library/Kingdee.BOS.FileServer.ProxyService.dll new file mode 100644 index 0000000..6e9e515 Binary files /dev/null and b/Library/Kingdee.BOS.FileServer.ProxyService.dll differ diff --git a/Library/Kingdee.BOS.ServiceHelper.dll b/Library/Kingdee.BOS.ServiceHelper.dll new file mode 100644 index 0000000..9240855 Binary files /dev/null and b/Library/Kingdee.BOS.ServiceHelper.dll differ diff --git a/Library/Kingdee.BOS.VerificationHelper.dll b/Library/Kingdee.BOS.VerificationHelper.dll new file mode 100644 index 0000000..4160c23 Binary files /dev/null and b/Library/Kingdee.BOS.VerificationHelper.dll differ diff --git a/Library/Kingdee.BOS.Web.HTML.Core.dll b/Library/Kingdee.BOS.Web.HTML.Core.dll new file mode 100644 index 0000000..1c37225 Binary files /dev/null and b/Library/Kingdee.BOS.Web.HTML.Core.dll differ diff --git a/Library/Kingdee.BOS.Web.HTML.dll b/Library/Kingdee.BOS.Web.HTML.dll new file mode 100644 index 0000000..37a8a8a Binary files /dev/null and b/Library/Kingdee.BOS.Web.HTML.dll differ diff --git a/Library/Kingdee.BOS.Web.dll b/Library/Kingdee.BOS.Web.dll new file mode 100644 index 0000000..ae56477 Binary files /dev/null and b/Library/Kingdee.BOS.Web.dll differ diff --git a/Library/Kingdee.BOS.WebApi.FormService.dll b/Library/Kingdee.BOS.WebApi.FormService.dll new file mode 100644 index 0000000..5789fd3 Binary files /dev/null and b/Library/Kingdee.BOS.WebApi.FormService.dll differ diff --git a/Library/Kingdee.BOS.dll b/Library/Kingdee.BOS.dll new file mode 100644 index 0000000..0b9ac56 Binary files /dev/null and b/Library/Kingdee.BOS.dll differ diff --git a/Library/Kingdee.CDP.WebApi.SDK.dll b/Library/Kingdee.CDP.WebApi.SDK.dll new file mode 100644 index 0000000..4d68c10 Binary files /dev/null and b/Library/Kingdee.CDP.WebApi.SDK.dll differ diff --git a/Library/Kingdee.K3.BD.BarCode.App.Core.dll b/Library/Kingdee.K3.BD.BarCode.App.Core.dll new file mode 100644 index 0000000..c139344 Binary files /dev/null and b/Library/Kingdee.K3.BD.BarCode.App.Core.dll differ diff --git a/Library/Kingdee.K3.BD.BarCode.App.dll b/Library/Kingdee.K3.BD.BarCode.App.dll new file mode 100644 index 0000000..60743b5 Binary files /dev/null and b/Library/Kingdee.K3.BD.BarCode.App.dll differ diff --git a/Library/Kingdee.K3.BD.BarCode.Business.PlugIn.dll b/Library/Kingdee.K3.BD.BarCode.Business.PlugIn.dll new file mode 100644 index 0000000..389bf68 Binary files /dev/null and b/Library/Kingdee.K3.BD.BarCode.Business.PlugIn.dll differ diff --git a/Library/Kingdee.K3.BD.BarCode.Core.dll b/Library/Kingdee.K3.BD.BarCode.Core.dll new file mode 100644 index 0000000..3254234 Binary files /dev/null and b/Library/Kingdee.K3.BD.BarCode.Core.dll differ diff --git a/Library/Kingdee.K3.BD.BarCode.ServiceHelper.dll b/Library/Kingdee.K3.BD.BarCode.ServiceHelper.dll new file mode 100644 index 0000000..09f94a8 Binary files /dev/null and b/Library/Kingdee.K3.BD.BarCode.ServiceHelper.dll differ diff --git a/Library/Kingdee.K3.BD.Contracts.dll b/Library/Kingdee.K3.BD.Contracts.dll new file mode 100644 index 0000000..89ab95f Binary files /dev/null and b/Library/Kingdee.K3.BD.Contracts.dll differ diff --git a/Library/Kingdee.K3.BD.NewCode.Core.dll b/Library/Kingdee.K3.BD.NewCode.Core.dll new file mode 100644 index 0000000..47cedbe Binary files /dev/null and b/Library/Kingdee.K3.BD.NewCode.Core.dll differ diff --git a/Library/Kingdee.K3.BD.NewCode.Extension.dll b/Library/Kingdee.K3.BD.NewCode.Extension.dll new file mode 100644 index 0000000..e6196df Binary files /dev/null and b/Library/Kingdee.K3.BD.NewCode.Extension.dll differ diff --git a/Library/Kingdee.K3.BD.ServiceHelper.dll b/Library/Kingdee.K3.BD.ServiceHelper.dll new file mode 100644 index 0000000..7bb294d Binary files /dev/null and b/Library/Kingdee.K3.BD.ServiceHelper.dll differ diff --git a/Library/Kingdee.K3.Core.dll b/Library/Kingdee.K3.Core.dll new file mode 100644 index 0000000..4ec6a58 Binary files /dev/null and b/Library/Kingdee.K3.Core.dll differ diff --git a/Library/Kingdee.K3.FIN.Business.PlugIn.dll b/Library/Kingdee.K3.FIN.Business.PlugIn.dll new file mode 100644 index 0000000..475189f Binary files /dev/null and b/Library/Kingdee.K3.FIN.Business.PlugIn.dll differ diff --git a/Library/Kingdee.K3.FIN.Core.dll b/Library/Kingdee.K3.FIN.Core.dll new file mode 100644 index 0000000..ab998e9 Binary files /dev/null and b/Library/Kingdee.K3.FIN.Core.dll differ diff --git a/Library/Kingdee.K3.FIN.HS.Business.PlugIn.dll b/Library/Kingdee.K3.FIN.HS.Business.PlugIn.dll new file mode 100644 index 0000000..30800be Binary files /dev/null and b/Library/Kingdee.K3.FIN.HS.Business.PlugIn.dll differ diff --git a/Library/Kingdee.K3.FIN.HS.Common.BusinessEntity.dll b/Library/Kingdee.K3.FIN.HS.Common.BusinessEntity.dll new file mode 100644 index 0000000..8c32801 Binary files /dev/null and b/Library/Kingdee.K3.FIN.HS.Common.BusinessEntity.dll differ diff --git a/Library/Kingdee.K3.FIN.HS.Contracts.dll b/Library/Kingdee.K3.FIN.HS.Contracts.dll new file mode 100644 index 0000000..0840184 Binary files /dev/null and b/Library/Kingdee.K3.FIN.HS.Contracts.dll differ diff --git a/Library/Kingdee.K3.FIN.HS.ServiceHelper.dll b/Library/Kingdee.K3.FIN.HS.ServiceHelper.dll new file mode 100644 index 0000000..913d2da Binary files /dev/null and b/Library/Kingdee.K3.FIN.HS.ServiceHelper.dll differ diff --git a/Library/Kingdee.K3.FIN.ServiceHelper.dll b/Library/Kingdee.K3.FIN.ServiceHelper.dll new file mode 100644 index 0000000..804e923 Binary files /dev/null and b/Library/Kingdee.K3.FIN.ServiceHelper.dll differ diff --git a/Library/Kingdee.K3.MFG.App.dll b/Library/Kingdee.K3.MFG.App.dll new file mode 100644 index 0000000..5dbf7d2 Binary files /dev/null and b/Library/Kingdee.K3.MFG.App.dll differ diff --git a/Library/Kingdee.K3.MFG.BusinessCommon.dll b/Library/Kingdee.K3.MFG.BusinessCommon.dll new file mode 100644 index 0000000..34bb853 Binary files /dev/null and b/Library/Kingdee.K3.MFG.BusinessCommon.dll differ diff --git a/Library/Kingdee.K3.MFG.Contracts.dll b/Library/Kingdee.K3.MFG.Contracts.dll new file mode 100644 index 0000000..ddfc290 Binary files /dev/null and b/Library/Kingdee.K3.MFG.Contracts.dll differ diff --git a/Library/Kingdee.K3.MFG.PLN.App.Core.dll b/Library/Kingdee.K3.MFG.PLN.App.Core.dll new file mode 100644 index 0000000..0d741aa Binary files /dev/null and b/Library/Kingdee.K3.MFG.PLN.App.Core.dll differ diff --git a/Library/Kingdee.K3.MFG.PLN.App.MrpModel.dll b/Library/Kingdee.K3.MFG.PLN.App.MrpModel.dll new file mode 100644 index 0000000..54013da Binary files /dev/null and b/Library/Kingdee.K3.MFG.PLN.App.MrpModel.dll differ diff --git a/Library/Kingdee.K3.MFG.PLN.Business.PlugIn.dll b/Library/Kingdee.K3.MFG.PLN.Business.PlugIn.dll new file mode 100644 index 0000000..f5f5d9d Binary files /dev/null and b/Library/Kingdee.K3.MFG.PLN.Business.PlugIn.dll differ diff --git a/Library/Kingdee.K3.MFG.PLN.Report.PlugIn.dll b/Library/Kingdee.K3.MFG.PLN.Report.PlugIn.dll new file mode 100644 index 0000000..e9789eb Binary files /dev/null and b/Library/Kingdee.K3.MFG.PLN.Report.PlugIn.dll differ diff --git a/Library/Kingdee.K3.MFG.ServiceHelper.dll b/Library/Kingdee.K3.MFG.ServiceHelper.dll new file mode 100644 index 0000000..75c9af8 Binary files /dev/null and b/Library/Kingdee.K3.MFG.ServiceHelper.dll differ diff --git a/Library/Kingdee.K3.SCM.App.Core.dll b/Library/Kingdee.K3.SCM.App.Core.dll new file mode 100644 index 0000000..05c1f4b Binary files /dev/null and b/Library/Kingdee.K3.SCM.App.Core.dll differ diff --git a/Library/Kingdee.K3.SCM.Common.BusinessEntity.dll b/Library/Kingdee.K3.SCM.Common.BusinessEntity.dll new file mode 100644 index 0000000..eff5194 Binary files /dev/null and b/Library/Kingdee.K3.SCM.Common.BusinessEntity.dll differ diff --git a/Library/Kingdee.K3.SCM.ServiceHelper.dll b/Library/Kingdee.K3.SCM.ServiceHelper.dll new file mode 100644 index 0000000..a225bf9 Binary files /dev/null and b/Library/Kingdee.K3.SCM.ServiceHelper.dll differ diff --git a/Library/Newtonsoft.Json.dll b/Library/Newtonsoft.Json.dll new file mode 100644 index 0000000..d593ed6 Binary files /dev/null and b/Library/Newtonsoft.Json.dll differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..623d426 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Gatedge.HuiWei.BOS.BarCode +#### 格致软件&汇威条码项目