diff --git a/BBWYB.Client/GlobalContext.cs b/BBWYB.Client/GlobalContext.cs index dbe2462..d3a13bb 100644 --- a/BBWYB.Client/GlobalContext.cs +++ b/BBWYB.Client/GlobalContext.cs @@ -20,7 +20,7 @@ namespace BBWYB.Client { public GlobalContext() { - BBWYBApiVersion = "10023"; + BBWYBApiVersion = "10024"; } private User user; @@ -52,7 +52,7 @@ namespace BBWYB.Client return JsonConvert.SerializeObject(User); } - public string GetBBWYBApiVersion() + public string GetClientApiVersion() { return BBWYBApiVersion; } diff --git a/BBWYB.Client/Models/Enums.cs b/BBWYB.Client/Models/Enums.cs index 2b89113..4786cd3 100644 --- a/BBWYB.Client/Models/Enums.cs +++ b/BBWYB.Client/Models/Enums.cs @@ -81,21 +81,41 @@ 银行卡转账 = 6 } + /// - /// 订单状态 + /// 订单状态 + /// 待付款 = 0 + /// 等待采购 = 1, 部分采购 = 110 + /// 待发货 = 2, 部分发货 = 120 + /// 待收货 = 3, 部分收货 = 130 + /// 已完成 = 4 + /// 锁定 = 5 + /// 已取消 = 6 + /// 暂停 = 7 + /// 已退款 = 8 + /// Unknow = 100 + /// 打包中 = 140 + /// 待完结 = 150 /// public enum OrderState { 待付款 = 0, 等待采购 = 1, - 待出库 = 2, + 部分采购 = 110, + 待发货 = 2, + 部分发货 = 120, 待收货 = 3, + 部分收货 = 130, 已完成 = 4, 锁定 = 5, 已取消 = 6, 暂停 = 7, 已退款 = 8, - 待配置 = 101, + Unknow = 100, + 打包中 = 140, + 待完结 = 150 + + //待配置 = 101, } /// diff --git a/BBWYB.Client/Views/Order/OrderList.xaml b/BBWYB.Client/Views/Order/OrderList.xaml index 7f4a714..5756a5a 100644 --- a/BBWYB.Client/Views/Order/OrderList.xaml +++ b/BBWYB.Client/Views/Order/OrderList.xaml @@ -189,12 +189,12 @@ + Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待发货:#8080FF:#F2F2F2}" + Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待发货:White:#4A4A4A}" + Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.待发货}"> - + diff --git a/BBWYB.Client/Views/WebB/WebB.xaml.cs b/BBWYB.Client/Views/WebB/WebB.xaml.cs index ad34426..de04809 100644 --- a/BBWYB.Client/Views/WebB/WebB.xaml.cs +++ b/BBWYB.Client/Views/WebB/WebB.xaml.cs @@ -52,7 +52,6 @@ namespace BBWYB.Client.Views.WebB //w2m.wb2.Dispose(); w2m.Close(); WeakReferenceMessenger.Default.UnregisterAll(this); - } private void WebB_Loaded(object sender, System.Windows.RoutedEventArgs e) @@ -67,15 +66,15 @@ namespace BBWYB.Client.Views.WebB } #if DEBUG - var url = "http://192.168.1.2:8080"; + var url = "http://192.168.1.8:8080"; //var url = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "s.html"); #else - var url = "http://qtbbwy.qiyue666.com"; + var url = "http://qtbbwy.qiyue666.com"; #endif //var url = "http://qtbbwy.qiyue666.com"; w2m.CoreWebView2InitializationCompleted = (e) => { - w2m.wb2.CoreWebView2.AddHostObjectToScript("qtbbwybContext", this.globalContext); + w2m.wb2.CoreWebView2.AddHostObjectToScript("webContext", this.globalContext); isNavigated = true; w2m.wb2.CoreWebView2.Navigate(url); }; diff --git a/BBWYB.Server.API/Controllers/DataRepairController.cs b/BBWYB.Server.API/Controllers/DataRepairController.cs new file mode 100644 index 0000000..4581b91 --- /dev/null +++ b/BBWYB.Server.API/Controllers/DataRepairController.cs @@ -0,0 +1,34 @@ +using BBWYB.Server.Business; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace BBWYB.Server.API.Controllers +{ + + public class DataRepairController : BaseApiController + { + private DataRepairBusiness dataRepairBusiness; + + public DataRepairController(IHttpContextAccessor httpContextAccessor, DataRepairBusiness dataRepairBusiness) : base(httpContextAccessor) + { + this.dataRepairBusiness = dataRepairBusiness; + } + + [HttpPost] + public void RepairPurchaseExpressOrder() + { + dataRepairBusiness.RepairPurchaseExpressOrder(); + } + + /// + /// 手动订阅快递100 + /// + /// + /// + [HttpPost("{waybillNo}/{targetCompanyCode}")] + public void SubscribeKD100([FromRoute] string waybillNo, [FromRoute] string targetCompanyCode) + { + dataRepairBusiness.SubscribeKD100(waybillNo, targetCompanyCode); + } + } +} diff --git a/BBWYB.Server.API/Controllers/OrderController.cs b/BBWYB.Server.API/Controllers/OrderController.cs index 56b969f..f9f30d6 100644 --- a/BBWYB.Server.API/Controllers/OrderController.cs +++ b/BBWYB.Server.API/Controllers/OrderController.cs @@ -30,15 +30,15 @@ namespace BBWYB.Server.API.Controllers - /// - /// 出库 - /// - /// - [HttpPost] - public void OutStock([FromBody] OutStockRequest request) - { - orderBusiness.OutStock(request); - } + ///// + ///// 出库 + ///// + ///// + //[HttpPost] + //public void OutStock([FromBody] OutStockRequest request) + //{ + // orderBusiness.OutStock(request); + //} /// /// 取消订单 diff --git a/BBWYB.Server.API/Controllers/PurchaseOrderController.cs b/BBWYB.Server.API/Controllers/PurchaseOrderController.cs index 86a9171..a42def9 100644 --- a/BBWYB.Server.API/Controllers/PurchaseOrderController.cs +++ b/BBWYB.Server.API/Controllers/PurchaseOrderController.cs @@ -1,4 +1,6 @@ -using BBWYB.Server.Business; +using BBWYB.Common.Models; +using BBWYB.Server.API.Filters; +using BBWYB.Server.Business; using BBWYB.Server.Model.Dto; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; @@ -58,6 +60,27 @@ namespace BBWYB.Server.API.Controllers purchaseOrderBusiness.AssociatePurchaseOrder(request); } + /// + /// 预览关联采购单 (自动匹配订单sku与采购金额) (不支持关联预览的采购平台将返回null) + /// + /// + /// + [HttpPost] + public AssociationPurchaseOrderResponse PreviewAssocationPurchaseOrder([FromBody] AssocationPurchaseOrderPreviewRequest request) + { + return purchaseOrderBusiness.PreviewAssocationPurchaseOrder(request); + } + + /// + /// 修改采购快递单 + /// + /// + [HttpPost] + public void EditPurchaseExpressOrder([FromBody] EditPurchaseExpressOrderRequest request) + { + purchaseOrderBusiness.EditPurchaseExpressOrder(request); + } + /// /// 设置历史采购单 /// @@ -73,9 +96,30 @@ namespace BBWYB.Server.API.Controllers /// /// [HttpPost] - public void SignPurchaseOrder([FromBody]SignPurchaseOrderRequest request) + public void SignPurchaseOrder([FromBody] SignPurchaseOrderRequest request) { - purchaseOrderBusiness.SignPurchaseOrder(request); + throw new BusinessException("SignPurchaseOrder接口已经停用"); + //purchaseOrderBusiness.SignPurchaseOrder(request); + } + + /// + /// 手动发货 + /// + /// + [HttpPost] + public void ManualDelivery([FromBody] ManualDeliveryRequest request) + { + purchaseOrderBusiness.ManualDelivery(request); + } + + /// + /// 手动收货 + /// + /// + [HttpPost] + public void ManualSign([FromBody] ManualSignRequest request) + { + purchaseOrderBusiness.ManualSign(request); } /// @@ -89,5 +133,26 @@ namespace BBWYB.Server.API.Controllers { purchaseOrderBusiness.CallbackFrom1688(message); } + + [Consumes("application/x-www-form-urlencoded")] + [HttpPost] + [AllowAnonymous] + public IActionResult KuaiDi100Publish([FromForm] string sign, [FromForm] string param) + { + #region 去掉本次请求的DTO格式 + var filters = ControllerContext.ActionDescriptor.FilterDescriptors; + var filterToRemove = filters.FirstOrDefault(f => f.Filter.GetType() == typeof(ResultFilter)); + if (filterToRemove != null) + filters.Remove(filterToRemove); + #endregion + + purchaseOrderBusiness.KuaiDi100Publish(param); + return new JsonResult(new + { + result = true, + returnCode = "200", + message = "成功" + }); + } } } diff --git a/BBWYB.Server.API/Controllers/VenderController.cs b/BBWYB.Server.API/Controllers/VenderController.cs index 42b492c..9a75a5c 100644 --- a/BBWYB.Server.API/Controllers/VenderController.cs +++ b/BBWYB.Server.API/Controllers/VenderController.cs @@ -37,5 +37,15 @@ namespace BBWYB.Server.API.Controllers { return venderBusiness.GetExpressCompanyList(request); } + + /// + /// 获取快递100物流公司列表 + /// + /// + [HttpPost] + public IList GetKuaiDi100ExpressCompanyList([FromBody]KuaiDi100ExpressSearchRequest request) + { + return venderBusiness.GetKuaiDi100ExpressCompanyList(request); + } } } diff --git a/BBWYB.Server.API/Program.cs b/BBWYB.Server.API/Program.cs index 94be203..7cbd9f9 100644 --- a/BBWYB.Server.API/Program.cs +++ b/BBWYB.Server.API/Program.cs @@ -62,6 +62,7 @@ services.BatchRegisterServices(new Assembly[] { Assembly.Load("BBWYB.Server.Busi services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); +services.AddSingleton(); services.AddMapper(new MappingProfiles()); services.Configure>(configuration.GetSection("ApiVersionRequirements")); diff --git a/BBWYB.Server.Business/BBWYB.Server.Business.csproj b/BBWYB.Server.Business/BBWYB.Server.Business.csproj index 65902f9..e7e1b0a 100644 --- a/BBWYB.Server.Business/BBWYB.Server.Business.csproj +++ b/BBWYB.Server.Business/BBWYB.Server.Business.csproj @@ -7,6 +7,16 @@ True + + + + + + + PreserveNewest + + + diff --git a/BBWYB.Server.Business/DataRepair/DataRepairBusiness.cs b/BBWYB.Server.Business/DataRepair/DataRepairBusiness.cs new file mode 100644 index 0000000..b2a827f --- /dev/null +++ b/BBWYB.Server.Business/DataRepair/DataRepairBusiness.cs @@ -0,0 +1,27 @@ +using BBWYB.Common.Log; +using BBWYB.Common.Models; +using BBWYB.Server.Model.Db; +using FreeSql; +using Yitter.IdGenerator; + +namespace BBWYB.Server.Business +{ + public class DataRepairBusiness : BaseBusiness, IDenpendency + { + private KuaiDi100Manager kuaiDi100Manager; + public DataRepairBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, KuaiDi100Manager kuaiDi100Manager) : base(fsql, nLogManager, idGenerator) + { + this.kuaiDi100Manager = kuaiDi100Manager; + } + + public void RepairPurchaseExpressOrder() + { + + } + + public void SubscribeKD100(string waybillNo,string targetCompanyCode) + { + kuaiDi100Manager.SubscribeKuaiDi100(waybillNo, targetCompanyCode, "http://bbwyb.qiyue666.com/api/purchaseorder/kuaidi100publish"); + } + } +} diff --git a/BBWYB.Server.Business/DingDingBusiness.cs b/BBWYB.Server.Business/DingDingBusiness.cs new file mode 100644 index 0000000..8d53c0b --- /dev/null +++ b/BBWYB.Server.Business/DingDingBusiness.cs @@ -0,0 +1,62 @@ +using BBWYB.Common.Extensions; +using BBWYB.Common.Http; +using BBWYB.Common.Models; +using System.Security.Cryptography; +using System.Text; + +namespace BBWYB.Server.Business +{ + public class DingDingBusiness : IDenpendency + { + private RestApiService restApiService; + + public DingDingBusiness(RestApiService restApiService) + { + this.restApiService = restApiService; + } + + public void SendDingDingBotMessage(string secret, string webHook, string content) + { + var timestamp = DateTime.Now.DateTimeToStamp(); + var stringToSign = timestamp + "\n" + secret; + var sign = EncryptWithSHA256(stringToSign, secret); + var url = $"{webHook}×tamp={timestamp}&sign={sign}"; + var result = restApiService.SendRequest(url, string.Empty, new + { + msgtype = "text", + text = new + { + content = content + } + }, null, HttpMethod.Post); + if (result.StatusCode != System.Net.HttpStatusCode.OK) + throw new Exception($"发送钉钉机器人消息失败 {result.Content}"); + } + + /// + /// Base64 SHA256 + /// + /// 待加密数据 + /// 密钥 + /// + private string EncryptWithSHA256(string data, string secret) + { + secret = secret ?? ""; + + // 1、string 转换成 utf-8 的byte[] + var encoding = Encoding.UTF8; + byte[] keyByte = encoding.GetBytes(secret); + byte[] dataBytes = encoding.GetBytes(data); + + // 2、 HMACSHA256加密 + using (var hmac256 = new HMACSHA256(keyByte)) + { + byte[] hashData = hmac256.ComputeHash(dataBytes); + // 3、转换成base64 + var base64Str = Convert.ToBase64String(hashData); + // 4、urlEncode编码 + return System.Web.HttpUtility.UrlEncode(base64Str, Encoding.UTF8); + } + } + } +} diff --git a/BBWYB.Server.Business/Extensions/OrderStateExtension.cs b/BBWYB.Server.Business/Extensions/OrderStateExtension.cs new file mode 100644 index 0000000..f57b86f --- /dev/null +++ b/BBWYB.Server.Business/Extensions/OrderStateExtension.cs @@ -0,0 +1,195 @@ + + +using BBWYB.Server.Model; +using BBWYB.Server.Model.Db; + +namespace BBWYB.Server.Business +{ + public static class OrderStateExtension + { + /// + /// 计算订单状态 + /// + /// + /// + /// + /// + public static void CalculationOrderState(this Order order, + IFreeSql fsql, + IList orderSkuList = null, + IList orderPurchaseInfoList = null) + { + if (order.OrderState == Enums.OrderState.已取消 || + order.OrderState == Enums.OrderState.已完成 || + order.OrderState == Enums.OrderState.待付款 || + order.OrderState == Enums.OrderState.待完结) + return; + + if (orderSkuList == null) + orderSkuList = fsql.Select().Where(osku => osku.OrderId == order.Id).ToList(); + if (orderPurchaseInfoList == null) + orderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == order.Id && opi.IsEnabled == true).ToList(); + + #region 等待采购 + if (orderPurchaseInfoList == null || orderPurchaseInfoList.Count() == 0) + { + order.OrderState = Enums.OrderState.等待采购; + return; + } + #endregion + + #region 部分采购 + foreach (var osku in orderSkuList) + { + if (!orderPurchaseInfoList.Any(opi => opi.BelongSkuIds.Contains(osku.SkuId))) + { + order.OrderState = Enums.OrderState.部分采购; + return; + } + } + #endregion + + #region 待发货 + if (orderPurchaseInfoList.Count() == orderPurchaseInfoList.Count(opi => opi.OrderState == Enums.PurchaseOrderState.待发货)) + { + order.OrderState = Enums.OrderState.待发货; + return; + } + #endregion + + #region 部分发货 + if (orderPurchaseInfoList.Any(opi => opi.OrderState == Enums.PurchaseOrderState.待收货 || + opi.OrderState == Enums.PurchaseOrderState.部分发货) && + orderPurchaseInfoList.Count(opi => opi.OrderState == Enums.PurchaseOrderState.待收货 || + opi.OrderState == Enums.PurchaseOrderState.部分发货) < orderPurchaseInfoList.Count()) + { + order.OrderState = Enums.OrderState.部分发货; + return; + } + #endregion + + #region 待收货 + if (orderPurchaseInfoList.Count() == orderPurchaseInfoList.Count(opi => opi.OrderState == Enums.PurchaseOrderState.待收货)) + { + order.OrderState = Enums.OrderState.待收货; + return; + } + #endregion + + #region 部分收货 + if (orderPurchaseInfoList.Any(opi => opi.OrderState == Enums.PurchaseOrderState.已签收 || + opi.OrderState == Enums.PurchaseOrderState.部分收货) && + orderPurchaseInfoList.Count(opi => opi.OrderState == Enums.PurchaseOrderState.已签收 || + opi.OrderState == Enums.PurchaseOrderState.部分收货) < orderPurchaseInfoList.Count()) + { + order.OrderState = Enums.OrderState.部分收货; + return; + } + #endregion + + #region 打包中 + if (orderPurchaseInfoList.Any(opi => opi.OrderState == Enums.PurchaseOrderState.已签收) && + orderPurchaseInfoList.Count(opi => opi.OrderState == Enums.PurchaseOrderState.已签收) == orderPurchaseInfoList.Count()) + { + order.OrderState = Enums.OrderState.打包中; + return; + } + #endregion + } + + + + /// + /// 计算采购单状态 + /// + /// + /// + /// + /// + public static void CalculationOrderState(this OrderPurchaseInfo orderPurchaseInfo, + IFreeSql fsql, + IList orderPurchaseSkuList = null, + IList purchaseExpressOrderList = null) + { + /* + 待发货 = 0, + 部分发货 = 1, + 待收货 = 10, + 部分收货 = 11, + 已签收 = 20, + 已取消 = 100 + */ + + if (orderPurchaseInfo.OrderState == Enums.PurchaseOrderState.已取消) + return; + + + if (orderPurchaseInfo.PurchasePlatform == Enums.Platform.阿里巴巴) + { + if (orderPurchaseSkuList == null) + orderPurchaseSkuList = fsql.Select().Where(ops => ops.PurchaseOrderId == orderPurchaseInfo.PurchaseOrderId).ToList(); + } + + if (purchaseExpressOrderList == null) + purchaseExpressOrderList = fsql.Select().Where(exo => exo.PurchaseOrderId == orderPurchaseInfo.PurchaseOrderId).ToList(); + + if (orderPurchaseInfo.PurchasePlatform == Enums.Platform.阿里巴巴) //支持采购sku和关联信息 + { + #region 待发货 + if (orderPurchaseSkuList.Count() == orderPurchaseSkuList.Count(ops => string.IsNullOrEmpty(ops.WaybillNo))) + { + orderPurchaseInfo.OrderState = Enums.PurchaseOrderState.待发货; + return; + } + #endregion + + #region 部分发货 + if (orderPurchaseSkuList.Any(ops => string.IsNullOrEmpty(ops.WaybillNo)) && + orderPurchaseSkuList.Count(ops => string.IsNullOrEmpty(ops.WaybillNo)) < orderPurchaseSkuList.Count()) + { + orderPurchaseInfo.OrderState = Enums.PurchaseOrderState.部分发货; + return; + } + #endregion + } + else + { + //不支持采购sku和关联信息 + #region 待发货 + if (purchaseExpressOrderList.Count() == 0) + { + orderPurchaseInfo.OrderState = Enums.PurchaseOrderState.待发货; + return; + } + #endregion + } + + + #region 待收货 + if (purchaseExpressOrderList.Count(exo => exo.ExpressState == "QianShou") == 0) + { + orderPurchaseInfo.OrderState = Enums.PurchaseOrderState.待收货; + return; + } + #endregion + + #region 部分收货 + if (purchaseExpressOrderList.Any(exo => exo.ExpressState == "QianShou") && + purchaseExpressOrderList.Count(exo => exo.ExpressState == "QianShou") < purchaseExpressOrderList.Count()) + { + orderPurchaseInfo.OrderState = Enums.PurchaseOrderState.部分收货; + return; + } + #endregion + + #region 已签收 + if (purchaseExpressOrderList.Any(exo => exo.ExpressState == "QianShou") && + purchaseExpressOrderList.Count(exo => exo.ExpressState == "QianShou") == purchaseExpressOrderList.Count()) + { + orderPurchaseInfo.OrderState = Enums.PurchaseOrderState.已签收; + return; + } + #endregion + } + } +} diff --git a/BBWYB.Server.Business/KuaiDi100ExpressCompany.txt b/BBWYB.Server.Business/KuaiDi100ExpressCompany.txt new file mode 100644 index 0000000..912eb38 --- /dev/null +++ b/BBWYB.Server.Business/KuaiDi100ExpressCompany.txt @@ -0,0 +1,1400 @@ +圆通速递,yuantong,国内运输商 +韵达快递,yunda,国内运输商 +中通快递,zhongtong,国内运输商 +申通快递,shentong,国内运输商 +极兔速递,jtexpress,国内运输商 +顺丰速运,shunfeng,国际运输商 +邮政快递包裹,youzhengguonei,国际邮政 +EMS,ems,国际邮政 +京东物流,jd,国内运输商 +邮政标准快递,youzhengbk,国内运输商 +德邦快递,debangkuaidi,国内运输商 +顺丰快运,shunfengkuaiyun,国内运输商 +丹鸟,danniao,国内运输商 +德邦,debangwuliu,国内运输商 +中通快运,zhongtongkuaiyun,国内运输商 +国际包裹,youzhengguoji,国际运输商 +京东快运,jingdongkuaiyun,国内运输商 +联昊通,lianhaowuliu,国内运输商 +安能快运,annengwuliu,国内运输商 +安得物流,annto,国内运输商 +跨越速运,kuayue,国内运输商 +速必达,subida,国内运输商 +顺心捷达,sxjdfreight,国内运输商 +日日顺物流,rrs,国内运输商 +百世快运,baishiwuliu,国内运输商 +速尔快递,suer,国内运输商 +韵达快运,yundakuaiyun,国内运输商 +丰网速运,fengwang,国内运输商 +百世快递,huitongkuaidi,国内运输商 +UPS-全球件,upsen,国际运输商 +中通国际,zhongtongguoji,国际运输商 +壹米滴答,yimidida,国内运输商 +优速,youshuwuliu,国内运输商 +宅急送,zhaijisong,国内运输商 +加运美,jiayunmeiwuliu,国内运输商 +信丰物流,xinfengwuliu,国内运输商 +中铁快运,ztky,国内运输商 +京广速递,jinguangsudikuaijian,国内运输商 +安迅物流,anxl,国内运输商 +海信物流,savor,国内运输商 +DHL-中国件,dhl,国际运输商 +UPS,ups,国际运输商 +Fedex-国际件-中文,fedexcn,国际运输商 +平安达腾飞,pingandatengfei,国内运输商 +易客满,ecmscn,国际运输商 +特急送,lntjs,国内运输商 +DHL-全球件,dhlen,国际运输商 +DPD UK,dpduk,国际运输商 +速腾快递,suteng,国内运输商 +FedEx-国际件,fedex,国际运输商 +USPS,usps,国际邮政 +EWE全球快递,ewe,国际运输商 +汇森速运,huisenky,国内运输商 +递四方,disifang,国内运输商 +苏宁物流,suning,国内运输商 +联运通物流,szuem,国内运输商 +同城快寄,shpost,国内运输商 +宇鑫物流,yuxinwuliu,国内运输商 +青岛安捷快递,anjiekuaidi,国内运输商 +EMS-国际件,emsguoji,国际邮政 +中远e环球,cosco,国际运输商 +拉火速运,lahuoex,国内运输商 +YunExpress,yuntrack,国际运输商 +安能快递,ane66,国内运输商 +报通快递,baoxianda,国内运输商 +速邮达,suyoda,国内运输商 +转运四方,zhuanyunsifang,国际运输商 +威盛快递,wherexpess,国内运输商 +雪域易购,qhxyyg,国内运输商 +Titan泰坦国际速递,timelytitan,国际运输商 +天地华宇,tiandihuayu,国内运输商 +申通国际,stosolution,国际运输商 +宏递快运,hd,国内运输商 +速通物流,sut56,国内运输商 +環海快運,hkglobalsea,国内运输商 +顺昌国际,shunchangguoji,国内运输商 +嘉里大通,jialidatong,国内运输商 +明通国际快递,tnjex,国际运输商 +盛丰物流,sfwl,国内运输商 +袋鼠速递,xjdaishu,国内运输商 +DPD,dpd,国际运输商 +凤凰快递,fenghuangkuaidi,国内运输商 +中通冷链,ztocc,国内运输商 +TNT-全球件,tnten,国际运输商 +洋包裹,yangbaoguo,国际运输商 +泰国中通CTO,ctoexp,国际运输商 +景光物流,jgwl,国内运输商 +极兔国际,jet,国际运输商 +佐川急便,sagawa,国际运输商 +新顺丰(NSF),nsf,国际运输商 +顺丰冷链,shunfenglengyun,国内运输商 +哪吒速运,nezhasuyun,国内运输商 +富吉速运,fujisuyun,国内运输商 +柬埔寨中通,khzto,国内运输商 +新西兰中通,nzzto,国际运输商 +美快国际物流,meiquick,国际运输商 +鑫正一快递,zhengyikuaidi,国内运输商 +敏華物流,manwah,国内运输商 +佰纳博通,viechina,国内运输商 +丽迅物流,lesoon,国内运输商 +百腾物流,baitengwuliu,国内运输商 +COE,coe,国际运输商 +OCS,ocs,国际运输商 +荣庆物流,rokin,国内运输商 +TNT,tnt,国际运输商 +铁中快运,tzky,国内运输商 +yundaasia,yundaasia,国际运输商 +中国邮政(CHINA POST),chinapost,国际邮政 +盛辉物流,shenghuiwuliu,国内运输商 +芝麻开门,zhimakaimen,国内运输商 +源安达,yuananda,国内运输商 +新杰物流,sunjex,国内运输商 +CK物流,ckexpress,国内运输商 +圆通国际,yuantongguoji,国际运输商 +中远快运,zy100,国内运输商 +嘉贤物流,jiaxianwuliu,国内运输商 +中铁飞豹,zhongtiewuliu,国内运输商 +日日顺智慧物联,gooday365,国内运输商 +中速快递,zhongsukuaidi,国内运输商 +联合速递,lhexpressus,国际运输商 +澳邮中国快运,auexpress,国际运输商 +方舟速递,arkexpress,国际运输商 +中集冷云,cccc58,国内运输商 +UBI Australia,gotoubi,国际运输商 +燕文物流,yw56,国际运输商 +EMS包裹,emsbg,国际邮政 +斑马物流,banma,国内运输商 +金大物流,jindawuliu,国内运输商 +邦泰快运,btexpress,国内运输商 +日本郵便,japanpost,国际运输商 +Aramex,aramex,国际运输商 +诚和通,cht361,国内运输商 +天天快递,tiantian,国内运输商 +深圳邮政,szyouzheng,国际邮政 +四季安物流,sja56,国内运输商 +AAE-中国件,aae,国际运输商 +D速快递,dsukuaidi,国际运输商 +时安达速递,goex,国内运输商 +顺丰-繁体,shunfenghk,国内运输商 +泰进物流,taijin,国内运输商 +宅急便,zhaijibian,国际运输商 +彪记快递,biaojikuaidi,国内运输商 +德国优拜物流,ubuy,国际运输商 +日本(Japan Post),japanposten,国际邮政 +Superb Express,superb,国际运输商 +中迅三方,cd3fwl,国内运输商 +CJ物流,doortodoor,国际运输商 +叁虎物流,sanhuwuliu,国内运输商 +天翼快递,tykd,国内运输商 +原飞航,yuanfeihangwuliu,国内运输商 +安鲜达,exfresh,国内运输商 +聚盟共建,jumstc,国内运输商 +顺丰-荷兰,shunfengnl,国际运输商 +三志物流,sanzhi56,国内运输商 +海外环球,haiwaihuanqiu,国际运输商 +快捷快物流,gdkjk56,国内运输商 +德坤物流,dekuncn,国内运输商 +联邦快递,lianbangkuaidi,国内运输商 +安达速递,adapost,国内运输商 +转运中国,uszcn,国际运输商 +荷兰邮政(PostNL international registered mail),postnl,国际邮政 +泛球物流,fanqiu,国内运输商 +华翰物流,huahanwuliu,国际运输商 +GLS,gls,国际运输商 +出口易,chukou1,国际运输商 +富腾达国际货运,ftd,国际运输商 +大田物流,datianwuliu,国内运输商 +恒路物流,hengluwuliu,国内运输商 +远成物流,yuanchengwuliu,国内运输商 +天马迅达,tianma,国内运输商 +家家通快递,newsway,国内运输商 +亚洲顺物流,yzswuliu,国际运输商 +佳吉快运,jiajiwuliu,国内运输商 +DHL-德国件(DHL Deutschland),dhlde,国际运输商 +Hermes,hermes,国际运输商 +澳德物流,auod,国际运输商 +加拿大(Canada Post),canpost,国际邮政 +黑猫宅急便,tcat,国际运输商 +耀奇物流,yaoqi,国内运输商 +SYNSHIP快递,synship,国际运输商 +达发物流,dfwl,国内运输商 +联合速运,unitedex,国内运输商 +星云速递,nebuex,国内运输商 +微特派,weitepai,国内运输商 +佳怡物流,jiayiwuliu,国内运输商 +鼎润物流,la911,国内运输商 +众邮快递,zhongyouex,国内运输商 +全联速运,guexp,国内运输商 +宁夏万家通,wanjiatong,国内运输商 +三真驿道,zlink,国内运输商 +九曳供应链,jiuyescm,国内运输商 +天鸽快运,hzdr,国内运输商 +商壹国际物流,com1express,国际运输商 +世华通物流,szshihuatong56,国内运输商 + Buffalo,buffaloex,国内运输商 +粤九通物流,yuejiutong,国内运输商 +南天物流,nantianwuliu,国内运输商 +城晓国际快递,ckeex,国际运输商 +澳大利亚(Australia Post),auspost,国际邮政 +贰仟家物流,erqianjia56,国内运输商 +速递中国,sendtochina,国际运输商 +1688国际物流,buyer1688,国际运输商 +美七国际快递,usa7ex,国内运输商 +EMS-国际件-英文,emsinten,国际邮政 +合众速递(UCS),ucs,国际运输商 +中环快递,zhonghuan,国内运输商 +签收快递,signedexpress,国内运输商 +安捷物流,anjie88,国内运输商 +极速达物流,jsdky,国内运输商 +广东邮政,guangdongyouzhengwuliu,国际邮政 +鸿泰物流,hnht56,国内运输商 +中邮速递,wondersyd,国内运输商 +TNT Italy,tntitaly,国际运输商 +如家国际快递,homecourier,国际运输商 +金岸物流,jinan,国内运输商 +速派快递,fastgoexpress,国内运输商 +极地快递,polarexpress,国内运输商 +中邮物流,zhongyouwuliu,国内运输商 +百米快运,100mexpress,国内运输商 +南方传媒物流,ndwl,国内运输商 +快捷速递,kuaijiesudi,国内运输商 +DFGL,dflogis,国内运输商 +MoreLink,morelink56,国内运输商 +EMS物流,emswuliu,国内运输商 +哥斯达黎加(Correos de Costa Rica),correos,国际邮政 +中邮电商,chinapostcb,国内运输商 +高田物流,gaotian56,国内运输商 +万家物流,wanjiawuliu,国内运输商 +三象速递,sxexpress,国内运输商 +新元国际,xynyc,国际运输商 +法国(La Poste),csuivi,国际邮政 +丰通快运,ftky365,国内运输商 +汇达物流,hdcexpress,国内运输商 +能达速递,ganzhongnengda,国内运输商 +科捷物流,kejie,国内运输商 +YDH,ydhex,国内运输商 +DPD Germany,dpdgermany,国际运输商 +鑫宸物流,cdxinchen56,国内运输商 +颿达国际快递,fardarww,国际运输商 +顺捷达,shunjieda,国内运输商 +TNT Australia,tntau,国际运输商 +小飞侠速递,cyxfx,国内运输商 +志方物流,zfex56,国内运输商 +泰嘉物流,takesend,国内运输商 +FedEx-美国件,fedexus,国际运输商 +领送送,lingsong,国内运输商 +全一快递,quanyikuaidi,国内运输商 +顺达快递,sundarexpress,国内运输商 +畅邮速递,changyousudi,国内运输商 +加拿大龙行速运,longcps,国内运输商 +百事亨通,bsht,国内运输商 +疯狂快递,crazyexpress,国内运输商 +秦岭智能速运,qinling,国内运输商 +优邦速运,ubonex,国内运输商 +顺捷美中速递,passerbyaexpress,国内运输商 +泰国138国际物流,sd138,国际运输商 +汇峰物流,huif56,国内运输商 +三态速递,santaisudi,国内运输商 +湘粤华通,smwfloor,国内运输商 +佰麒快递,beckygo,国内运输商 +北京EMS,bjemstckj,国际邮政 +货拉拉物流,huolalawuliu,国内运输商 +快捷物流,kuaijiewuliu,国内运输商 +美国申通,stoexpress,国际运输商 +耀飞同城快递,yaofeikuaidi,国内运输商 +宇佳物流,yujiawl,国内运输商 +CNE,cnexps,国际运输商 +申通新西兰,stonewzealand,国际运输商 +智通物流,ztong,国内运输商 +新易泰,lnet,国内运输商 +全峰快递,quanfengkuaidi,国内运输商 +秦邦快运,qbexpress,国内运输商 +昌宇国际,changwooair,国际运输商 +星光大道,xgdd56,国内运输商 +Xlobo贝海国际,xlobo,国际运输商 +无忧物流,aliexpress,国内运输商 +全信通快递,quanxintong,国内运输商 +西班牙(Correos de Espa?a),correosdees,国际邮政 +上海航瑞货运,hangrui,国内运输商 +郑州速捷,sujievip,国内运输商 +青云物流,bjqywl,国内运输商 +"继达物流,",gdjida56,国内运输商 +锦程快递,hrex,国内运输商 +J&T Express 菲律宾,jtexpressph,国际运输商 +龙行天下,pmt0704be,国内运输商 +澳天速运,aotsd,国际运输商 +DYB,dybservice,国内运输商 +优优速递,youyou,国内运输商 +BOXC,boxc,国际运输商 +广州安能聚创物流,gzanjcwl,国内运输商 +中环转运,zhonghuanus,国际运输商 +春风物流,spring56,国内运输商 +远盾物流,yuandun,国内运输商 +递四方美国,disifangus,国际运输商 +百福东方,baifudongfang,国际运输商 +品骏快递,pjbest,国内运输商 +百世国际,baishiguoji,国际运输商 +转瞬达集运,zsda56,国内运输商 +dhluk,dhluk,国内运输商 +明达国际速递,tmwexpress,国际运输商 +次晨达物流,ccd,国内运输商 +泛捷国际速递,epanex,国际运输商 +EMS-英文,emsen,国际邮政 +世通物流,worldex,国际运输商 +黄马甲,huangmajia,国内运输商 +速达通,sdto,国内运输商 +TST速运通,tstexp,国际运输商 +黑猫同城送,ynztsy,国内运输商 +意大利(Poste Italiane),italiane,国际邮政 +SGXpress,sgxpress,国际运输商 +红马甲物流,sxhongmajia,国内运输商 +天辰物流,tianchenwuliu,国内运输商 +实利配送,shiligyl,国内运输商 +力展物流,lizhan,国内运输商 +新速航,sunspeedy,国内运输商 +美通,valueway,国内运输商 +airpak expresss,airpak,国际运输商 +中欧物流,cneulogistics,国内运输商 +英国大包、EMS(Parcel Force),parcelforce,国际邮政 +中途速递,ztcce,国内运输商 +传喜物流,chuanxiwuliu,国内运输商 +EFSPOST,efspost,国内运输商 +车联天下,szclyc,国内运输商 +威时沛运货运,wtdchina,国内运输商 +皇家物流,pfcexpress,国内运输商 +Toll,dpexen,国际运输商 +速舟物流,cnspeedster,国内运输商 +logen路坚,ilogen,国际运输商 +BRT,brt,国际运输商 +全球速运,global99,国际运输商 +汇通天下物流,httx56,国内运输商 +想乐送,leshines,国内运输商 +优速通达,yousutongda,国内运输商 +一智通,1ziton,国内运输商 +光线速递,gxwl,国内运输商 +极兔快递埃及站,jtexpresseg,国际运输商 +快卡,kuaika,国内运输商 +丰羿,fengyee,国内运输商 +久久物流,jiujiuwl,国内运输商 +锋鸟物流,beebird,国内运输商 +聚鼎物流,juding,国内运输商 +货运皇,kingfreight,国际运输商 +城市映急,city56,国内运输商 +递五方云仓,di5pll,国内运输商 +印度尼西亚EMS(Pos Indonesia-EMS),indonesia,国际邮政 +J&T Express 马来西亚,jtexpressmy,国际运输商 +迅达速递,xdexpress,国内运输商 +A2U速递,a2u,国际运输商 +韩国邮政,koreapostcn,国际邮政 +lotteglogis,lotteglogis,国际运输商 +英国邮政大包EMS,parcelforcecn,国际邮政 +速呈,sczpds,国内运输商 +武汉优进汇,yjhgo,国内运输商 +玥玛速运,yue777,国内运输商 +安信达,anxindakuaixi,国内运输商 +新西兰(New Zealand Post),newzealand,国际邮政 +顺捷丰达,shunjiefengda,国内运输商 +广博物流,wxgbwl,国内运输商 +新宁物流,xinning,国内运输商 +迅速快递,xunsuexpress,国内运输商 +YODEL,yodel,国际运输商 +比利时(Belgium Post),belgiumpost,国际邮政 +FedRoad 联邦转运,fedroad,国际运输商 +中国香港环球快运,huanqiuabc,国际运输商 +韩国(Korea Post),koreapost,国际邮政 +泰实货运,tjkjwl,国内运输商 +中汲物流,zhongji,国内运输商 +云邮跨境快递,hkems,国际运输商 +中国香港(HongKong Post),hkpost,国际邮政 +佳辰国际速递,jiachenexpress,国际运输商 +龙兴物流,lx56,国内运输商 +中华邮政,postserv,国际邮政 +swiship us,swishipus,国际运输商 +瑞士(Swiss Post),swisspost,国际邮政 +安世通快递,astexpress,国内运输商 +成都东骏物流,dongjun,国内运输商 +通达物流,tarrive,国内运输商 +中宏物流,zhonghongwl,国内运输商 +吉捷国际速递,luckyfastex,国际运输商 +荷兰邮政-中文(PostNL international registered mail),postnlcn,国际邮政 +易境达国际物流,uscbexpress,国际运输商 +智谷特货,zhiguil,国内运输商 +百世云配,baishiyp,国内运输商 +长江国际速递,changjiang,国际运输商 +法国大包、EMS-法文(Chronopost France),chronopostfra,国际邮政 +法国大包、EMS-英文(Chronopost France),chronopostfren,国际邮政 +德国(Deutsche Post),deutschepost,国际邮政 +Fastway Ireland,fastway,国际运输商 +飞腾物流,ft56,国内运输商 +直布罗陀[英国]( Royal Gibraltar Post),gibraltar,国际邮政 +GTT EXPRESS快递,gttexpress,国内运输商 +豪翔物流,haoxiangwuliu,国内运输商 +黑豹物流,heibaowuliu,国内运输商 +JNE,jne,国际运输商 +葡萄牙(Portugal CTT),portugalctt,国际运输商 +越南EMS(VNPost Express),vnpost,国际邮政 +宇航通物流,yhtlogistics,国内运输商 +鸢速货运,yuansuhy,国内运输商 +卓志速运,chinaicip,国内运输商 +华欣物流,chinastarlogistics,国内运输商 +CHS中环国际快递,chszhonghuanguoji,国际运输商 +CNPEX中邮快递,cnpex,国际运输商 +大道物流,dadaoex,国内运输商 +澳州顺风快递,emms,国际运输商 +英国(大包,EMS),england,国际邮政 +欧亚专线,euasia,国际运输商 +黑猫速运,heimao56,国内运输商 +海欣斯快递,highsince,国际运输商 +海联快递,hltop,国内运输商 +佳成快递 ,jiacheng,国内运输商 +美西快递,meixi,国际运输商 +民航快递,minghangkuaidi,国内运输商 +魔速达,mosuda,国内运输商 +一速递,oneexpress,国内运输商 +全速物流,quansu,国内运输商 +天天欧洲物流,ttkeurope,国际运输商 +五六快运,wuliuky,国内运输商 +远成快运,ycgky,国内运输商 +承诺达,ytchengnuoda,国内运输商 +DPEX,dpex,国际运输商 +飞快达,feikuaida,国内运输商 +飞力士物流,flysman,国内运输商 +高铁快运,gaotieex,国内运输商 +嘉里大荣物流,kerrytj,国内运输商 +番薯国际货运,koali,国际运输商 +快速递,ksudi,国内运输商 +明亮物流,mingliangwuliu,国内运输商 +林道国际快递,shlindao,国际运输商 +UEQ快递,ueq,国际运输商 +万家康物流,wjkwl,国内运输商 +亚风速递,yafengsudi,国内运输商 +邮邦国际,youban,国际运输商 +360 Lion Express,360lion,国际运输商 +爱尔兰(An Post),anposten,国际邮政 +阿塞拜疆EMS(EMS AzerExpressPost),azerbaijan,国际邮政 +上海缤纷物流,bflg,国内运输商 +大洋物流,dayangwuliu,国内运输商 +希腊EMS(ELTA Courier),eltahell,国际邮政 +南非EMS,emssouthafrica,国际邮政 +乌克兰EMS(EMS Ukraine),emsukraine,国际邮政 +乌克兰EMS-中文(EMS Ukraine),emsukrainecn,国际邮政 +飞豹快递,feibaokuaidi,国内运输商 +JDIEX,jdiex,国际运输商 +时达通,jssdt56,国内运输商 +联邦快递-英文,lianbangkuaidien,国内运输商 +吉运家物流,luckyexpress,国内运输商 +新加坡EMS、大包(Singapore Speedpost),speedpost,国际邮政 +GPI,tcxbthai,国际运输商 +突尼斯EMS(Rapid-Poste),tunisia,国际邮政 +西游寄,xiyoug,国际运输商 +新骐点物流,xqd4000711238,国内运输商 +行云物流,xyb2b,国际运输商 +友家速递,youjia,国内运输商 +中融泰隆,zrtl,国内运输商 +路港易通,bjlgyt,国内运输商 +大韩通运,cjkoreaexpress,国内运输商 +长吉物流,cjqy,国内运输商 +中健云康,concare,国内运输商 +EFS Post(平安快递),efs,国际邮政 +冠达丰物流,gfdwuliu,国内运输商 +嘉诚速达,jcsuda,国内运输商 +一号线,lineone,国际运输商 +美乐维冷链物流,mlw,国内运输商 +瑞典(Sweden Post),ruidianyouzheng,国际邮政 +商桥物流,shangqiao56,国内运输商 +神骏物流,shenjun,国内运输商 +速通鸿达,sutonghongda,国内运输商 +"兴鹏物流,",szxpwl,国内运输商 +洋口岸,ykouan,国际运输商 +全球快运,abcglobal,国际运输商 +ABF,abf,国际运输商 +安敏物流,anmin56,国内运输商 +贝业物流,boyol,国内运输商 +巴西(Brazil Post/Correios),brazilposten,国际邮政 +百通物流,buytong,国内运输商 +银雁专送,cfss,国内运输商 +法国小包(colissimo),colissimo,国际运输商 +Dotzot,dotzot,国内运输商 +飞邦快递,fbkd,国内运输商 +四方格,fourpxus,国际运输商 +宏运发物流,hongyunfa56,国内运输商 +汇强快递,huiqiangkuaidi,国内运输商 +爱拜物流,ibuy8,国际运输商 +Italy SDA,italysad,国际运输商 +佳吉快递,jiajikuaidi,国内运输商 +快达物流,kuaidawuliu,国内运输商 +LaserShip,lasership,国际运输商 +Linex,linex,国际运输商 +路邦物流,lubang56,国内运输商 +美泰物流,meitai,国内运输商 +OnTrac,ontrac,国际运输商 +闪货极速达,shanhuodidi,国内运输商 +飞洋快递,shipgce,国际运输商 +老扬州物流,tjlyz56,国内运输商 +乌克兰小包、大包(UkrPoshta),ukraine,国际运输商 +伍圆速递,wuyuansudi,国内运输商 +远辉物流,wxyuanhui,国内运输商 +驿将快运,yijiangky,国内运输商 +中技物流,zhongjiwuliu,国内运输商 +明辉物流,zsmhwl,国内运输商 +中铁物流供应链,ztwlgyl,国内运输商 +安捷信物流,anjiexin56,国内运输商 +皮牙子快递,bazirim,国内运输商 +CEVA Logistics,ceva,国际运输商 +德中快递,decnlh,国内运输商 +大亿快递,dyexpress,国际运输商 +飞康达,feikangda,国内运输商 +GDEX,gdex,国际运输商 +冠捷物流 ,gjwl,国内运输商 +高捷快运,goldjet,国内运输商 +中国香港(HongKong Post)英文,hkposten,国际邮政 +环球速运,huanqiu,国际运输商 +兰州伙伴物流,huoban,国内运输商 +加州猫速递,jiazhoumao,国内运输商 +J&T Express 新加坡,jtexpresssg,国际运输商 +两点之间,ldzy168,国内运输商 +美国快递,meiguokuaidi,国际运输商 +MyHermes,myhermes,国际运输商 +Ninja Van ,ninjavan,国际运输商 +澳洲飞跃物流,rlgaus,国际运输商 +日日顺快线,rrskx,国内运输商 +上大物流,shangda,国内运输商 +速通国际快运,sutongst,国际运输商 +Amazon FBA Swiship,swiship,国际运输商 +鑫宏福物流,xhf56,国内运输商 +西邮寄速递,xyjexpress,国内运输商 +赞比亚,zampost,国际邮政 +准实快运,zsky123,国内运输商 +AAA Cooper Transportation,aaacooper,国际运输商 +AlfaTrex,alfatrex,国际运输商 +apgecommerce,apgecommerce,国内运输商 +Austa国际速递,austa,国际运输商 +邦送物流,bangsongwuliu,国内运输商 +八达通,bdatong,国内运输商 +远通盛源,bjytsywl,国内运输商 +加拿大邮政,canpostfr,国际邮政 +捷克(?eská po?ta),ceskaposta,国际运输商 +城通物流,chengtong,国内运输商 +群航国际物流,cloudlogistics365,国际运输商 +重庆星程快递,cqxingcheng,国内运输商 +DHL-荷兰(DHL Netherlands),dhlnetherlands,国际运输商 +ETEEN专线,eteenlog,国内运输商 +飛斯特運通,exbtr,国际运输商 +Flash Express,flashexpress,国际运输商 +Flash Express-英文,flashexpressen,国际运输商 +程光快递,flyway,国际运输商 +全网物流,gdqwwl,国内运输商 +GSM,gsm,国际运输商 +冠庭国际物流,guanting,国际运输商 +天天快物流,guoeryue,国内运输商 +汇霖大货网,huilin56,国内运输商 +户通物流,hutongwuliu,国内运输商 +景顺物流,jingshun,国内运输商 +J&T Express 泰国,jtexpressth,国际运输商 +聚盟物流,jumsz,国内运输商 +阿曼(Oman Post),oman,国际邮政 +7E速递,qesd,国际运输商 +Quantium,quantium,国际运输商 +日昱物流,riyuwuliu,国内运输商 +全时速运,runhengfeng,国内运输商 +赛澳递for买卖宝,saiaodimmb,国际运输商 +澳丰速递,sfau,国际运输商 +翔宇物流,xiangyuwl56,国内运输商 +亿德隆物流,ydl56,国内运输商 +一邦速递,yibangwuliu,国内运输商 +易通达,yitongda,国内运输商 +运通快运,ytky168,国内运输商 +中快货运,zhongkuai,国内运输商 +忠信达,zhongxinda,国内运输商 +众派速递,zhpex,国内运输商 +泰捷达国际物流,ztjieda,国际运输商 +明大快递,adaexpress,国内运输商 +ADP国际快递,adp,国际运输商 +AOL澳通速递,aolau,国际运输商 +阿森迪亚,asendia,国际运输商 +"奔力物流,",blex56,国内运输商 +City-Link,citylink,国际运输商 +阿根廷(Correo Argentina),correoargentino,国际运输商 +达方物流,dfpost,国内运输商 +DPD Poland,dpdpoland,国际运输商 +东方航空物流,ealceair,国际运输商 +FedEx-英国件(FedEx UK),fedexuk,国际运输商 +广东诚通物流,gdct56,国内运输商 +GHT物流,ghtexpress,国际运输商 +globaltracktrace,globaltracktrace,国际运输商 +哥士传奇速递,gscq365,国内运输商 +海带宝,haidaibao,国际运输商 +Jingle Express,jingleexpressx,国际运输商 +龙枫国际快递,lfexpress,国际运输商 +Lite Express,lite56,国内运输商 +中国澳门(Macau Post),macao,国际邮政 +OC-Post,ocpost,国际运输商 +诚一物流,parcelchina,国际运输商 +PostNord Logistics,postnord,国际运输商 +全川摩运,quanchuan56,国内运输商 +丰程物流,sccod,国内运输商 +SiCepat Ekspres,sicepat,国际运输商 +新加坡小包(Singapore Post),singpost,国际邮政 +中外运空运,sinoairinex,国际运输商 +中外运速递-中文,sinoex,国际运输商 +SMSA Express,smsaexpress,国际运输商 +嗖一下同城快递,sofast56,国内运输商 +南非(South African Post Office),southafrican,国际邮政 + Speed Shipping Company,speedegypt,国际运输商 +速速达,ssd,国内运输商 +瑞士邮政,swisspostcn,国际邮政 +泰国邮政(Thailand Thai Post),thailand,国际邮政 +威速递,wexpress,国内运输商 +翔腾物流,xiangteng,国内运输商 +亿隆速运,yilongex,国内运输商 +一正达速运,yizhengdasuyun,国内运输商 +邮来速递,youlai,国内运输商 +美国云达,yundaexus,国际运输商 +途兴供应链,zgtux,国内运输商 +中安物流,zhonganhuoyun,国内运输商 +ABS courier & freight system,abs,国际运输商 +aCommerce,acommerce,国际运输商 +ACS Courier,acscourier,国际运输商 +安达易国际速递,adiexpress,国际运输商 +ADSone,adsone,国际运输商 +Agility Logistics,agility,国际运输商 +德方物流,ahdf,国内运输商 +奥兰群岛,aland,国际邮政 +Algeria,algeria,国际邮政 +ALLIED,alliedexpress,国际运输商 +安家同城快运,anjiatongcheng,国内运输商 +Anteraja,anteraja,国际运输商 +APC Postal Logistics,apc,国际运输商 +ARC,arc,国际运输商 +Asendia HK,asendiahk,国际运输商 +澳达国际物流,auadexpress,国内运输商 +奥地利(Austrian Post),austria,国际邮政 +蜜蜂速递,bee001,国内运输商 +BHT,bht,国际运输商 +BlueDart,bluedart,国际运输商 +BorderGuru,borderguru,国际邮政 +百千诚物流,bqcwl,国内运输商 +彩丰物流,caifengwl,国内运输商 +能装能送,canhold,国内运输商 +Canpar,canpar,国际运输商 +捷祥物流,cdjx56,国内运输商 +嘉荣物流,chllog,国内运输商 +Chronopost Portugal,chronopostport,国际邮政 +创一快递,chuangyi,国内运输商 +中国香港骏辉物流,chunfai,国际运输商 +澳通华人物流,cllexpress,国际运输商 +中澳速递,cnausu,国际运输商 +哥伦比亚(4-72 La Red Postal de Colombia),colombia,国际邮政 +CourierPost,courierpost,国际运输商 +云南诚中物流,czwlyn,国内运输商 +丹递56,dande56,国内运输商 +DHL Benelux,dhlbenelux,国际运输商 +dhl小包,dhlecommerce,国际运输商 +DHL HK,dhlhk,国际运输商 +递达速运,didasuyun,国内运输商 +渡石医药,dushisc,国内运输商 +ECMS Express,ecmsglobal,国际运输商 +厄瓜多尔(Correos del Ecuador),ecuador,国际邮政 +易达快运,edaeuexpress,国内运输商 +埃及(Egypt Post),egypt,国际邮政 +高考通知书,emsluqu,国内运输商 +东方汇,est365,国内运输商 +Estafeta,estafeta,国际运输商 +埃塞俄比亚(Ethiopian postal),ethiopia,国际邮政 +E2G速递,express2global,国内运输商 +正途供应链,fastzt,国内运输商 +飞狐快递,feihukuaidi,国内运输商 +Gati-英文,gatien,国际运输商 +容智快运,gdrz58,国内运输商 +英脉物流,gml,国内运输商 +潍鸿,grivertek,国际运输商 +GTS快递,gts,国际运输商 +宏观国际快递,gvpexpress,国际运输商 +汉邦国际速递,handboy,国际运输商 +合心速递,hexinexpress,国内运输商 +飞豹速递,hkeex,国内运输商 +好来运,hlyex,国内运输商 +华美快递,hmus,国内运输商 +飞鹰物流,hnfy,国内运输商 +河南全速通,hnqst,国内运输商 +皇家云仓,hotwms,国内运输商 +环球通达 ,hqtd,国际运输商 +高铁速递,hre,国内运输商 +华通快运,htongexpress,国内运输商 +匈牙利(Magyar Posta),hungary,国际邮政 +鸿远物流,hyeship,国内运输商 +大达物流,idada,国内运输商 +艾姆勒,imlb2c,国际运输商 +印度(India Post),india,国际邮政 +多米尼加(INPOSDOM – Instituto Postal Dominicano),inposdom,国际邮政 +以色列(Israel Post),israelpost,国际邮政 +骏达快递,jdexpressusa,国内运输商 +佳家通货运,jiajiatong56,国内运输商 +捷安达,jieanda,国内运输商 +久易快递,jiuyicn,国内运输商 +极兔快递阿联酋,jtexpressae,国际运输商 +凯信达,kxda,国内运输商 +Landmark Global,landmarkglobal,国际运输商 +拉脱维亚(Latvijas Pasts),latvia,国际运输商 +LBC Express,lbc56,国内运输商 +乐达全球速递,ledaexpress,国内运输商 +美联快递,letseml,国内运输商 +联运快递,lianyun,国内运输商 +成都立即送,lijisong,国内运输商 +LUCFLOW EXPRESS,longfx,国内运输商 +6LS EXPRESS,lsexpress,国际运输商 +乐天速递,ltexp,国内运输商 +联通快递,ltparcel,国际运输商 +鲁通快运,lutong,国内运输商 +今枫国际快运,mapleexpress,国际运输商 +木春货运,mchy,国际运输商 +猛犸速递,mmlogi,国际运输商 +浩博物流,njhaobo,国内运输商 +OCA Argentina,ocaargen,国际运输商 +爱沙尼亚(Eesti Post),omniva,国际邮政 +parcel2go,parcel2go,国际运输商 +全球速递,pdstow,国际运输商 +Parcel Freight Logistics,pflogistics,国际运输商 +菲律宾(Philippine Postal),phlpost,国际邮政 +丹麦(Post Denmark),postdanmarken,国际邮政 +PostNord(Posten AB),postenab,国际邮政 +荷兰包裹(PostNL International Parcels),postnlpacle,国际邮政 +急顺通,pzhjst,国内运输商 +ANTS EXPRESS,qdants,国际运输商 +秦远物流,qinyuan,国内运输商 +千顺快递,qskdyxgs,国内运输商 +全际通,quanjitong,国内运输商 +全速通,quansutong,国内运输商 +仁速物流,rensu56,国内运输商 +Safexpress,safexpress,国际运输商 +SAP EXPRESS,sapexpress,国际运输商 +首达速运,sdsy888,国内运输商 +圣安物流,shenganwuliu,国内运输商 +盛通快递,shengtongscm,国内运输商 +wish邮,shpostwish,国际运输商 +双鹤物流,shuanghe,国内运输商 +skynet,skynet,国际运输商 +Asendia HK (LATAM),skypostal,国际运输商 +斯洛伐克(Slovenská Posta),slovak,国际邮政 +星速递,starex,国内运输商 +顺通快递,stkd,国内运输商 +速品快递,supinexpress,国内运输商 +苏里南,surpost,国际邮政 +圣文森特和格林纳丁斯,svgpost,国际邮政 +通达兴物流,tongdaxing,国内运输商 +优联吉运,uluckex,国内运输商 +乌兹别克斯坦(Post of Uzbekistan),uzbekistan,国际邮政 +文捷航空,wenjiesudi,国际运输商 +星空国际,wlwex,国际运输商 +新宏达物流,xhongda56,国内运输商 +西安喜来快递,xilaikd,国内运输商 +新颜物流,xinyan,国内运输商 +雄达国际物流,xiongda,国际运输商 +快弟来了,xlair,国内运输商 +鑫圣邦物流,xsb56,国内运输商 +一辉物流,yatfai,国内运输商 +银捷速递,yinjiesudi,国内运输商 +亿顺航,yishunhang,国际运输商 +宜送,yisong,国内运输商 +优胜国际速递,yoseus,国际运输商 +雅澳物流,yourscm,国际运输商 +鼹鼠快送,ysexpress,国内运输商 +远航国际快运,yuanhhk,国际运输商 +越丰物流,yuefengwuliu,国内运输商 +蕴国物流,yunguo56,国内运输商 +Yusen Logistics,yusen,国际运输商 +西安运逸快递,yyexp,国内运输商 +浩运物流,zbhy56,国内运输商 +俄顺物流,zesexpress,国际运输商 +志腾物流,zhitengwuliu,国内运输商 +逐电快运,zhudiankuaiyun,国内运输商 +增速跨境 ,zyzoom,国际运输商 +ABX Express,abxexpress_my,国际运输商 +德国雄鹰速递,adlerlogi,国际运输商 +阿富汗(Afghan Post),afghan,国际邮政 +全程快递,agopost,国内运输商 +卡邦配送,ahkbps,国内运输商 +加拿大民航快递,airgtc,国际运输商 +捷记方舟,ajexpress,国际运输商 +澳捷物流,ajlogistics,国际运输商 +阿尔巴尼亚(Posta shqipatre),albania,国际邮政 +心怡物流,alog,国内运输商 +Swiship UK,amazon_fba_swiship,国际运输商 +亚马逊中国订单,amazoncnorder,国际运输商 +Anjun Logistics,anjun_logistics,国际运输商 +新干线快递,anlexpress,国内运输商 +安时递,anshidi,国内运输商 +澳速物流,aosu,国际运输商 +美国汉邦快递,aplus100,国际运输商 +艾瑞斯远,ariesfar,国内运输商 +阿鲁巴[荷兰](Post Aruba),aruba,国际邮政 +Asendia USA,asendiausa,国际运输商 +上海生生物流,ashsh,国内运输商 +澳货通,auex,国际运输商 +澳世速递,ausexpress,国际运输商 +澳台转运,autw,国际运输商 +AUV国际快递,auvexpress,国际运输商 +澳新物流,axexpress,国际运输商 +巴林(Bahrain Post),bahrain,国际邮政 +巴巴多斯(Barbados Post),barbados,国际邮政 +BCWELT,bcwelt,国际运输商 +BDC快递,bdcgcc,国际运输商 +BEE express,beeexpress,国际运输商 +beiou express,beiou,国内运输商 +伯利兹(Belize Postal),belize,国际邮政 +白俄罗斯(Belpochta),belpost,国际运输商 +贝宁,benin,国际邮政 +笨鸟国际,benniao,国际运输商 +奔腾物流,benteng,国内运输商 +飛斯特,bester,国际运输商 +東邮寄,betterlife,国际运输商 +不丹邮政 Bhutan Post,bhutan,国际邮政 +鑫锐达,bjxsrd,国内运输商 +佰乐捷通,bljt56,国内运输商 +北美国际物流,bmxps,国际运输商 +波黑(JP BH Posta),bohei,国际邮政 +玻利维亚,bolivia,国际运输商 +堡昕德速递,bosind,国内运输商 +Bosta,bosta,国际运输商 +博茨瓦纳,botspost,国际邮政 +速方(Sufast),bphchina,国际运输商 +比利时国际(Bpost international),bpostinter,国际邮政 +Bridge Express ,bridgeexpress ,国际运输商 +宏桥国际物流,briems,国内运输商 +文莱(Brunei Postal),brunei,国际邮政 +保加利亚(Bulgarian Posts),bulgarian,国际邮政 +Buylogic,buylogic,国际运输商 +新喀里多尼亚[法国](New Caledonia),caledonia,国际运输商 +柬埔寨(Cambodia Post),cambodia,国际邮政 +到了港,camekong,国际运输商 +Campbell’s Express,campbellsexpress,国际运输商 +卢森堡航空,cargolux,国际运输商 +CBL Logistica,cbl,国内运输商 +CBL Logistics,cbl_logistica,国际运输商 +广州信邦,cbllogistics,国内运输商 +钏博物流,cbo56,国内运输商 +CEVA Logistic,cevalogistics,国际运输商 +城铁速递,cex,国内运输商 +成达国际速递,chengda,国际运输商 +城际快递,chengji,国内运输商 +城宁供应链,chengning,国内运输商 +程洋快递,chengyangex,国际运输商 +智利(Correos Chile),chile,国际邮政 +荣通国际,chinaqingguan,国内运输商 +SQK国际速递,chinasqk,国际运输商 +同舟行物流,chinatzx,国内运输商 +中翼国际物流,chnexp,国际运输商 +citysprint,citysprint,国际运输商 +CNAIR,cnair,国际运输商 +C&C国际速递,cncexp,国际运输商 +CNUP 中联邮,cnup,国际运输商 +Collect+,collectplus,国际运输商 +邦通国际,comexpress,国际运输商 +Corporate couriers logistics,corporatecouriers,国际运输商 +莫桑比克(Correios de Moçambique),correios,国际运输商 +乌拉圭(Correo Uruguayo),correo,国际运输商 +Correos Express,correosexpress,国际运输商 +Couriers Please,couriersplease,国际运输商 +华中快递,cpsair,国内运输商 +新时速物流,csxss,国内运输商 +DACHSER,dachser,国际运输商 +达速物流,dasu,国内运输商 +DCS,dcs,国际运输商 +深圳德创物流,dechuangwuliu,国内运输商 +德速电商物流,deksu,国内运输商 +Delhivery,delhivery,国际运输商 +Delivery Station,deliverystations,国际运输商 +Deltec Courier,deltec,国际运输商 +Deploy,deployeg,国际运输商 +澳行快递,desworks,国际运输商 +东风全球速递,dfglobalex,国内运输商 +DHL-波兰(DHL Poland),dhlpoland,国际运输商 +云南滇驿物流,dianyi,国内运输商 +叮咚澳洲转运,dindon,国际运输商 +叮咚快递,dingdong,国内运输商 +Direct Link,directlink,国际邮政 +递四方澳洲,disifangau,国际运输商 +吉布提,djibouti,国际邮政 +东瀚物流,donghanwl,国内运输商 +东红物流,donghong,国内运输商 +DPD Ireland,dpd_ireland,国际运输商 +DPE Express,dpe_express,国际运输商 +DF物流,dragonfe,国内运输商 +dreevo,dreevo,国际运输商 +老司机国际快递,driverfastgo,国际运输商 +DSV,dsv,国际运输商 +德淘邦,dt8ang,国内运输商 +DTD,dtd,国际运输商 +DTDC India,dtdcindia,国际运输商 +EASY EXPRESS,easyexpress,国际运输商 +E跨通,ecallturn,国际运输商 +EC-Firstclass,ecfirstclass,国际运输商 +Echo,echo,国际运输商 +Ecom Express,ecomexpress,国内运输商 +东西E全运,ecotransite,国际运输商 +龙象国际物流,edragon,国际运输商 +EGY Express Logistics,egyexpress,国际运输商 +Egypt Express,egyptexpress,国际运输商 +Ekart,ekart,国际运输商 +希腊包裹(ELTA Hellenic Post),elta,国际邮政 +阿联酋(Emirates Post),emirates,国际邮政 +阿联酋(Emirates Post),emiratesen,国内运输商 +波兰小包(Poczta Polska),emonitoring,国际运输商 +波兰小包(Poczta Polska),emonitoringen,国内运输商 +联众国际,epspost,国际运输商 +Equick China,equick_cn,国际运输商 +厄立特里亚,eripostal,国际邮政 +俄顺达,eshunda,国内运输商 +Estes,estes,国际运输商 +埃塞俄比亚(Ethiopian Post),ethiopian,国际邮政 +E通速递,etong,国际运输商 +中欧国际物流,eucnrail,国际运输商 +德国 EUC POST,eucpost,国际邮政 +EU-EXPRESS,euexpress,国际运输商 +易邮国际,euguoji,国际运输商 +易优包裹,eupackage,国内运输商 +败欧洲,europe8,国际运输商 +europeanecom,europeanecom,国际运输商 +优莎速运,eusacn,国内运输商 +长顺海运,everwellmarine,国内运输商 +可可树美中速运,excocotree,国内运输商 +Expeditors,expeditors,国际运输商 +探路速运,explorer56,国内运输商 +澳洲新干线快递,expressplus,国际运输商 +E速达,exsuda,国内运输商 +易转运,ezhuanyuan,国际运输商 +颿达国际快递-英文,fandaguoji,国际运输商 +凡宇快递,fanyukuaidi,国内运输商 +泛远国际物流,farlogistis,国际运输商 +加拿大联通快运,fastontime,国际运输商 +Fastway New Zealand,fastway_nz,国际运输商 +Fastway South Africa,fastway_za,国际运输商 +FDS,fds,国际运输商 +FedEx-英国件,fedexukcn,国际运输商 +斐济(Fiji Post),fiji,国际邮政 +芬兰(Itella Posti Oy),finland,国际邮政 +First Flight,firstflight,国际运输商 +First Logistics,firstlogistics,国际运输商 +Flextock,flextock,国际运输商 +花瓣转运,flowerkd,国际运输商 +FODEL,fodel,国际运输商 +FOX国际快递,fox,国际运输商 +FQ狂派速递,freakyquick,国际运输商 +法翔速运,ftlexpress,国内运输商 +Gati-中文,gaticn,国际运输商 +Gati-KWE,gatikwe,国际运输商 +新鹏快递,gdxp,国内运输商 +GE2D跨境物流,ge2d,国际运输商 +格鲁吉亚(Georgian Pos),georgianpost,国际运输商 +G EXpress,gexpress,国际运输商 +加纳,ghanapost,国际邮政 +环创物流,ghl,国内运输商 +GIZTIX,giztix,国际运输商 +GLS Italy,gls_italy,国际运输商 +GOGOX,gogox,国际运输商 +gojavas,gojavas,国际运输商 +共速达,gongsuda,国内运输商 +Grab,grab,国际运输商 +格陵兰[丹麦](TELE Greenland A/S),greenland,国际运输商 +德尚国际速递,gslexpress,国际运输商 +广东通路,guangdongtonglu,国内运输商 +永邦快递,guangdongyongbang,国内运输商 +根西岛,guernsey,国际邮政 +国顺达物流,guoshunda,国内运输商 +国送快运,guosong,国内运输商 +圭亚那,guyana,国际邮政 +贵州星程快递,gzxingcheng,国内运输商 +货六六,h66,国内运输商 +海红for买卖宝,haihongmmb,国际运输商 +海红网送,haihongwangsong,国内运输商 +海盟速递,haimengsudi,国内运输商 +海星桥快递,haixingqiao,国内运输商 +海中转运,haizhongzhuanyun,国内运输商 +翰丰快递,hanfengjl,国内运输商 +航宇快递,hangyu,国内运输商 +汉信快递,hanxin,国内运输商 +亚美尼亚(Haypost-Armenian Postal),haypost,国际邮政 +恒瑞物流,hengrui56,国内运输商 +Hermes Germany,hermes_de,国际运输商 +Hermesworld,hermesworld,国际运输商 +环国运物流,hgy56,国内运输商 +华瀚快递,hhair56,国内运输商 +Highway,highway,国际运输商 +猴急送,hjs,国内运输商 +汇捷物流,hjwl,国内运输商 +华光国际快运,hkhuaguang,国内运输商 +共联配,hlpgyl,国内运输商 +顺时达物流,hnssd56,国内运输商 +益企发物流,hnyqf,国内运输商 +中强物流,hnzqwl,国内运输商 +Holisol,holisollogistics,国际运输商 +洪都拉斯,honduras,国际邮政 +红背心,hongbeixin,国内运输商 +宏捷国际物流,hongjie,国际运输商 +宏品物流,hongpinwuliu,国内运输商 +红远物流,hongywl,国内运输商 +海派国际速递,hpexpress,国际运输商 +速远同城快递,hrbsydrd,国内运输商 +卓烨快递,hrbzykd,国内运输商 +克罗地亚(Hrvatska Posta),hrvatska,国际邮政 +寰世达国际物流,hsdexpress,国际运输商 +海硕高铁速递,hsgtsd,国内运输商 +海淘物流,ht22,国内运输商 +华达快运,huada,国内运输商 +环东物流,huandonglg,国内运输商 +华企快运,huaqikuaiyun,国内运输商 +华夏货运,huaxiahuoyun,国内运输商 +驼峰国际,humpline,国际运输商 +hunter Express,hunterexpress,国际运输商 +上海昊宏国际货物,hyk,国际运输商 +中电华远物流,hywuliu,国内运输商 +恒宇运通,hyytes,国内运输商 +华航快递,hzpl,国内运输商 +IB Courier,ibcourier,国际运输商 +冰岛(Iceland Post),iceland,国际邮政 +ID Express,idexpress,国际运输商 +泛太优达,iex,国内运输商 +无限速递,igcaexpress,国内运输商 +ILYANG,ilyang,国际运输商 +iMile,imile,国际运输商 +INDOPAKET,indopaket,国际运输商 +InPost Paczkomaty,inpost_paczkomaty,国际运输商 +捷运达快递,interjz,国内运输商 +Interlink Express,interlink,国际运输商 +Interparcel,interparcel,国际运输商 +UPS i-parcel,iparcel,国际运输商 +伊朗(Iran Post),iran,国际邮政 +"爱淘速递,",itaoexpress,国内运输商 +IXPRESS,ixpress,国际运输商 +驿扬国际速运,iyoungspeed,国际运输商 +牙买加(Jamaica Post),jamaicapost,国际邮政 +janio,janio,国际运输商 +jcex,jcex,国际运输商 +泽西岛,jerseypost,国际运输商 +Jet Express,jetexpresseg,国际运输商 +澳速通国际速递,jetexpressgroup,国际运输商 +J&T Express,jetexpresszh,国际运输商 +捷仕,jetstarexp,国内运输商 +佳豪鑫物流,jhx56,国内运输商 +加佳物流,jiajiawl,国内运输商 +捷世通物流,jieshitong,国内运输商 +极光转运,jiguang,国际运输商 +锦程物流,jinchengwuliu,国内运输商 +近端,jinduan,国内运输商 +晋越快递,jinyuekuaidi,国内运输商 +盈通物流,jisu,国内运输商 +急先达,jixianda,国内运输商 +吉祥邮(澳洲),jixiangyouau,国际运输商 +佳捷翔物流,jjx888,国内运输商 +国迅物流,jmguoxun,国内运输商 +约旦(Jordan Post),jordan,国际邮政 +Jumia,jumia,国际运输商 +骏丰国际速递,junfengguoji,国际运输商 +聚物物流,juwu,国内运输商 +聚中大,juzhongda,国内运输商 +集先锋快递,jxfex,国内运输商 +Kaha Epress,kahaexpress,国际运输商 +Kangaroo Express,kangaroo,国际运输商 +哈萨克斯坦(Kazpost),kazpost,国际邮政 +KCS,kcs,国际运输商 +肯尼亚(POSTA KENYA),kenya,国际邮政 +Kerry Express-泰国,kerrythailand,国际运输商 +Kerry Express-泰国,kerrythailanden,国际运输商 +启邦国际物流,keypon,国际运输商 +快服务,kfwnet,国内运输商 +Kuehne + Nagel,kn,国际运输商 +考拉速递,koalaexp,国内运输商 +韩国邮政韩文,koreapostkr,国际邮政 +淘韩国际快递,krtao,国际运输商 +Kuehne+Nagel,kuehnenagel,国际运输商 +KURASI,kurasi,国际运输商 +吉尔吉斯斯坦(Kyrgyz Post),kyrgyzpost,国际邮政 +蓝镖快递,lanbiaokuaidi,国内运输商 +蓝弧快递,lanhukuaidi,国内运输商 +老挝(Lao Express) ,lao,国际运输商 +塞内加尔,laposte,国际邮政 +林安物流,lasy56,国内运输商 +拉脱维亚(Latvijas Pasts),latviaen,国际邮政 +立白宝凯物流,lbbk,国内运输商 +禄昌物流,lc56,国内运输商 +林道国际快递-英文,ldxpres,国际运输商 +楽道物流,ledaowuliu,国内运输商 +乐递供应链,ledii,国内运输商 +云豹国际货运,leopard,国际运输商 +莱索托(Lesotho Post),lesotho,国际邮政 +Laxship,lexship,国际运输商 +黎巴嫩(Liban Post),libanpost,国际邮政 +Lion Parcel,lionparcel,国际运输商 +丽狮物流,lishi,国内运输商 +润禾物流,liujiashen,国内运输商 +良藤国际速递,lmfex,国际运输商 +Loadbugs,loadbugs,国际运输商 +華信物流WTO,logistics,国际运输商 +隆浪快递,longlangkuaidi,国内运输商 +长风物流,longvast,国内运输商 +Loomis Express,loomisexpress,国际运输商 +论道国际物流,lundao,国际运输商 +卢森堡(Luxembourg Post),luxembourg,国际邮政 +卢森堡(Luxembourg Post),luxembourgde,国际运输商 +卢森堡(Luxembourg Post),luxembourgfr,国际运输商 +路遥物流,luyao,国内运输商 +路尊物流,luzun,国内运输商 +LWE,lwe,国际运输商 +马其顿(Macedonian Post),macedonia,国际邮政 +Maersk,maersk,国际运输商 +mailamericas,mailamericas,国内运输商 +迈隆递运,mailongdy,国内运输商 +Mainfreight,mainfreight,国际运输商 +马来西亚大包、EMS(Malaysia Post(parcel,EMS)),malaysiaems,国际邮政 +马来西亚小包(Malaysia Post(Registered)),malaysiapost,国际邮政 +马耳他(Malta Post),malta,国际邮政 +芒果速递,mangguo,国内运输商 +MAS Courier Servic,mascourierservice,国际运输商 +Matkahuolto,matkahuolto,国际运输商 +毛里求斯(Mauritius Post),mauritius,国际邮政 +澳洲迈速快递,maxeedexpress,国际运输商 +MCIH国际快递,mcih,国内运输商 +Middle East Courier service,mecs,国际运输商 +金域达物流,med56,国际运输商 +美邦国际快递,meibang,国际运输商 +美达快递,meidaexpress,国内运输商 +Merage ,merage,国际运输商 +墨西哥(Correos de Mexico),mexico,国际邮政 +Mexico Senda Express,mexicodenda,国际运输商 +名航速运,mhsy,国内运输商 +银河物流,milkyway,国内运输商 +Mitsui OSK Lines,mol,国际运输商 +摩尔多瓦(Posta Moldovei),moldova,国际邮政 +蒙古国(Mongol Post) ,mongolpost,国际邮政 +黑山(Posta Crne Gore),montenegro,国际邮政 +摩洛哥 ( Morocco Post ),morocco,国际邮政 +MRW,mrw,国际运输商 +中俄速通(淼信),mxe56,国内运输商 +mylerz,mylerz,国际运输商 +新亚物流,nalexpress,国内运输商 +纳米比亚(NamPost),namibia,国际邮政 +NandanCourier,nandan,国际运输商 +NAQEL Express,naqel,国际运输商 +Nationex,nationex,国际运输商 +早道佳,nbhtt,国内运输商 +荷兰速递(Nederland Post),nederlandpost,国际邮政 +尼泊尔(Nepal Postal Services),nepalpost,国际邮政 +Network Courier,networkcourier,国际运输商 +Newgistics,newgistics,国际运输商 +尼日利亚(Nigerian Postal),nigerianpost,国际邮政 +ninja xpress,ninjaxpress,国际运输商 +Nippon Express,nipponexpress,国际运输商 +牛仔速运,niuzaiexpress,国内运输商 +NLE,nle,国际运输商 +亚欧专线,nlebv,国际运输商 +华赫物流,nmhuahe,国内运输商 +Nok Courier,nokcourier,国际运输商 +Norsk Global,norsk_global,国际运输商 +Nova Poshta,novaposhta,国际运输商 +"诺客来,",nuokelai,国内运输商 +偌亚奥国际快递,nuoyaao,国际运输商 +NYK Line,nyk,国际运输商 +OCS ANA Group,ocsindia,国际运输商 +无限配,omni2,国内运输商 +Omni Parcel,omniparcel,国际运输商 +One World Express,oneworldexpress,国际运输商 +OPEK,opek,国际运输商 +OPEX,opex,国际运输商 +波音速递,overseaex,国内运输商 +Packlink,packlink,国际运输商 +巴基斯坦(Pakistan Post),pakistan,国际邮政 +巴拿马,panama,国际邮政 +Pandu Logistics,pandulogistics,国内运输商 +巴拉圭(Correo Paraguayo),paraguay,国际运输商 +Park N Pracel,parknparcel,国际运输商 +paxel,paxel,国际运输商 +paxelen,paxelen,国际运输商 +PCA Express,pcaexpress,国际运输商 +普畅物流,pcwl56,国内运输商 +派尔快递,peex,国内运输商 +配思货运,peisihuoyunkuaidi,国内运输商 +陪行物流,peixingwuliu,国内运输商 +鹏远国际速递,pengyuanexpress,国际运输商 +佩奇集运,peppaship,国内运输商 +Perfect Service,perfectservice,国际运输商 +秘鲁(SERPOST),peru,国际邮政 +Presto,pesto,国际运输商 +pickupp,pickupp,国际运输商 +品速心达快递,pinsuxinda,国内运输商 +品信快递,pinxinkuaidi,国内运输商 +先锋国际快递,pioneer,国际运输商 +北极星快运,polarisexpress,国内运输商 +葡萄牙(Portugal CTT),portugalctten,国际运输商 +Portugal Seur,portugalseur,国际运输商 +POS INDONESIA,posindonesia,国际运输商 +坦桑尼亚(Tanzania Posts Corporation),posta,国际邮政 +挪威(Posten Norge),postennorge,国际邮政 +荷兰邮政-中国件,postnlchina,国际邮政 +巴布亚新几内亚(PNG Post),postpng,国际邮政 +PP速运,ppsuyun,国内运输商 +PT Prima Multi Cipta,primamulticipta,国际运输商 +土耳其,ptt,国际邮政 +Purolator,purolator,国际运输商 +雪域快递,qhxykd,国内运输商 +千里速递,qianli,国内运输商 +启辰国际速递,qichen,国际运输商 +卡塔尔(Qatar Post),qpost,国际邮政 +全日通,quanritongkuaidi,国内运输商 +Qxpress,qxpress,国际运输商 +全之鑫物流,qzx56,国内运输商 +R2S Logistics,r2slogistics,国际运输商 +RAM,ramgroup_za,国际运输商 +Rapido Cargo Egypt,rapidocargoeg,国际运输商 +Red Express,redexpress,国际运输商 +Redur,redur,国际运输商 +Redur Spain,redur_es,国际运输商 +人人转运,renrenex,国内运输商 +叙利亚(Syrian Post),republic,国际邮政 +睿和泰速运,rhtexpress,国内运输商 +锐界同城速递,rjtcsd,国内运输商 +RL Carriers,rl_carriers,国际运输商 +罗马尼亚(Posta Romanian),romanian,国际邮政 +皇家国际速运,royal,国内运输商 +rpx,rpx,国际运输商 +日日通国际,rrthk,国际运输商 +瑞典(Sweden Post),ruidianyouzhengen,国际邮政 +润百特货,runbail,国内运输商 +卢旺达(Rwanda i-posita),rwanda,国际运输商 +佐川急便-英文,sagawaen,国际运输商 +Correo El Salvador,salvador,国际邮政 +萨摩亚(Samoa Post),samoa,国际邮政 +三盛快递,sanshengco,国内运输商 +盛德国际墨西哥物流,sanstar,国内运输商 +SCCS,sccs,国际运输商 +SCG,scglogistics,国际运输商 +中加国际快递,scic,国际运输商 +速佳达快运,scsujiada,国内运输商 +四川星程快递,scxingcheng,国内运输商 +森鼎国际物流,sendinglog,国际运输商 +Sendle,sendle,国际运输商 +塞尔维亚(PE Post of Serbia),serbia,国际邮政 +International Seur,seur,国际运输商 +SFC,sfc,国际运输商 +SFC Service,sfcservice,国际运输商 +十方通物流,sfift,国内运输商 +Shadowfax,shadowfax,国际运输商 +穗航物流,shallexp,国内运输商 +衫达快运,shanda56,国内运输商 +尚橙物流,shangcheng,国内运输商 +上海无疆for买卖宝,shanghaiwujiangmmb,国际运输商 +尚途国际货运,shangtuguoji,国内运输商 +山西建华,shanxijianhua,国内运输商 +捎客物流,shaoke,国内运输商 +杰响物流,shbwch,国内运输商 +商海德物流,shd56,国内运输商 +神马快递,shenma,国内运输商 +阳光快递,shiningexpress,国内运输商 +ShipBlu,shipblu,国际运输商 +王牌快递,shipbyace,国内运输商 +苏豪快递,shipsoho,国内运输商 +世运快递,shiyunkuaidi,国内运输商 +SHL畅灵国际物流,shlexp,国际运输商 +shreeanjanicourier,shreeanjanicourier,国际运输商 +顺邦国际物流,shunbang,国际运输商 +四海捷运,sihiexpress,国内运输商 +Siodemka,siodemka,国际运输商 +易普递,sixroad,国内运输商 +Sky Express,skyexpresseg,国际运输商 +SkyNet Malaysia,skynetmalaysia,国际运输商 +skynetworldwide,skynetworldwide,国际运输商 +荷兰Sky Post,skypost,国际邮政 +斯洛文尼亚(Slovenia Post),slovenia,国际邮政 +斯里兰卡(Sri Lanka Post),slpost,国际邮政 +所罗门群岛,solomon,国际邮政 +布基纳法索,sonapost,国际邮政 +水趣到家,sooeasy,国内运输商 +行必达,speeda,国内运输商 +Speedaf,speedaf,国际运输商 +SpeedEx,speedex,国际运输商 +申必达,speedoex,国内运输商 +Spoton,spoton,国际运输商 +Sprint,sprint,国际运输商 +首通快运,staky,国内运输商 +星运快递,staryvr,国内运输商 +圣卢西亚,stlucia,国际邮政 +速豹,subaoex,国内运输商 +速呈宅配,sucheng,国内运输商 +特急便物流,sucmj,国内运输商 +苏丹(Sudapost),sudapost,国际邮政 +速风快递,sufengkuaidi,国内运输商 +穗佳物流,suijiawuliu,国内运输商 +速配欧翼,superoz,国际运输商 +斯威士兰,swaziland,国际邮政 +顺友物流,sypost,国际运输商 +深圳DPEX,szdpex,国际运输商 +宇达物流,szyudawl,国内运输商 +中时顺物流,szzss,国内运输商 +Talabat ,talabat,国际运输商 +坦桑尼亚(Tanzania Posts),tanzania,国际邮政 +淘布斯国际物流,taoplus,国际运输商 +淘特物流快递,taote,国内运输商 +TCI XPS,tcixps,国际运输商 +The BlueBhell Couriers,thebluebhellcouriers,国际运输商 +The Courier Guy,thecourierguy,国际运输商 +天翔快递,tianxiang,国内运输商 +天纵物流,tianzong,国内运输商 +TiKi,tiki,国际运输商 +TIPSA,tipsa,国际运输商 +Shree Tirupati,tirupati,国际运输商 +天联快运,tlky,国内运输商 +株式会社T.M.G,tmg,国内运输商 +TNT Post,tntpostcn,国际邮政 +TNT UK,tntuk,国际运输商 +多哥,togo,国际邮政 +Toll Priority(Toll Online),tollpriority,国际运输商 +通和天下,tonghetianxia,国内运输商 +通胜物流,tongshengwj,国内运输商 +顶世国际物流,topshey,国际运输商 +中运全速,topspeedex,国内运输商 +The Professional Couriers,tpcindia,国际运输商 +track-parcel,trackparcel,国际运输商 +Trans Kargo,transkargologistics,国际运输商 +Transporter Egypt,transporter,国际运输商 +Turbo,turbo,国际运输商 +海龟国际快递,turtle,国际运输商 +UBX,ubx,国际运输商 +UEX国际物流,uex,国际运输商 +欧洲UEX,uexiex,国际邮政 +Ufelix,ufelix,国际运输商 +乌干达(Posta Uganda),uganda,国际邮政 +邮鸽速运,ugoexpress,国内运输商 +优海国际速递,uhi,国际运输商 +乌克兰邮政包裹,ukrpostcn,国际邮政 +Uni Express,uniexpress,国际运输商 +Union Courier SAE,unioncourier,国际运输商 +United express courier service,unitedexpress,国际运输商 +UParcel,uparcel,国际运输商 +UPS Freight,upsfreight,国际运输商 +UPS Mail Innovations,upsmailinno,国际运输商 +速翼快递,usasueexpress,国内运输商 +USPSCN,uspscn,国际运输商 +UTAO优到,utaoscm,国际运输商 +瓦努阿图(Vanuatu Post),vanuatu,国际邮政 +越中国际物流,vctrans,国际运输商 +越南小包(Vietnam Posts),vietnam,国际邮政 +鹰运国际速递,vipexpress,国际运输商 +Voo,voo,国际运输商 +维普恩物流,vps,国内运输商 +Wadily,wadily,国际运输商 +Wahana,wahana,国际运输商 +豌豆物流,wandougongzhu,国内运输商 +WassalNow,wassalnow,国际运输商 +WATT,watt,国内运输商 +万达美,wdm,国内运输商 +Wedel,wedel,国际运输商 +wedepot物流,wedepot,国际运输商 +世航通运,welogistics,国内运输商 +Whistl,whistl,国际运输商 +万邑通,winit,国内运输商 +凡仕特物流,wlfast,国内运输商 +万理诺物流,wln,国内运输商 +渥途国际速运,wotu,国际运输商 +wowexpress,wowexpress,国际运输商 +渭鹏速递,wpost56,国内运输商 +WTD海外通,wtdex,国际运输商 +臣邦同城,wto56kj,国内运输商 +欧利,wxolys,国内运输商 +蓝天物流,xflt56,国内运输商 +祥龙运通物流,xianglongyuntong,国内运输商 +新元快递,xingyuankuaidi,国内运输商 +鑫梦成,xinmengcheng,国内运输商 +西邮寄,xipost,国际运输商 +Xpert Delivery,xpertdelivery,国际运输商 +XpressBees,xpressbees,国际运输商 +鑫世锐达,xsrd,国内运输商 +迅选物流,xunxuan,国内运输商 +YCG物流,ycgglobal,国际运输商 +云达通,ydglobe,国内运输商 +也门(Yemen Post),yemen,国际邮政 +易达通,yidatong,国内运输商 +EMAYYA,yidazhuanyun,国际运输商 +驿递汇速递,yidihui,国内运输商 +宜送物流,yiex,国内运输商 +易航物流,yihangmall,国内运输商 +yikonn,yikonn,国际运输商 +亿领速运,yilingsuyun,国内运输商 +英超物流,yingchao,国际运输商 +易欧洲国际物流,yiouzhou,国际运输商 +一起送,yiqisong,国内运输商 +益加盛快递,yjs,国内运输商 +亚历克斯供应链,ylkswl,国内运输商 +邮驿帮高铁速运,youyibang,国内运输商 +永世通物流,ystsd,国内运输商 +元智捷诚,yuanzhijiecheng,国内运输商 +御风速运,yufeng,国内运输商 +一运全成物流,yyqc56,国内运输商 +珠峰速运,zf365,国内运输商 +招金精炼,zhaojin,国内运输商 +众辉达物流,zhdwl,国内运输商 +中天万运,zhongtianwanyun,国内运输商 +卓实快运,zhuoshikuaiyun,国内运输商 +创运物流,zjcy56,国内运输商 +振捷国际货运,zjgj56,国际运输商 +ZTE中兴物流,zteexpress,国际运输商 +中途国际速递,ztsdu,国内运输商 diff --git a/BBWYB.Server.Business/KuaiDi100Manager.cs b/BBWYB.Server.Business/KuaiDi100Manager.cs new file mode 100644 index 0000000..0ef93af --- /dev/null +++ b/BBWYB.Server.Business/KuaiDi100Manager.cs @@ -0,0 +1,121 @@ +using BBWYB.Common.Http; +using BBWYB.Common.Models; +using Newtonsoft.Json; +using SDKAdapter; +using System.Collections.Generic; +using System.Reflection; + +namespace BBWYB.Server.Business +{ + public class KuaiDi100Manager : IDenpendency + { + private RestApiService restApiService; + + public IList KuaiDi100PushStateList_ZaiTu = new List() { 0, 1001, 1002, 1003 }; + public IList KuaiDi100PushStateList_LanShou = new List() { 1, 101, 102, 103 }; + public IList KuaiDi100PushStateList_QianShou = new List() { 3, 301, 302, 303, 304 }; + public IList KuaiDi100PushStateList_PaiJian = new List() { 5, 501 }; + private IList kuaiDi100ExpressCompanyList; + + public KuaiDi100Manager(RestApiService restApiService) + { + this.restApiService = restApiService; + + kuaiDi100ExpressCompanyList = new List(); + var lines = File.ReadAllLines(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "KuaiDi100ExpressCompany.txt"), System.Text.Encoding.UTF8); + foreach (var line in lines) + { + var array = line.Split(',', StringSplitOptions.RemoveEmptyEntries); + if (!array[2].Contains("国内")) + continue; + kuaiDi100ExpressCompanyList.Add(new KuaiDi100ExpressCompany() + { + ExpressId = array[1], + ExpressName = array[0], + Type = array[2] + }); + } + } + + + /// + /// 订阅快递100 + /// + /// + /// + /// + public void SubscribeKuaiDi100(string waybillno, string kuaidi100CompanyCode, string callbackUrl) + { + if (string.IsNullOrEmpty(kuaidi100CompanyCode)) + throw new Exception("缺少快递100公司编码"); + + var paramStr = JsonConvert.SerializeObject(new + { + company = kuaidi100CompanyCode, + number = waybillno, + key = "SdcRPzxo8802", + parameters = new + { + callbackurl = callbackUrl, + salt = Guid.NewGuid(), + resultv2 = "4" + } + }); + var subscribeResult = restApiService.SendRequest("https://poll.kuaidi100.com", "poll", $"schema=json¶m={paramStr}", null, HttpMethod.Post, RestApiService.ContentType_Form); + if (subscribeResult.StatusCode != System.Net.HttpStatusCode.OK) + throw new Exception(subscribeResult.Content); + var subscribeResponse = JsonConvert.DeserializeObject(subscribeResult.Content); + if (!subscribeResponse.result) + throw new Exception(subscribeResponse.message); + } + + /// + /// 获取物流状态 ZaiTu LanShou QianShou PaiJian Unknow + /// + /// + /// + public string GetExpressState(int kuaidi100State) + { + if (KuaiDi100PushStateList_ZaiTu.Contains(kuaidi100State)) + return "ZaiTu"; + if (KuaiDi100PushStateList_LanShou.Contains(kuaidi100State)) + return "LanShou"; + if (KuaiDi100PushStateList_QianShou.Contains(kuaidi100State)) + return "QianShou"; + if (KuaiDi100PushStateList_PaiJian.Contains(kuaidi100State)) + return "PaiJian"; + return "Unknow"; + } + + public IList GetKuaiDi100ExpressCompanyList(KuaiDi100ExpressSearchRequest request) + { + if (string.IsNullOrEmpty(request.ExpressName)) + return kuaiDi100ExpressCompanyList; + else + return kuaiDi100ExpressCompanyList.Where(x => x.ExpressName.Contains(request.ExpressName)).ToList(); + } + } + + public class KuaiDi100SubscribeResponse + { + public bool result { get; set; } + + public int returnCode { get; set; } + + public string message { get; set; } + } + + public class KuaiDi100ExpressCompany + { + public string ExpressId { get; set; } + + public string ExpressName { get; set; } + + public string Type { get; set; } + } + + public class KuaiDi100ExpressSearchRequest + { + public string ExpressName { get; set; } + } +} diff --git a/BBWYB.Server.Business/Order/OrderBusiness.cs b/BBWYB.Server.Business/Order/OrderBusiness.cs index 48ec72e..92c009c 100644 --- a/BBWYB.Server.Business/Order/OrderBusiness.cs +++ b/BBWYB.Server.Business/Order/OrderBusiness.cs @@ -33,9 +33,9 @@ namespace BBWYB.Server.Business .LeftJoin((o, ocs, oct) => o.Id == ocs.OrderId) .LeftJoin((o, ocs, oct) => o.Id == oct.OrderId); if (!string.IsNullOrEmpty(request.OrderId)) - { select = select.Where((o, ocs, oct) => o.Id == request.OrderId); - } + else if (!string.IsNullOrEmpty(request.OrderSn)) + select = select.Where((o, ocs, oct) => o.OrderSn == request.OrderSn); else { if (!string.IsNullOrEmpty(request.Sku) || !string.IsNullOrEmpty(request.SourceSku) || !string.IsNullOrEmpty(request.ProductId)) @@ -53,8 +53,18 @@ namespace BBWYB.Server.Business .Where(opi => opi.PurchaseOrderId == request.PurchaseOrderId); select = select.Where((o, ocs, oct) => childSelect.Where(opi => opi.OrderId == o.Id).Any()); } - - select = select.WhereIf(request.OrderState != null, (o, ocs, oct) => o.OrderState == request.OrderState) + select = select.WhereIf(request.OrderState == Enums.OrderState.待付款 || + request.OrderState == Enums.OrderState.打包中 || + request.OrderState == Enums.OrderState.待完结 || + request.OrderState == Enums.OrderState.已完成 || + request.OrderState == Enums.OrderState.已取消, + (o, ocs, oct) => o.OrderState == request.OrderState) + .WhereIf(request.OrderState == Enums.OrderState.等待采购, (o, ocs, oct) => o.OrderState == Enums.OrderState.等待采购 || + o.OrderState == Enums.OrderState.部分采购) + .WhereIf(request.OrderState == Enums.OrderState.待发货, (o, ocs, oct) => o.OrderState == Enums.OrderState.待发货 || + o.OrderState == Enums.OrderState.部分发货) + .WhereIf(request.OrderState == Enums.OrderState.待收货, (o, ocs, oct) => o.OrderState == Enums.OrderState.待收货 || + o.OrderState == Enums.OrderState.部分收货) .WhereIf(request.IsWaitConfig, (o, ocs, oct) => o.OrderState != Enums.OrderState.已取消 && o.IsPurchased == true) .WhereIf(request.StartDate != null, (o, ocs, oct) => o.StartTime >= request.StartDate) .WhereIf(request.EndDate != null, (o, ocs, oct) => o.StartTime <= request.EndDate) @@ -153,15 +163,17 @@ namespace BBWYB.Server.Business #region 处理采购信息 var orderPurchaseInfoList = fsql.Select().Where(op => orderIdList.Contains(op.OrderId) && op.IsEnabled == true).ToList(); - var orderPurchaseSkuInfoList = fsql.Select().Where(o => orderIdList.Contains(o.OrderId)).ToList(); + var orderPurchaseSkuInfoList = fsql.Select().Where(o => orderIdList.Contains(o.OrderId)).ToList(); + + var purchaseExpressOrderList = fsql.Select().Where(peo => orderIdList.Contains(peo.OrderId)).ToList(); foreach (var order in orderList) { order.OrderPurchaseInfoList = orderPurchaseInfoList.Where(op => op.OrderId == order.Id).ToList(); - foreach (var purchaseOrder in order.OrderPurchaseInfoList) + foreach (var orderPurchaseInfo in order.OrderPurchaseInfoList) { - purchaseOrder.ExpressState = orderPurchaseSkuInfoList.FirstOrDefault(x => !string.IsNullOrEmpty(x.ExpressState) && - x.PurchaseOrderId == purchaseOrder.PurchaseOrderId)?.ExpressState; + orderPurchaseInfo.OrderPurchaseSkuInfoList = orderPurchaseSkuInfoList.Where(opsi => opsi.PurchaseOrderId == orderPurchaseInfo.PurchaseOrderId).ToList(); + orderPurchaseInfo.PurchaseExpressOrderList = purchaseExpressOrderList.Where(peo => peo.PurchaseOrderId == orderPurchaseInfo.PurchaseOrderId).ToList(); } } @@ -174,73 +186,81 @@ namespace BBWYB.Server.Business }; } - public void OutStock(OutStockRequest request) - { - var dbOrder = fsql.Select(request.OrderId).ToOne(); - if (dbOrder == null) - throw new BusinessException($"订单{request.OrderId}不存在"); - //if (dbOrder.OrderState != Enums.OrderState.待出库) - // throw new BusinessException($"订单{request.OrderId} 只有在待出库时才允许出库"); - - if (!string.IsNullOrEmpty(request.TargetExpressId)) - { - try - { - opPlatformClientFactory.GetClient((AdapterEnums.PlatformType)request.Platform) - .OutStock(new OP_OutStockRequest() - { - AppKey = request.AppKey, - AppSecret = request.AppSecret, - AppToken = request.AppToken, - ExpressId = request.TargetExpressId, - ExpressName = request.TargetExpressName, - OrderId = request.OrderId, - Platform = (AdapterEnums.PlatformType)request.Platform, - WayBillNo = request.WayBillNo - }); - } - catch (Exception ex) - { - nLogManager.Default().Error(ex, $"OutStock Request {JsonConvert.SerializeObject(request)}"); - } - } - - #region 通知C端出库 - //通知C端 - try - { - restApiService.SendRequest("https://bbwy.qiyue666.com", - "/Api/PurchaseOrder/QuanTanSendGoodsCallback", - new - { - OrderId = request.OrderId, - ExpressId = request.SourceExpressId, - ExpressName = request.SourceExpressName, - request.WayBillNo - }, - null, - HttpMethod.Post); - } - catch (Exception ex) - { - - } - #endregion - - fsql.Transaction(() => - { - fsql.Update().Where(opi => opi.PurchaseOrderId == request.PurchaseOrderId) - .Set(opi => opi.WaybillNo, request.WayBillNo) - .Set(opi => opi.SourceExpressId, request.SourceExpressId) - .Set(opi => opi.SourceExpressName, request.SourceExpressName) - .Set(opi => opi.TargetExpressId, request.TargetExpressId) - .Set(opi => opi.TargetExpressName, request.TargetExpressName) - .ExecuteAffrows(); - - if (dbOrder.OrderState == Enums.OrderState.待出库) - fsql.Update(request.OrderId).Set(o => o.OrderState, Enums.OrderState.待收货).ExecuteAffrows(); - }); - } + //public void OutStock(OutStockRequest request) + //{ + // var dbOrder = fsql.Select(request.OrderId).ToOne(); + // if (dbOrder == null) + // throw new BusinessException($"订单{request.OrderId}不存在"); + + // var dbOrderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == request.OrderId && opi.IsEnabled == true).ToList(); + // var dbOrderPurchaseInfo = dbOrderPurchaseInfoList.FirstOrDefault(opi => opi.PurchaseOrderId == request.PurchaseOrderId); + + // dbOrderPurchaseInfo.WaybillNo = request.WayBillNo; + // dbOrderPurchaseInfo.SourceExpressId = request.SourceExpressId; + // dbOrderPurchaseInfo.SourceExpressName = request.SourceExpressName; + // dbOrderPurchaseInfo.TargetExpressId = request.TargetExpressId; + // dbOrderPurchaseInfo.TargetExpressName = request.TargetExpressName; + // dbOrderPurchaseInfo.OrderState = Enums.PurchaseOrderState.待收货; + + // #region 订单状态 + // dbOrder.CalculationOrderState(fsql, null, dbOrderPurchaseInfoList); + // #endregion + + // if (!string.IsNullOrEmpty(request.TargetExpressId)) + // { + // #region 订阅快递100 + + // #endregion + + // //try + // //{ + // // opPlatformClientFactory.GetClient((AdapterEnums.PlatformType)request.Platform) + // // .OutStock(new OP_OutStockRequest() + // // { + // // AppKey = request.AppKey, + // // AppSecret = request.AppSecret, + // // AppToken = request.AppToken, + // // ExpressId = request.TargetExpressId, + // // ExpressName = request.TargetExpressName, + // // OrderId = request.OrderId, + // // Platform = (AdapterEnums.PlatformType)request.Platform, + // // WayBillNo = request.WayBillNo + // // }); + // //} + // //catch (Exception ex) + // //{ + // // nLogManager.Default().Error(ex, $"OutStock Request {JsonConvert.SerializeObject(request)}"); + // //} + // } + + // #region 通知C端出库 + // //通知C端 + // try + // { + // restApiService.SendRequest("https://bbwy.qiyue666.com", + // "/Api/PurchaseOrder/QuanTanSendGoodsCallback", + // new + // { + // OrderId = request.OrderId, + // ExpressId = request.SourceExpressId, + // ExpressName = request.SourceExpressName, + // request.WayBillNo + // }, + // null, + // HttpMethod.Post); + // } + // catch (Exception ex) + // { + + // } + // #endregion + + // fsql.Transaction(() => + // { + // fsql.Update().SetSource(dbOrderPurchaseInfo).ExecuteAffrows(); + // fsql.Update(request.OrderId).Set(o => o.OrderState, dbOrder.OrderState).ExecuteAffrows(); + // }); + //} public void CancelOrder(CancelOrderRequest request, string mdsToken) { diff --git a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs index 54c20be..c5572a3 100644 --- a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs +++ b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs @@ -1,54 +1,66 @@ using BBWYB.Common.Http; using BBWYB.Common.Log; using BBWYB.Common.Models; +using BBWYB.Server.Business.Extensions; using BBWYB.Server.Model; using BBWYB.Server.Model.Db; +using BBWYB.Server.Model.Db.Mds; using BBWYB.Server.Model.Db.MDS; using BBWYB.Server.Model.Dto; using FreeSql; +using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using SDKAdapter; -using SDKAdapter.OperationPlatform.Models; using SDKAdapter.PurchasePlatform.Client; using SDKAdapter.PurchasePlatform.Models; using System.Text; using Yitter.IdGenerator; -using BBWYB.Server.Business.Extensions; namespace BBWYB.Server.Business { public class PurchaseOrderBusiness : BaseBusiness, IDenpendency { - private PP_PlatformClientFactory ppPlatformClientFactory; - private TaskSchedulerManager taskSchedulerManager; - private FreeSqlMultiDBManager fsqlManager; - private OrderBusiness orderBusiness; - private VenderBusiness venderBusiness; - private PurchaseSchemeBusiness purchaseSchemeBusiness; - private ExpressCompanyNameConverter expressCompanyNameConverter; - private RestApiService restApiService; + private Lazy pplatformClientFactoryLazy; + private Lazy taskSchedulerManagerLazy; + private Lazy fsqlManagerLazy; + private Lazy expressCompanyNameConverterLazy; + private Lazy kuaiDi100ManagerLazy; + private Lazy dingDingBusinessLazy; + private Lazy qiKuManagerLazy; + private Lazy restApiServiceLazy; + + private PP_PlatformClientFactory ppPlatformClientFactory => pplatformClientFactoryLazy.Value; + private TaskSchedulerManager taskSchedulerManager => taskSchedulerManagerLazy.Value; + private FreeSqlMultiDBManager fsqlManager => fsqlManagerLazy.Value; + private ExpressCompanyNameConverter expressCompanyNameConverter => expressCompanyNameConverterLazy.Value; + private KuaiDi100Manager kuaiDi100Manager => kuaiDi100ManagerLazy.Value; + private DingDingBusiness dingDingBusiness => dingDingBusinessLazy.Value; + private QiKuManager qiKuManager => qiKuManagerLazy.Value; + private RestApiService restApiService => restApiServiceLazy.Value; + + private IList cantPurchaseOrderStateList; public PurchaseOrderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, - PP_PlatformClientFactory ppPlatformClientFactory, - TaskSchedulerManager taskSchedulerManager, - FreeSqlMultiDBManager fsqlManager, - OrderBusiness orderBusiness, - VenderBusiness venderBusiness, - PurchaseSchemeBusiness purchaseSchemeBusiness, - ExpressCompanyNameConverter expressCompanyNameConverter, - RestApiService restApiService) : base(fsql, nLogManager, idGenerator) + IServiceProvider serviceProvider) : base(fsql, nLogManager, idGenerator) { - this.ppPlatformClientFactory = ppPlatformClientFactory; - this.taskSchedulerManager = taskSchedulerManager; - this.fsqlManager = fsqlManager; - this.orderBusiness = orderBusiness; - this.venderBusiness = venderBusiness; - this.expressCompanyNameConverter = expressCompanyNameConverter; - this.restApiService = restApiService; - this.purchaseSchemeBusiness = purchaseSchemeBusiness; + pplatformClientFactoryLazy = new Lazy(() => serviceProvider.GetService()); + taskSchedulerManagerLazy = new Lazy(() => serviceProvider.GetService()); + fsqlManagerLazy = new Lazy(() => serviceProvider.GetService()); + expressCompanyNameConverterLazy = new Lazy(() => serviceProvider.GetService()); + kuaiDi100ManagerLazy = new Lazy(() => serviceProvider.GetService()); + dingDingBusinessLazy = new Lazy(() => serviceProvider.GetService()); + qiKuManagerLazy = new Lazy(() => serviceProvider.GetService()); + restApiServiceLazy = new Lazy(() => serviceProvider.GetService()); + cantPurchaseOrderStateList = new List() + { + Enums.OrderState.已取消, + Enums.OrderState.已完成, + Enums.OrderState.待付款, + Enums.OrderState.待完结 + }; } /// @@ -93,6 +105,27 @@ namespace BBWYB.Server.Business if (request.CargoParamGroupList == null || request.CargoParamGroupList.Count() == 0) throw new BusinessException("缺少报价参数"); + #region 验证同一个批次中,一个订单sku不能同时拥有多个采购方案 + IDictionary schemeValidationDictionary = new Dictionary(); + foreach (var purchaseGroup in request.CargoParamGroupList) + { + foreach (var cargo in purchaseGroup.CargoParamList) + { + if (!schemeValidationDictionary.ContainsKey(cargo.BelongSkuId)) + schemeValidationDictionary.TryAdd(cargo.BelongSkuId, cargo.SchemeId); + + if (schemeValidationDictionary.TryGetValue(cargo.BelongSkuId, out long schemeId)) + { + if (cargo.SchemeId != schemeId) + { + throw new BusinessException($"订单sku{cargo.BelongSkuId}只允许使用一个采购方案进行报价"); + } + } + } + } + schemeValidationDictionary.Clear(); + #endregion + var extJArray = new List(); var errorBuilder = new StringBuilder(); var freightAmount = 0M; @@ -179,8 +212,8 @@ namespace BBWYB.Server.Business var dbOrder = fsql.Select(request.OrderId).ToOne(); if (dbOrder == null) throw new BusinessException("订单不存在"); - if (dbOrder.OrderState != Enums.OrderState.等待采购 && dbOrder.OrderState != Enums.OrderState.待出库) - throw new BusinessException("只能为等待采购或待出库的订单进行采购"); + if (cantPurchaseOrderStateList.Contains(dbOrder.OrderState.Value)) + throw new BusinessException($"当前订单状态:{dbOrder.OrderState},不允许采购"); if (request.Consignee == null || string.IsNullOrEmpty(request.Consignee.Address) || @@ -192,9 +225,31 @@ namespace BBWYB.Server.Business if (request.CargoParamGroupList == null || request.CargoParamGroupList.Count() == 0) throw new BusinessException("缺少下单商品参数"); + #region 验证同一个批次中,一个订单sku不能同时拥有多个采购方案 + IDictionary schemeValidationDictionary = new Dictionary(); + foreach (var purchaseGroup in request.CargoParamGroupList) + { + foreach (var cargo in purchaseGroup.CargoParamList) + { + if (!schemeValidationDictionary.ContainsKey(cargo.BelongSkuId)) + schemeValidationDictionary.TryAdd(cargo.BelongSkuId, cargo.SchemeId); + + if (schemeValidationDictionary.TryGetValue(cargo.BelongSkuId, out long schemeId)) + { + if (cargo.SchemeId != schemeId) + { + throw new BusinessException($"订单sku{cargo.BelongSkuId}只允许使用一个采购方案进行下单"); + } + } + } + } + schemeValidationDictionary.Clear(); + #endregion + + var isRepurchase = fsql.Select(dbOrder.Id).Any(); var orderSkus = fsql.Select().Where(osku => osku.Price != 0 && osku.OrderId == request.OrderId).ToList(); - + var orderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == request.OrderId && opi.IsEnabled == true).ToList(); var extJArray = JsonConvert.DeserializeObject(request.Extensions); @@ -342,6 +397,7 @@ namespace BBWYB.Server.Business PurchaseAccountId = purchaseAccount.Id, PurchaseAccountName = purchaseAccount.AccountName, PurchaseMethod = Enums.PurchaseMethod.线上采购, + OrderState = Enums.PurchaseOrderState.待发货, PurchaseOrderId = createOrderResponse.OrderId, PurchasePlatform = cargoParamGroup.PurchasePlatform, PurchaserId = cargoParamGroup.PurchaserId, @@ -395,16 +451,21 @@ namespace BBWYB.Server.Business } #endregion + #region 订单状态 + dbOrder.CalculationOrderState(fsql, orderSkus, orderPurchaseInfoList.Union(insertOrderPurchaseInfos).ToList()); + #endregion + + #region 通知C端状态 + Task.Factory.StartNew(() => SendPurchaseOrderStateToC(dbOrder.Id, dbOrder.OrderState.Value), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + fsql.Transaction(() => { if (updatePurchaseOrderIdList.Count() > 0) fsql.Update(updatePurchaseOrderIdList).Set(opi => opi.IsEnabled, false).ExecuteAffrows(); if (updateOrderCostDetailIdList.Count() > 0) fsql.Update(updateOrderCostDetailIdList).Set(ocd => ocd.IsEnabled, false).ExecuteAffrows(); - }); - fsql.Transaction(() => - { fsql.Insert(insertOrderCostDetails).ExecuteAffrows(); fsql.Insert(insertOrderPurchaseInfos).ExecuteAffrows(); fsql.Insert(insertOrderPurchaseSkuInfos).ExecuteAffrows(); @@ -413,8 +474,7 @@ namespace BBWYB.Server.Business insertOrderCost?.ExecuteAffrows(); if (updatePurchaseTimeSchemeIdList.Count() > 0) fsql.Update(updatePurchaseTimeSchemeIdList).Set(p => p.LastPurchaseTime, DateTime.Now).ExecuteAffrows(); - fsql.Update(request.OrderId).SetIf(dbOrder.OrderState == Enums.OrderState.待付款 || - dbOrder.OrderState == Enums.OrderState.等待采购, o => o.OrderState, Model.Enums.OrderState.待出库) + fsql.Update(request.OrderId).Set(o => o.OrderState, dbOrder.OrderState) .SetIf(!string.IsNullOrEmpty(request.Remark), o => o.PurchaseRemark, request.Remark) .Set(o => o.IsPurchased, true) .Set(o => o.PackConfigState, Enums.PackConfigState.待配置) @@ -482,15 +542,37 @@ namespace BBWYB.Server.Business /// public void AssociatePurchaseOrder(AssociationOrderRequest request) { + nLogManager.Default().Info($"AssociatePurchaseOrder {JsonConvert.SerializeObject(request)}"); + var dbOrder = fsql.Select(request.OrderId).ToOne(); + if (dbOrder == null) + throw new BusinessException("订单不存在"); + + if (cantPurchaseOrderStateList.Contains(dbOrder.OrderState.Value)) + throw new BusinessException($"当前订单状态:{dbOrder.OrderState},不允许关联"); + if (request.AssociationPurchaseOrderList == null || request.AssociationPurchaseOrderList.Count() == 0) throw new BusinessException("缺少采购单信息"); var dbPurchaseOrderList = fsql.Select().Where(opi => opi.OrderId == request.OrderId).ToList(); var dbInvalidPurchaseOrderIdList = dbPurchaseOrderList.Where(opi => !opi.IsEnabled).Select(opi => opi.PurchaseOrderId).ToList(); + var dbvalidPurchaseOrderList = dbPurchaseOrderList.Where(opi => opi.IsEnabled).ToList(); + if (request.AssociationPurchaseOrderList.Any(x => dbInvalidPurchaseOrderIdList.Contains(x.PurchaseOrderId))) throw new BusinessException("关联采购单时不能包含历史采购单"); + #region 数据验证 + var validation_groups_pid = request.AssociationPurchaseOrderList.GroupBy(po => po.PurchaseOrderId); + if (validation_groups_pid.Any(x => x.Count() > 1)) + throw new BusinessException("不允许包含重复的采购单"); + + foreach (var apo in request.AssociationPurchaseOrderList) + { + if (Math.Abs(apo.PurchaseAmount - apo.AssocationOrderCostDetailList.Sum(aocd => aocd.SkuAmount)) > 1) + throw new BusinessException($"采购单{apo.PurchaseOrderId}的采购货款与明细采购货款总和误差不能超过1"); + } + #endregion + #region 读取采购单中的采购账号/采购方案 IList purchaseAccountIdList = request.AssociationPurchaseOrderList.Select(x => string.IsNullOrEmpty(x.PurchaseAccountId) ? x.PurchaseAccountName : @@ -506,7 +588,7 @@ namespace BBWYB.Server.Business var dbOrderSkuList = fsql.Select().Where(osku => osku.OrderId == request.OrderId).ToList(); var dbOrderCostDetailList = fsql.Select().Where(ocd => ocd.OrderId == request.OrderId && ocd.IsEnabled == true).ToList(); var dbOrderCost = fsql.Select(request.OrderId).ToOne(); - var dbOrder = fsql.Select(request.OrderId).ToOne(); + List insertOrderPurchaseInfoList = new List(); @@ -548,7 +630,7 @@ namespace BBWYB.Server.Business #region 处理采购商Id var purchaserId = purchaseOrderSimpleInfo.PurchaserId; - if (!string.IsNullOrEmpty(purchaserId)) + if (string.IsNullOrEmpty(purchaserId)) throw new BusinessException($"采购单{purchaseOrder.PurchaseOrderId}缺少采购商Id"); purchaserId = purchaserId.Replace("b2b-", string.Empty); var purchaserId2 = purchaserId.Substring(0, purchaserId.Length - 5); @@ -577,7 +659,7 @@ namespace BBWYB.Server.Business pss.PurchaseSkuSpecId, pss.SkuPurchaseSchemeId }); - if(purchaseSchemeSkuList.Count()==0) + if (purchaseSchemeSkuList.Count() == 0) throw new BusinessException($"采购单{purchaseOrder.PurchaseOrderId} 采购商Id{purchaserId} 未匹配到采购方案"); #endregion @@ -672,6 +754,7 @@ namespace BBWYB.Server.Business BelongSkuIds = string.Join(",", purchaseOrder.AssocationOrderCostDetailList.Select(x => x.SkuId)), CreateTime = DateTime.Now, PurchaseMethod = Enums.PurchaseMethod.关联外部单, + OrderState = Enums.PurchaseOrderState.待发货, PurchaseOrderId = purchaseOrder.PurchaseOrderId, PurchasePlatform = purchaseOrder.PurchasePlatform, PurchaserId = purchaseOrder.PurchaserId, @@ -712,7 +795,8 @@ namespace BBWYB.Server.Business OrderId = request.OrderId, ProductId = dbOrderSku.ProductId, SkuId = assOrderCostDetail.SkuId, - PurchaseOrderId = purchaseOrder.PurchaseOrderId + PurchaseOrderId = purchaseOrder.PurchaseOrderId, + ShopId = request.ShopId }; } orderCostDetail.DeductionQuantity = assOrderCostDetail.PurchaseQuantity; @@ -732,13 +816,14 @@ namespace BBWYB.Server.Business } } - if (dbOrderCost == null) + var dbOrderCostIsEmpty = dbOrderCost == null; + if (dbOrderCostIsEmpty) { dbOrderCost = new OrderCost() { OrderId = request.OrderId, IsManualEdited = false, - CreateTime = DateTime.Now, + CreateTime = DateTime.Now }; } @@ -751,11 +836,19 @@ namespace BBWYB.Server.Business totalOutPackAmount ?? 0M, 0M); - if (dbOrderCost == null) + if (dbOrderCostIsEmpty) insertOrderCost = fsql.Insert(dbOrderCost); else updateOrderCost = fsql.Update().SetSource(dbOrderCost); + #region 订单状态 + dbOrder.CalculationOrderState(fsql, dbOrderSkuList, dbvalidPurchaseOrderList.Union(insertOrderPurchaseInfoList).ToList()); + #endregion + + #region 通知C端状态 + Task.Factory.StartNew(() => SendPurchaseOrderStateToC(dbOrder.Id, dbOrder.OrderState.Value), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + fsql.Transaction(() => { if (insertOrderPurchaseInfoList.Count() > 0) @@ -780,13 +873,119 @@ namespace BBWYB.Server.Business insertOrderCost?.ExecuteAffrows(); updateOrderCost?.ExecuteAffrows(); - fsql.Update(dbOrder.Id).SetIf(dbOrder.OrderState == Enums.OrderState.待付款 || - dbOrder.OrderState == Enums.OrderState.等待采购, o => o.OrderState, Enums.OrderState.待出库) + fsql.Update(dbOrder.Id).Set(o => o.OrderState, dbOrder.OrderState) .Set(o => o.IsPurchased, true) .ExecuteAffrows(); }); } + /// + /// 预览关联订单信息(不支持关联预览的平台会返回null) + /// + /// + public AssociationPurchaseOrderResponse PreviewAssocationPurchaseOrder(AssocationPurchaseOrderPreviewRequest request) + { + if (request.PurchasePlatform != Enums.Platform.阿里巴巴) + return null; + + var client = ppPlatformClientFactory.GetClient((AdapterEnums.PlatformType)request.PurchasePlatform); + var purchaseOrderSimpleInfo = client.QueryOrderDetail(new PP_QueryOrderDetailRequest() + { + AppKey = request.PurchaseAccount.AppKey, + AppSecret = request.PurchaseAccount.AppSecret, + AppToken = request.PurchaseAccount.AppToken, + OrderId = request.PurchaseOrderId + }); + + #region 处理采购商Id + var purchaserId = purchaseOrderSimpleInfo.PurchaserId; + if (string.IsNullOrEmpty(purchaserId)) + throw new BusinessException($"采购单{request.PurchaseOrderId}缺少采购商Id"); + purchaserId = purchaserId.Replace("b2b-", string.Empty); + var purchaserId2 = purchaserId.Substring(0, purchaserId.Length - 5); + var purchaserIds = new List() { purchaserId, purchaserId2 }; + var dbPurchaser = fsql.Select().Where(p => p.Platform == Enums.Platform.阿里巴巴 && purchaserIds.Contains(p.Id)).ToOne(); + if (dbPurchaser == null) + throw new BusinessException($"采购单{request.PurchaseOrderId}缺少有效采购商"); + purchaserId = dbPurchaser.Id; + #endregion + + #region 查询订单Sku + var dbOrderSkuList = fsql.Select().Where(osku => osku.OrderId == request.OrderId).ToList(); + if (dbOrderSkuList.Count() == 0) + throw new BusinessException("缺少订单sku信息"); + #endregion + + #region 查询订单sku所有采购方案 + var skuIds = dbOrderSkuList.Select(osku => osku.SkuId).ToList(); + var purchaseSchemeSkuList = fsql.Select() + .InnerJoin((p, ps, pss) => p.Id == ps.PurchaserId) + .InnerJoin((p, ps, pss) => ps.Id == pss.SkuPurchaseSchemeId) + .Where((p, ps, pss) => p.Id == purchaserId) + .Where((p, ps, pss) => ps.PurchasePlatform == Enums.Platform.阿里巴巴) + .Where((p, ps, pss) => skuIds.Contains(pss.SkuId)) + .ToList((p, ps, pss) => new + { + pss.Id, + pss.SkuId, + pss.ProductId, + pss.PurchaseProductId, + pss.PurchaseSkuId, + pss.PurchaseSkuSpecId, + pss.SkuPurchaseSchemeId + }); + if (purchaseSchemeSkuList.Count() == 0) + throw new BusinessException($"采购单{request.PurchaseOrderId} 采购商Id{purchaserId} 未匹配到采购方案"); + #endregion + + #region 匹配采购单所使用到的采购方案 + var assocationOrderCostDetailList = new List(); + var purchaseSchemeGroups = purchaseSchemeSkuList.GroupBy(s => s.SkuPurchaseSchemeId); + var totalPurchaseCount = purchaseOrderSimpleInfo.ItemList.Sum(x => x.Quantity); + foreach (var schemeGroup in purchaseSchemeGroups) + { + var schemePurchaseSkuList = schemeGroup.ToList(); + if (schemePurchaseSkuList.Any(psku => purchaseOrderSimpleInfo.ItemList.Count(x => x.SkuId == psku.PurchaseSkuId) == 0)) + continue; + + var orderPurchaseSkuOfCurrentSchemeList = purchaseOrderSimpleInfo.ItemList.Where(psku => schemePurchaseSkuList.Count(x => x.PurchaseSkuId == psku.SkuId) > 0); + + + var skuId = schemePurchaseSkuList.FirstOrDefault().SkuId; + var orderSku = dbOrderSkuList.FirstOrDefault(osku => osku.SkuId == skuId); + var assocationOrderCostDetail = new AssocationOrderCostDetailResponse() + { + Logo = orderSku.Logo, + Title = orderSku.Title, + SkuId = skuId, + OrderId = orderSku.OrderId, + SkuAmount = orderPurchaseSkuOfCurrentSchemeList.Sum(psku => psku.ProductAmount), + PurchaseQuantity = orderSku.ItemTotal.Value, + PurchaseFreight = purchaseOrderSimpleInfo.FreightAmount * (orderPurchaseSkuOfCurrentSchemeList.Sum(x => x.Quantity) / totalPurchaseCount) + }; + assocationOrderCostDetail.PurchasePrice = assocationOrderCostDetail.SkuAmount / assocationOrderCostDetail.PurchaseFreight; + assocationOrderCostDetailList.Add(assocationOrderCostDetail); + } + #endregion + + if (assocationOrderCostDetailList.Count() == 0) + throw new BusinessException("没有匹配到合适的采购方案"); + + return new AssociationPurchaseOrderResponse(assocationOrderCostDetailList) + { + PurchaserId = dbPurchaser.Id, + PurchaserName = dbPurchaser.Name, + PurchaseAccountId = request.PurchaseAccount.Id, + PurchaseAccountName = request.PurchaseAccount.AccountName, + PurchaseAmount = purchaseOrderSimpleInfo.ProductAmount, + PurchaseFreight = purchaseOrderSimpleInfo.FreightAmount, + PurchaseMethod = Enums.PurchaseMethod.关联外部单, + PurchaseOrderId = request.PurchaseOrderId, + PurchasePlatform = request.PurchasePlatform, + IsEnabled = true + }; + } + /// /// 设置历史采购单 /// @@ -813,6 +1012,7 @@ namespace BBWYB.Server.Business { fsql.Update() .Set(opi => opi.IsEnabled, false) + .Set(opi => opi.OrderState, Enums.PurchaseOrderState.已取消) .Where(opi => opi.PurchaseOrderId == request.PurchaseOrderId) .ExecuteAffrows(); @@ -821,39 +1021,405 @@ namespace BBWYB.Server.Business .Where(ocd => ocd.PurchaseOrderId == request.PurchaseOrderId) .ExecuteAffrows(); + fsql.Delete().Where(opsi => opsi.PurchaseOrderId == request.PurchaseOrderId).ExecuteAffrows(); + fsql.Delete().Where(opri => opri.PurchaseOrderId == request.PurchaseOrderId).ExecuteAffrows(); + fsql.Delete().Where(peo => peo.PurchaseOrderId == request.PurchaseOrderId).ExecuteAffrows(); + fsql.Update().SetSource(dbOrderCost).ExecuteAffrows(); }); } /// - /// 签收采购单 + /// 修改采购快递单 /// /// - public void SignPurchaseOrder(SignPurchaseOrderRequest request) + public void EditPurchaseExpressOrder(EditPurchaseExpressOrderRequest request) { - var dbOrder = fsql.Select(request.OrderId).ToOne(); + var dbOrder = fsql.Select(request.OrderId).ToOne(o => new { o.Id, o.ShopId, o.OrderSn }); + if (dbOrder == null) + throw new BusinessException($"订单号{request.OrderId}不存在"); + + var shopIds = dbOrder.ShopId.ToString(); + var shop = fsqlManager.MDSfsql.Select().Where(s => s.ShopId == shopIds).ToOne(); + + var oldPeo = fsql.Select(request.OldWaybillNo).ToOne(); + if (oldPeo == null) + throw new BusinessException($"旧快递单号{request.OldWaybillNo}不存在"); + if (oldPeo.OrderId != request.OrderId || oldPeo.PurchaseOrderId != request.PurchaseOrderId) + throw new BusinessException("快递单号不属于当前操作提交的订单或采购单"); + var newPeo = fsql.Select(request.NewWaybillNo).ToOne(); + if (newPeo != null) + throw new BusinessException($"新快递单号{request.NewWaybillNo}已存在"); + + newPeo = new PurchaseExpressOrder() + { + WaybillNo = request.NewWaybillNo, + TargetExpressId = request.NewExpressId, + TargetExpressName = request.NewExpressName, + CreateTime = DateTime.Now, + OrderId = request.OrderId, + PurchaseOrderId = request.PurchaseOrderId, + ShopId = oldPeo.ShopId, + ExpressState = kuaiDi100Manager.GetExpressState(1) //快递100发货状态值 默认揽收 + }; + try + { + kuaiDi100Manager.SubscribeKuaiDi100(request.NewWaybillNo, request.NewExpressId, "http://bbwyb.qiyue666.com/api/purchaseorder/kuaidi100publish"); + newPeo.IsSubscribeKD100 = true; + } + catch (Exception ex) + { + nLogManager.Default().Error(ex, $"EditPurchaseExpressOrder,Request:{JsonConvert.SerializeObject(request)}"); + + #region 订阅失败发送钉钉通知 + var dingdingMsg = new StringBuilder(); + dingdingMsg.AppendLine($"错误:{ex.Message}"); + dingdingMsg.AppendLine($"采购订单号:{request.PurchaseOrderId}"); + dingdingMsg.AppendLine($"拳探订单号:{request.OrderId}"); + dingdingMsg.AppendLine($"拳探订单Sn:{dbOrder.OrderSn}"); + dingdingMsg.AppendLine($"源物流公司:无"); + dingdingMsg.AppendLine($"目标物流公司:{request.NewExpressName} {request.NewExpressId}"); + dingdingMsg.AppendLine($"快递单号:{request.NewWaybillNo}"); + dingdingMsg.AppendLine("触发环节:修改物流单号"); + dingdingMsg.Append($"店铺名:{shop.ShopName}"); + Task.Factory.StartNew(() => SendDingDingOnKD100SubscribeFail(dingdingMsg.ToString()), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + } + + fsql.Transaction(() => + { + fsql.Delete(request.OldWaybillNo).ExecuteAffrows(); + fsql.Update().Set(psku => psku.WaybillNo, request.NewWaybillNo) + .Where(psku => psku.PurchaseOrderId == request.PurchaseOrderId) + .Where(psku => psku.WaybillNo == request.OldWaybillNo) + .ExecuteAffrows(); + fsql.Insert(newPeo).ExecuteAffrows(); + }); + } + + /// + /// 手动发货 + /// + /// + public void ManualDelivery(ManualDeliveryRequest request) + { + #region 准备数据库更新对象 + List insertPurchaseExpressOrderList = new List(); + IList> updateOrderPurchaseSkuList = new List>(); + IUpdate updateOrderPurchase = null; + IUpdate updateOrder = null; + #endregion + + #region 查询该笔采购单的快递单信息 + var purchaseExpressOrderList = fsql.Select().Where(x => x.PurchaseOrderId == request.PurchaseOrderId).ToList(); + bool isExists = purchaseExpressOrderList.Any(exo => exo.WaybillNo == request.WaybillNo); + #endregion + + #region 查询当前采购单的订单信息 + var dbOrder = fsql.Select().InnerJoin((opi, o) => opi.OrderId == o.Id) + .Where((opi, o) => opi.PurchaseOrderId == request.PurchaseOrderId && opi.IsEnabled == true) + .ToOne((opi, o) => new Order + { + Id = o.Id, + OrderSn = o.OrderSn, + OrderState = o.OrderState, + ShopId = o.ShopId + }); if (dbOrder == null) - throw new BusinessException("无效订单号"); - if (dbOrder.OrderState == Enums.OrderState.已取消) - throw new BusinessException("订单已取消"); - if (dbOrder.OrderState == Enums.OrderState.已完成) - throw new BusinessException("订单已完成无需签收"); - - var dbOrderPurchaseInfo = fsql.Select().Where(opi => opi.PurchaseOrderId == request.PurchaseOrderId && opi.IsEnabled == true).ToOne(); - if (dbOrderPurchaseInfo == null) - throw new BusinessException("无效采购单号"); - if (!dbOrderPurchaseInfo.IsEnabled) - throw new BusinessException("采购单已失效"); - if (dbOrderPurchaseInfo.IsSign == true) - throw new BusinessException("采购单已签收"); + throw new BusinessException("未查询到采购单的订单信息"); + #endregion + + #region 店铺信息 + var shop = fsqlManager.MDSfsql.Select().Where(s => s.ShopId == dbOrder.ShopId.ToString()).ToOne(); + if (shop == null) + throw new BusinessException("未查询到采购单所属店铺"); + #endregion + + #region 查询订单的全部采购单信息 + var orderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == dbOrder.Id && opi.IsEnabled == true).ToList(); + var orderPurchaseInfo = orderPurchaseInfoList.FirstOrDefault(opi => opi.PurchaseOrderId == request.PurchaseOrderId); + if (orderPurchaseInfo == null) + throw new BusinessException("未查询到采购单信息"); + #endregion + + IList orderPurchaseSkuList = null; + if (orderPurchaseInfo.PurchasePlatform == Enums.Platform.阿里巴巴) + { + #region 查询采购关联信息 + var orderPurchaseRelationList = fsql.Select().Where(opri => opri.PurchaseOrderId == request.PurchaseOrderId && + opri.BelongSkuId == request.SkuId).ToList(); + if (orderPurchaseRelationList.Count() == 0) + throw new BusinessException("未查询到采购单的关联信息"); + #endregion + + #region 查询该笔采购单的采购sku信息并更新快递单号 + orderPurchaseSkuList = fsql.Select().Where(x => x.PurchaseOrderId == request.PurchaseOrderId).ToList(); + if (orderPurchaseSkuList.Count() == 0) + throw new BusinessException("未查询到采购单sku信息"); + + foreach (var relation in orderPurchaseRelationList) + { + var orderPurchaseSku = orderPurchaseSkuList.FirstOrDefault(posku => posku.PurchaseSkuId == relation.PurchaseSkuId); + if (orderPurchaseSku == null) + throw new BusinessException("未查询到采购单sku信息"); + if (orderPurchaseSku.WaybillNo != request.WaybillNo) + { + orderPurchaseSku.WaybillNo = request.WaybillNo; + updateOrderPurchaseSkuList.Add(fsql.Update(orderPurchaseSku.Id).Set(ps => ps.WaybillNo, request.WaybillNo)); + } + } + #endregion + } + + #region 订阅快递100 + bool isSubscribeKD100 = false; + if (!isExists) + { + #region 订阅快递100 + try + { + kuaiDi100Manager.SubscribeKuaiDi100(request.WaybillNo, request.ExpressId, "http://bbwyb.qiyue666.com/api/purchaseorder/kuaidi100publish"); + isSubscribeKD100 = true; + } + catch (Exception ex) + { + nLogManager.Default().Error(ex, $"ManualDelivery,Request:{JsonConvert.SerializeObject(request)}"); + + #region 订阅失败发送钉钉通知 + var dingdingMsg = new StringBuilder(); + dingdingMsg.AppendLine($"错误:{ex.Message}"); + dingdingMsg.AppendLine($"采购订单号:{request.PurchaseOrderId}"); + dingdingMsg.AppendLine($"拳探订单号:{dbOrder.Id}"); + dingdingMsg.AppendLine($"拳探订单Sn:{dbOrder.OrderSn}"); + dingdingMsg.AppendLine($"源物流公司:无"); + dingdingMsg.AppendLine($"目标物流公司:{request.ExpressName} {request.ExpressId}"); + dingdingMsg.AppendLine($"快递单号:{request.WaybillNo}"); + dingdingMsg.AppendLine("触发环节:手动发货"); + dingdingMsg.Append($"店铺名:{shop.ShopName}"); + Task.Factory.StartNew(() => SendDingDingOnKD100SubscribeFail(dingdingMsg.ToString()), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + } + #endregion + } + + #endregion + + #region 创建快递单 + if (!isExists) + { + var purchaseExpressOrder = new PurchaseExpressOrder() + { + OrderId = dbOrder.Id, + CreateTime = DateTime.Now, + PurchaseOrderId = request.PurchaseOrderId, + ShopId = dbOrder.ShopId ?? 0, + TargetExpressId = request.ExpressId, + TargetExpressName = request.ExpressName, + WaybillNo = request.WaybillNo, + ExpressState = kuaiDi100Manager.GetExpressState(1), //快递100发货状态值 默认揽收 + IsSubscribeKD100 = isSubscribeKD100, + ExpressContent = "手动发货", + ExpressChangedTime = DateTime.Now + }; + insertPurchaseExpressOrderList.Add(purchaseExpressOrder); + } + #endregion + + #region 计算采购单状态 + orderPurchaseInfo.CalculationOrderState(fsql, orderPurchaseSkuList, purchaseExpressOrderList.Union(insertPurchaseExpressOrderList).ToList()); + updateOrderPurchase = fsql.Update(orderPurchaseInfo.Id) + .Set(opi => opi.OrderState, orderPurchaseInfo.OrderState); + #endregion + + #region 计算订单状态 + dbOrder.CalculationOrderState(fsql, null, orderPurchaseInfoList); + updateOrder = fsql.Update(dbOrder.Id) + .Set(o => o.OrderState, dbOrder.OrderState); + #endregion + + #region 通知C端状态 + Task.Factory.StartNew(() => SendPurchaseOrderStateToC(dbOrder.Id, dbOrder.OrderState.Value), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion fsql.Transaction(() => { - fsql.Update(dbOrderPurchaseInfo.Id).Set(opi => opi.IsSign, true).ExecuteAffrows(); - fsql.Update(dbOrder.Id).Set(o => o.IsWaitPack, true).ExecuteAffrows(); + if (insertPurchaseExpressOrderList.Count() > 0) + fsql.Insert(insertPurchaseExpressOrderList).ExecuteAffrows(); + if (updateOrderPurchaseSkuList.Count() > 0) + { + foreach (var update in updateOrderPurchaseSkuList) + update.ExecuteAffrows(); + } + updateOrderPurchase?.ExecuteAffrows(); + updateOrder?.ExecuteAffrows(); }); } + /// + /// 手动收货 + /// + /// + public void ManualSign(ManualSignRequest request) + { + IList> updatePurchaseExpressOrderList = new List>(); + IUpdate updateOrderPurchase = null; + IUpdate updateOrder = null; + + #region 查询该笔采购单的快递单信息 + var purchaseExpressOrderList = fsql.Select().Where(x => x.PurchaseOrderId == request.PurchaseOrderId).ToList(); + #endregion + + #region 查询当前采购单的订单信息 + var dbOrder = fsql.Select().InnerJoin((opi, o) => opi.OrderId == o.Id) + .Where((opi, o) => opi.PurchaseOrderId == request.PurchaseOrderId && opi.IsEnabled == true) + .ToOne((opi, o) => new Order + { + Id = o.Id, + OrderState = o.OrderState, + ShopId = o.ShopId + }); + if (dbOrder == null) + throw new BusinessException("未查询到采购单的订单信息"); + #endregion + + #region 查询订单的全部采购单信息 + var orderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == dbOrder.Id && opi.IsEnabled == true).ToList(); + var orderPurchaseInfo = orderPurchaseInfoList.FirstOrDefault(opi => opi.PurchaseOrderId == request.PurchaseOrderId); + if (orderPurchaseInfo == null) + throw new BusinessException("未查询到采购单信息"); + #endregion + + IList orderPurchaseSkuList = null; + IList orderPurchaseRelationList = null; + if (orderPurchaseInfo.PurchasePlatform == Enums.Platform.阿里巴巴) + { + #region 查询采购关联信息 + orderPurchaseRelationList = fsql.Select().Where(opri => opri.PurchaseOrderId == request.PurchaseOrderId && + opri.BelongSkuId == request.SkuId).ToList(); + if (orderPurchaseRelationList.Count() == 0) + throw new BusinessException("未查询到采购单的关联信息"); + #endregion + + #region 查询该笔采购单的采购sku信息 + orderPurchaseSkuList = fsql.Select().Where(x => x.PurchaseOrderId == request.PurchaseOrderId).ToList(); + if (orderPurchaseSkuList.Count() == 0) + throw new BusinessException("未查询到采购单sku信息"); + #endregion + + #region 更新采购sku的快递单状态为签收 + foreach (var relation in orderPurchaseRelationList) + { + var orderPurchaseSku = orderPurchaseSkuList.FirstOrDefault(posku => posku.PurchaseSkuId == relation.PurchaseSkuId); + if (orderPurchaseSku == null) + throw new BusinessException("未查询到采购单sku信息"); + if (!string.IsNullOrEmpty(orderPurchaseSku.WaybillNo)) + { + var purchaseExpressOrder = purchaseExpressOrderList.FirstOrDefault(exo => exo.WaybillNo == orderPurchaseSku.WaybillNo); + if (purchaseExpressOrder == null) + throw new BusinessException("未查询到采购sku的快递信息"); + var expressState = kuaiDi100Manager.GetExpressState(3); + if (purchaseExpressOrder.ExpressState != expressState) + { + purchaseExpressOrder.ExpressState = expressState; + updatePurchaseExpressOrderList.Add(fsql.Update(purchaseExpressOrder.WaybillNo) + .Set(exo => exo.ExpressState, purchaseExpressOrder.ExpressState) + .Set(exo => exo.ExpressChangedTime, DateTime.Now) + .Set(exo => exo.ExpressContent, "手动签收")); + } + } + } + #endregion + } + else + { + foreach (var purchaseExpressOrder in purchaseExpressOrderList) + { + var expressState = kuaiDi100Manager.GetExpressState(3); + if (purchaseExpressOrder.ExpressState != expressState) + { + purchaseExpressOrder.ExpressState = expressState; + updatePurchaseExpressOrderList.Add(fsql.Update(purchaseExpressOrder.WaybillNo) + .Set(exo => exo.ExpressState, purchaseExpressOrder.ExpressState) + .Set(exo => exo.ExpressChangedTime, DateTime.Now) + .Set(exo => exo.ExpressContent, "手动签收")); + } + } + } + + #region 计算采购单状态 + orderPurchaseInfo.CalculationOrderState(fsql, orderPurchaseSkuList, purchaseExpressOrderList); + updateOrderPurchase = fsql.Update(orderPurchaseInfo.Id) + .Set(opi => opi.OrderState, orderPurchaseInfo.OrderState); + #endregion + + #region 计算订单状态 + dbOrder.CalculationOrderState(fsql, null, orderPurchaseInfoList); + updateOrder = fsql.Update(dbOrder.Id) + .Set(o => o.OrderState, dbOrder.OrderState); + #endregion + + #region 通知齐库打包落仓情况 + Task.Factory.StartNew(() => qiKuManager.PublishQiKu(orderPurchaseInfo, orderPurchaseRelationList, orderPurchaseSkuList, purchaseExpressOrderList), + CancellationToken.None, + TaskCreationOptions.LongRunning, + taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + + #region 通知C端状态 + Task.Factory.StartNew(() => SendPurchaseOrderStateToC(dbOrder.Id, dbOrder.OrderState.Value), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + + fsql.Transaction(() => + { + if (updatePurchaseExpressOrderList.Count() > 0) + { + foreach (var update in updatePurchaseExpressOrderList) + update.ExecuteAffrows(); + } + updateOrderPurchase?.ExecuteAffrows(); + updateOrder?.ExecuteAffrows(); + }); + } + + ///// + ///// 签收采购单 + ///// + ///// + //public void SignPurchaseOrder(SignPurchaseOrderRequest request) + //{ + // var dbOrder = fsql.Select(request.OrderId).ToOne(); + // if (dbOrder == null) + // throw new BusinessException("无效订单号"); + // if (dbOrder.OrderState == Enums.OrderState.已取消) + // throw new BusinessException("订单已取消"); + // if (dbOrder.OrderState == Enums.OrderState.已完成) + // throw new BusinessException("订单已完成无需签收"); + + // var dbOrderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == request.OrderId && opi.IsEnabled == true).ToList(); + + // var dbOrderPurchaseInfo = dbOrderPurchaseInfoList.FirstOrDefault(opi => opi.PurchaseOrderId == request.PurchaseOrderId); + // if (dbOrderPurchaseInfo == null) + // throw new BusinessException("无效采购单号"); + // if (!dbOrderPurchaseInfo.IsEnabled) + // throw new BusinessException("采购单已失效"); + // if (dbOrderPurchaseInfo.OrderState == Enums.PurchaseOrderState.已签收 || + // dbOrderPurchaseInfo.IsSign == true) + // throw new BusinessException("采购单已签收"); + + // dbOrderPurchaseInfo.IsSign = true; + // dbOrderPurchaseInfo.OrderState = Enums.PurchaseOrderState.已签收; + + // dbOrder.CalculationOrderState(fsql, null, dbOrderPurchaseInfoList); + + // fsql.Transaction(() => + // { + // fsql.Update().SetSource(dbOrderPurchaseInfo).ExecuteAffrows(); + // fsql.Update(dbOrder.Id) + // .Set(o => o.OrderState, dbOrder.OrderState) + // .Set(o => o.IsWaitPack, true).ExecuteAffrows(); + // }); + //} + #region 1688CallBack public void CallbackFrom1688(string jsonStr) { @@ -870,7 +1436,7 @@ namespace BBWYB.Server.Business OrderPriceModificationCallbackFrom1688(jObject); //订单改价 break; case "LOGISTICS_BUYER_VIEW_TRACE": - LogisticsUpdateCallbackFrom1688(jObject);//1688物流信息变更 + // LogisticsUpdateCallbackFrom1688(jObject);//1688物流信息变更 break; default: break; @@ -884,50 +1450,63 @@ namespace BBWYB.Server.Business private void DeliveryCallbackFrom1688(JObject jObject) { var purchaseOrderId = jObject["data"].Value("orderId"); - Task.Factory.StartNew(() => DeliveryCallback(purchaseOrderId, null, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + Task.Factory.StartNew(() => DeliveryCallbackFrom1688(purchaseOrderId), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); } /// - /// 1688订单改价回调 - /// - /// - private void OrderPriceModificationCallbackFrom1688(JObject jObject) - { - var purchaseOrderId = jObject["data"].Value("orderId"); - Task.Factory.StartNew(() => OrderPriceModificationCallback(purchaseOrderId, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); - } - #endregion - - /// - /// 采购平台发货回调 + /// 1688发货回调 /// - /// - /// - /// - private void DeliveryCallback(string purchaseOrderId, PP_QueryOrderLogisticsResponse wayBillNoResponse, Enums.Platform callbackPlatform) + /// 采购单 + private void DeliveryCallbackFrom1688(string purchaseOrderId) { - string currentProgress = string.Empty; - string wayBillNoResponseInfo = string.Empty; - string expressCompanyListInfo = string.Empty; - string expressCompanyInfo = string.Empty; string orderId = string.Empty; long? shopId = null; + string currentProgress = string.Empty; + string wayBillNoResponseInfo = string.Empty; try { - #region 查询代发信息 - currentProgress = "查询代发信息"; - var orderPurchaseInfo = fsql.Select().Where(o => o.PurchaseOrderId == purchaseOrderId).ToOne(); - if (orderPurchaseInfo == null) - throw new Exception("未查询到代发信息"); - orderId = orderPurchaseInfo.OrderId; - shopId = orderPurchaseInfo.ShopId; + List insertPurchaseExpressOrderList = new List(); + IList> updateOrderPurchaseSkuList = new List>(); + IUpdate updateOrderPurchase = null; + IUpdate updateOrder = null; + + #region 查询当前采购单的订单信息 + currentProgress = "查询当前采购单的订单信息"; + var dbOrder = fsql.Select().InnerJoin((opi, o) => opi.OrderId == o.Id) + .Where((opi, o) => opi.PurchaseOrderId == purchaseOrderId && opi.IsEnabled == true) + .ToOne((opi, o) => new Order + { + Id = o.Id, + OrderSn = o.OrderSn, + OrderState = o.OrderState, + ShopId = o.ShopId + }); + if (dbOrder == null) + throw new Exception("未查询到采购单的订单信息"); + orderId = dbOrder.Id; + shopId = dbOrder.ShopId; #endregion - #region 查询采购账号的归属店铺 - currentProgress = "查询采购账号归属店铺"; - var shop = venderBusiness.GetShopList(shopId: shopId)?.FirstOrDefault(); + #region 店铺信息 + var shop = fsqlManager.MDSfsql.Select().Where(s => s.ShopId == dbOrder.ShopId.ToString()).ToOne(); if (shop == null) - throw new Exception("未查询到店铺信息"); + throw new BusinessException("未查询到采购单所属店铺"); + #endregion + + #region 查询订单的全部采购单信息 + currentProgress = "查询订单的全部采购单信息"; + var orderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == orderId && opi.IsEnabled == true).ToList(); + var orderPurchaseInfo = orderPurchaseInfoList.FirstOrDefault(opi => opi.PurchaseOrderId == purchaseOrderId); + #endregion + + #region 查询该笔采购单的sku信息 + currentProgress = "查询该笔采购单的sku信息"; + var orderPurchaseSkuList = fsql.Select().Where(x => x.PurchaseOrderId == purchaseOrderId).ToList(); + #endregion + + #region 查询该笔采购单的快递单信息 + currentProgress = "查询该笔采购单的快递单信息"; + var purchaseExpressOrderList = fsql.Select().Where(x => x.PurchaseOrderId == purchaseOrderId).ToList(); #endregion #region 查询采购账号 @@ -939,190 +1518,372 @@ namespace BBWYB.Server.Business #region 获取采购单的物流信息 currentProgress = "获取采购单的物流信息"; - if (wayBillNoResponse == null) + var client = ppPlatformClientFactory.GetClient(AdapterEnums.PlatformType.阿里巴巴); + var ppQueryOrderLogisticsRequest = new PP_QueryOrderLogisticsRequest() { - var client = ppPlatformClientFactory.GetClient((AdapterEnums.PlatformType)callbackPlatform); - var ppQueryOrderLogisticsRequest = new PP_QueryOrderLogisticsRequest() - { - AppKey = purchaseAccount.AppKey, - AppSecret = purchaseAccount.AppSecret, - AppToken = purchaseAccount.AppToken, - OrderId = purchaseOrderId, - Platform = (AdapterEnums.PlatformType)callbackPlatform - }; - wayBillNoResponse = client.QueryOrderLogistics(ppQueryOrderLogisticsRequest); - wayBillNoResponseInfo = JsonConvert.SerializeObject(new { Request = ppQueryOrderLogisticsRequest, Result = wayBillNoResponse }); - } + AppKey = purchaseAccount.AppKey, + AppSecret = purchaseAccount.AppSecret, + AppToken = purchaseAccount.AppToken, + OrderId = purchaseOrderId, + Platform = AdapterEnums.PlatformType.阿里巴巴 + }; + var logisticsList = client.QueryOrderLogistics(ppQueryOrderLogisticsRequest); + wayBillNoResponseInfo = JsonConvert.SerializeObject(new { purchaseOrderId, logisticsList }); #endregion - #region 获取目标平台的物流公司列表 - currentProgress = "获取店铺平台物流公司列表"; - var expressCompanyList = venderBusiness.GetExpressCompanyList(new PlatformRequest() + #region 找出新发货的快递单 + foreach (var logisticsInfo in logisticsList) { - AppKey = shop.AppKey, - AppSecret = shop.AppSecret, - AppToken = shop.AppToken, - Platform = shop.PlatformId - }); - if (expressCompanyList != null) - expressCompanyListInfo = JsonConvert.SerializeObject(expressCompanyList); - #endregion - - #region 物流公司翻译 - currentProgress = "物流公司翻译"; - - OP_QueryExpressCompanyResponse convertExpressCompany = null; + if (string.IsNullOrEmpty(logisticsInfo.WayBillNo) || + purchaseExpressOrderList.Any(po => po.WaybillNo == logisticsInfo.WayBillNo)) + continue; + + #region 订阅快递100 + currentProgress = "订阅快递100"; + LogisticsCompanyRelationship kuaidi100Company = null; + bool isSubscribeKD100 = false; + try + { + kuaidi100Company = expressCompanyNameConverter.ConverterToKuaiDi100Company(logisticsInfo.ExpressName); + if (kuaidi100Company == null) + throw new Exception($"无翻译结果"); + kuaiDi100Manager.SubscribeKuaiDi100(logisticsInfo.WayBillNo, kuaidi100Company.TargetCode, "http://bbwyb.qiyue666.com/api/purchaseorder/kuaidi100publish"); + isSubscribeKD100 = true; + } + catch (Exception ex) + { + nLogManager.Default().Error(ex, $"DeliveryCallback 回调平台1688,订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo}"); + + #region 订阅失败发送钉钉通知 + var dingdingMsg = new StringBuilder(); + dingdingMsg.AppendLine($"错误:{ex.Message}"); + dingdingMsg.AppendLine($"采购订单号:{purchaseOrderId}"); + dingdingMsg.AppendLine($"拳探订单号:{orderId}"); + dingdingMsg.AppendLine($"拳探订单Sn:{dbOrder.OrderSn}"); + dingdingMsg.AppendLine($"源物流公司:{logisticsInfo.ExpressName}"); + dingdingMsg.AppendLine($"目标物流公司:{kuaidi100Company?.TargetName} {kuaidi100Company?.TargetCode}"); + dingdingMsg.AppendLine($"快递单号:{logisticsInfo.WayBillNo}"); + dingdingMsg.AppendLine("触发环节:1688发货回调"); + dingdingMsg.Append($"店铺名:{shop.ShopName}"); + Task.Factory.StartNew(() => SendDingDingOnKD100SubscribeFail(dingdingMsg.ToString()), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + } + #endregion - try - { - convertExpressCompany = expressCompanyNameConverter.Converter(wayBillNoResponse.ExpressName, - (AdapterEnums.PlatformType)callbackPlatform, - (AdapterEnums.PlatformType)shop.PlatformId, - expressCompanyList); - if (convertExpressCompany != null) - expressCompanyInfo = JsonConvert.SerializeObject(convertExpressCompany); - } - catch - { - throw; - } - finally - { - #region 店铺平台订单出库 - currentProgress = "店铺平台订单出库"; - orderBusiness.OutStock(new OutStockRequest() + #region 创建快递单 + var purchaseExpressOrder = new PurchaseExpressOrder() { - AppKey = shop.AppKey, - AppSecret = shop.AppSecret, - AppToken = shop.AppToken, OrderId = orderId, - TargetExpressId = convertExpressCompany?.ExpressId ?? string.Empty, //物流公司Id - TargetExpressName = convertExpressCompany?.ExpressName ?? string.Empty, //物流公司名称 - SourceExpressId = wayBillNoResponse.ExpressId, - SourceExpressName = wayBillNoResponse.ExpressName, + CreateTime = DateTime.Now, PurchaseOrderId = purchaseOrderId, - Platform = shop.PlatformId, - WayBillNo = wayBillNoResponse.WayBillNo - }); + ShopId = shopId ?? 0, + SourceExpressId = logisticsInfo.ExpressId, + SourceExpressName = logisticsInfo.ExpressName, + WaybillNo = logisticsInfo.WayBillNo, + TargetExpressId = kuaidi100Company?.TargetCode, + TargetExpressName = kuaidi100Company?.TargetName, + ExpressState = kuaiDi100Manager.GetExpressState(1), //快递100发货状态值 默认揽收 + IsSubscribeKD100 = isSubscribeKD100 + }; + insertPurchaseExpressOrderList.Add(purchaseExpressOrder); + #endregion + + #region 更新采购sku的快递单号 + foreach (var orderEntryId in logisticsInfo.OrderEntryIds) + { + var purchaseSku = orderPurchaseSkuList.FirstOrDefault(x => x.Id == orderEntryId); + if (purchaseSku == null) + continue; + purchaseSku.WaybillNo = logisticsInfo.WayBillNo; + updateOrderPurchaseSkuList.Add(fsql.Update(orderEntryId).Set(ps => ps.WaybillNo, logisticsInfo.WayBillNo)); + } #endregion } #endregion - nLogManager.Default().Info($"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{expressCompanyListInfo},翻译后的物流公司:{expressCompanyInfo}"); + #region 计算采购单状态 + orderPurchaseInfo.CalculationOrderState(fsql, orderPurchaseSkuList, purchaseExpressOrderList.Union(insertPurchaseExpressOrderList).ToList()); + updateOrderPurchase = fsql.Update(orderPurchaseInfo.Id) + .Set(opi => opi.OrderState, orderPurchaseInfo.OrderState); + #endregion + + #region 计算订单状态 + dbOrder.CalculationOrderState(fsql, null, orderPurchaseInfoList); + updateOrder = fsql.Update(dbOrder.Id) + .Set(o => o.OrderState, dbOrder.OrderState); + #endregion + + #region 通知C端订单状态 + Task.Factory.StartNew(() => SendPurchaseOrderStateToC(dbOrder.Id, dbOrder.OrderState.Value), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + + fsql.Transaction(() => + { + if (insertPurchaseExpressOrderList.Count() > 0) + fsql.Insert(insertPurchaseExpressOrderList).ExecuteAffrows(); + if (updateOrderPurchaseSkuList.Count() > 0) + { + foreach (var update in updateOrderPurchaseSkuList) + update.ExecuteAffrows(); + } + updateOrderPurchase?.ExecuteAffrows(); + updateOrder?.ExecuteAffrows(); + }); } catch (Exception ex) { - nLogManager.Default().Error(ex, $"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{expressCompanyListInfo},翻译后的物流公司:{expressCompanyInfo}"); + nLogManager.Default().Error(ex, $"DeliveryCallback 回调平台1688,订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo}"); } } /// - /// 1688物流信息变更回调 + /// 1688订单改价回调 /// /// - private void LogisticsUpdateCallbackFrom1688(JObject jObject) + private void OrderPriceModificationCallbackFrom1688(JObject jObject) { - Task.Factory.StartNew(() => - { - IList> updateOrderPurchaseSkuInfoList = new List>(); - - var statusChanged = jObject["data"]["OrderLogisticsTracingModel"].Value("statusChanged").ToUpper(); - var orderLogsItems = jObject["data"]["OrderLogisticsTracingModel"]["orderLogsItems"].Children(); - - var purchaseOrderIds = orderLogsItems.Select(x => x.Value("orderId")).Distinct().ToList(); - var orderEntryIds = orderLogsItems.Select(x => x.Value("orderEntryId")).Distinct().ToList(); - - var dbOrderPurchaseSkuInfoList = fsql.Select() - .WhereIf(purchaseOrderIds.Count() > 1, ops => purchaseOrderIds.Contains(ops.PurchaseOrderId)) - .WhereIf(purchaseOrderIds.Count() == 1, ops => ops.PurchaseOrderId == purchaseOrderIds[0]) - .ToList(); - - var dbOrderPurchaseRelationInfoList = fsql.Select() - .WhereIf(purchaseOrderIds.Count() > 1, opr => purchaseOrderIds.Contains(opr.PurchaseOrderId)) - .WhereIf(purchaseOrderIds.Count() == 1, opr => opr.PurchaseOrderId == purchaseOrderIds[0]) - .ToList(); - - foreach (var orderEntryId in orderEntryIds) - { - var dbOrderPurchaseSkuInfo = dbOrderPurchaseSkuInfoList.FirstOrDefault(x => x.Id == orderEntryId); - if (dbOrderPurchaseSkuInfo.ExpressState != statusChanged) - { - var update = fsql.Update(orderEntryId).Set(x => x.ExpressState, statusChanged) - .Set(x => x.ExpressChangeTime, DateTime.Now); - updateOrderPurchaseSkuInfoList.Add(update); - dbOrderPurchaseSkuInfo.ExpressState = statusChanged; - } - } - - if (statusChanged == "SIGN") - { - var groupsByPoIds = dbOrderPurchaseSkuInfoList.GroupBy(x => x.PurchaseOrderId); - foreach (var group in groupsByPoIds) - { - var isSignAll = group.Count() == group.Where(x => x.ExpressState == "SIGN").Count(); - - #region 通知齐库 - var relationList = dbOrderPurchaseRelationInfoList.Where(x => x.PurchaseOrderId == group.Key).ToList(); - foreach (var relation in relationList) - { - //通知C端 - try - { - restApiService.SendRequest("http://qiku.qiyue666.com", - "/Api/PackPurchaseTask/UpdateAvailabilityState", - new - { - availability = isSignAll ? 0 : 1, - orderId = relation.OrderId, - skuId = relation.SourceSkuId - }, - null, - HttpMethod.Post); - } - catch (Exception ex) - { - - } - } - #endregion - } - - var groupsByOrderIds = dbOrderPurchaseSkuInfoList.GroupBy(x => x.OrderId); - foreach (var group in groupsByOrderIds) - { - var isSignAll = group.Count() == group.Where(x => x.ExpressState == "SIGN").Count(); - - if (isSignAll) - { - //通知C端 - try - { - restApiService.SendRequest("https://bbwy.qiyue666.com", - "/Api/PurchaseOrder/SignPurchaseOrder", - new { orderId = group.Key }, - null, - HttpMethod.Post); - } - catch (Exception ex) - { - - } - } - } - } - - if (updateOrderPurchaseSkuInfoList.Count() > 0) - { - fsql.Transaction(() => - { - foreach (var update in updateOrderPurchaseSkuInfoList) - update.ExecuteAffrows(); - }); - } - - - }, CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + var purchaseOrderId = jObject["data"].Value("orderId"); + Task.Factory.StartNew(() => OrderPriceModificationCallback(purchaseOrderId, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); } + #endregion + + ///// + ///// 采购平台发货回调 + ///// + ///// + ///// + ///// + //private void DeliveryCallback(string purchaseOrderId, PP_QueryOrderLogisticsResponse wayBillNoResponse, Enums.Platform callbackPlatform) + //{ + // string currentProgress = string.Empty; + // string wayBillNoResponseInfo = string.Empty; + // string expressCompanyListInfo = string.Empty; + // string expressCompanyInfo = string.Empty; + // string orderId = string.Empty; + // long? shopId = null; + // try + // { + // #region 查询代发信息 + // currentProgress = "查询代发信息"; + // var orderPurchaseInfo = fsql.Select().Where(o => o.PurchaseOrderId == purchaseOrderId && o.IsEnabled == true).ToOne(); + // if (orderPurchaseInfo == null) + // throw new Exception("未查询到代发信息"); + // orderId = orderPurchaseInfo.OrderId; + // shopId = orderPurchaseInfo.ShopId; + // #endregion + + // //#region 查询采购账号的归属店铺 + // //currentProgress = "查询采购账号归属店铺"; + // //var shop = venderBusiness.GetShopList(shopId: shopId)?.FirstOrDefault(); + // //if (shop == null) + // // throw new Exception("未查询到店铺信息"); + // //#endregion + + // #region 查询采购账号 + // currentProgress = "查询采购账号"; + // var purchaseAccount = fsqlManager.MDSfsql.Select().Where(pa => pa.Id == orderPurchaseInfo.PurchaseAccountId).ToOne(); + // if (purchaseAccount == null) + // throw new Exception($"未查询到采购账号{orderPurchaseInfo.PurchaseAccountId}"); + // #endregion + + // #region 获取采购单的物流信息 + // currentProgress = "获取采购单的物流信息"; + // if (wayBillNoResponse == null) + // { + // var client = ppPlatformClientFactory.GetClient((AdapterEnums.PlatformType)callbackPlatform); + // var ppQueryOrderLogisticsRequest = new PP_QueryOrderLogisticsRequest() + // { + // AppKey = purchaseAccount.AppKey, + // AppSecret = purchaseAccount.AppSecret, + // AppToken = purchaseAccount.AppToken, + // OrderId = purchaseOrderId, + // Platform = (AdapterEnums.PlatformType)callbackPlatform + // }; + // wayBillNoResponse = client.QueryOrderLogistics(ppQueryOrderLogisticsRequest); + // wayBillNoResponseInfo = JsonConvert.SerializeObject(new { Request = ppQueryOrderLogisticsRequest, Result = wayBillNoResponse }); + // } + // #endregion + + // //#region 获取目标平台的物流公司列表 + // //currentProgress = "获取店铺平台物流公司列表"; + // //var expressCompanyList = venderBusiness.GetExpressCompanyList(new PlatformRequest() + // //{ + // // AppKey = shop.AppKey, + // // AppSecret = shop.AppSecret, + // // AppToken = shop.AppToken, + // // Platform = shop.PlatformId + // //}); + // //if (expressCompanyList != null) + // // expressCompanyListInfo = JsonConvert.SerializeObject(expressCompanyList); + // //#endregion + + + + // //#region 物流公司翻译 + // //currentProgress = "物流公司翻译"; + + // //OP_QueryExpressCompanyResponse convertExpressCompany = null; + + // //try + // //{ + // // convertExpressCompany = expressCompanyNameConverter.Converter(wayBillNoResponse.ExpressName, + // // (AdapterEnums.PlatformType)callbackPlatform, + // // (AdapterEnums.PlatformType)shop.PlatformId, + // // expressCompanyList); + // // if (convertExpressCompany != null) + // // expressCompanyInfo = JsonConvert.SerializeObject(convertExpressCompany); + // //} + // //catch + // //{ + // // throw; + // //} + // //finally + // //{ + // // #region 店铺平台订单出库 + // // currentProgress = "店铺平台订单出库"; + // // orderBusiness.OutStock(new OutStockRequest() + // // { + // // AppKey = shop.AppKey, + // // AppSecret = shop.AppSecret, + // // AppToken = shop.AppToken, + // // OrderId = orderId, + // // TargetExpressId = convertExpressCompany?.ExpressId ?? string.Empty, //物流公司Id + // // TargetExpressName = convertExpressCompany?.ExpressName ?? string.Empty, //物流公司名称 + // // SourceExpressId = wayBillNoResponse.ExpressId, + // // SourceExpressName = wayBillNoResponse.ExpressName, + // // PurchaseOrderId = purchaseOrderId, + // // Platform = shop.PlatformId, + // // WayBillNo = wayBillNoResponse.WayBillNo + // // }); + // // #endregion + // //} + // //#endregion + + + // //#region 店铺平台订单出库 + // //currentProgress = "店铺平台订单出库"; + // //orderBusiness.OutStock(new OutStockRequest() + // //{ + // // //AppKey = shop.AppKey, + // // //AppSecret = shop.AppSecret, + // // //AppToken = shop.AppToken, + // // OrderId = orderId, + // // //TargetExpressId = convertExpressCompany?.ExpressId ?? string.Empty, //物流公司Id + // // //TargetExpressName = convertExpressCompany?.ExpressName ?? string.Empty, //物流公司名称 + // // SourceExpressId = wayBillNoResponse.ExpressId, + // // SourceExpressName = wayBillNoResponse.ExpressName, + // // PurchaseOrderId = purchaseOrderId, + // // //Platform = shop.PlatformId, + // // WayBillNo = wayBillNoResponse.WayBillNo + // //}); + // //#endregion + + + // nLogManager.Default().Info($"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{expressCompanyListInfo},翻译后的物流公司:{expressCompanyInfo}"); + // } + // catch (Exception ex) + // { + // nLogManager.Default().Error(ex, $"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{expressCompanyListInfo},翻译后的物流公司:{expressCompanyInfo}"); + // } + //} + + ///// + ///// 1688物流信息变更回调 + ///// + ///// + //private void LogisticsUpdateCallbackFrom1688(JObject jObject) + //{ + // Task.Factory.StartNew(() => + // { + // IList> updateOrderPurchaseSkuInfoList = new List>(); + // IList> updateOrderPurchaseInfoList = new List>(); + + // var statusChanged = jObject["data"]["OrderLogisticsTracingModel"].Value("statusChanged").ToUpper(); + // var orderLogsItems = jObject["data"]["OrderLogisticsTracingModel"]["orderLogsItems"].Children(); + + // var purchaseOrderIds = orderLogsItems.Select(x => x.Value("orderId")).Distinct().ToList(); + // var orderEntryIds = orderLogsItems.Select(x => x.Value("orderEntryId")).Distinct().ToList(); + + // var dbOrderPurchaseInfoList = fsql.Select().Where(opi => purchaseOrderIds.Contains(opi.PurchaseOrderId) && opi.IsEnabled == true).ToList(); + + // var dbOrderPurchaseSkuInfoList = fsql.Select() + // .WhereIf(purchaseOrderIds.Count() > 1, ops => purchaseOrderIds.Contains(ops.PurchaseOrderId)) + // .WhereIf(purchaseOrderIds.Count() == 1, ops => ops.PurchaseOrderId == purchaseOrderIds[0]) + // .ToList(); + + // var dbOrderPurchaseRelationInfoList = fsql.Select() + // .WhereIf(purchaseOrderIds.Count() > 1, opr => purchaseOrderIds.Contains(opr.PurchaseOrderId)) + // .WhereIf(purchaseOrderIds.Count() == 1, opr => opr.PurchaseOrderId == purchaseOrderIds[0]) + // .ToList(); + + // foreach (var orderEntryId in orderEntryIds) + // { + // var dbOrderPurchaseSkuInfo = dbOrderPurchaseSkuInfoList.FirstOrDefault(x => x.Id == orderEntryId); + // if (dbOrderPurchaseSkuInfo.ExpressState != statusChanged) + // { + // var update = fsql.Update(orderEntryId).Set(x => x.ExpressState, statusChanged) + // .Set(x => x.ExpressChangeTime, DateTime.Now); + // updateOrderPurchaseSkuInfoList.Add(update); + // dbOrderPurchaseSkuInfo.ExpressState = statusChanged; + // } + // } + + // if (statusChanged == "SIGN") + // { + // var groupsByPoIds = dbOrderPurchaseSkuInfoList.GroupBy(x => x.PurchaseOrderId); + // foreach (var group in groupsByPoIds) + // { + // var isSignAll = group.Count() == group.Where(x => x.ExpressState == "SIGN").Count(); + // if (isSignAll) + // { + // var dbOrderPurchaseInfo = dbOrderPurchaseInfoList.FirstOrDefault(x => x.PurchaseOrderId == group.Key && x.IsEnabled == true); + // if (dbOrderPurchaseInfo != null) + // { + // dbOrderPurchaseInfo.OrderState = Enums.PurchaseOrderState.已签收; + // updateOrderPurchaseInfoList.Add(fsql.Update().SetSource(dbOrderPurchaseInfo)); + // } + // } + + // #region 通知齐库 + // var relationList = dbOrderPurchaseRelationInfoList.Where(x => x.PurchaseOrderId == group.Key).ToList(); + // foreach (var relation in relationList) + // { + // try + // { + // restApiService.SendRequest("http://qiku.qiyue666.com", + // "/Api/PackPurchaseTask/UpdateAvailabilityState", + // new + // { + // availability = isSignAll ? 0 : 1, + // orderId = relation.OrderId, + // skuId = relation.SourceSkuId + // }, + // null, + // HttpMethod.Post); + // } + // catch (Exception ex) + // { + + // } + // } + // #endregion + // } + // } + + // if (updateOrderPurchaseSkuInfoList.Count() > 0 || updateOrderPurchaseInfoList.Count() > 0) + // { + // fsql.Transaction(() => + // { + // foreach (var update in updateOrderPurchaseSkuInfoList) + // update.ExecuteAffrows(); + // foreach (var update in updateOrderPurchaseInfoList) + // update.ExecuteAffrows(); + // }); + // } + + + // }, CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + //} /// /// 采购平台改价回调 @@ -1248,5 +2009,143 @@ namespace BBWYB.Server.Business nLogManager.Default().Error(ex, $"OrderPriceModificationCallback 回调平台{callbackPlatform},采购单号{purchaseOrderId},执行进度[{currentProgress}]"); } } + + public void KuaiDi100Publish(string param) + { + Task.Factory.StartNew(() => KuaiDi100PublishCore(param), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + } + + private void KuaiDi100PublishCore(string param) + { + nLogManager.GetLogger("快递100").Info($"KuaiDi100Publish {param}"); + JObject jobject = JObject.Parse(param); + var waybillNo = jobject["lastResult"].Value("nu"); + try + { + var state = jobject["lastResult"].Value("state"); + var convertState = kuaiDi100Manager.GetExpressState(state); + if (convertState == "Unknow") + return; + + var dataArray = jobject["lastResult"]["data"].Children().Select(d => new + { + context = d.Value("context"), + ftime = d.Value("ftime"), + statusCode = d.Value("statusCode") + }).OrderByDescending(d => d.ftime).ToList(); + + var lastData = dataArray.FirstOrDefault(); + + IUpdate updatePurchaseExpressOrder = null; + IUpdate updateOrderPurchase = null; + IUpdate updateOrder = null; + + #region 查询该笔快递单 + var tpeo = fsql.Select(waybillNo).ToOne(); + if (tpeo == null) + throw new Exception("未查询到快递单"); + #endregion + + #region 查询采购单 + var orderPurchaseInfoList = fsql.Select().Where(opi => opi.OrderId == tpeo.OrderId && opi.IsEnabled == true).ToList(); + var orderPurchaseInfo = orderPurchaseInfoList.FirstOrDefault(opi => opi.PurchaseOrderId == tpeo.PurchaseOrderId); + if (orderPurchaseInfo == null) + throw new Exception("未查询到采购单"); + #endregion + + #region 查询订单/采购sku/快递单/采购关系 + var dbOrder = fsql.Select(tpeo.OrderId).ToOne(o => new Order + { + Id = o.Id, + ShopId = o.ShopId, + OrderState = o.OrderState + }); + if (dbOrder == null) + throw new Exception("未查询到订单"); + + IList orderPurchaseSkuList = null; + IList orderPurchaseRelationList = null; + if (orderPurchaseInfo.PurchasePlatform == Enums.Platform.阿里巴巴) + { + orderPurchaseSkuList = fsql.Select().Where(x => x.PurchaseOrderId == tpeo.PurchaseOrderId).ToList(); + if (orderPurchaseSkuList.Count() == 0) + throw new BusinessException("未查询到采购单sku信息"); + + orderPurchaseRelationList = fsql.Select().Where(opri => opri.PurchaseOrderId == tpeo.PurchaseOrderId).ToList(); + if (orderPurchaseRelationList.Count() == 0) + throw new BusinessException("未查询到采购单的关联信息"); + } + + var purchaseExpressOrderList = fsql.Select().Where(x => x.PurchaseOrderId == tpeo.PurchaseOrderId).ToList(); + var purchaseExpressOrder = purchaseExpressOrderList.FirstOrDefault(exo => exo.WaybillNo == waybillNo); + purchaseExpressOrder.ExpressState = convertState; + purchaseExpressOrder.ExpressChangedTime = lastData.ftime; + purchaseExpressOrder.ExpressContent = lastData.context; + updatePurchaseExpressOrder = fsql.Update().SetSource(purchaseExpressOrder); + + #endregion + + #region 计算采购单状态 + orderPurchaseInfo.CalculationOrderState(fsql, orderPurchaseSkuList, purchaseExpressOrderList); + updateOrderPurchase = fsql.Update(orderPurchaseInfo.Id) + .Set(opi => opi.OrderState, orderPurchaseInfo.OrderState); + #endregion + + #region 计算订单状态 + dbOrder.CalculationOrderState(fsql, null, orderPurchaseInfoList); + updateOrder = fsql.Update(dbOrder.Id) + .Set(o => o.OrderState, dbOrder.OrderState); + #endregion + + #region 通知齐库打包落仓情况 + Task.Factory.StartNew(() => qiKuManager.PublishQiKu(orderPurchaseInfo, orderPurchaseRelationList, orderPurchaseSkuList, purchaseExpressOrderList), + CancellationToken.None, + TaskCreationOptions.LongRunning, + taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + + #region 通知C端状态 + Task.Factory.StartNew(() => SendPurchaseOrderStateToC(dbOrder.Id, dbOrder.OrderState.Value), CancellationToken.None, TaskCreationOptions.None, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); + #endregion + + fsql.Transaction(() => + { + updatePurchaseExpressOrder?.ExecuteAffrows(); + updateOrderPurchase?.ExecuteAffrows(); + updateOrder?.ExecuteAffrows(); + }); + } + catch (Exception ex) + { + nLogManager.GetLogger("快递100").Error(ex, waybillNo); + } + } + + private void SendDingDingOnKD100SubscribeFail(string content) + { + try + { + dingDingBusiness.SendDingDingBotMessage("SEC5f08a3dd6813e50bf9a3b81350ec12a8086c64b9e29ef858a17f5cc7887906d7", + "https://oapi.dingtalk.com/robot/send?access_token=7ce472411bb8dde0c3ff503fcca9ead84d39950ee3c4c65c808dbc58981eb929", + content); + } + catch { } + } + + private void SendPurchaseOrderStateToC(string orderId, Enums.OrderState orderState) + { + try + { + restApiService.SendRequest("https://bbwy.qiyue666.com", "api/BatchPurchase/UpdatePurchaseOrderState", new + { + OrderId = orderId, + PurchaseOrderState = orderState + }, null, HttpMethod.Post); + } + catch + { + + } + } } } diff --git a/BBWYB.Server.Business/QiKuManager.cs b/BBWYB.Server.Business/QiKuManager.cs new file mode 100644 index 0000000..8a93d99 --- /dev/null +++ b/BBWYB.Server.Business/QiKuManager.cs @@ -0,0 +1,118 @@ +using BBWYB.Common.Http; +using BBWYB.Common.Models; +using BBWYB.Server.Model; +using BBWYB.Server.Model.Db; + +namespace BBWYB.Server.Business +{ + public class QiKuManager : IDenpendency + { + private RestApiService restApiService; + private IFreeSql fsql; + public QiKuManager(RestApiService restApiService, IFreeSql fsql) + { + this.restApiService = restApiService; + this.fsql = fsql; + } + + /// + /// 通知齐库 + /// 支持关联的采购平台以来源SKU为单位通知齐库 + /// 不支持关联的采购平台以采购单为单位通知齐库 + /// + /// + /// + /// + /// + public void PublishQiKu(OrderPurchaseInfo orderPurchaseInfo, + IList orderPurchaseRelationInfoList, + IList orderPurchaseSkuInfoList, + IList purchaseExpressOrderList) + { + if (orderPurchaseInfo.PurchasePlatform == Enums.Platform.阿里巴巴) + PublishQiKuByRelation(orderPurchaseRelationInfoList, orderPurchaseSkuInfoList, purchaseExpressOrderList); + else + PublishQiKuPurchaseExpressOrder(orderPurchaseInfo, purchaseExpressOrderList); + } + + private void PublishQiKuByRelation(IList orderPurchaseRelationInfoList, + IList orderPurchaseSkuInfoList, + IList purchaseExpressOrderList) + { + try + { + var relationGroups = orderPurchaseRelationInfoList.GroupBy(opri => opri.SourceSkuId); + foreach (var relationGroup in relationGroups) + { + bool isSignAll = true; + foreach (var relation in relationGroup) + { + var purchaseSku = orderPurchaseSkuInfoList.FirstOrDefault(x => x.PurchaseSkuId == relation.PurchaseSkuId); + if (purchaseSku == null || string.IsNullOrEmpty(purchaseSku.WaybillNo)) + { + isSignAll = false; + continue; + } + var purchaseExpressOrder = purchaseExpressOrderList.FirstOrDefault(x => x.WaybillNo == purchaseSku.WaybillNo); + if (purchaseExpressOrder == null || purchaseExpressOrder.ExpressState != "QianShou") + { + isSignAll = false; + continue; + } + } + + restApiService.SendRequest("http://qiku.qiyue666.com", + "/Api/PackPurchaseTask/UpdateAvailabilityState", + new + { + availability = isSignAll ? 0 : 1, + orderId = relationGroup.FirstOrDefault().OrderId, + skuId = relationGroup.Key + }, + null, + HttpMethod.Post); + + } + } + catch (Exception ex) + { + + } + } + + private void PublishQiKuPurchaseExpressOrder(OrderPurchaseInfo orderPurchaseInfo, IList purchaseExpressOrderList) + { + try + { + if (string.IsNullOrEmpty(orderPurchaseInfo.BelongSkuIds)) + return; + + var orderId = purchaseExpressOrderList.FirstOrDefault().OrderId; + var orderSkuList = fsql.Select().Where(osku => osku.OrderId == orderId).ToList(); + + var isSignAll = !purchaseExpressOrderList.Any(x => x.ExpressState != "QianShou"); + + var notifyList = orderSkuList.Where(osku => orderPurchaseInfo.BelongSkuIds.Contains(osku.SkuId)).ToList(); + if (notifyList.Count() == 0) + return; + foreach (var notifySku in notifyList) + { + restApiService.SendRequest("http://qiku.qiyue666.com", + "/Api/PackPurchaseTask/UpdateAvailabilityState", + new + { + availability = isSignAll ? 0 : 1, + orderId = notifySku.OrderId, + skuId = notifySku.BelongSkuId + }, + null, + HttpMethod.Post); + } + } + catch + { + + } + } + } +} diff --git a/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs b/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs index 96d0a33..926bb4f 100644 --- a/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs +++ b/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs @@ -175,21 +175,21 @@ namespace BBWYB.Server.Business.Sync } else { - var updateOrderState = false; - //var updateWaybillNo = false; - //var updateExpressName = false; + Enums.OrderState? updateOrderState = null; var updateModifyTime = false; var updateBuyerRemark = false; var updateVenderRemark = false; var updateBuyerAccount = false; var updateOrderSn = false; - if (dbOrder.OrderState != orderState) - updateOrderState = true; - //if (dbOrder.WaybillNo != qtOrder.DeliveryResponse.WayBillNo) - // updateWaybillNo = true; - //if (dbOrder.ExpressName != qtOrder.DeliveryResponse.ExpressName) - // updateExpressName = true; + #region 订单状态脱离拳探 只处理付款和取消 + if (dbOrder.OrderState == Enums.OrderState.待付款 && orderState != Enums.OrderState.待付款) + updateOrderState = Enums.OrderState.等待采购; + + if (dbOrder.OrderState != Enums.OrderState.已取消 && orderState == Enums.OrderState.已取消) + updateOrderState = Enums.OrderState.已取消; + #endregion + if (dbOrder.ModifyTime != qtOrder.ModifyTime) updateModifyTime = true; if (dbOrder.BuyerRemark != qtOrder.BuyerRemark) @@ -201,11 +201,9 @@ namespace BBWYB.Server.Business.Sync if (dbOrder.OrderSn != qtOrder.OrderSn) updateOrderSn = true; - if (updateOrderState || updateModifyTime || updateBuyerRemark || updateVenderRemark || updateBuyerAccount || updateOrderSn) + if (updateOrderState != null || updateModifyTime || updateBuyerRemark || updateVenderRemark || updateBuyerAccount || updateOrderSn) { - var update = fsql.Update(dbOrder.Id).SetIf(updateOrderState, o => o.OrderState == orderState) - //.SetIf(updateWaybillNo, o => o.WaybillNo, qtOrder.DeliveryResponse.WayBillNo) - //.SetIf(updateExpressName, o => o.ExpressName, qtOrder.DeliveryResponse.ExpressName) + var update = fsql.Update(dbOrder.Id).SetIf(updateOrderState != null, o => o.OrderState, orderState) .SetIf(updateModifyTime, o => o.ModifyTime, qtOrder.ModifyTime) .SetIf(updateBuyerRemark, o => o.BuyerRemark, qtOrder.BuyerRemark) .SetIf(updateVenderRemark, o => o.VenderRemark, qtOrder.VenderRemark) @@ -257,7 +255,7 @@ namespace BBWYB.Server.Business.Sync { if (!isPurchased) return Enums.OrderState.等待采购; - return Enums.OrderState.待出库; + return Enums.OrderState.待发货; } if (qtOrderState == "1") diff --git a/BBWYB.Server.Business/Vender/VenderBusiness.cs b/BBWYB.Server.Business/Vender/VenderBusiness.cs index 3cc46b7..e11998b 100644 --- a/BBWYB.Server.Business/Vender/VenderBusiness.cs +++ b/BBWYB.Server.Business/Vender/VenderBusiness.cs @@ -1,8 +1,7 @@ -using BBWY.Server.Model.Db.Mds; -using BBWYB.Common.Log; +using BBWYB.Common.Log; using BBWYB.Common.Models; using BBWYB.Server.Model; -using BBWYB.Server.Model.Db; +using BBWYB.Server.Model.Db.Mds; using BBWYB.Server.Model.Db.MDS; using BBWYB.Server.Model.Dto; using SDKAdapter.OperationPlatform.Client; @@ -15,10 +14,13 @@ namespace BBWYB.Server.Business { private OP_PlatformClientFactory opPlatformClientFactory; private FreeSqlMultiDBManager fsqlManager; - public VenderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, FreeSqlMultiDBManager fsqlManager, OP_PlatformClientFactory opPlatformClientFactory) : base(fsql, nLogManager, idGenerator) + private KuaiDi100Manager kuaiDi100Manager; + + public VenderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, FreeSqlMultiDBManager fsqlManager, OP_PlatformClientFactory opPlatformClientFactory, KuaiDi100Manager kuaiDi100Manager) : base(fsql, nLogManager, idGenerator) { this.fsqlManager = fsqlManager; this.opPlatformClientFactory = opPlatformClientFactory; + this.kuaiDi100Manager = kuaiDi100Manager; } public IList GetShopList(long? shopId = null, Enums.Platform? platform = null) @@ -82,5 +84,10 @@ namespace BBWYB.Server.Business Platform = (SDKAdapter.AdapterEnums.PlatformType)request.Platform }); } + + public IList GetKuaiDi100ExpressCompanyList(KuaiDi100ExpressSearchRequest request) + { + return kuaiDi100Manager.GetKuaiDi100ExpressCompanyList(request); + } } } diff --git a/BBWYB.Server.Model/Db/MDS/Shops.cs b/BBWYB.Server.Model/Db/MDS/Shops.cs index 57d133c..8f7d105 100644 --- a/BBWYB.Server.Model/Db/MDS/Shops.cs +++ b/BBWYB.Server.Model/Db/MDS/Shops.cs @@ -1,7 +1,6 @@ using FreeSql.DataAnnotations; -using System; -namespace BBWY.Server.Model.Db.Mds +namespace BBWYB.Server.Model.Db.Mds { [Table(Name = "shops", DisableSyncStructure = true)] diff --git a/BBWYB.Server.Model/Db/Order/OrderPurchaseInfo.cs b/BBWYB.Server.Model/Db/Order/OrderPurchaseInfo.cs index 31b7048..c40d326 100644 --- a/BBWYB.Server.Model/Db/Order/OrderPurchaseInfo.cs +++ b/BBWYB.Server.Model/Db/Order/OrderPurchaseInfo.cs @@ -56,35 +56,35 @@ namespace BBWYB.Server.Model.Db /// public long? ShopId { get; set; } - /// - /// ݵ - /// - [Column(StringLength = 100)] - public string WaybillNo { get; set; } - - /// - /// ԭʼݹ˾ - /// - [Column(StringLength = 100)] - public string SourceExpressName { get; set; } - - /// - /// ԭʼݹ˾Id - /// - [Column(StringLength = 100)] - public string SourceExpressId { get; set; } - - /// - /// Ŀݹ˾ - /// - [Column(StringLength = 100)] - public string TargetExpressName { get; set; } - - /// - /// Ŀݹ˾Id - /// - [Column(StringLength = 100)] - public string TargetExpressId { get; set; } + ///// + ///// ݵ + ///// + //[Column(StringLength = 100)] + //public string WaybillNo { get; set; } + + ///// + ///// ԭʼݹ˾ + ///// + //[Column(StringLength = 100)] + //public string SourceExpressName { get; set; } + + ///// + ///// ԭʼݹ˾Id + ///// + //[Column(StringLength = 100)] + //public string SourceExpressId { get; set; } + + ///// + ///// Ŀݹ˾ + ///// + //[Column(StringLength = 100)] + //public string TargetExpressName { get; set; } + + ///// + ///// Ŀݹ˾Id + ///// + //[Column(StringLength = 100)] + //public string TargetExpressId { get; set; } /// /// Sku @@ -101,11 +101,17 @@ namespace BBWYB.Server.Model.Db [Column(StringLength = 500)] public string Remark { get; set; } + ///// + ///// Ƿǩ + ///// + //[Column(DbType = "bit")] + //public bool? IsSign { get; set; } = false; + /// - /// Ƿǩ + /// ɹ״̬ /// - [Column(DbType = "bit")] - public bool? IsSign { get; set; } = false; + [Column(MapType = typeof(int?))] + public Enums.PurchaseOrderState? OrderState { get; set; } } } diff --git a/BBWYB.Server.Model/Db/Order/OrderPurchaseSkuInfo.cs b/BBWYB.Server.Model/Db/Order/OrderPurchaseSkuInfo.cs index 1e71a04..f95cf3d 100644 --- a/BBWYB.Server.Model/Db/Order/OrderPurchaseSkuInfo.cs +++ b/BBWYB.Server.Model/Db/Order/OrderPurchaseSkuInfo.cs @@ -16,17 +16,17 @@ namespace BBWYB.Server.Model.Db [Column(DbType = "datetime")] public DateTime? CreateTime { get; set; } - /// - /// 物流变更时间 - /// - [Column(DbType = "datetime")] - public DateTime? ExpressChangeTime { get; set; } + ///// + ///// 物流变更时间 + ///// + //[Column(DbType = "datetime")] + //public DateTime? ExpressChangeTime { get; set; } - /// - /// 物流状态 - /// - [Column(StringLength = 100)] - public string ExpressState { get; set; } + ///// + ///// 物流状态 + ///// + //[Column(StringLength = 100)] + //public string ExpressState { get; set; } /// /// 店铺订单Id @@ -57,6 +57,11 @@ namespace BBWYB.Server.Model.Db /// public long? ShopId { get; set; } + /// + /// 快递单 + /// + [Column(StringLength = 100)] + public string WaybillNo { get; set; } } } diff --git a/BBWYB.Server.Model/Db/Order/PurchaseExpressOrder.cs b/BBWYB.Server.Model/Db/Order/PurchaseExpressOrder.cs new file mode 100644 index 0000000..46f0d8e --- /dev/null +++ b/BBWYB.Server.Model/Db/Order/PurchaseExpressOrder.cs @@ -0,0 +1,84 @@ +using FreeSql.DataAnnotations; + +namespace BBWYB.Server.Model.Db +{ + + /// + /// 采购快递单表 + /// + [Table(Name = "purchaseexpressorder", DisableSyncStructure = true)] + public partial class PurchaseExpressOrder + { + + /// + /// 快递单号 + /// + [Column(StringLength = 100, IsPrimary = true, IsNullable = false)] + public string WaybillNo { get; set; } + + /// + /// 创建时间 + /// + [Column(DbType = "datetime")] + public DateTime? CreateTime { get; set; } + + /// + /// 变更时间 + /// + [Column(DbType = "datetime")] + public DateTime? ExpressChangedTime { get; set; } + + /// + /// 物流内容 + /// + [Column(StringLength = 2000)] + public string ExpressContent { get; set; } + + /// + /// 物流状态 (ZaiTu,LanShou,QianShou,PaiJian,Unknow) + /// + [Column(StringLength = 100)] + public string ExpressState { get; set; } + + [Column(StringLength = 100)] + public string OrderId { get; set; } + + [Column(StringLength = 100)] + public string PurchaseOrderId { get; set; } + + [Column(StringLength = 100)] + public long ShopId { get; set; } + + /// + /// 原快递公司Id + /// + [Column(StringLength = 100)] + public string SourceExpressId { get; set; } + + /// + /// 原快递公司名称 + /// + [Column(StringLength = 100)] + public string SourceExpressName { get; set; } + + /// + /// 目标快递公司Id(kuaidi100) + /// + [Column(StringLength = 100)] + public string TargetExpressId { get; set; } + + /// + /// 目标快递公司名称(kuaidi100) + /// + [Column(StringLength = 100)] + public string TargetExpressName { get; set; } + + /// + /// 是否订阅快递100 + /// + [Column(DbType = "bit")] + public bool IsSubscribeKD100 { get; set; } = false; + + } + +} diff --git a/BBWYB.Server.Model/Dto/Request/Order/OutStockRequest.cs b/BBWYB.Server.Model/Dto/Request/Order/OutStockRequest.cs index cf11eca..8d8a304 100644 --- a/BBWYB.Server.Model/Dto/Request/Order/OutStockRequest.cs +++ b/BBWYB.Server.Model/Dto/Request/Order/OutStockRequest.cs @@ -1,6 +1,6 @@ namespace BBWYB.Server.Model.Dto { - public class OutStockRequest : PlatformRequest + public class OutStockRequest { /// /// 订单Id diff --git a/BBWYB.Server.Model/Dto/Request/Order/QueryOrderRequest.cs b/BBWYB.Server.Model/Dto/Request/Order/QueryOrderRequest.cs index 0b78c2c..8f73ec2 100644 --- a/BBWYB.Server.Model/Dto/Request/Order/QueryOrderRequest.cs +++ b/BBWYB.Server.Model/Dto/Request/Order/QueryOrderRequest.cs @@ -2,10 +2,16 @@ { public class QueryOrderRequest { - /// 当订单号有值时会忽略其余所有条件 + /// + /// 订单号,有值时会忽略其余所有条件,OrderId与OrderSn同时有值,优先OrderId /// public string OrderId { get; set; } + /// + /// 订单Sn号,有值时会忽略其余所有条件,OrderId与OrderSn同时有值,优先OrderId + /// + public string OrderSn { get; set; } + /// /// 店铺Id /// diff --git a/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssocationPurchaseOrderPreviewRequest.cs b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssocationPurchaseOrderPreviewRequest.cs new file mode 100644 index 0000000..c0b82ef --- /dev/null +++ b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssocationPurchaseOrderPreviewRequest.cs @@ -0,0 +1,25 @@ +namespace BBWYB.Server.Model.Dto +{ + /// + /// 预览关联订单信息请求 + /// + public class AssocationPurchaseOrderPreviewRequest + { + /// + /// 订单Id + /// + public string OrderId { get; set; } + + /// + /// 采购单Id + /// + public string PurchaseOrderId { get; set; } + + /// + /// 采购账户 + /// + public PurchaseAccountRequest PurchaseAccount { get; set; } + + public Enums.Platform PurchasePlatform { get; set; } + } +} diff --git a/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssociationPurchaseOrderRequest.cs b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssociationPurchaseOrderRequest.cs index a20a837..0589da8 100644 --- a/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssociationPurchaseOrderRequest.cs +++ b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/AssociationPurchaseOrderRequest.cs @@ -35,7 +35,7 @@ public string PurchaserName { get; set; } /// - /// 采购金额 + /// 采购金额(货款) /// public decimal PurchaseAmount { get; set; } diff --git a/BBWYB.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseExpressOrderRequest.cs b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseExpressOrderRequest.cs new file mode 100644 index 0000000..2568568 --- /dev/null +++ b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseExpressOrderRequest.cs @@ -0,0 +1,20 @@ +namespace BBWYB.Server.Model.Dto +{ + /// + /// 修改快递单号 + /// + public class EditPurchaseExpressOrderRequest + { + public string OrderId { get; set; } + + public string PurchaseOrderId { get; set; } + + public string OldWaybillNo { get; set; } + + public string NewWaybillNo { get; set; } + + public string NewExpressId { get; set;} + + public string NewExpressName { get; set; } + } +} diff --git a/BBWYB.Server.Model/Dto/Request/PurchaseOrder/ManualDeliveryRequest.cs b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/ManualDeliveryRequest.cs new file mode 100644 index 0000000..71b36c6 --- /dev/null +++ b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/ManualDeliveryRequest.cs @@ -0,0 +1,30 @@ +namespace BBWYB.Server.Model.Dto +{ + public class ManualDeliveryRequest + { + /// + /// 采购单Id + /// + public string PurchaseOrderId { get; set; } + + /// + /// 快递公司Id + /// + public string ExpressId { get; set; } + + /// + /// 快递公司名称 + /// + public string ExpressName { get; set; } + + /// + /// 快递单号 + /// + public string WaybillNo { get; set; } + + /// + /// 订单SkuId (OrderSku对象的SkuId) + /// + public string SkuId { get; set; } + } +} diff --git a/BBWYB.Server.Model/Dto/Request/PurchaseOrder/ManualSignRequest.cs b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/ManualSignRequest.cs new file mode 100644 index 0000000..81bc878 --- /dev/null +++ b/BBWYB.Server.Model/Dto/Request/PurchaseOrder/ManualSignRequest.cs @@ -0,0 +1,15 @@ +namespace BBWYB.Server.Model.Dto +{ + public class ManualSignRequest + { + /// + /// 采购单Id + /// + public string PurchaseOrderId { get; set; } + + /// + /// 订单SkuId (OrderSku对象的SkuId) + /// + public string SkuId { get; set; } + } +} diff --git a/BBWYB.Server.Model/Dto/Response/Order/OrderCostResponse.cs b/BBWYB.Server.Model/Dto/Response/Order/OrderCostResponse.cs index ebbbab1..a11a0ff 100644 --- a/BBWYB.Server.Model/Dto/Response/Order/OrderCostResponse.cs +++ b/BBWYB.Server.Model/Dto/Response/Order/OrderCostResponse.cs @@ -1,4 +1,3 @@ -using BBWY.Server.Model.Db; using BBWYB.Server.Model.Db; namespace BBWYB.Server.Model.Dto diff --git a/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseInfoResponse.cs b/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseInfoResponse.cs index 9ab28d2..61c2004 100644 --- a/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseInfoResponse.cs +++ b/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseInfoResponse.cs @@ -5,9 +5,13 @@ namespace BBWYB.Server.Model.Dto public class OrderPurchaseInfoResponse : OrderPurchaseInfo { /// - /// 物流状态 - /// 1688物流状态: 发货(CONSIGN)、揽收(ACCEPT)、运输(TRANSPORT)、派送(DELIVERING)、签收(SIGN) + /// 采购sku列表 /// - public string ExpressState { get; set; } + public IList OrderPurchaseSkuInfoList { get; set; } + + /// + /// 快递单列表 + /// + public IList PurchaseExpressOrderList { get; set; } } } diff --git a/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseSkuInfoResponse.cs b/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseSkuInfoResponse.cs new file mode 100644 index 0000000..518fd35 --- /dev/null +++ b/BBWYB.Server.Model/Dto/Response/Order/OrderPurchaseSkuInfoResponse.cs @@ -0,0 +1,8 @@ +using BBWYB.Server.Model.Db; + +namespace BBWYB.Server.Model.Dto +{ + public class OrderPurchaseSkuInfoResponse: OrderPurchaseSkuInfo + { + } +} diff --git a/BBWYB.Server.Model/Dto/Response/Order/OrderResponse.cs b/BBWYB.Server.Model/Dto/Response/Order/OrderResponse.cs index 2d162d4..4c8933d 100644 --- a/BBWYB.Server.Model/Dto/Response/Order/OrderResponse.cs +++ b/BBWYB.Server.Model/Dto/Response/Order/OrderResponse.cs @@ -132,7 +132,7 @@ public OrderCostResponse OrderCost { get; set; } /// - /// 订单采购信息 + /// 采购单列表 /// public IList OrderPurchaseInfoList { get; set; } diff --git a/BBWYB.Server.Model/Dto/Response/Order/PurchaseExpressOrderResponse.cs b/BBWYB.Server.Model/Dto/Response/Order/PurchaseExpressOrderResponse.cs new file mode 100644 index 0000000..58efff2 --- /dev/null +++ b/BBWYB.Server.Model/Dto/Response/Order/PurchaseExpressOrderResponse.cs @@ -0,0 +1,8 @@ +using BBWYB.Server.Model.Db; + +namespace BBWYB.Server.Model.Dto +{ + public class PurchaseExpressOrderResponse: PurchaseExpressOrder + { + } +} diff --git a/BBWYB.Server.Model/Dto/Response/PurchaseOrder/AssociationPurchaseOrderResponse.cs b/BBWYB.Server.Model/Dto/Response/PurchaseOrder/AssociationPurchaseOrderResponse.cs index 6feb646..7d81449 100644 --- a/BBWYB.Server.Model/Dto/Response/PurchaseOrder/AssociationPurchaseOrderResponse.cs +++ b/BBWYB.Server.Model/Dto/Response/PurchaseOrder/AssociationPurchaseOrderResponse.cs @@ -7,6 +7,11 @@ AssocationOrderCostDetailList = new List(); } + public AssociationPurchaseOrderResponse(List assocationOrderCostDetailList) + { + AssocationOrderCostDetailList = assocationOrderCostDetailList; + } + /// /// 采购单号 /// diff --git a/BBWYB.Server.Model/Enums.cs b/BBWYB.Server.Model/Enums.cs index 8d57de2..f77cacf 100644 --- a/BBWYB.Server.Model/Enums.cs +++ b/BBWYB.Server.Model/Enums.cs @@ -72,23 +72,54 @@ } /// - /// 订单状态 待付款 = 0,等待采购 = 1,待出库 = 2,待收货 = 3,已完成 = 4,锁定 = 5,已取消 = 6,暂停 = 7,已退款 = 8,Unknow = 100 + /// 订单状态 + /// 待付款 = 0 + /// 等待采购 = 1, 部分采购 = 110 + /// 待发货 = 2, 部分发货 = 120 + /// 待收货 = 3, 部分收货 = 130 + /// 已完成 = 4 + /// 锁定 = 5 + /// 已取消 = 6 + /// 暂停 = 7 + /// 已退款 = 8 + /// Unknow = 100 + /// 打包中 = 140 + /// 待完结 = 150 /// public enum OrderState { 待付款 = 0, 等待采购 = 1, - 待出库 = 2, + 部分采购 = 110, + 待发货 = 2, + 部分发货 = 120, 待收货 = 3, + 部分收货 = 130, 已完成 = 4, 锁定 = 5, 已取消 = 6, 暂停 = 7, 已退款 = 8, - Unknow = 100 + Unknow = 100, + 打包中 = 140, + 待完结 = 150 + //待配置 = 101, } + /// + /// 采购单状态 待发货 = 0, 部分发货=1, 待收货 = 10, 部分收货=11, 已签收 = 20, 已取消 = 100 + /// + public enum PurchaseOrderState + { + 待发货 = 0, + 部分发货 = 1, + 待收货 = 10, + 部分收货 = 11, + 已签收 = 20, + 已取消 = 100 + } + /// /// 刷单类型 /// diff --git a/SDKAdapter/ExpressCompanyNameConverter.cs b/SDKAdapter/ExpressCompanyNameConverter.cs index 70297b9..ae49470 100644 --- a/SDKAdapter/ExpressCompanyNameConverter.cs +++ b/SDKAdapter/ExpressCompanyNameConverter.cs @@ -86,6 +86,44 @@ namespace SDKAdapter new LogisticsCompanyRelationship(){SourceName="极兔快递(原百世快递)",TargetName="极兔速递"}, new LogisticsCompanyRelationship(){SourceName="极兔速递-原百世快递",TargetName="极兔速递"} }); + + converterDictionary.Add("1688_kuaidi100", new List() + { + new LogisticsCompanyRelationship(){SourceName="中通快递(ZTO)",TargetName="中通快递",TargetCode="zhongtong"}, + new LogisticsCompanyRelationship(){SourceName="中通快运",TargetName="中通快运",TargetCode="zhongtongkuaiyun"}, + new LogisticsCompanyRelationship(){SourceName="圆通速递(YTO)",TargetName="圆通速递",TargetCode="yuantong"}, + new LogisticsCompanyRelationship(){SourceName="圆通速递",TargetName="圆通速递",TargetCode="yuantong"}, + new LogisticsCompanyRelationship(){SourceName="圆通",TargetName="圆通速递",TargetCode="yuantong"}, + new LogisticsCompanyRelationship(){SourceName="邮政国内小包",TargetName="邮政快递包裹",TargetCode="youzhengguonei"}, + new LogisticsCompanyRelationship(){SourceName="韵达快递",TargetName="韵达快递",TargetCode="yunda"}, + new LogisticsCompanyRelationship(){SourceName="韵达快运",TargetName="韵达快运",TargetCode="yundakuaiyun"}, + new LogisticsCompanyRelationship(){SourceName="申通快递(STO)",TargetName="申通快递",TargetCode="shentong"}, + new LogisticsCompanyRelationship(){SourceName="申通",TargetName="申通快递",TargetCode="shentong"}, + new LogisticsCompanyRelationship(){SourceName="申通快递",TargetName="申通快递",TargetCode="shentong"}, + new LogisticsCompanyRelationship(){SourceName="顺丰速运",TargetName="顺丰快递",TargetCode="shunfeng"}, + new LogisticsCompanyRelationship(){SourceName="顺丰快运",TargetName="顺丰快运",TargetCode="shunfengkuaiyun"}, + new LogisticsCompanyRelationship(){SourceName="百世快递",TargetName="百世快递",TargetCode="huitongkuaidi"}, + new LogisticsCompanyRelationship(){SourceName="百世物流",TargetName="百世快运",TargetCode="baishiwuliu"}, + new LogisticsCompanyRelationship(){SourceName="德邦",TargetName="德邦物流",TargetCode="debangwuliu"}, + new LogisticsCompanyRelationship(){SourceName="德邦快递",TargetName="德邦快递",TargetCode="debangkuaidi"}, + new LogisticsCompanyRelationship(){SourceName="EMS",TargetName="EMS",TargetCode="ems"}, + new LogisticsCompanyRelationship(){SourceName="极兔速递",TargetName="极兔速递",TargetCode="jtexpress"}, + new LogisticsCompanyRelationship(){SourceName="极兔快递(原百世快递)",TargetName="极兔速递",TargetCode="jtexpress"}, + new LogisticsCompanyRelationship(){SourceName="极兔速递-原百世快递",TargetName="极兔速递",TargetCode="jtexpress"}, + new LogisticsCompanyRelationship(){SourceName="安能物流",TargetName="安能物流",TargetCode="annengwuliu"}, + new LogisticsCompanyRelationship(){SourceName="德坤物流",TargetName="德坤物流",TargetCode="dekuncn"}, + new LogisticsCompanyRelationship(){SourceName="壹米滴答",TargetName="壹米滴答",TargetCode="yimidida"}, + new LogisticsCompanyRelationship(){SourceName="壹米滴答快运",TargetName="壹米滴答",TargetCode="yimidida"}, + new LogisticsCompanyRelationship(){SourceName="优速快递",TargetName="优速快递",TargetCode="youshuwuliu"}, + new LogisticsCompanyRelationship(){SourceName="京广速递",TargetName="京广速递",TargetCode="jinguangsudikuaijian"}, + new LogisticsCompanyRelationship(){SourceName="丰网速运",TargetName="丰网速运",TargetCode="fengwang"}, + new LogisticsCompanyRelationship(){SourceName="顺心捷达",TargetName="顺心捷达",TargetCode="sxjdfreight"}, + new LogisticsCompanyRelationship(){SourceName="快捷快递",TargetName="快捷速递",TargetCode="kuaijiesudi"}, + new LogisticsCompanyRelationship(){SourceName="优速",TargetName="优速物流",TargetCode="youshuwuliu"}, + new LogisticsCompanyRelationship(){SourceName="优速物流",TargetName="优速物流",TargetCode="youshuwuliu"}, + new LogisticsCompanyRelationship(){SourceName="加运美速递",TargetName="加运美",TargetCode="jiayunmeiwuliu"}, + new LogisticsCompanyRelationship(){SourceName="加运美",TargetName="加运美",TargetCode="jiayunmeiwuliu"} + }); } /// @@ -127,6 +165,14 @@ namespace SDKAdapter } return expressCompany; } + + public LogisticsCompanyRelationship ConverterToKuaiDi100Company(string sourceName) + { + var key = "1688_kuaidi100"; + if (!converterDictionary.TryGetValue(key, out IList companyRelationShips)) + return null; + return companyRelationShips.FirstOrDefault(l => l.SourceName == sourceName); + } } public class LogisticsCompanyRelationship diff --git a/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs b/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs index 42b4898..65ed26c 100644 --- a/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs +++ b/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs @@ -53,7 +53,7 @@ namespace SDKAdapter.PurchasePlatform.Client /// /// /// - public virtual PP_QueryOrderLogisticsResponse QueryOrderLogistics(PP_QueryOrderLogisticsRequest request) + public virtual IList QueryOrderLogistics(PP_QueryOrderLogisticsRequest request) { throw new NotImplementedException(); } diff --git a/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs b/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs index 9897b46..f1cc945 100644 --- a/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs +++ b/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs @@ -227,7 +227,7 @@ namespace SDKAdapter.PurchasePlatform.Client _request.AccessToken = request.AppToken; var result = client.NewRequest(_request, reqPolicy); if (result.Value("success") != true) - throw new Exception(result.Value("errorMessage")); + throw new BusinessException(result.Value("errorMessage")); return new PP_QueryOrderDetailResponse() @@ -251,7 +251,7 @@ namespace SDKAdapter.PurchasePlatform.Client }; } - public override PP_QueryOrderLogisticsResponse QueryOrderLogistics(PP_QueryOrderLogisticsRequest request) + public override IList QueryOrderLogistics(PP_QueryOrderLogisticsRequest request) { var client = GetSyncAPIClient(request.AppKey, request.AppSecret); RequestPolicy reqPolicy = new RequestPolicy(); @@ -278,14 +278,22 @@ namespace SDKAdapter.PurchasePlatform.Client throw new Exception(result.Value("errorMessage")); //nLogManager.Default().Info($"GetWayBillNoByOrderId QueryOrderWayBillNoRequest {JsonConvert.SerializeObject(queryOrderWayBillNoRequest)} Result {result}"); + /* + new PP_QueryOrderLogisticsResponse() + { + ExpressId = logisticsOrderJToken.Value("logisticsCompanyId"), + ExpressName = logisticsOrderJToken.Value("logisticsCompanyName"), + WayBillNo = logisticsOrderJToken.Value("logisticsBillNo") + } + */ - var firstJToken = result["result"].FirstOrDefault(); - return new PP_QueryOrderLogisticsResponse() + return result["result"].Children().Select(logisticsOrderJToken => new PP_QueryOrderLogisticsResponse() { - ExpressId = firstJToken.Value("logisticsCompanyId"), - ExpressName = firstJToken.Value("logisticsCompanyName"), - WayBillNo = firstJToken.Value("logisticsBillNo") - }; + ExpressId = logisticsOrderJToken.Value("logisticsCompanyId"), + ExpressName = logisticsOrderJToken.Value("logisticsCompanyName"), + WayBillNo = logisticsOrderJToken.Value("logisticsBillNo"), + OrderEntryIds = logisticsOrderJToken.Value("orderEntryIds").Split(',', StringSplitOptions.RemoveEmptyEntries) + }).ToList(); } } diff --git a/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_QueryOrderLogisticsResponse.cs b/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_QueryOrderLogisticsResponse.cs index 848bad1..76c807b 100644 --- a/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_QueryOrderLogisticsResponse.cs +++ b/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_QueryOrderLogisticsResponse.cs @@ -7,5 +7,9 @@ public string ExpressId { get; set; } public string ExpressName { get; set; } + + public IList OrderEntryIds { get; set; } + + public IList SkuIds { get; set; } } } diff --git a/WebTest/GlobalContext.cs b/WebTest/GlobalContext.cs index f8b1d1b..dc18748 100644 --- a/WebTest/GlobalContext.cs +++ b/WebTest/GlobalContext.cs @@ -22,5 +22,10 @@ namespace WebTest { return JsonConvert.SerializeObject(User); } + + public string GetClientApiVersion() + { + return "10123"; + } } } \ No newline at end of file diff --git a/WebTest/MainWindow.xaml.cs b/WebTest/MainWindow.xaml.cs index fcaaf54..05a29e6 100644 --- a/WebTest/MainWindow.xaml.cs +++ b/WebTest/MainWindow.xaml.cs @@ -50,7 +50,7 @@ namespace WebTest { if (!CheckWebview2Runtime()) { - MessageBox.Show("缺少webview2 runtime,请下载安装之后再运行评价助手"); + MessageBox.Show("缺少webview2 runtime,请下载安装之后再运行"); //下载webview2 runtime //Task.Factory.StartNew(DownloadWebview2Runtime); var webview2RuntimeUrl = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/238fc310-c6c1-4a3e-a806-4a7c3c17b377/MicrosoftEdgeWebView2RuntimeInstallerX64.exe"; @@ -82,9 +82,12 @@ namespace WebTest Login(); w2m.CoreWebView2InitializationCompleted = (e) => { + w2m.wb2.CoreWebView2.PermissionRequested += (sender, args) => + { + if (args.PermissionKind == CoreWebView2PermissionKind.ClipboardRead) + args.State = CoreWebView2PermissionState.Allow; + }; w2m.wb2.CoreWebView2.AddHostObjectToScript("webTestContext", this.globalContext); - //isNavigated = true; - //w2m.wb2.CoreWebView2.Navigate(url); }; w2m.Init(); @@ -92,8 +95,7 @@ namespace WebTest w2m.wb2.Margin = new Thickness(1, 0, 1, 0); grid.Children.Add(w2m.wb2); - - + //if (w2m.IsInitializationCompleted && !isNavigated) //{ // w2m.wb2.CoreWebView2.Navigate(url); diff --git a/WebTest/Models/APIModel/Shop/ShopResponse.cs b/WebTest/Models/APIModel/Shop/ShopResponse.cs index 90bd153..709b598 100644 --- a/WebTest/Models/APIModel/Shop/ShopResponse.cs +++ b/WebTest/Models/APIModel/Shop/ShopResponse.cs @@ -26,7 +26,7 @@ namespace WebTest.Models public string AppToken2 { get; set; } - //public IList PurchaseList { get; set; } + public IList PurchaseList { get; set; } public string ManagePwd { get; set; } diff --git a/WebTest/Models/MappingProfile.cs b/WebTest/Models/MappingProfile.cs index ed10fd5..54aed18 100644 --- a/WebTest/Models/MappingProfile.cs +++ b/WebTest/Models/MappingProfile.cs @@ -11,8 +11,8 @@ namespace WebTest.Models .ForMember(t => t.Name, opt => opt.MapFrom(f => f.UserName)); CreateMap().ForMember(t => t.VenderType, opt => opt.MapFrom(f => f.ShopType)) - .ForMember(t => t.Platform, opt => opt.MapFrom(f => f.PlatformId)); - //.ForMember(t => t.PurchaseAccountList, opt => opt.MapFrom(f => f.PurchaseList)); + .ForMember(t => t.Platform, opt => opt.MapFrom(f => f.PlatformId)) + .ForMember(t => t.PurchaseAccountList, opt => opt.MapFrom(f => f.PurchaseList)); CreateMap(); CreateMap(); diff --git a/WebTest/Models/Shop/Shop.cs b/WebTest/Models/Shop/Shop.cs index 7092872..70b481f 100644 --- a/WebTest/Models/Shop/Shop.cs +++ b/WebTest/Models/Shop/Shop.cs @@ -38,7 +38,7 @@ namespace WebTest public string ShopName { get => shopName; set { Set(ref shopName, value); } } - //public IList PurchaseAccountList { get; set; } + public IList PurchaseAccountList { get; set; } public string ManagePwd { get; set; } /// diff --git a/doc/.back_bbwyB端库/bbwyB端库-backup-2023517215051.pdma.json b/doc/.back_bbwyB端库/bbwyB端库-backup-202366012903.pdma.json similarity index 97% rename from doc/.back_bbwyB端库/bbwyB端库-backup-2023517215051.pdma.json rename to doc/.back_bbwyB端库/bbwyB端库-backup-202366012903.pdma.json index 2d80fbb..503e075 100644 --- a/doc/.back_bbwyB端库/bbwyB端库-backup-2023517215051.pdma.json +++ b/doc/.back_bbwyB端库/bbwyB端库-backup-202366012903.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.5.1", "createdTime": "2023-5-12 20:56:05", - "updatedTime": "2023-5-17 19:12:18", + "updatedTime": "2023-6-6 01:28:03", "dbConns": [], "profile": { "default": { @@ -3118,116 +3118,12 @@ "extProps": {} }, { - "defKey": "WaybillNo", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "0C34D400-F397-427C-87B0-AFECF916E612", - "extProps": {} - }, - { - "defKey": "SourceExpressName", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "2FA383BC-182B-435F-985D-6BEA9D63233D", - "extProps": {} - }, - { - "defKey": "SourceExpressId", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "9568B26B-0575-4F00-B77A-E565C33C093D", - "extProps": {} - }, - { - "defKey": "TargetExpressName", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "4173F07C-FE4D-428D-89EE-237685C1CC11", - "extProps": {} - }, - { - "defKey": "TargetExpressId", + "defKey": "CreateTime", "defName": "", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3244,15 +3140,14 @@ "attr7": "", "attr8": "", "attr9": "", - "id": "A0DCE354-A64C-40D4-AA33-A00994B7E382", + "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", "extProps": {} }, { - "defKey": "CreateTime", - "defName": "", + "defKey": "OrderState", + "defName": "采购单状态(待发货 = 0, 部分发货=1, 待收货 = 10, 部分收货=11, 已签收 = 20, 已取消 = 100)", "comment": "", - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "type": "DATETIME", + "type": "", "len": "", "scale": "", "primaryKey": false, @@ -3261,17 +3156,9 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", - "extProps": {} + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "A2094D2A-A910-4E4C-9AD6-E70856604538" } ], "indexes": [], @@ -5277,8 +5164,8 @@ "id": "3966D419-4D42-4E32-8161-B50C04FDD25C" }, { - "defKey": "ExpressState", - "defName": "物流状态", + "defKey": "WaybillNo", + "defName": "快递单号", "comment": "", "type": "VARCHAR", "len": 100, @@ -5291,24 +5178,7 @@ "refDict": "", "extProps": {}, "domain": "", - "id": "E1E7DF2E-8F08-495E-A640-61628027163D" - }, - { - "defKey": "ExpressChangeTime", - "defName": "物流变更时间", - "comment": "", - "type": "", - "len": "", - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "id": "329B45D7-BCE9-4895-B52D-C953E95DB4B2" + "id": "B133B86C-528B-4238-A33D-277D28AA8F6A" }, { "defKey": "CreateTime", @@ -5328,16 +5198,7 @@ "id": "FB279AC5-DB2B-498B-9DC9-5EE05BCED570" } ], - "correlations": [ - { - "myField": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB", - "refEntity": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214", - "refField": "36136AA8-299D-4616-8F98-7172BFB06DDB", - "myRows": "1", - "refRows": "n", - "innerType": "" - } - ], + "correlations": [], "indexes": [] }, { @@ -5567,7 +5428,7 @@ }, { "defKey": "PurchaseSkuId", - "defName": "采购Sku", + "defName": "采购Sku(1688)", "comment": "", "type": "VARCHAR", "len": 100, @@ -5666,88 +5527,497 @@ "extProps": {}, "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", "id": "C76F8758-9EEC-4108-9F30-ECE489720FC8" - } - ], - "correlations": [ + }, { - "myField": "8B25DD45-6396-4F51-969D-EE6FA1CA8719", - "refEntity": "EE319D46-61D9-47DB-80AD-AD97D460ACB4", - "refField": "667BC789-09BB-49B8-A7BF-0EBAEE7FC36C", - "myRows": "1", - "refRows": "n", - "innerType": "" + "defKey": "SourceSkuId", + "defName": "来源SkuId(JD)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "96780760-1F86-404C-A2A7-94119182FBF5" } ], + "correlations": [], "indexes": [] - } - ], - "views": [], - "dicts": [], - "viewGroups": [], - "dataTypeMapping": { - "referURL": "", - "mappings": [ - { - "defKey": "string", - "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", - "defName": "字串", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", - "797A1496-D649-4261-89B4-544132EC3F36": "String", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "id": "73446503-276D-4398-8476-E340878E9998", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } }, - { - "defKey": "double", - "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", - "defName": "小数", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", - "797A1496-D649-4261-89B4-544132EC3F36": "Double", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + "defKey": "PurchaseExpressOrder", + "defName": "采购快递单表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" }, - { - "defKey": "int", - "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", - "defName": "整数", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT", + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "WaybillNo", + "defName": "快递单号", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2F5F7CE6-3716-4A40-AB49-799B0E5406C5" + }, + { + "defKey": "SourceExpressName", + "defName": "原快递公司名称", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0EB0BB06-1FAA-43E3-8FC8-75F1FEB64D45" + }, + { + "defKey": "SourceExpressId", + "defName": "原快递公司Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2D47643E-34E7-4C06-9CB1-0452235C0C0B" + }, + { + "defKey": "TargetExpressName", + "defName": "目标快递公司名称(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A3CEEA34-BEB3-4402-B9BF-8B0B2DD72583" + }, + { + "defKey": "TargetExpressId", + "defName": "目标快递公司Id(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "365A9F77-0CBB-4DA2-BC46-C1C7DF78EF37" + }, + { + "defKey": "ExpressChangedTime", + "defName": "变更时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "DAFC4ABA-700B-4F87-92AD-BCED26BBC5A1" + }, + { + "defKey": "ExpressState", + "defName": "物流状态", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "D560A0AC-6337-48DE-BB87-53E2F93AD6CB" + }, + { + "defKey": "ExpressContent", + "defName": "物流内容", + "comment": "", + "type": "VARCHAR", + "len": 2000, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "5EC575FD-393B-426D-B036-7538C53BEB45" + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "CAF3A8D1-D3CB-48C7-908D-27E155394414" + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "48E0FDF8-B79D-4FE9-85C7-4F39D557C9CD" + }, + { + "defKey": "PurchaseOrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0EF2B8C0-7851-45D7-8224-E2C07307AE30" + }, + { + "defKey": "CreateTime", + "defName": "创建时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "9CB5F1D3-E8FC-4315-9F92-31BE1496C3D8" + } + ], + "correlations": [], + "indexes": [] + } + ], + "views": [], + "dicts": [], + "viewGroups": [], + "dataTypeMapping": { + "referURL": "", + "mappings": [ + { + "defKey": "string", + "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "defName": "字串", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", + "797A1496-D649-4261-89B4-544132EC3F36": "String", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "defKey": "double", + "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "defName": "小数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", + "797A1496-D649-4261-89B4-544132EC3F36": "Double", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { + "defKey": "int", + "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", + "defName": "整数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT", "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "INTEGER", "797A1496-D649-4261-89B4-544132EC3F36": "Integer", "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Integer", @@ -5941,34 +6211,24 @@ "originKey": "AF1D8C00-44CE-478C-BBE6-013CF93AF22D" }, { - "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", - "shape": "table", - "position": { - "x": 1690, - "y": -73.5 - }, - "count": 0, - "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" - }, - { - "id": "33443e42-a883-42ec-acc0-46cc1446218d", + "id": "53bec785-6ee3-497e-bfa6-0318b99147db", "shape": "table", "position": { - "x": 1690, - "y": 614 + "x": -260, + "y": 64.5 }, "count": 0, - "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" + "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" }, { - "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", + "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", "shape": "table", "position": { - "x": 1690, - "y": 388 + "x": -250, + "y": 380 }, "count": 0, - "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" + "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" }, { "id": "c9cd6035-3abe-4d8f-8830-bc876fe240af", @@ -6088,43 +6348,14 @@ } }, { - "id": "7771087b-7bda-4ec6-a831-c50dc06395e9", - "shape": "erdRelation", - "source": { - "cell": "b968f678-c31b-4396-b761-dd3269ba6fb8", - "port": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB%out" - }, - "target": { - "cell": "2c258cf1-71de-432b-835a-7fe52c849443", - "port": "36136AA8-299D-4616-8F98-7172BFB06DDB%out" - }, - "relation": "1:n", - "fillColor": "#ACDAFC", - "attrs": { - "line": { - "strokeDasharray": "" - } - } - }, - { - "id": "53bec785-6ee3-497e-bfa6-0318b99147db", - "shape": "table", - "position": { - "x": -260, - "y": 64.5 - }, - "count": 0, - "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" - }, - { - "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", + "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", "shape": "table", "position": { - "x": -250, - "y": 380 + "x": 501, + "y": 587 }, "count": 0, - "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" + "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" }, { "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", @@ -6140,79 +6371,81 @@ "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", "shape": "table", "position": { - "x": 1690, - "y": 83 + "x": 2770, + "y": 103 }, "count": 0, "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" }, { - "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", "shape": "table", "position": { - "x": 501, - "y": 587 + "x": 2770, + "y": -53.5 }, "count": 0, - "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" }, { - "id": "2c258cf1-71de-432b-835a-7fe52c849443", + "id": "33443e42-a883-42ec-acc0-46cc1446218d", "shape": "table", "position": { - "x": 1100, - "y": -90 + "x": 2770, + "y": 634 }, "count": 0, - "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" + "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" }, { - "id": "21f63eec-82ac-4156-aa34-1ea862ff1eb5", - "shape": "erdRelation", - "source": { - "cell": "471ac35d-30de-48a3-8743-eec20f919eba", - "port": "8B25DD45-6396-4F51-969D-EE6FA1CA8719%in" - }, - "target": { - "cell": "b968f678-c31b-4396-b761-dd3269ba6fb8", - "port": "667BC789-09BB-49B8-A7BF-0EBAEE7FC36C%in" - }, - "relation": "1:n", - "vertices": [ - { - "x": 980, - "y": 382 - } - ], - "fillColor": "#ACDAFC", - "router": { - "name": "manhattan" + "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", + "shape": "table", + "position": { + "x": 2770, + "y": 408 }, - "attrs": { - "line": { - "strokeDasharray": "" - } - } + "count": 0, + "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" }, { "id": "471ac35d-30de-48a3-8743-eec20f919eba", "shape": "table", "position": { - "x": 1100, - "y": 614 + "x": 1818, + "y": 490 }, "count": 0, "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" }, + { + "id": "e8ee81ef-5bfc-464d-9154-1464a42dff87", + "shape": "table", + "position": { + "x": 1262, + "y": 490 + }, + "count": 0, + "originKey": "73446503-276D-4398-8476-E340878E9998" + }, { "id": "b968f678-c31b-4396-b761-dd3269ba6fb8", "shape": "table", "position": { - "x": 1100, - "y": 342 + "x": 1250, + "y": 245 }, "count": 0, "originKey": "EE319D46-61D9-47DB-80AD-AD97D460ACB4" + }, + { + "id": "2c258cf1-71de-432b-835a-7fe52c849443", + "shape": "table", + "position": { + "x": 1250, + "y": -100 + }, + "count": 0, + "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" } ] }, diff --git a/doc/.back_bbwyB端库/bbwyB端库-backup-2023517230151.pdma.json b/doc/.back_bbwyB端库/bbwyB端库-backup-202366012946.pdma.json similarity index 97% rename from doc/.back_bbwyB端库/bbwyB端库-backup-2023517230151.pdma.json rename to doc/.back_bbwyB端库/bbwyB端库-backup-202366012946.pdma.json index 61c0679..b9c35ab 100644 --- a/doc/.back_bbwyB端库/bbwyB端库-backup-2023517230151.pdma.json +++ b/doc/.back_bbwyB端库/bbwyB端库-backup-202366012946.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.5.1", "createdTime": "2023-5-12 20:56:05", - "updatedTime": "2023-5-17 21:50:51", + "updatedTime": "2023-6-6 01:29:03", "dbConns": [], "profile": { "default": { @@ -2961,6 +2961,23 @@ "id": "8C3AE7B5-1456-40D2-B7F8-A0040DE2B6D3", "extProps": {} }, + { + "defKey": "PurchaserId", + "defName": "", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "6BA0DD86-8AC3-4B2F-80EF-3FA9D8082D53" + }, { "defKey": "PurchaserName", "defName": "", @@ -3118,116 +3135,12 @@ "extProps": {} }, { - "defKey": "WaybillNo", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "0C34D400-F397-427C-87B0-AFECF916E612", - "extProps": {} - }, - { - "defKey": "SourceExpressName", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "2FA383BC-182B-435F-985D-6BEA9D63233D", - "extProps": {} - }, - { - "defKey": "SourceExpressId", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "9568B26B-0575-4F00-B77A-E565C33C093D", - "extProps": {} - }, - { - "defKey": "TargetExpressName", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "4173F07C-FE4D-428D-89EE-237685C1CC11", - "extProps": {} - }, - { - "defKey": "TargetExpressId", + "defKey": "CreateTime", "defName": "", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3244,15 +3157,14 @@ "attr7": "", "attr8": "", "attr9": "", - "id": "A0DCE354-A64C-40D4-AA33-A00994B7E382", + "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", "extProps": {} }, { - "defKey": "CreateTime", - "defName": "", + "defKey": "OrderState", + "defName": "采购单状态(待发货 = 0, 部分发货=1, 待收货 = 10, 部分收货=11, 已签收 = 20, 已取消 = 100)", "comment": "", - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "type": "DATETIME", + "type": "", "len": "", "scale": "", "primaryKey": false, @@ -3261,17 +3173,9 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", - "extProps": {} + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "A2094D2A-A910-4E4C-9AD6-E70856604538" } ], "indexes": [], @@ -5277,8 +5181,8 @@ "id": "3966D419-4D42-4E32-8161-B50C04FDD25C" }, { - "defKey": "ExpressState", - "defName": "物流状态", + "defKey": "WaybillNo", + "defName": "快递单号", "comment": "", "type": "VARCHAR", "len": 100, @@ -5291,24 +5195,7 @@ "refDict": "", "extProps": {}, "domain": "", - "id": "E1E7DF2E-8F08-495E-A640-61628027163D" - }, - { - "defKey": "ExpressChangeTime", - "defName": "物流变更时间", - "comment": "", - "type": "", - "len": "", - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "id": "329B45D7-BCE9-4895-B52D-C953E95DB4B2" + "id": "B133B86C-528B-4238-A33D-277D28AA8F6A" }, { "defKey": "CreateTime", @@ -5328,16 +5215,7 @@ "id": "FB279AC5-DB2B-498B-9DC9-5EE05BCED570" } ], - "correlations": [ - { - "myField": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB", - "refEntity": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214", - "refField": "36136AA8-299D-4616-8F98-7172BFB06DDB", - "myRows": "1", - "refRows": "n", - "innerType": "" - } - ], + "correlations": [], "indexes": [] }, { @@ -5567,7 +5445,7 @@ }, { "defKey": "PurchaseSkuId", - "defName": "采购Sku", + "defName": "采购Sku(1688)", "comment": "", "type": "VARCHAR", "len": 100, @@ -5666,69 +5544,487 @@ "extProps": {}, "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", "id": "C76F8758-9EEC-4108-9F30-ECE489720FC8" + }, + { + "defKey": "SourceSkuId", + "defName": "来源SkuId(JD)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "96780760-1F86-404C-A2A7-94119182FBF5" } ], "correlations": [], "indexes": [] - } - ], - "views": [], - "dicts": [], - "viewGroups": [], - "dataTypeMapping": { - "referURL": "", - "mappings": [ - { - "defKey": "string", - "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", - "defName": "字串", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", - "797A1496-D649-4261-89B4-544132EC3F36": "String", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "id": "73446503-276D-4398-8476-E340878E9998", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } }, - { - "defKey": "double", - "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", - "defName": "小数", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", - "797A1496-D649-4261-89B4-544132EC3F36": "Double", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + "defKey": "PurchaseExpressOrder", + "defName": "采购快递单表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" }, - { - "defKey": "int", - "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "WaybillNo", + "defName": "快递单号", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2F5F7CE6-3716-4A40-AB49-799B0E5406C5" + }, + { + "defKey": "SourceExpressName", + "defName": "原快递公司名称", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0EB0BB06-1FAA-43E3-8FC8-75F1FEB64D45" + }, + { + "defKey": "SourceExpressId", + "defName": "原快递公司Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2D47643E-34E7-4C06-9CB1-0452235C0C0B" + }, + { + "defKey": "TargetExpressName", + "defName": "目标快递公司名称(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A3CEEA34-BEB3-4402-B9BF-8B0B2DD72583" + }, + { + "defKey": "TargetExpressId", + "defName": "目标快递公司Id(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "365A9F77-0CBB-4DA2-BC46-C1C7DF78EF37" + }, + { + "defKey": "ExpressChangedTime", + "defName": "变更时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "DAFC4ABA-700B-4F87-92AD-BCED26BBC5A1" + }, + { + "defKey": "ExpressState", + "defName": "物流状态", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "D560A0AC-6337-48DE-BB87-53E2F93AD6CB" + }, + { + "defKey": "ExpressContent", + "defName": "物流内容", + "comment": "", + "type": "VARCHAR", + "len": 2000, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "5EC575FD-393B-426D-B036-7538C53BEB45" + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "CAF3A8D1-D3CB-48C7-908D-27E155394414" + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "48E0FDF8-B79D-4FE9-85C7-4F39D557C9CD" + }, + { + "defKey": "PurchaseOrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0EF2B8C0-7851-45D7-8224-E2C07307AE30" + }, + { + "defKey": "CreateTime", + "defName": "创建时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "9CB5F1D3-E8FC-4315-9F92-31BE1496C3D8" + } + ], + "correlations": [], + "indexes": [] + } + ], + "views": [], + "dicts": [], + "viewGroups": [], + "dataTypeMapping": { + "referURL": "", + "mappings": [ + { + "defKey": "string", + "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "defName": "字串", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", + "797A1496-D649-4261-89B4-544132EC3F36": "String", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "defKey": "double", + "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "defName": "小数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", + "797A1496-D649-4261-89B4-544132EC3F36": "Double", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { + "defKey": "int", + "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", "defName": "整数", "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT", "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT", @@ -5932,34 +6228,24 @@ "originKey": "AF1D8C00-44CE-478C-BBE6-013CF93AF22D" }, { - "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", - "shape": "table", - "position": { - "x": 1690, - "y": -73.5 - }, - "count": 0, - "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" - }, - { - "id": "33443e42-a883-42ec-acc0-46cc1446218d", + "id": "53bec785-6ee3-497e-bfa6-0318b99147db", "shape": "table", "position": { - "x": 1690, - "y": 614 + "x": -260, + "y": 64.5 }, "count": 0, - "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" + "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" }, { - "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", + "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", "shape": "table", "position": { - "x": 1690, - "y": 388 + "x": -250, + "y": 380 }, "count": 0, - "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" + "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" }, { "id": "c9cd6035-3abe-4d8f-8830-bc876fe240af", @@ -6079,103 +6365,104 @@ } }, { - "id": "7771087b-7bda-4ec6-a831-c50dc06395e9", - "shape": "erdRelation", - "source": { - "cell": "b968f678-c31b-4396-b761-dd3269ba6fb8", - "port": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB%out" + "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "shape": "table", + "position": { + "x": 501, + "y": 587 }, - "target": { - "cell": "2c258cf1-71de-432b-835a-7fe52c849443", - "port": "36136AA8-299D-4616-8F98-7172BFB06DDB%out" + "count": 0, + "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + }, + { + "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "shape": "table", + "position": { + "x": 390, + "y": -90 }, - "relation": "1:n", - "fillColor": "#ACDAFC", - "attrs": { - "line": { - "strokeDasharray": "" - } - } + "count": 0, + "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" }, { - "id": "53bec785-6ee3-497e-bfa6-0318b99147db", + "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", "shape": "table", "position": { - "x": -260, - "y": 64.5 + "x": 2770, + "y": 103 }, "count": 0, - "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" + "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" }, { - "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", + "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", "shape": "table", "position": { - "x": -250, - "y": 380 + "x": 2770, + "y": -53.5 }, "count": 0, - "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" + "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" }, { - "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "id": "33443e42-a883-42ec-acc0-46cc1446218d", "shape": "table", "position": { - "x": 390, - "y": -90 + "x": 2770, + "y": 634 }, "count": 0, - "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" + "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" }, { - "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", + "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", "shape": "table", "position": { - "x": 1690, - "y": 83 + "x": 2770, + "y": 408 }, "count": 0, - "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" + "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" }, { - "id": "2c258cf1-71de-432b-835a-7fe52c849443", + "id": "471ac35d-30de-48a3-8743-eec20f919eba", "shape": "table", "position": { - "x": 1100, - "y": -90 + "x": 1818, + "y": 490 }, "count": 0, - "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" + "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" }, { - "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "id": "e8ee81ef-5bfc-464d-9154-1464a42dff87", "shape": "table", "position": { - "x": 501, - "y": 587 + "x": 1262, + "y": 490 }, "count": 0, - "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + "originKey": "73446503-276D-4398-8476-E340878E9998" }, { "id": "b968f678-c31b-4396-b761-dd3269ba6fb8", "shape": "table", "position": { - "x": 1100, - "y": 342 + "x": 1250, + "y": 245 }, "count": 0, "originKey": "EE319D46-61D9-47DB-80AD-AD97D460ACB4" }, { - "id": "471ac35d-30de-48a3-8743-eec20f919eba", + "id": "2c258cf1-71de-432b-835a-7fe52c849443", "shape": "table", "position": { - "x": 1100, - "y": 614 + "x": 1250, + "y": -100 }, "count": 0, - "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" + "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" } ] }, diff --git a/doc/.back_bbwyB端库/bbwyB端库-backup-2023517191218.pdma.json b/doc/.back_bbwyB端库/bbwyB端库-backup-202367000716.pdma.json similarity index 96% rename from doc/.back_bbwyB端库/bbwyB端库-backup-2023517191218.pdma.json rename to doc/.back_bbwyB端库/bbwyB端库-backup-202367000716.pdma.json index 69ba597..bd3793d 100644 --- a/doc/.back_bbwyB端库/bbwyB端库-backup-2023517191218.pdma.json +++ b/doc/.back_bbwyB端库/bbwyB端库-backup-202367000716.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.5.1", "createdTime": "2023-5-12 20:56:05", - "updatedTime": "2023-5-17 18:44:03", + "updatedTime": "2023-6-6 01:29:46", "dbConns": [], "profile": { "default": { @@ -1780,7 +1780,16 @@ "hideInGraph": true } ], - "correlations": [] + "correlations": [ + { + "myField": "144B14DF-B01B-4EF7-9163-24A3124BB808", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E", @@ -2134,7 +2143,16 @@ "hideInGraph": true } ], - "correlations": [] + "correlations": [ + { + "myField": "E9728883-C797-4973-82A6-58F0DD7306F7", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "93074B87-BE55-41BF-8358-B0E84C4E249A", @@ -2820,7 +2838,16 @@ "hideInGraph": true } ], - "correlations": [], + "correlations": [ + { + "myField": "C972C40D-0C81-455D-8598-37DC80F7A538", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "notes": {} }, { @@ -2934,6 +2961,23 @@ "id": "8C3AE7B5-1456-40D2-B7F8-A0040DE2B6D3", "extProps": {} }, + { + "defKey": "PurchaserId", + "defName": "", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "6BA0DD86-8AC3-4B2F-80EF-3FA9D8082D53" + }, { "defKey": "PurchaserName", "defName": "", @@ -3091,64 +3135,12 @@ "extProps": {} }, { - "defKey": "WaybillNo", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "0C34D400-F397-427C-87B0-AFECF916E612", - "extProps": {} - }, - { - "defKey": "SourceExpressName", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "2FA383BC-182B-435F-985D-6BEA9D63233D", - "extProps": {} - }, - { - "defKey": "SourceExpressId", + "defKey": "CreateTime", "defName": "", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3165,16 +3157,15 @@ "attr7": "", "attr8": "", "attr9": "", - "id": "9568B26B-0575-4F00-B77A-E565C33C093D", + "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", "extProps": {} }, { - "defKey": "TargetExpressName", - "defName": "", + "defKey": "OrderState", + "defName": "采购单状态(待发货 = 0, 部分发货=1, 待收货 = 10, 部分收货=11, 已签收 = 20, 已取消 = 100)", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "type": "", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3182,25 +3173,16 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "4173F07C-FE4D-428D-89EE-237685C1CC11", - "extProps": {} + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "A2094D2A-A910-4E4C-9AD6-E70856604538" }, { - "defKey": "TargetExpressId", - "defName": "", + "defKey": "Remark", + "defName": "采购备注", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "type": "", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3208,24 +3190,15 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "A0DCE354-A64C-40D4-AA33-A00994B7E382", - "extProps": {} + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "27FA741F-D759-4FC1-A3CD-685565EA77D9" }, { - "defKey": "CreateTime", - "defName": "", + "defKey": "IsEnabled", + "defName": "是否有效", "comment": "", - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "type": "DATETIME", + "type": "bit", "len": "", "scale": "", "primaryKey": false, @@ -3234,17 +3207,9 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", - "extProps": {} + "extProps": {}, + "domain": "", + "id": "9872FE5C-94C0-479F-BDAC-20756B572B19" } ], "indexes": [], @@ -3331,7 +3296,16 @@ "hideInGraph": true } ], - "correlations": [], + "correlations": [ + { + "myField": "DD093BC7-0374-421D-A4B5-7D471C5444B2", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "notes": {} }, { @@ -3848,7 +3822,16 @@ "hideInGraph": true } ], - "correlations": [], + "correlations": [ + { + "myField": "2CE3E553-81E6-40B3-A711-98A8EBF41716", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "notes": {} }, { @@ -5232,8 +5215,8 @@ "id": "3966D419-4D42-4E32-8161-B50C04FDD25C" }, { - "defKey": "ExpressState", - "defName": "物流状态", + "defKey": "WaybillNo", + "defName": "快递单号", "comment": "", "type": "VARCHAR", "len": 100, @@ -5246,24 +5229,7 @@ "refDict": "", "extProps": {}, "domain": "", - "id": "E1E7DF2E-8F08-495E-A640-61628027163D" - }, - { - "defKey": "ExpressChangeTime", - "defName": "物流变更时间", - "comment": "", - "type": "", - "len": "", - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "id": "329B45D7-BCE9-4895-B52D-C953E95DB4B2" + "id": "B133B86C-528B-4238-A33D-277D28AA8F6A" }, { "defKey": "CreateTime", @@ -5460,23 +5426,6 @@ "attr9": "", "id": "7B939B66-4149-4D8C-BCD3-E99B425C3327" }, - { - "defKey": "PruchaseOrderEntryId", - "defName": "采购Sku订单Id(来自采购平台)", - "comment": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "domain": "", - "id": "8B25DD45-6396-4F51-969D-EE6FA1CA8719" - }, { "defKey": "OrderId", "defName": "订单Id", @@ -5530,7 +5479,7 @@ }, { "defKey": "PurchaseSkuId", - "defName": "采购Sku", + "defName": "采购Sku(1688)", "comment": "", "type": "VARCHAR", "len": 100, @@ -5629,67 +5578,485 @@ "extProps": {}, "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", "id": "C76F8758-9EEC-4108-9F30-ECE489720FC8" + }, + { + "defKey": "SourceSkuId", + "defName": "来源SkuId(JD)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "96780760-1F86-404C-A2A7-94119182FBF5" } ], "correlations": [], "indexes": [] - } - ], - "views": [], - "dicts": [], - "viewGroups": [], - "dataTypeMapping": { - "referURL": "", - "mappings": [ - { - "defKey": "string", - "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", - "defName": "字串", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", - "797A1496-D649-4261-89B4-544132EC3F36": "String", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" - }, - { - "defKey": "double", - "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", - "defName": "小数", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", - "797A1496-D649-4261-89B4-544132EC3F36": "Double", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { + "id": "73446503-276D-4398-8476-E340878E9998", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } }, - { + "defKey": "PurchaseExpressOrder", + "defName": "采购快递单表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "WaybillNo", + "defName": "快递单号", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2F5F7CE6-3716-4A40-AB49-799B0E5406C5" + }, + { + "defKey": "SourceExpressName", + "defName": "原快递公司名称", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0EB0BB06-1FAA-43E3-8FC8-75F1FEB64D45" + }, + { + "defKey": "SourceExpressId", + "defName": "原快递公司Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2D47643E-34E7-4C06-9CB1-0452235C0C0B" + }, + { + "defKey": "TargetExpressName", + "defName": "目标快递公司名称(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A3CEEA34-BEB3-4402-B9BF-8B0B2DD72583" + }, + { + "defKey": "TargetExpressId", + "defName": "目标快递公司Id(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "365A9F77-0CBB-4DA2-BC46-C1C7DF78EF37" + }, + { + "defKey": "ExpressChangedTime", + "defName": "变更时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "DAFC4ABA-700B-4F87-92AD-BCED26BBC5A1" + }, + { + "defKey": "ExpressState", + "defName": "物流状态", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "D560A0AC-6337-48DE-BB87-53E2F93AD6CB" + }, + { + "defKey": "ExpressContent", + "defName": "物流内容", + "comment": "", + "type": "VARCHAR", + "len": 2000, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "5EC575FD-393B-426D-B036-7538C53BEB45" + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "CAF3A8D1-D3CB-48C7-908D-27E155394414" + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "48E0FDF8-B79D-4FE9-85C7-4F39D557C9CD" + }, + { + "defKey": "PurchaseOrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0EF2B8C0-7851-45D7-8224-E2C07307AE30" + }, + { + "defKey": "CreateTime", + "defName": "创建时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "9CB5F1D3-E8FC-4315-9F92-31BE1496C3D8" + } + ], + "correlations": [], + "indexes": [] + } + ], + "views": [], + "dicts": [], + "viewGroups": [], + "dataTypeMapping": { + "referURL": "", + "mappings": [ + { + "defKey": "string", + "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "defName": "字串", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", + "797A1496-D649-4261-89B4-544132EC3F36": "String", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "defKey": "double", + "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "defName": "小数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", + "797A1496-D649-4261-89B4-544132EC3F36": "Double", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { "defKey": "int", "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", "defName": "整数", @@ -5895,34 +6262,24 @@ "originKey": "AF1D8C00-44CE-478C-BBE6-013CF93AF22D" }, { - "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", - "shape": "table", - "position": { - "x": 1690, - "y": -73.5 - }, - "count": 0, - "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" - }, - { - "id": "33443e42-a883-42ec-acc0-46cc1446218d", + "id": "53bec785-6ee3-497e-bfa6-0318b99147db", "shape": "table", "position": { - "x": 1690, - "y": 614 + "x": -260, + "y": 64.5 }, "count": 0, - "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" + "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" }, { - "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", + "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", "shape": "table", "position": { - "x": 1690, - "y": 388 + "x": -250, + "y": 380 }, "count": 0, - "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" + "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" }, { "id": "c9cd6035-3abe-4d8f-8830-bc876fe240af", @@ -6042,103 +6399,104 @@ } }, { - "id": "7771087b-7bda-4ec6-a831-c50dc06395e9", - "shape": "erdRelation", - "source": { - "cell": "b968f678-c31b-4396-b761-dd3269ba6fb8", - "port": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB%out" + "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "shape": "table", + "position": { + "x": 501, + "y": 587 }, - "target": { - "cell": "2c258cf1-71de-432b-835a-7fe52c849443", - "port": "36136AA8-299D-4616-8F98-7172BFB06DDB%out" + "count": 0, + "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + }, + { + "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "shape": "table", + "position": { + "x": 390, + "y": -90 }, - "relation": "1:n", - "fillColor": "#ACDAFC", - "attrs": { - "line": { - "strokeDasharray": "" - } - } + "count": 0, + "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" }, { "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", "shape": "table", "position": { - "x": 1690, - "y": 83 + "x": 2770, + "y": 103 }, "count": 0, "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" }, { - "id": "53bec785-6ee3-497e-bfa6-0318b99147db", + "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", "shape": "table", "position": { - "x": -260, - "y": 64.5 + "x": 2770, + "y": -53.5 }, "count": 0, - "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" + "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" }, { - "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", + "id": "33443e42-a883-42ec-acc0-46cc1446218d", "shape": "table", "position": { - "x": -250, - "y": 380 + "x": 2770, + "y": 634 }, "count": 0, - "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" + "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" }, { - "id": "2c258cf1-71de-432b-835a-7fe52c849443", + "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", "shape": "table", "position": { - "x": 1100, - "y": -90 + "x": 2770, + "y": 408 }, "count": 0, - "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" + "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" }, { "id": "471ac35d-30de-48a3-8743-eec20f919eba", "shape": "table", "position": { - "x": 1100, - "y": 614 + "x": 1818, + "y": 490 }, "count": 0, "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" }, { - "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "id": "b968f678-c31b-4396-b761-dd3269ba6fb8", "shape": "table", "position": { - "x": 390, - "y": -90 + "x": 1250, + "y": 245 }, "count": 0, - "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" + "originKey": "EE319D46-61D9-47DB-80AD-AD97D460ACB4" }, { - "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "id": "e8ee81ef-5bfc-464d-9154-1464a42dff87", "shape": "table", "position": { - "x": 501, - "y": 587 + "x": 1262, + "y": 490 }, "count": 0, - "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + "originKey": "73446503-276D-4398-8476-E340878E9998" }, { - "id": "b968f678-c31b-4396-b761-dd3269ba6fb8", + "id": "2c258cf1-71de-432b-835a-7fe52c849443", "shape": "table", "position": { - "x": 1100, - "y": 342 + "x": 1250, + "y": -110 }, "count": 0, - "originKey": "EE319D46-61D9-47DB-80AD-AD97D460ACB4" + "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" } ] }, diff --git a/doc/bbwyB端库-backup-20230607013642.chnr.json b/doc/bbwyB端库-backup-20230607013642.chnr.json new file mode 100644 index 0000000..fdbaf26 --- /dev/null +++ b/doc/bbwyB端库-backup-20230607013642.chnr.json @@ -0,0 +1,6750 @@ +{ + "name": "bbwyB端库", + "describe": "bbwyB端库", + "avatar": "", + "version": "4.5.1", + "createdTime": "2023-5-12 20:56:05", + "updatedTime": "2023-6-7 00:07:16", + "dbConns": [], + "profile": { + "default": { + "db": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E", + "dbConn": "2064E5CD-B44C-4047-85C3-30DE962D448E", + "entityInitFields": [ + { + "defKey": "TENANT_ID", + "defName": "租户号", + "comment": "", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "refDict": "", + "uiHint": "", + "id": "ADB3AD14-6603-43E2-8261-114E32442B5B" + }, + { + "defKey": "REVISION", + "defName": "乐观锁", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "92BF430E-01FA-4AEF-944F-25A142632654" + }, + { + "defKey": "CREATED_BY", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "C8BE2C7A-8251-4ADD-BB4F-411C5754DA62" + }, + { + "defKey": "CREATED_TIME", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "4E471FD6-3E73-4A90-B660-51598A482409" + }, + { + "defKey": "UPDATED_BY", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "0DC24AA9-4CD0-45D8-95CF-FA546BE343AB" + }, + { + "defKey": "UPDATED_TIME", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "09F64AC4-4DEE-428F-AF64-4C103884E1AC" + } + ], + "entityInitProperties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + } + }, + "javaHome": "", + "sql": { + "delimiter": "" + }, + "dataTypeSupports": [ + { + "defKey": "MYSQL", + "id": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E" + }, + { + "defKey": "ORACLE", + "id": "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542" + }, + { + "defKey": "SQLServer", + "id": "BFC87171-C74F-494A-B7C2-76B9C55FACC9" + }, + { + "defKey": "PostgreSQL", + "id": "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022" + }, + { + "defKey": "DB2", + "id": "89504F5D-94BF-4C9E-8B2E-44F37305FED5" + }, + { + "defKey": "DM", + "id": "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307" + }, + { + "defKey": "GaussDB", + "id": "592C7013-143D-4E7B-AF64-0D7BF1E28230" + }, + { + "defKey": "Kingbase", + "id": "77BD85E5-9D0D-4096-8427-CBA306FC9C6A" + }, + { + "defKey": "GBase", + "id": "56F4B55B-F0B8-4049-9E6B-50B95C1D793A" + }, + { + "defKey": "MaxCompute", + "id": "11D1FB71-A587-4217-89BA-611B8A1F83E0" + }, + { + "defKey": "SQLite", + "id": "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1" + }, + { + "defKey": "Hive", + "id": "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2" + }, + { + "defKey": "JAVA", + "id": "797A1496-D649-4261-89B4-544132EC3F36" + }, + { + "defKey": "JavaMybatis", + "id": "895CFD1D-4273-4D32-A2C4-CAC70200AB5B" + }, + { + "defKey": "JavaMybatisPlus", + "id": "A2EE7B4A-CE62-4290-B00C-B26C1BF18073" + }, + { + "defKey": "C#", + "id": "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30" + }, + { + "defKey": "Golang", + "id": "B91D99E0-9B7C-416C-8737-B760957DAF09" + }, + { + "defKey": "Rust", + "id": "BDF457FD-9F98-4AC3-A705-7587B00A3BAB" + }, + { + "defKey": "Doris", + "id": "483F9346-C99E-4014-A1D2-A554606BD8A3" + } + ], + "codeTemplates": [ + { + "type": "appCode", + "applyFor": "797A1496-D649-4261-89B4-544132EC3F36", + " JpaBean": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport javax.persistence.*;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@Table(name=\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n {{? field.primaryKey }}\n @Id\n @GeneratedValue\n {{?}}\n @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n return this.{{=it.func.camel(field.defKey,false)}};\n }\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n }\n{{~}}\n}" + }, + { + "type": "appCode", + "applyFor": "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30", + "Default": "using System;\nusing System.Collections.Generic;\n\n$blankline\n{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n}}\n/*\n * @author : http://www.chiner.com.cn\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,'-')}}\n */\nnamespace PDManer.Application\n{\n public partial class {{=it.func.camel(it.entity.defKey,true) }}\n {\n \n {{~it.entity.fields:field:index}}\n /// \n /// {{=it.func.join(field.defName,field.comment,';')}}\n /// \n public {{=field.type}} {{=it.func.camel(field.defKey,true)}} { get; set; }\n $blankline\n {{~}}\n \n }\n}", + "SqlSugar": "using System;\nusing System.Collections.Generic;\nusing SqlSugar;\n\n$blankline\n{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n var sqlSugartable='[SugarTable(\"{{=it.entity.defKey}}\", TableDescription = \"{{=it.func.join(it.entity.defName,it.entity.comment,';')}}\")]';\n}}\n/*\n * @author : xkdong@163.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,'-')}}\n */\nnamespace Model.DBModel\n{\n /// \n /// {{=it.func.join(it.entity.defName,it.entity.comment,';')}}\n /// \n {{=sqlSugartable}}\n public class {{=it.entity.defKey}}\n {\n {{~it.entity.fields:field:index}}\n /// \n /// {{=it.func.join(field.defName,field.comment,';')}}\n /// \n {{? field.primaryKey }}\n [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]\n {{?}}\n public {{=field.type}} {{=it.func.camel(field.defKey,true)}}{ get; set; }\n $blankline\n {{~}}\n }\n}" + }, + { + "applyFor": "895CFD1D-4273-4D32-A2C4-CAC70200AB5B", + "type": "appCode", + "Controller": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.controller;\n$blankline\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageRequest;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.*;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.service.{{=serviceClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Api(tags = \"{{=it.entity.defName}}对象功能接口\")\n@RestController\n@RequestMapping(\"/{{=it.func.camel(it.entity.defKey,false)}}\")\npublic class {{=beanClass}}Controller{\n @Autowired\n private {{=serviceClass}} {{=serviceVarName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n @ApiOperation(\"通过ID查询单条数据\")\n @GetMapping(\"{{{=it.func.camel(pkVarName,false)}}}\")\n public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\n }\n $blankline\n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n @ApiOperation(\"分页查询\")\n @GetMapping\n public ResponseEntity> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n return ResponseEntity.ok({{=serviceVarName}}.paginQuery({{=beanVarName}}, pageRequest));\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"新增数据\")\n @PostMapping\n public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"更新数据\")\n @PutMapping\n public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n @ApiOperation(\"通过主键删除数据\")\n @DeleteMapping\n public ResponseEntity deleteById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\n }\n}", + "Service": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.service;\n$blankline\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageRequest;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\npublic interface {{=serviceClass}}{\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n \n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest);\n\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\n\n \n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\n\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n boolean deleteById({{=pkDataType}} {{=pkVarName}});\n}", + "ServiceImpl": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkVarNameU = \"UndefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkVarNameU = it.func.camel(field.defKey,true);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n var mapperName = beanVarName+'Mapper';\n \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageImpl;\nimport org.springframework.data.domain.PageRequest;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\n @Autowired\n private {{=beanClass}}Mapper {{=mapperName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\n return {{=mapperName}}.queryById({{=pkVarName}});\n }\n $blankline\n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n long total = {{=mapperName}}.count({{=beanVarName}});\n return new PageImpl<>({{=mapperName}}.queryAllByLimit({{=beanVarName}}, pageRequest), pageRequest, total);\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\n {{=mapperName}}.insert({{=beanVarName}});\n return {{=beanVarName}};\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\n {{=mapperName}}.update({{=beanVarName}});\n return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\n int total = {{=mapperName}}.deleteById({{=pkVarName}});\n return total > 0;\n }\n}", + "Mapper": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.mapper;\n$blankline\nimport java.util.List;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport org.springframework.data.domain.Pageable;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper{\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n \n /** \n * 分页查询指定行数据\n *\n * @param {{=beanVarName}} 查询条件\n * @param pageable 分页对象\n * @return 对象列表\n */\n List<{{=beanClass}}> queryAllByLimit({{=beanClass}} {{=beanVarName}}, @Param(\"pageable\") Pageable pageable);\n\n /** \n * 统计总行数\n *\n * @param {{=beanVarName}} 查询条件\n * @return 总行数\n */\n long count({{=beanClass}} {{=beanVarName}});\n\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 影响行数\n */\n int insert({{=beanClass}} {{=beanVarName}});\n\n /** \n * 批量新增数据\n *\n * @param entities List<{{=beanClass}}> 实例对象列表\n * @return 影响行数\n */\n int insertBatch(@Param(\"entities\") List<{{=beanClass}}> entities);\n \n /** \n * 批量新增或按主键更新数据\n *\n * @param entities List<{{=beanClass}}> 实例对象列表\n * @return 影响行数\n */\n int insertOrUpdateBatch(@Param(\"entities\") List<{{=beanClass}}> entities);\n \n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 影响行数\n */\n int update({{=beanClass}} {{=beanVarName}});\n\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 影响行数\n */\n int deleteById({{=pkDataType}} {{=pkVarName}});\n}", + "Mapper.xml": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n var pkField = \"UNDEFINED_ID\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkField = field.defKey;\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}\n\n\n \n {{~it.entity.fields:field:index}}\n \n {{~}}\n \n $blankline\n \n \n $blankline\n \n \n $blankline\n \n \n $blankline\n \n \n insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n values ({{=it.entity.fields.map(function(e,i){return '#{'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n \n $blankline\n \n \n insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n values\n \n ({{=it.entity.fields.map(function(e,i){return '#{entity.'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n \n \n $blankline\n \n \n insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n values\n \n ({{=it.entity.fields.map(function(e,i){return '#{entity.'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n \n on duplicate key update\n {{=it.entity.fields.map(function(e,i){return e.defKey + '=values('+e.defKey+')'}).join(',\\n\\t\\t')}}\n \n $blankline\n \n \n update {{=it.entity.defKey}}\n \n {{~it.entity.fields:field:index}}\n \n {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}},\n \n {{~}}\n \n where {{=pkField}} = #{{{=pkVarName}}}\n \n $blankline\n \n \n delete from {{=it.entity.defKey}} where {{=pkField}} = #{{{=pkVarName}}}\n \n\n\n", + "Entity": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n return this.{{=it.func.camel(field.defKey,false)}};\n }\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n }\n{{~}}\n}" + }, + { + "applyFor": "A2EE7B4A-CE62-4290-B00C-B26C1BF18073", + "type": "appCode", + "Controller": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.controller;\n$blankline\nimport java.util.List;\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.data.domain.PageImpl;\nimport org.springframework.data.domain.PageRequest;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.*;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.service.{{=serviceClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Api(tags = \"{{=it.entity.defName}}对象功能接口\")\n@RestController\n@RequestMapping(\"/{{=it.func.camel(it.entity.defKey,false)}}\")\npublic class {{=beanClass}}Controller{\n @Autowired\n private {{=serviceClass}} {{=serviceVarName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n @ApiOperation(\"通过ID查询单条数据\")\n @GetMapping(\"{{{=it.func.camel(pkVarName,false)}}}\")\n public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\n }\n $blankline\n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n @ApiOperation(\"分页查询\")\n @GetMapping\n public ResponseEntity> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n //1.分页参数\n long current = pageRequest.getPageNumber();\n long size = pageRequest.getPageSize();\n\n //2.分页查询\n /*把Mybatis的分页对象做封装转换,MP的分页对象上有一些SQL敏感信息,还是通过spring的分页模型来封装数据吧*/\n com.baomidou.mybatisplus.extension.plugins.pagination.Page<{{=beanClass}}> pageResult = {{=serviceVarName}}.paginQuery({{=beanVarName}}, current,size);\n\n //3. 分页结果组装\n List<{{=beanClass}}> dataList = pageResult.getRecords();\n long total = pageResult.getTotal();\n PageImpl<{{=beanClass}}> retPage = new PageImpl<{{=beanClass}}>(dataList,pageRequest,total);\n return ResponseEntity.ok(retPage);\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"新增数据\")\n @PostMapping\n public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"更新数据\")\n @PutMapping\n public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n @ApiOperation(\"通过主键删除数据\")\n @DeleteMapping\n public ResponseEntity deleteById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\n }\n}", + "Service": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.service;\n$blankline\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\npublic interface {{=serviceClass}}{\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n $blankline\n /**\n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param current 当前页码\n * @param size 每页大小\n * @return\n */\n Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size);\n\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\n\n \n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\n\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n boolean deleteById({{=pkDataType}} {{=pkVarName}});\n}", + "ServiceImpl": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkVarNameU = \"UndefinedId\";\n var pkFieldKey = \"UNDEFINED\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkFieldKey = field.defKey;\n pkVarName = it.func.camel(field.defKey,false);\n pkVarNameU = it.func.camel(field.defKey,true);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n var mapperName = beanVarName+'Mapper';\n \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport cn.hutool.core.util.StrUtil;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;\nimport com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\n @Autowired\n private {{=beanClass}}Mapper {{=mapperName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\n return {{=mapperName}}.selectById({{=pkVarName}});\n }\n $blankline\n /**\n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param current 当前页码\n * @param size 每页大小\n * @return\n */\n public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size){\n //1. 构建动态查询条件\n LambdaQueryWrapper<{{=beanClass}}> queryWrapper = new LambdaQueryWrapper<>();\n {{~it.entity.fields.filter(function(e){return e[\"type\"]===\"String\"&&e.defKey !== pkFieldKey}):field:index}}\n if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\n queryWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\n }\n {{~}}\n\n //2. 执行分页查询\n Page<{{=beanClass}}> pagin = new Page<>(current , size , true);\n IPage<{{=beanClass}}> selectResult = {{=mapperName}}.selectByPage(pagin , queryWrapper);\n pagin.setPages(selectResult.getPages());\n pagin.setTotal(selectResult.getTotal());\n pagin.setRecords(selectResult.getRecords());\n\n //3. 返回结果\n return pagin;\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\n {{=mapperName}}.insert({{=beanVarName}});\n return {{=beanVarName}};\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\n //1. 根据条件动态更新\n LambdaUpdateChainWrapper<{{=beanClass}}> chainWrapper = new LambdaUpdateChainWrapper<{{=beanClass}}>({{=mapperName}});\n {{~it.entity.fields.filter(function(e){return e[\"type\"]===\"String\"&&e.defKey !== pkFieldKey}):field:index}}\n if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\n chainWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\n }\n {{~}}\n //2. 设置主键,并更新\n chainWrapper.set({{=beanClass}}::get{{=pkVarNameU}}, {{=beanVarName}}.get{{=pkVarNameU}}());\n boolean ret = chainWrapper.update();\n //3. 更新成功了,查询最最对象返回\n if(ret){\n return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\n }else{\n return {{=beanVarName}};\n }\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\n int total = {{=mapperName}}.deleteById({{=pkVarName}});\n return total > 0;\n }\n}", + "Mapper": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.conditions.Wrapper;\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.baomidou.mybatisplus.core.toolkit.Constants;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper extends BaseMapper<{{=beanClass}}>{\n /** \n * 分页查询指定行数据\n *\n * @param page 分页参数\n * @param wrapper 动态查询条件\n * @return 分页对象列表\n */\n IPage<{{=beanClass}}> selectByPage(IPage<{{=beanClass}}> page , @Param(Constants.WRAPPER) Wrapper<{{=beanClass}}> wrapper);\n}", + "Mapper.xml": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n var pkField = \"UNDEFINED_ID\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkField = field.defKey;\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}\n\n$blankline\n\n\n \n\n\n", + "Entity": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n {{? field.primaryKey }}\n @TableId\n {{?}}\n private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n return this.{{=it.func.camel(field.defKey,false)}};\n }\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n }\n{{~}}\n}" + }, + { + "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E", + "type": "dbDDL", + "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n `{{=field.defKey}}` {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}\n", + "update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('ALTER TABLE '+before.defKey+' RENAME TO '+after.defKey);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldAdded) { \n let ddlItem = 'ADD COLUMN `'+field.defKey+'` '+field.dbType;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n if(field.autoIncrement){\n ddlItem += ' AUTO_INCREMENT';\n }\n if(field.defaultValue){\n ddlItem += (' DEFAULT ' + field.defaultValue);\n }\n ddlItem += (' COMMENT \\''+field.defName+';'+field.comment+'\\'');\n \n if(field.index>0 && field.afterFieldKey){\n ddlItem += (' AFTER '+field.afterFieldKey);\n }\n ret.push(ddlItem);\n }\n return firstDDL+'\\n'+ret.join(',\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldRemoved) { \n ret.push('DROP '+field.defKey);\n }\n return firstDDL+'\\n'+ret.join(',\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey === after.defKey){\n changeDDL += (' MODIFY COLUMN `'+after.defKey+'`');\n }else{\n changeDDL += (' CHANGE COLUMN `'+before.defKey+'` `'+after.defKey+'`');\n }\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n changeDDL += (','+after.scale);\n }\n changeDDL += ')';\n }\n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n let defaultValue = '';\n if(after.defaultValue != null && after.defaultValue.length>0){\n defaultValue = (after.defaultValue);\n }else{\n defaultValue = 'NULL';\n }\n if(defaultValue != 'NULL'){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n\n let comment = after.defName;\n if(after.comment){\n comment = comment + ';' + (after.comment||'');\n }\n if(comment){\n changeDDL += (' COMMENT \\''+comment+'\\';');\n }\n \n ret.push(firstDDL+' '+changeDDL);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}" + }, + { + "applyFor": "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542", + "type": "dbDDL", + "createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* -------------------------------------------------- */\n创建表:\n{{~ createEntities:entity}}\n {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* -------------------------------------------------- */\n删除表:\n{{~ dropEntities:entity}}\n {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* -------------------------------------------------- */\n修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n {{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n {{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n {{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n {{?}}{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}\n {{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('\\n\\t建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('\\n\\t解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}\n{{=indexChanged?'\\n\\t更改了索引':''}}\n{{=changed?'\\n\\t更改了属性':''}}\n{{=relaArray.length>0?relaArray.join(''):''}}\n{{~}}\n{{?}}", + "update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n ret.push(myText);\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD (${field.defKey} ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n ddlItem += ')';\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey !== after.defKey){\n let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n ret.push(renameText);\n }\n /*如果没有变化,则不生成变更语句*/\n if(before.dbType === after.dbType \n && before['len'] === after['len'] \n && before.scale === after.scale\n && before.primaryKey === after.primaryKey\n && before.notNull === after.notNull\n && before.autoIncrement === after.autoIncrement\n && before.defaultValue === after.defaultValue){\n continue;\n }\n changeDDL += ('MODIFY ('+after.defKey+'');\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n changeDDL += (','+after.scale);\n }\n changeDDL += ')';\n }\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n \n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n changeDDL += ')';\n ret.push(`${firstDDL} ${changeDDL};`);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}" + }, + { + "applyFor": "BFC87171-C74F-494A-B7C2-76B9C55FACC9", + "type": "dbDDL", + "createTable": "IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{{=it.entity.defKey}}]') AND type in (N'U')) DROP TABLE [dbo].[{{=it.entity.defKey}}];\n\nCREATE TABLE [dbo].[{{=it.entity.defKey}}](\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' IDENTITY(1,1)' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}", + "update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`EXEC sp_rename '${before.defKey}','${after.defKey}'`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `IF ((SELECT COUNT(*) FROM ::fn_listextendedproperty('MS_Description','SCHEMA', 'dbo','TABLE', '${after.defKey}', NULL, NULL)) > 0)\n \\n\\tEXEC sp_updateextendedproperty 'MS_Description', '${commentText}','SCHEMA', 'dbo','TABLE', '${after.defKey}'\n \\nELSE\n \\n\\tEXEC sp_addextendedproperty 'MS_Description', '${commentText}', 'SCHEMA', 'dbo','TABLE', '${after.defKey}'\n `;\n ret.push(myText);\n /*ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');*/\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD [${field.defKey}] ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `EXEC sp_addextendedproperty 'MS_Description', N'${commentText}','SCHEMA', N'dbo','TABLE', N'${entity.data.baseInfo.defKey}','COLUMN', N'${field.defKey}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN [${field.defKey}]`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey === after.defKey){\n changeDDL += (' ALTER COLUMN ['+after.defKey+']');\n }else{\n let renameText = `EXEC sp_rename '[dbo].[${entity.data.baseInfo.defKey}].[${before.defKey}]','${after.defKey}','COLUMN';`;\n ret.push(renameText);\n continue;\n }\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n changeDDL += (','+after.scale);\n }\n changeDDL += ')';\n }\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n \n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n ret.push(`${firstDDL} ${changeDDL};`);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}" + }, + { + "applyFor": "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022", + "type": "dbDDL", + "createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{? field.autoIncrement}}SERIAL{{??}}{{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}", + "update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n ret.push(myText);\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD COLUMN ${field.defKey} ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n } \n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldModified) { \n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey !== after.defKey){\n let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n ret.push(renameText);\n }\n /*如果没有变化,则不生成变更语句*/\n if(before.dbType === after.dbType \n && before['len'] === after['len'] \n && before.scale === after.scale\n && before.primaryKey === after.primaryKey\n && before.notNull === after.notNull\n && before.autoIncrement === after.autoIncrement\n && before.defaultValue === after.defaultValue){\n continue;\n }\n if(before.dbType !== after.dbType || before.len !== after.len || before.scale !== after.scale){\n let dbTypeDDL = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${after.defKey} TYPE ${before.dbType}`;\n if(after.len>0){\n dbTypeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n dbTypeDDL += (','+after.scale);\n }\n dbTypeDDL += ')';\n }\n ret.push(dbTypeDDL+';');\n }\n \n if(before.defaultValue !== after.defaultValue){\n let defaultDDL = '';\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"NULL\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n defaultDDL += ('SET DEFAULT ' + defaultValue);\n }\n let defaultTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${defaultDDL};`;\n ret.push(defaultTpl);\n }\n \n if(before.notNull !== after.notNull){\n let notNullDDL= 'SET NULL';\n if(after.notNull){\n let notNullDDL= 'SET NOT NULL';\n }\n let notNullTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${notNullDDL};`;\n ret.push(notNullTpl);\n }\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n-- 索引重建\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}" + }, + { + "type": "dbDDL", + "applyFor": "89504F5D-94BF-4C9E-8B2E-44F37305FED5", + "createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'IDENTITY(1,1)' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}'{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTOINCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }} --{{=it.func.join(field.defName,field.comment,';')}}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0只有为decimal类型或double类型时才保留长度和小数的位数*/\n{{~it.entity.fields:field:index}}\n {{=it.func.lowerCase(field.defKey)}} {{=it.func.lowerCase(field.type)=='varchar'||it.func.lowerCase(field.type)=='char'||it.func.lowerCase(field.type)=='text'||it.func.lowerCase(field.type)=='date'||it.func.lowerCase(field.type)=='datetime' ? 'string':it.func.lowerCase(field.type)=='tinyint unsigned'||it.func.lowerCase(field.type)=='bit'||it.func.lowerCase(field.type)=='integer'||it.func.lowerCase(field.type)=='tinyint'||it.func.lowerCase(field.type)=='smallint'||it.func.lowerCase(field.type)=='mediumint' ? 'int':it.func.lowerCase(field.type)=='int unsigned' ? 'bigint':it.func.lowerCase(field.type)}}{{?field.len>0&&(it.func.lowerCase(field.type)=='decimal'||it.func.lowerCase(field.type)=='double')}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{=')'}}{{?}}{{?}} comment '{{=it.func.join(field.defName,field.comment,'')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n{{?}}\n)\n{{\n let partitionedBy = it.entity.properties['partitioned by'];\n partitionedBy = partitionedBy?partitionedBy:'请在扩展属性中配置[partitioned by]属性';\n}}\ncomment '{{=it.func.join(it.entity.defName,';') }}'\n/**是否分区表,分区字段名和字段注释自定义*/\n[partitioned by {{=partitionedBy}}]\n/**文件存储格式自定义*/\n[stored as orc]\n/**hdfs上的地址自定义*/\n[location xxx]\n;", + "createView": "", + "deleteTable": "", + "createIndex": "", + "deleteIndex": "", + "message": "", + "update": "" + }, + { + "applyFor": "B91D99E0-9B7C-416C-8737-B760957DAF09", + "type": "appCode", + "content": "{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1<10?\"0\"+today.getMonth():today.getMonth();\n var days=today.getDate()<10?\"0\"+today.getDate():today.getDate();\n var hours = today.getHours()<10?\"0\"+today.getHours():today.getHours(); \n\tvar minutes = today.getMinutes()<10?\"0\"+today.getMinutes():today.getMinutes(); \n\tvar seconds = today.getSeconds()<10?\"0\"+today.getSeconds():today.getSeconds(); \n}}\n// Package models {{=it.func.join(it.entity.defName,it.entity.comment,',')}}\n// author : http://www.liyang.love\n// date : {{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n// desc : {{=it.func.join(it.entity.defName,it.entity.comment,',')}}\npackage models\n\n$blankline\n\n// {{=it.func.camel(it.entity.defKey,true) }} {{=it.func.join(it.entity.defName,it.entity.comment,',')}}。\n// 说明:{{=it.entity.comment}}\n// 表名:{{=it.entity.defKey}}\n// group: {{=it.func.camel(it.entity.defKey,true) }}\n// obsolete:\n// appliesto:go 1.8+;\n// namespace:hongmouer.his.models.{{=it.func.camel(it.entity.defKey,true) }}\n// assembly: hongmouer.his.models.go\n// class:HongMouer.HIS.Models.{{=it.func.camel(it.entity.defKey,true) }}\n// version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\ntype {{=it.func.camel(it.entity.defKey,true) }} struct {\n {{~it.entity.fields:field:index}}\n {{=formatGoLang(it.func.camel(field.defKey,true),null,field,it.entity.fields,null,1)}} {{=formatGoLang(field.type,\"type\",field,it.entity.fields,10,3)}} `gorm:\"column:{{=field.primaryKey?\"primaryKey;\":\"\"}}{{=field.defKey}}\" json:\"{{=it.func.camel(field.defKey,true)}}\"` {{=formatGoLang(\"gorm:column:\"+field.defKey+\" json:\"+it.func.camel(field.defKey,true),null,field,it.entity.fields,null,2)}} //type:{{=formatGoLang(field.type,\"type\",field,it.entity.fields,null,3)}} comment:{{=formatGoLang(it.func.join(field.defName,field.comment,';'),\"defName\",field,it.entity.fields,null,4)}} version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n {{~}}\n}\n\n\n$blankline\n// TableName 表名:{{=it.entity.defKey}},{{=it.entity.defName}}。\n// 说明:{{=it.entity.comment}}\nfunc (ZentaoUserInfo) TableName() string {\n\treturn \"{{=it.entity.defKey}}\"\n}\n\n{{\n\nfunction formatGoLang(str, fieldName, field, fileds, emptLength, isFiled) {\n var maxLength = 0;\n\n if (isFiled == 1) {\n for (var i = 0; i < fileds.length; i++) {\n if (getBlength(it.func.camel(fileds[i].defKey, true)) > maxLength) {\n maxLength = getBlength(it.func.camel(fileds[i].defKey, true)) + 2;\n }\n }\n } else if (isFiled == 2) {\n for (var i = 0; i < fileds.length; i++) {\n var newStr = \"gorm:column:\" + fileds[i].defKey + \" json:\" + it.func.camel(fileds[i].defKey, true);\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 2;\n }\n }\n var empt = \"\";\n var strLength = getBlength(str);\n if (field.primaryKey) {\n strLength += getBlength(\"primaryKey;\");\n }\n for (var j = 0; j < maxLength - strLength; j++) {\n empt += ' ';\n }\n return empt;\n } else if (isFiled == 3) {\n /*获取某个字段的最大长度*/\n for (var i = 0; i < fileds.length; i++) {\n var newStr = eval(\"fileds[\" + i + \"].\" + fieldName);\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 1;\n }\n }\n } else if (isFiled == 4) {\n /*获取某个字段的最大长度*/\n for (var i = 0; i < fileds.length; i++) {\n var newStr = fileds[i].comment + \";\" + fileds[i].defName;\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 1;\n }\n }\n }\n else {\n maxLength = emptLength;\n }\n\n var strLength = getBlength(str);\n for (var j = 0; j < maxLength - strLength; j++) {\n str += ' ';\n }\n return str;\n}\n\nfunction getBlength(str) {\n var n = 0;\n for (var i = str.length; i--;) {\n n += str.charCodeAt(i) > 255 ? 2 : 1;\n }\n return n;\n} \n\n}}" + }, + { + "applyFor": "BDF457FD-9F98-4AC3-A705-7587B00A3BAB", + "type": "appCode", + "struct": "use chrono::{DateTime, Local};\nuse serde::{Deserialize, Serialize};\n$blankline\n/// {{=it.entity.defName}}\n#[derive(Serialize, Deserialize, Debug, Clone)]\n{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n \n}}\npub struct {{=beanClass}} {\n {{~it.entity.fields:field:index}}\n {{\n let fieldDateType = field.type;\n if(!field.notNull){\n fieldDateType = 'Option<'+fieldDateType+'>';\n }\n }}/// {{=field.defName}}\n pub {{=it.func.camel(field.defKey,false)}}: {{=fieldDateType}},\n {{~}}\n}\n" + }, + { + "applyFor": "56F4B55B-F0B8-4049-9E6B-50B95C1D793A", + "type": "dbDDL", + "createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* -------------------------------------------------- */\n创建表:\n{{~ createEntities:entity}}\n {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* -------------------------------------------------- */\n删除表:\n{{~ dropEntities:entity}}\n {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* -------------------------------------------------- */\n修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n {{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n {{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n {{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n {{?}}{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}\n {{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('\\n\\t建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('\\n\\t解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}\n{{=indexChanged?'\\n\\t更改了索引':''}}\n{{=changed?'\\n\\t更改了属性':''}}\n{{=relaArray.length>0?relaArray.join(''):''}}\n{{~}}\n{{?}}", + "update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n ret.push(myText);\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD (${field.defKey} ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n ddlItem += ')';\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey !== after.defKey){\n let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n ret.push(renameText);\n }\n /*如果没有变化,则不生成变更语句*/\n if(before.dbType === after.dbType \n && before['len'] === after['len'] \n && before.scale === after.scale\n && before.primaryKey === after.primaryKey\n && before.notNull === after.notNull\n && before.autoIncrement === after.autoIncrement\n && before.defaultValue === after.defaultValue){\n continue;\n }\n changeDDL += ('MODIFY ('+after.defKey+'');\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n changeDDL += (','+after.scale);\n }\n changeDDL += ')';\n }\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n \n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n changeDDL += ')';\n ret.push(`${firstDDL} ${changeDDL};`);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}" + }, + { + "applyFor": "483F9346-C99E-4014-A1D2-A554606BD8A3", + "type": "dbDDL", + "createTable": "{{let dorisDistributedBy = it.entity.properties['dorisDistributedBy'];\n dorisDistributedBy = dorisDistributedBy?dorisDistributedBy:'请在表的扩展属性中配置[dorisDistributedBy]属性';\n}}CREATE TABLE IF NOT EXISTS {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n `{{=field.defKey}}` {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}' {{= index < it.entity.fields.length-1 ? ',' : '' }}\n{{~}}\n) COMMENT '{{=it.func.join(it.entity.defName,it.entity.comment,';') }}'\n{{=dorisDistributedBy}} ;\n$blankline\n", + "createView": "", + "deleteTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};", + "createIndex": "", + "deleteIndex": "", + "message": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChanged(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}\n", + "update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('ALTER TABLE '+before.defKey+' RENAME TO '+after.defKey);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldAdded) { \n let ddlItem = 'ADD COLUMN `'+field.defKey+'` '+field.dbType;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n if(field.autoIncrement){\n ddlItem += ' AUTO_INCREMENT';\n }\n if(field.defaultValue){\n ddlItem += (' DEFAULT ' + field.defaultValue);\n }\n ddlItem += (' COMMENT \\''+field.defName+';'+field.comment+'\\'');\n \n if(field.index>0 && field.afterFieldKey){\n ddlItem += (' AFTER '+field.afterFieldKey);\n }\n ret.push(ddlItem);\n }\n return firstDDL+'\\n'+ret.join(',\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldRemoved) { \n ret.push('DROP '+field.defKey);\n }\n return firstDDL+'\\n'+ret.join(',\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey === after.defKey){\n changeDDL += (' MODIFY COLUMN `'+after.defKey+'`');\n }else{\n changeDDL += (' CHANGE COLUMN `'+before.defKey+'` `'+after.defKey+'`');\n }\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n changeDDL += (','+after.scale);\n }\n changeDDL += ')';\n }\n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n let defaultValue = '';\n if(after.defaultValue != null && after.defaultValue.length>0){\n defaultValue = (after.defaultValue);\n }else{\n defaultValue = 'NULL';\n }\n if(defaultValue != 'NULL'){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n\n let comment = after.defName;\n if(after.comment){\n comment = comment + ';' + (after.comment||'');\n }\n if(comment){\n changeDDL += (' COMMENT \\''+comment+'\\';');\n }\n \n ret.push(firstDDL+' '+changeDDL);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}" + } + ], + "generatorDoc": { + "docTemplate": "" + }, + "relationFieldSize": 50, + "uiHint": [ + { + "defKey": "Input", + "defName": "普通输入框", + "id": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "Select", + "defName": "下拉输入框", + "id": "FB111359-2B73-4443-926C-08A98E446448" + }, + { + "defKey": "CheckBox", + "defName": "复选框", + "id": "0CB8A6C9-1115-4FC0-B51E-5C028065082F" + }, + { + "defKey": "RadioBox", + "defName": "单选框", + "id": "5C04987A-260F-4B7C-A5D5-22A181AAE9CA" + }, + { + "defKey": "Double", + "defName": "小数输入", + "id": "8D5BAFE4-E15C-4707-A047-8EE59C58E70F" + }, + { + "defKey": "Integer", + "defName": "整数输入", + "id": "9999AF2A-A44E-415C-A2DC-D7C613BD0073" + }, + { + "defKey": "Money", + "defName": "金额输入", + "id": "2B0C3D0C-7BAF-4B36-81AD-9362B5E5DC2E" + }, + { + "defKey": "Date", + "defName": "日期输入", + "id": "E4D94E14-F695-487F-AFC2-4D888009B7DA" + }, + { + "defKey": "DataYearMonth", + "defName": "年月输入", + "id": "936927E3-DD2D-4096-87FD-074CDE278D59" + }, + { + "defKey": "Text", + "defName": "长文本输入", + "id": "D89DD4F1-ADAC-4469-BF8D-B3FF41AE7963" + }, + { + "defKey": "RichText", + "defName": "富文本输入", + "id": "C134EB1F-4CFF-49E0-882F-2C6FB275CB20" + } + ], + "headers": [ + { + "refKey": "defKey", + "hideInGraph": false, + "value": "字段代码", + "freeze": false + }, + { + "refKey": "defName", + "hideInGraph": false, + "value": "显示名称", + "freeze": false + }, + { + "refKey": "primaryKey", + "hideInGraph": false, + "value": "主键", + "freeze": false + }, + { + "refKey": "notNull", + "hideInGraph": true, + "value": "不为空", + "freeze": false + }, + { + "refKey": "autoIncrement", + "hideInGraph": true, + "value": "自增", + "freeze": false + }, + { + "refKey": "domain", + "hideInGraph": true, + "value": "数据域", + "freeze": false + }, + { + "refKey": "type", + "hideInGraph": false, + "value": "数据类型", + "freeze": false + }, + { + "refKey": "len", + "hideInGraph": false, + "value": "长度", + "freeze": false + }, + { + "refKey": "scale", + "hideInGraph": false, + "value": "小数位数", + "freeze": false + }, + { + "refKey": "comment", + "hideInGraph": true, + "value": "说明", + "freeze": false + }, + { + "refKey": "refDict", + "hideInGraph": true, + "value": "数据字典", + "freeze": false + }, + { + "refKey": "defaultValue", + "hideInGraph": true, + "value": "默认值", + "freeze": false + }, + { + "refKey": "isStandard", + "hideInGraph": false, + "value": "标准字段", + "enable": false, + "freeze": false + }, + { + "refKey": "uiHint", + "hideInGraph": true, + "value": "UI建议", + "enable": true, + "freeze": false + }, + { + "refKey": "extProps", + "hideInGraph": true, + "value": "拓展属性", + "enable": true, + "freeze": false + }, + { + "refKey": "attr1", + "value": "属性1", + "hideInGraph": true, + "enable": true, + "freeze": false + }, + { + "refKey": "attr2", + "value": "属性2", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr3", + "value": "属性3", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr4", + "value": "属性4", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr5", + "value": "属性5", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr6", + "value": "属性6", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr7", + "value": "属性7", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr8", + "value": "属性8", + "hideInGraph": true, + "enable": false, + "freeze": false + }, + { + "refKey": "attr9", + "value": "属性9", + "hideInGraph": true, + "enable": false, + "freeze": false + } + ], + "modelType": "modalAll", + "recentColors": [ + "#d148d1", + "#ce4bce", + "#831b83", + "#dd31dd", + "#da2fda", + "#e988e9", + "#000000", + "#DDE5FF" + ], + "DDLToggleCase": "L" + }, + "entities": [ + { + "id": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "defKey": "order", + "defName": "订单表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "extProps": {} + }, + { + "defKey": "ShopId", + "defName": "商家Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "661D5FA8-064C-4E60-8168-FD9B7F36680E", + "extProps": {} + }, + { + "defKey": "StartTime", + "defName": "开始时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "FF73B5B6-7EE2-4550-8023-7C062BA4F739", + "extProps": {} + }, + { + "defKey": "EndTime", + "defName": "结束时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D01BF72B-6CA4-47F7-819C-03B83542BA3B", + "extProps": {} + }, + { + "defKey": "ModifyTime", + "defName": "修改时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D3FD55AF-C3CF-4E90-BEC9-5F76FDFBA547", + "extProps": {} + }, + { + "defKey": "Platform", + "defName": "订单平台", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8A00CFFA-39CD-4FE1-8DDA-E92426C7DD6A", + "extProps": {} + }, + { + "defKey": "OrderType", + "defName": "订单类型", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "AD720F8D-50EE-47AE-B6C7-FCD2306BBF4F", + "extProps": {} + }, + { + "defKey": "PayType", + "defName": "支付方式", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "EE50729D-D249-4B09-A86F-41F266F0446F", + "extProps": {} + }, + { + "defKey": "StorageType", + "defName": "仓储类型", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "6C854A08-D9D1-4352-B3BD-85A502C41503", + "extProps": {} + }, + { + "defKey": "OrderState", + "defName": "订单状态", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B6390436-57C7-4A60-8873-9011CBF45521", + "extProps": {} + }, + { + "defKey": "OrderTotalPrice", + "defName": "订单总价", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "4349EB3D-C904-4411-82AC-7AE93A4B3E7C", + "extProps": {} + }, + { + "defKey": "OrderSellerPrice", + "defName": "订单货款金额", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8CC8CBED-A623-44AE-8E3F-FA1F6AF59518", + "extProps": {} + }, + { + "defKey": "OrderPayment", + "defName": "用户应付金额", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D030721B-867D-4FF7-93B4-1F96D03B30FB", + "extProps": {} + }, + { + "defKey": "PreferentialAmount", + "defName": "平台补贴", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E27E819B-7876-41DF-A80C-D1F44155BEA6", + "extProps": {} + }, + { + "defKey": "SellerPreferentialAmount", + "defName": "商家优惠金额(商家承担)", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "60D95172-FA2D-4B1E-9474-C732C6F5D646", + "extProps": {} + }, + { + "defKey": "FreightPrice", + "defName": "商品运费(用户承担)", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "527D2D07-3C25-46E6-8E62-3CDD16BE4AEB", + "extProps": {} + }, + { + "defKey": "BuyerRemark", + "defName": "买家备注", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "VARCHAR", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "203E1392-7AB1-4990-B56D-F33AF3083124", + "extProps": {} + }, + { + "defKey": "VenderRemark", + "defName": "商家备注", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 500, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "BB607CEE-DB8A-47CC-AEEF-59409E73DE0D", + "extProps": {} + }, + { + "defKey": "PurchaseRemark", + "defName": "采购备注", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "VARCHAR", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "096CAD3D-6615-4EDE-BA77-5476C977293F", + "extProps": {} + }, + { + "defKey": "WaybillNo", + "defName": "运单号", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "15446E12-C9DE-4320-8D44-18840C89C2F4", + "extProps": {} + }, + { + "defKey": "ExpressName", + "defName": "快递公司名称", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "214FAF72-2837-4E3F-B576-48ED9C4275FF", + "extProps": {} + }, + { + "defKey": "SourceSku", + "defName": "来源Sku", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 500, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "5B03DF6A-95CA-4CCF-8235-654D83469573", + "extProps": {} + }, + { + "defKey": "SourceShopName", + "defName": "来源店铺名", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F9088204-EA99-4640-A514-CCA1181437CC", + "extProps": {} + }, + { + "defKey": "ClientOrderId", + "defName": "业务端订单号", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F11DB16E-672C-470E-8FE7-E81824870DCC", + "extProps": {} + }, + { + "defKey": "IsPurchased", + "defName": "是否采购", + "comment": "", + "domain": "", + "type": "BIT", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "b'0'", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "40FBAEB3-C074-4965-89FE-E58B1DA0B872", + "extProps": {} + }, + { + "defKey": "BuyerAccount", + "defName": "买家账号", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "10146274-8C90-4ADC-9ECB-CA4B23FB6279", + "extProps": {} + } + ], + "indexes": [ + { + "defKey": "idx_ShopId_OrderState_StartTime", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "953678C5-CE59-4935-8A04-4FFEEBF7716C", + "fieldDefKey": "661D5FA8-064C-4E60-8168-FD9B7F36680E" + }, + { + "ascOrDesc": "A", + "id": "3A9D1E9D-A557-4F6A-80A9-909F5B7F6572", + "fieldDefKey": "B6390436-57C7-4A60-8873-9011CBF45521" + }, + { + "ascOrDesc": "A", + "id": "265DA14D-AFCC-49D3-A280-3D3266D306DA", + "fieldDefKey": "FF73B5B6-7EE2-4550-8023-7C062BA4F739" + } + ], + "id": "CBAA5899-4692-4FCE-9589-0EB44E0E9288" + }, + { + "defKey": "idx_ShopId_StartTime", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "66A7C4DE-AC00-4516-B2C0-E2CFCB095DC0", + "fieldDefKey": "661D5FA8-064C-4E60-8168-FD9B7F36680E" + }, + { + "ascOrDesc": "A", + "id": "013A75D3-BFD8-4F05-A590-709B92418DDF", + "fieldDefKey": "FF73B5B6-7EE2-4550-8023-7C062BA4F739" + } + ], + "id": "39B3148D-87EB-4F23-BFBC-2B01B9E06911" + } + ], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [], + "notes": {} + }, + { + "id": "AF1D8C00-44CE-478C-BBE6-013CF93AF22D", + "defKey": "orderconsignee", + "defName": "订单收货信息表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "144B14DF-B01B-4EF7-9163-24A3124BB808", + "extProps": {} + }, + { + "defKey": "ContactName", + "defName": "联系人", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "950EC35A-7D27-4069-BED4-504C3D8C8145", + "extProps": {} + }, + { + "defKey": "Address", + "defName": "收货地址", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "VARCHAR", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "9DF495F2-3318-4ACD-9BB2-94E1A005AD2E", + "extProps": {} + }, + { + "defKey": "Mobile", + "defName": "手机号", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "3A3B62C3-EAA6-4DBC-A1D1-02CE1BBC982E", + "extProps": {} + }, + { + "defKey": "TelePhone", + "defName": "做记号", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7F5F4D3E-E878-4E26-A838-ECA56D253F57", + "extProps": {} + }, + { + "defKey": "Province", + "defName": "省", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 30, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0C700A4C-33C7-417B-8806-432298B37226", + "extProps": {} + }, + { + "defKey": "City", + "defName": "市", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 30, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "00907561-A707-4C40-82A4-39CA255665FA", + "extProps": {} + }, + { + "defKey": "County", + "defName": "区", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 30, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7ED72563-32E5-46A5-A8B9-20960579FA76", + "extProps": {} + }, + { + "defKey": "Town", + "defName": "镇", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 30, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F94BAC3E-6102-4EC0-B325-F400E0961E09", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "C4F73914-36E5-4678-BB4D-77FC8B306DE0", + "extProps": {} + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [ + { + "myField": "144B14DF-B01B-4EF7-9163-24A3124BB808", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] + }, + { + "id": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E", + "defKey": "ordercost", + "defName": "订单成本表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E9728883-C797-4973-82A6-58F0DD7306F7", + "extProps": {} + }, + { + "defKey": "PurchaseAmount", + "defName": "采购金额", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B4DDEF86-2D82-44DB-B3AA-A1DDE9EDB24D", + "extProps": {} + }, + { + "defKey": "Profit", + "defName": "利润", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B1B7004A-8DBD-4BDA-89D4-DDE22D2FAC4F", + "extProps": {} + }, + { + "defKey": "PlatformCommissionAmount", + "defName": "平台扣点金额", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A9BA5D50-12D4-4FF7-B9D7-16460A7C7D2D", + "extProps": {} + }, + { + "defKey": "PlatformCommissionRatio", + "defName": "平台扣点百分比", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 5, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A248A1B0-C401-42EB-AD8D-2BE329876172", + "extProps": {} + }, + { + "defKey": "PreferentialAmount", + "defName": "优惠金额", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "053F566B-B106-4D16-BF48-0728BA041AF6", + "extProps": {} + }, + { + "defKey": "DeliveryExpressFreight", + "defName": "发货快递费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "AAE83678-4756-4D8C-AF29-82D7252EFAD8", + "extProps": {} + }, + { + "defKey": "IsManualEdited", + "defName": "是否手动编辑过成本", + "comment": "", + "domain": "", + "type": "BIT", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "b'0'", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7F6C4C68-B9F6-4A7F-93C1-5CC5FB948D80", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "988A4114-DCC9-4CDF-A3AA-F2136D85F904", + "extProps": {} + }, + { + "defKey": "TotalCost", + "defName": "", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "27F5CD90-D03C-4404-BDD3-9B69AFE026F6", + "extProps": {} + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [ + { + "myField": "E9728883-C797-4973-82A6-58F0DD7306F7", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] + }, + { + "id": "93074B87-BE55-41BF-8358-B0E84C4E249A", + "defKey": "ordercostdetail", + "defName": "订单成本明细表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "563D2DCA-402E-4D1F-8267-F332EA129FD7", + "extProps": {} + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0DB00E1D-CB5F-421B-84FD-4BCB50B86649", + "extProps": {} + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "C972C40D-0C81-455D-8598-37DC80F7A538", + "extProps": {} + }, + { + "defKey": "ProductId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "192AB36D-2FE7-4B24-82BD-ED3EE1D3BB97", + "extProps": {} + }, + { + "defKey": "SkuId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F6B13E89-771B-4D3F-8986-A3B302FCE2AF", + "extProps": {} + }, + { + "defKey": "PurchaseOrderPKId", + "defName": "采购单流水Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "4293B05A-57C5-4E7D-B3C1-F4B006BB0827", + "extProps": {} + }, + { + "defKey": "PurchaseOrderId", + "defName": "采购单Id", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F1CCF263-8329-46CF-921A-ACEBECCF6BFD", + "extProps": {} + }, + { + "defKey": "UnitCost", + "defName": "单件采购成本(不含发货运费)", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "1951E707-6A9A-4C14-9BA7-6A4F6C387AB2", + "extProps": {} + }, + { + "defKey": "DeliveryExpressFreight", + "defName": "发货运费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "EFC9D7A1-34A8-4334-9A50-83713C528E85", + "extProps": {} + }, + { + "defKey": "DeductionQuantity", + "defName": "扣减数量", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B18273A0-E21A-4F20-97B4-210C0251F041", + "extProps": {} + }, + { + "defKey": "SkuAmount", + "defName": "货款成本", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A0F25647-2405-4D18-B2FA-AF7661661033", + "extProps": {} + }, + { + "defKey": "PurchaseFreight", + "defName": "采购运费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "369C3B5B-C7AE-4C82-BDB1-807C2708B3C5", + "extProps": {} + }, + { + "defKey": "FirstFreight", + "defName": "头程运费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "80C0696A-7B64-44B5-8FE2-22195A48BC26", + "extProps": {} + }, + { + "defKey": "OperationAmount", + "defName": "操作费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "10E4C221-897A-4BB0-B7C7-14BF00DC7C34", + "extProps": {} + }, + { + "defKey": "ConsumableAmount", + "defName": "耗材费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2458A8EA-549F-41E2-8A2E-6B458B25C18A", + "extProps": {} + }, + { + "defKey": "StorageAmount", + "defName": "仓储费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B9FB4D42-047C-4516-8D7A-9AD3BB7A6AB8", + "extProps": {} + }, + { + "defKey": "IsEnabled", + "defName": "", + "comment": "", + "domain": "", + "type": "BIT", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "b'1'", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "101C8C14-BDC7-4AC0-9C0B-635D0F896877", + "extProps": {} + }, + { + "defKey": "InStorageAmount", + "defName": "入库操作费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8CE46716-23E3-49D3-A823-133EDABEAAA4", + "extProps": {} + }, + { + "defKey": "OutStorageAmount", + "defName": "出库操作费", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "5E1912E3-6939-418B-8827-CB0311DC7959", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "42661D2F-5641-4EB6-8498-1DA6D93185F3", + "extProps": {} + }, + { + "defKey": "PurchaseAmount", + "defName": "采购成本(不含发货运费)", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "4509900B-BE1F-4FE5-A50B-EF6C47A082F0", + "extProps": {} + }, + { + "defKey": "TotalCost", + "defName": "成本总计(采购成本+发货运费)", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 10, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "0.00", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "80A76054-5E2F-4ED7-82D2-180357581B34", + "extProps": {} + } + ], + "indexes": [ + { + "defKey": "idx_OrderId_IsEnabled", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "78CE3B5D-3EFA-4134-8FAF-9DC40C612946", + "fieldDefKey": "C972C40D-0C81-455D-8598-37DC80F7A538" + }, + { + "ascOrDesc": "A", + "id": "EAEDDB59-EDBB-4095-9129-6A7CBF085C1F", + "fieldDefKey": "101C8C14-BDC7-4AC0-9C0B-635D0F896877" + } + ], + "id": "752931E7-C9AF-4C05-90E2-AAA826041A2B" + } + ], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [ + { + "myField": "C972C40D-0C81-455D-8598-37DC80F7A538", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], + "notes": {} + }, + { + "id": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214", + "defKey": "orderpurchaseinfo", + "defName": "采购单表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E5143C9F-DB79-405D-9801-178D17E3A104", + "extProps": {} + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DD093BC7-0374-421D-A4B5-7D471C5444B2", + "extProps": {} + }, + { + "defKey": "PurchaseMethod", + "defName": "", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "79ACBEFA-03A6-4D0A-860D-B3BD54272049", + "extProps": {} + }, + { + "defKey": "PurchasePlatform", + "defName": "", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8C3AE7B5-1456-40D2-B7F8-A0040DE2B6D3", + "extProps": {} + }, + { + "defKey": "PurchaserId", + "defName": "", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "6BA0DD86-8AC3-4B2F-80EF-3FA9D8082D53" + }, + { + "defKey": "PurchaserName", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A24D79C2-B5B1-43FA-B141-45B1DC58E401", + "extProps": {} + }, + { + "defKey": "PurchaseAccountId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D810C5F6-1E90-4462-9AA6-BE81B1A38E20", + "extProps": {} + }, + { + "defKey": "PurchaseOrderId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "36136AA8-299D-4616-8F98-7172BFB06DDB", + "extProps": {} + }, + { + "defKey": "PurchaseAccountName", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "FEE9CC22-1B2E-4FA1-836C-AECD3650D67B", + "extProps": {} + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D9A07EA2-431B-451E-9CE5-0D601C378620", + "extProps": {} + }, + { + "defKey": "BelongSkuIds", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 500, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "AC2EA61E-47F6-40BF-BB7E-7443DB1FFE83", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", + "extProps": {} + }, + { + "defKey": "OrderState", + "defName": "采购单状态(待发货 = 0, 部分发货=1, 待收货 = 10, 部分收货=11, 已签收 = 20, 已取消 = 100)", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "A2094D2A-A910-4E4C-9AD6-E70856604538" + }, + { + "defKey": "Remark", + "defName": "采购备注", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "27FA741F-D759-4FC1-A3CD-685565EA77D9" + }, + { + "defKey": "IsEnabled", + "defName": "是否有效", + "comment": "", + "type": "bit", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "9872FE5C-94C0-479F-BDAC-20756B572B19" + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [ + { + "myField": "DD093BC7-0374-421D-A4B5-7D471C5444B2", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], + "notes": {} + }, + { + "id": "B0921F8C-064A-48FC-A028-C849BD1EAC09", + "defKey": "ordersku", + "defName": "订单SKU", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2CE3E553-81E6-40B3-A711-98A8EBF41716", + "extProps": {} + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "061BDB1C-DA56-49FF-894C-1F7589FD1659", + "extProps": {} + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0B99914B-E363-4779-9604-A681230D962B", + "extProps": {} + }, + { + "defKey": "ProductId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7A22D8E6-9F60-4C48-8023-F314EBD2735B", + "extProps": {} + }, + { + "defKey": "SkuId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "BD8DB845-41A3-4674-9A62-69165FA77646", + "extProps": {} + }, + { + "defKey": "Title", + "defName": "Sku标题", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "VARCHAR", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "CA8DBC55-EAED-490E-8C82-0EA20D6A1FDD", + "extProps": {} + }, + { + "defKey": "Price", + "defName": "销售单价", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 20, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D5C24EBE-8516-4894-9634-5A35AB62DE22", + "extProps": {} + }, + { + "defKey": "Logo", + "defName": "Logo", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "VARCHAR", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B96857D9-19DA-4529-B57A-A0C7247E0578", + "extProps": {} + }, + { + "defKey": "ItemTotal", + "defName": "销售数量", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "559A9D89-B541-4830-8AE1-5FF7ECF65EAE", + "extProps": {} + }, + { + "defKey": "ProductNo", + "defName": "货号", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "97A81062-424C-4C29-9224-B56EAB00CA89", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "02F19FDE-FCB2-49F8-9721-64DF03F5B4FD", + "extProps": {} + }, + { + "defKey": "OrderDropShippingId", + "defName": "代发Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "900A84D2-1A4F-496F-A644-4D0B01A777C6", + "extProps": {} + }, + { + "defKey": "IsRefund", + "defName": "是否退款", + "comment": "", + "domain": "", + "type": "BIT", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "b'0'", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "1A165F66-FE0D-4A2E-AF71-EE7F6EBDDCFA", + "extProps": {} + }, + { + "defKey": "BelongSkuId", + "defName": "来源Sku", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "1A0C9CCD-B348-4916-83C2-D02754D94E1D" + } + ], + "indexes": [ + { + "defKey": "ct", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "F4FACD03-C9D4-40EC-8BF1-4A9FFA8D540B", + "fieldDefKey": "02F19FDE-FCB2-49F8-9721-64DF03F5B4FD" + } + ], + "id": "64C2C328-C02B-4E00-8A0E-7A2E02A61718" + }, + { + "defKey": "idx_OrderId", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "5F4DE2D7-E723-482D-ADA6-26CFA4A7333B", + "fieldDefKey": "0B99914B-E363-4779-9604-A681230D962B" + } + ], + "id": "FDAE6CD6-C915-4C0D-9AAB-67AC960DC784" + }, + { + "defKey": "idx_SkuId_OrderId_Price", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "02E6538E-B7D5-4248-908B-DC1EB5F154E2", + "fieldDefKey": "BD8DB845-41A3-4674-9A62-69165FA77646" + }, + { + "ascOrDesc": "A", + "id": "65A588D1-3D80-4948-B3DC-F09A4C6C2583", + "fieldDefKey": "0B99914B-E363-4779-9604-A681230D962B" + }, + { + "ascOrDesc": "A", + "id": "39D49EDF-4C16-41B6-805B-AA804979EB4D", + "fieldDefKey": "D5C24EBE-8516-4894-9634-5A35AB62DE22" + } + ], + "id": "F204CE42-2365-4AA8-BEE7-EBAF1DD9B678" + }, + { + "defKey": "spu", + "unique": false, + "defName": null, + "comment": "", + "fields": [ + { + "ascOrDesc": "A", + "id": "C7F23E61-D732-4FB0-A60C-844D5EC11CF9", + "fieldDefKey": "7A22D8E6-9F60-4C48-8023-F314EBD2735B" + } + ], + "id": "42EBEDC8-A472-49B2-BB2B-268841FBDD2B" + } + ], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [ + { + "myField": "2CE3E553-81E6-40B3-A711-98A8EBF41716", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], + "notes": {} + }, + { + "id": "474E5807-5650-43BD-8C5C-E16F36D58F85", + "defKey": "purchaser", + "defName": "采购商表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "采购商Id", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 20, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DFD793AA-19D3-491D-A299-BB2E57C51640", + "extProps": {} + }, + { + "defKey": "Name", + "defName": "采购商名称", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "02A539F9-3CAD-445C-9020-3A9A8AC841CD", + "extProps": {} + }, + { + "defKey": "Location", + "defName": "发货地", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D23558DA-8A20-4F19-8ADF-93F233DEA455", + "extProps": {} + }, + { + "defKey": "Platform", + "defName": "采购商归属平台", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "2", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "514F6923-AAB4-4CED-9044-D8270C5654D0", + "extProps": {} + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [] + }, + { + "id": "03EA3614-C1F5-4909-96A0-0687EDEABD4B", + "defKey": "purchasescheme", + "defName": "Sku采购方案表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "Sku采购方案Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DDD9C81D-C8FE-422D-9913-300E6D901B10", + "extProps": {} + }, + { + "defKey": "ProductId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B7E9091E-3A5F-4F73-BA8D-79644F52C27A", + "extProps": {} + }, + { + "defKey": "SkuId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8EDE6F50-1F9E-49F6-9A44-CA72B7174694", + "extProps": {} + }, + { + "defKey": "ShopId", + "defName": "店铺Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "CF13EB3E-16E5-4AD2-99A1-CBA45D55E91A", + "extProps": {} + }, + { + "defKey": "DefaultCost", + "defName": "采购默认成本", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 10, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "5A0955B3-5C17-40E1-B62C-A3ADE1D77B77", + "extProps": {} + }, + { + "defKey": "RealCost", + "defName": "采购实际成本", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 10, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "19E3EB27-7E28-4B0B-A48E-3250AFFD8E67", + "extProps": {} + }, + { + "defKey": "PurchaserId", + "defName": "采购商Id", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 20, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7A00C96B-E26F-456C-BB7C-CD403C04BA6E", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "1847774E-C43C-4742-8B4D-6E973A953406", + "extProps": {} + }, + { + "defKey": "PurchasePlatform", + "defName": "采购平台", + "comment": "", + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "10F0DDD8-A4A1-4777-80D2-906B3BFA2A1A", + "extProps": {} + }, + { + "defKey": "LastPurchaseTime", + "defName": "上次采购时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "BCCE0E8F-B6E6-46DC-B3DE-BB162A91D3F7", + "extProps": {} + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [] + }, + { + "id": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE", + "defKey": "purchaseschemeproduct", + "defName": "采购方案商品表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "采购商品和采购方案的关系Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E7D8B96D-CEA7-4385-8237-FC42CC5617A9", + "extProps": {} + }, + { + "defKey": "ProductId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "90D7055B-8691-4444-B15C-757B0542B4A8", + "extProps": {} + }, + { + "defKey": "SkuId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B3872E09-A9D1-45CC-844F-5AEEBB216F51", + "extProps": {} + }, + { + "defKey": "PurchaseProductId", + "defName": "采购商品Id", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "96C285D7-C0A0-43AE-A7FB-58AEAE4421AA", + "extProps": {} + }, + { + "defKey": "PurchaseUrl", + "defName": "采购商品链接", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B95DD818-ECC3-423A-835B-3F546DEE0F16", + "extProps": {} + }, + { + "defKey": "SkuPurchaseSchemeId", + "defName": "Sku采购方案Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7B4051F3-DAF1-420D-BB64-98E4C6BF0514", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "6FC07FAA-E4C2-4E99-96A1-0A54E4D1DEEE", + "extProps": {} + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [] + }, + { + "id": "1E65E858-7177-4B30-9B39-32A6D1CB104C", + "defKey": "purchaseschemeproductsku", + "defName": "采购方案sku表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "Id", + "defName": "采购商品的SKU和采购方案的关系Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "000BEEDD-00ED-4825-9F34-EBCBBDE93D83", + "extProps": {} + }, + { + "defKey": "ProductId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "40A281DC-1D86-46EB-841A-86B0EA37DF4B", + "extProps": {} + }, + { + "defKey": "SkuId", + "defName": "", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F7B2C907-5B4F-4FFD-94E1-47B443EE4F24", + "extProps": {} + }, + { + "defKey": "PurchaseProductId", + "defName": "采购商品Id", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "90D42D96-139A-40D9-AB3F-DB21B1C9C114", + "extProps": {} + }, + { + "defKey": "PurchaseSkuId", + "defName": "采购商品的SkuId", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0CA3EEFC-0FC3-4041-B62A-7F582524121D", + "extProps": {} + }, + { + "defKey": "PurchaseSkuSpecId", + "defName": "采购商品Sku的SpecId", + "comment": "", + "domain": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "80A24092-133C-4F48-BBD2-68F4769C7A68", + "extProps": {} + }, + { + "defKey": "SkuPurchaseSchemeId", + "defName": "Sku采购方案Id", + "comment": "", + "domain": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "EEEAAF7C-4FD8-4964-B985-739A5061DF17", + "extProps": {} + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "AAB59BF9-1F15-4A70-A947-4F9EAA39BF38", + "extProps": {} + } + ], + "indexes": [], + "nameTemplate": "{defKey}[{defName}]", + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [] + }, + { + "id": "EE319D46-61D9-47DB-80AD-AD97D460ACB4", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "orderPurchaseSkuInfo", + "defName": "采购单Sku表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "Id", + "defName": "采购Sku订单Id(来自采购平台)", + "comment": "", + "type": "bigint", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "667BC789-09BB-49B8-A7BF-0EBAEE7FC36C" + }, + { + "defKey": "ShopId", + "defName": "店铺Id", + "comment": "", + "type": "bigint", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "713E7CA8-382C-4721-8FF2-B91D27F3360C" + }, + { + "defKey": "OrderId", + "defName": "店铺订单Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "91FEE39C-C79C-4DAC-9C24-FB4ED8DFD241" + }, + { + "defKey": "PurchaseOrderId", + "defName": "采购订单Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB" + }, + { + "defKey": "PurchaseProductId", + "defName": "采购商品Id(spu)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "B9DFF0FD-EF65-4A61-BB23-4B3B36668EAD" + }, + { + "defKey": "PurchaseSkuId", + "defName": "采购Sku", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "3966D419-4D42-4E32-8161-B50C04FDD25C" + }, + { + "defKey": "WaybillNo", + "defName": "快递单号", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "B133B86C-528B-4238-A33D-277D28AA8F6A" + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "FB279AC5-DB2B-498B-9DC9-5EE05BCED570" + } + ], + "correlations": [], + "indexes": [] + }, + { + "id": "1ED24FEC-604E-4B36-9E51-17D572021F0C", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "orderPurchaseRelationInfo", + "defName": "采购订单关系表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "Id", + "defName": "主键", + "comment": "", + "type": "bigint", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7B939B66-4149-4D8C-BCD3-E99B425C3327" + }, + { + "defKey": "OrderId", + "defName": "订单Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "19E4CACC-5E58-4016-9654-FBDA15B17BE7" + }, + { + "defKey": "PurchaseOrderId", + "defName": "采购单Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "55EB7910-E4F0-49A6-8A53-EB0167E5ED34" + }, + { + "defKey": "PurchaseProductId", + "defName": "采购Spu", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "3B0E5CF8-DBCF-447F-B49C-2096C0B2D402" + }, + { + "defKey": "PurchaseSkuId", + "defName": "采购Sku(1688)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "8024FAE2-F559-40AF-A1D6-D1725CF9E267" + }, + { + "defKey": "PurchaseSpecId", + "defName": "采购Spec(1688)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "29B35FE1-220E-46A2-8636-BA833A60B4A0" + }, + { + "defKey": "BelongSkuId", + "defName": "归属SkuId(拳探)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "5780904B-4B79-4357-A9CB-331DD828C920" + }, + { + "defKey": "Quantity", + "defName": "采购数量", + "comment": "", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "4471FF5A-423F-453C-A31B-7F2B36433FE1" + }, + { + "defKey": "SchemeId", + "defName": "采购方案Id", + "comment": "", + "type": "bigint", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "C4728627-12F6-4B95-8931-E32E8913C578" + }, + { + "defKey": "CreateTime", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "C76F8758-9EEC-4108-9F30-ECE489720FC8" + }, + { + "defKey": "SourceSkuId", + "defName": "来源SkuId(JD)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "96780760-1F86-404C-A2A7-94119182FBF5" + } + ], + "correlations": [], + "indexes": [] + }, + { + "id": "73446503-276D-4398-8476-E340878E9998", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "PurchaseExpressOrder", + "defName": "采购快递单表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "WaybillNo", + "defName": "快递单号", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2F5F7CE6-3716-4A40-AB49-799B0E5406C5" + }, + { + "defKey": "SourceExpressName", + "defName": "原快递公司名称", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0EB0BB06-1FAA-43E3-8FC8-75F1FEB64D45" + }, + { + "defKey": "SourceExpressId", + "defName": "原快递公司Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2D47643E-34E7-4C06-9CB1-0452235C0C0B" + }, + { + "defKey": "TargetExpressName", + "defName": "目标快递公司名称(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A3CEEA34-BEB3-4402-B9BF-8B0B2DD72583" + }, + { + "defKey": "TargetExpressId", + "defName": "目标快递公司Id(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "365A9F77-0CBB-4DA2-BC46-C1C7DF78EF37" + }, + { + "defKey": "ExpressChangedTime", + "defName": "变更时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "DAFC4ABA-700B-4F87-92AD-BCED26BBC5A1" + }, + { + "defKey": "ExpressState", + "defName": "物流状态", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "D560A0AC-6337-48DE-BB87-53E2F93AD6CB" + }, + { + "defKey": "ExpressContent", + "defName": "物流内容", + "comment": "", + "type": "VARCHAR", + "len": 2000, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "5EC575FD-393B-426D-B036-7538C53BEB45" + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "CAF3A8D1-D3CB-48C7-908D-27E155394414" + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "48E0FDF8-B79D-4FE9-85C7-4F39D557C9CD" + }, + { + "defKey": "PurchaseOrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0EF2B8C0-7851-45D7-8224-E2C07307AE30" + }, + { + "defKey": "CreateTime", + "defName": "创建时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "9CB5F1D3-E8FC-4315-9F92-31BE1496C3D8" + } + ], + "correlations": [], + "indexes": [] + } + ], + "views": [], + "dicts": [], + "viewGroups": [], + "dataTypeMapping": { + "referURL": "", + "mappings": [ + { + "defKey": "string", + "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "defName": "字串", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", + "797A1496-D649-4261-89B4-544132EC3F36": "String", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "defKey": "double", + "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "defName": "小数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", + "797A1496-D649-4261-89B4-544132EC3F36": "Double", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { + "defKey": "int", + "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", + "defName": "整数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "INTEGER", + "797A1496-D649-4261-89B4-544132EC3F36": "Integer", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Integer", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Integer", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "float", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "int", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*int", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "i32", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "INTEGER", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "INT" + }, + { + "defKey": "date", + "id": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "defName": "日期", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DATETIME", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DATE", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DATETIME", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "TIMESTAMP", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DATE", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DATE", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "DATE", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "DATE", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DATETIME", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "NUMERIC", + "797A1496-D649-4261-89B4-544132EC3F36": "Date", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Date", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Date", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "DateTime", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "timestamp", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*time.Time", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "DateTime", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DATE", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "DATETIME" + }, + { + "defKey": "bytes", + "id": "D516E75B-90F5-4741-B9B3-A186A263F04C", + "defName": "二进制", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "BLOB", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "BLOB", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARBINARY", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "BYTEA", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "BLOB", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "BLOB", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "BYTEA", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "BYTEA", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "BINARY", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "NONE", + "797A1496-D649-4261-89B4-544132EC3F36": "byte[]", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "byte[]", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "byte[]", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "binary", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "binary", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "[]byte", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "BYTE" + }, + { + "defKey": "largeText", + "id": "B17BDED3-085F-40E1-9019-3B79CF2BF075", + "defName": "大文本", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "TEXT", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "CLOB", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "TEXT", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "TEXT", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "CLOB", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "CLOB", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "TEXT", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "TEXT", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", + "797A1496-D649-4261-89B4-544132EC3F36": "String", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "TEXT", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "STRING" + } + ] + }, + "domains": [ + { + "defKey": "DefaultString", + "defName": "默认字串", + "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "len": 255, + "scale": "", + "uiHint": "", + "id": "9092C4E0-1A54-4859-ABBB-5B62DBC27573" + }, + { + "defKey": "IdOrKey", + "defName": "主键标识", + "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "len": 32, + "scale": "", + "uiHint": "", + "id": "16120F75-6AA7-4483-868D-F07F511BB081" + }, + { + "defKey": "Name", + "defName": "名称", + "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "len": 90, + "scale": "", + "uiHint": "", + "id": "54611CCC-CA4B-42E1-9F32-4944C85B85A6" + }, + { + "defKey": "Int", + "defName": "整数", + "applyFor": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", + "len": "", + "scale": "", + "uiHint": "", + "id": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E" + }, + { + "defKey": "Double", + "defName": "小数", + "applyFor": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "len": 24, + "scale": 6, + "uiHint": "", + "id": "FF4459C5-6B45-4DBF-8FC0-E06239BC05B4" + }, + { + "defKey": "Money", + "defName": "金额", + "applyFor": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "len": 24, + "scale": 6, + "uiHint": "", + "id": "C3B1681B-99F9-4818-9E80-DE1652A51D85" + }, + { + "defKey": "DateTime", + "defName": "日期时间", + "applyFor": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "len": "", + "scale": "", + "uiHint": "", + "id": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC" + }, + { + "defKey": "YesNo", + "defName": "是否", + "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "len": "1", + "scale": "", + "uiHint": "", + "id": "6F7C1C5C-D159-41E6-BF9D-54DEEFA79AFF" + }, + { + "defKey": "Dict", + "defName": "数据字典", + "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "len": "32", + "scale": "", + "uiHint": "", + "id": "73FD2BAD-2358-4336-B96D-45DC897BD792" + }, + { + "defKey": "DescText", + "defName": "描述文本", + "applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "len": "900", + "scale": "", + "uiHint": "", + "id": "3E948CEC-3070-472C-AF92-F3CA11EC9D15" + } + ], + "diagrams": [ + { + "defKey": "globalView", + "defName": "全局视图", + "relationType": "field", + "canvasData": { + "cells": [ + { + "id": "bae79cdf-e627-427b-aa66-728f637effcb", + "shape": "table", + "position": { + "x": -260, + "y": -290 + }, + "count": 0, + "originKey": "AF1D8C00-44CE-478C-BBE6-013CF93AF22D" + }, + { + "id": "53bec785-6ee3-497e-bfa6-0318b99147db", + "shape": "table", + "position": { + "x": -260, + "y": 64.5 + }, + "count": 0, + "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" + }, + { + "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", + "shape": "table", + "position": { + "x": -250, + "y": 380 + }, + "count": 0, + "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" + }, + { + "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "shape": "table", + "position": { + "x": 390, + "y": -90 + }, + "count": 0, + "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" + }, + { + "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", + "shape": "table", + "position": { + "x": 2770, + "y": 103 + }, + "count": 0, + "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" + }, + { + "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", + "shape": "table", + "position": { + "x": 2770, + "y": -53.5 + }, + "count": 0, + "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" + }, + { + "id": "33443e42-a883-42ec-acc0-46cc1446218d", + "shape": "table", + "position": { + "x": 2770, + "y": 634 + }, + "count": 0, + "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" + }, + { + "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", + "shape": "table", + "position": { + "x": 2770, + "y": 408 + }, + "count": 0, + "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" + }, + { + "id": "c9cd6035-3abe-4d8f-8830-bc876fe240af", + "shape": "erdRelation", + "source": { + "cell": "bae79cdf-e627-427b-aa66-728f637effcb", + "port": "144B14DF-B01B-4EF7-9163-24A3124BB808%out" + }, + "target": { + "cell": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "port": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB%in" + }, + "relation": "1:n", + "vertices": [ + { + "x": 310, + "y": -140 + }, + { + "x": 310, + "y": 30 + } + ], + "fillColor": "#ACDAFC", + "attrs": { + "line": { + "strokeDasharray": "" + } + } + }, + { + "id": "f42bb406-efea-4131-a0af-b715871f1be5", + "shape": "erdRelation", + "source": { + "cell": "53bec785-6ee3-497e-bfa6-0318b99147db", + "port": "E9728883-C797-4973-82A6-58F0DD7306F7%out" + }, + "target": { + "cell": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "port": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB%in" + }, + "relation": "1:n", + "fillColor": "#ACDAFC", + "attrs": { + "line": { + "strokeDasharray": "" + } + } + }, + { + "id": "dc004b3d-1f8d-4542-bcd6-f6e9c42a8aa3", + "shape": "erdRelation", + "source": { + "cell": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", + "port": "C972C40D-0C81-455D-8598-37DC80F7A538%out" + }, + "target": { + "cell": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "port": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB%in" + }, + "relation": "1:n", + "vertices": [ + { + "x": 300, + "y": 260 + } + ], + "fillColor": "#ACDAFC", + "attrs": { + "line": { + "strokeDasharray": "" + } + } + }, + { + "id": "7d43ca17-a824-4484-b330-25c54849aa47", + "shape": "erdRelation", + "source": { + "cell": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "port": "2CE3E553-81E6-40B3-A711-98A8EBF41716%out" + }, + "target": { + "cell": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "port": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB%out" + }, + "relation": "1:n", + "fillColor": "#ACDAFC", + "attrs": { + "line": { + "strokeDasharray": "" + } + } + }, + { + "id": "bc383ac2-cad9-4248-b5d3-ff44f1aba52e", + "shape": "erdRelation", + "source": { + "cell": "2c258cf1-71de-432b-835a-7fe52c849443", + "port": "DD093BC7-0374-421D-A4B5-7D471C5444B2%in" + }, + "target": { + "cell": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "port": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB%out" + }, + "relation": "1:n", + "vertices": [ + { + "x": 930, + "y": 127.5 + } + ], + "fillColor": "#ACDAFC", + "attrs": { + "line": { + "strokeDasharray": "" + } + } + }, + { + "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "shape": "table", + "position": { + "x": 501, + "y": 587 + }, + "count": 0, + "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + }, + { + "id": "471ac35d-30de-48a3-8743-eec20f919eba", + "shape": "table", + "position": { + "x": 1818, + "y": 495 + }, + "count": 0, + "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" + }, + { + "id": "2c258cf1-71de-432b-835a-7fe52c849443", + "shape": "table", + "position": { + "x": 1250, + "y": -150 + }, + "count": 0, + "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" + }, + { + "id": "e8ee81ef-5bfc-464d-9154-1464a42dff87", + "shape": "table", + "position": { + "x": 1250, + "y": 495 + }, + "count": 0, + "originKey": "73446503-276D-4398-8476-E340878E9998" + }, + { + "id": "b968f678-c31b-4396-b761-dd3269ba6fb8", + "shape": "table", + "position": { + "x": 1250, + "y": 245 + }, + "count": 0, + "originKey": "EE319D46-61D9-47DB-80AD-AD97D460ACB4" + } + ] + }, + "id": "26560F1B-3B7D-4AD8-8524-B1FB838E26F1", + "comment": "" + } + ], + "standardFields": [ + { + "defKey": "personInfo", + "defName": "个人基本信息要素", + "fields": [ + { + "defKey": "ID_CARD_NO", + "defName": "身份证号", + "comment": "", + "type": "VARCHAR", + "len": "60", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "refDict": "", + "uiHint": "", + "id": "A64A91C8-A41F-4113-92FB-7563D7EF054D" + }, + { + "defKey": "MOBILE_PHONE", + "defName": "手机号", + "comment": "", + "type": "VARCHAR", + "len": "60", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "refDict": "", + "uiHint": "", + "id": "479DA2AB-1974-411A-A81E-92FB939E75EB" + }, + { + "defKey": "GENDER", + "defName": "性别", + "comment": "", + "type": "VARCHAR", + "len": "32", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792", + "refDict": "BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D", + "uiHint": "", + "id": "48473E29-6594-4912-AADE-C8AB44FCA3E9" + }, + { + "defKey": "BIRTH", + "defName": "出生日期", + "comment": "", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "refDict": "", + "uiHint": "", + "id": "2BD3D2EE-2411-49A6-983D-84B81057312F" + }, + { + "defKey": "AVATAR", + "defName": "头像", + "comment": "", + "type": "VARCHAR", + "len": "60", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "refDict": "", + "uiHint": "", + "id": "FDD67CEE-4B52-4BD1-A1A3-9C5EBC6037E6" + }, + { + "defKey": "HEIGHT", + "defName": "身高", + "comment": "", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "refDict": "", + "uiHint": "", + "id": "CAAA0E79-41A1-4758-B481-D171168C4D68" + }, + { + "defKey": "WEIGHT", + "defName": "体重", + "comment": "", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "refDict": "", + "uiHint": "", + "id": "575482CE-64A6-4CB9-99DC-8E126D190AAA" + }, + { + "defKey": "NATION", + "defName": "名族", + "comment": "", + "type": "VARCHAR", + "len": "32", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792", + "refDict": "115EDEFC-0323-410E-81AB-CCAB8879837A", + "uiHint": "", + "id": "15B0D75D-0B97-4985-A816-D0EAFA90446B" + }, + { + "defKey": "POLITICAL", + "defName": "政治面貌", + "comment": "", + "type": "VARCHAR", + "len": "32", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792", + "refDict": "06EED564-BBA9-4747-8D73-AF809A330CB8", + "uiHint": "", + "id": "F458E86D-84D6-45A1-9DD3-51E6C8170D7F" + }, + { + "defKey": "MARITAL", + "defName": "婚姻状况", + "comment": "", + "type": "VARCHAR", + "len": "32", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792", + "refDict": "EA1587B7-3954-437A-BFE0-FCB0453BCABA", + "uiHint": "", + "id": "7275E578-6893-4922-AC69-95B261BFBD61" + }, + { + "defKey": "DOMICILE_PLACE_PROVINCE", + "defName": "籍贯(省)", + "comment": "", + "type": "VARCHAR", + "len": "60", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "refDict": "", + "uiHint": "", + "id": "F04BF130-3EC1-4E02-9DED-3214CA88E352" + }, + { + "defKey": "DOMICILE_PLACE_CITY", + "defName": "籍贯(市)", + "comment": "", + "type": "VARCHAR", + "len": "32", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792", + "refDict": "", + "uiHint": "", + "id": "B97F5BC2-33DE-4857-9DB8-ECFD02C9040C" + }, + { + "defKey": "DOMICILE_PLACE_ADDRESS", + "defName": "户籍地址", + "comment": "", + "type": "VARCHAR", + "len": "60", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "refDict": "", + "uiHint": "", + "id": "812ADF1D-8C03-40CA-B030-E539838FB889" + } + ], + "id": "F30202B9-4B5D-4CE7-87CE-B3890C84D3F2" + } + ], + "dbConn": [ + { + "defKey": "2064E5CD-B44C-4047-85C3-30DE962D448E", + "defName": "bbwyb", + "type": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E", + "properties": { + "driver_class_name": "com.mysql.cj.jdbc.Driver", + "url": "jdbc:mysql://rm-bp1508okrh23710yfao.mysql.rds.aliyuncs.com:3306/bbwyb?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC", + "password": "kaicn1132+-", + "username": "qyroot" + } + } + ] +} \ No newline at end of file diff --git a/doc/bbwyB端库.pdma.json b/doc/bbwyB端库.pdma.json index 363ac8d..fdbaf26 100644 --- a/doc/bbwyB端库.pdma.json +++ b/doc/bbwyB端库.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.5.1", "createdTime": "2023-5-12 20:56:05", - "updatedTime": "2023-5-17 23:01:51", + "updatedTime": "2023-6-7 00:07:16", "dbConns": [], "profile": { "default": { @@ -1780,7 +1780,16 @@ "hideInGraph": true } ], - "correlations": [] + "correlations": [ + { + "myField": "144B14DF-B01B-4EF7-9163-24A3124BB808", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E", @@ -2134,7 +2143,16 @@ "hideInGraph": true } ], - "correlations": [] + "correlations": [ + { + "myField": "E9728883-C797-4973-82A6-58F0DD7306F7", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ] }, { "id": "93074B87-BE55-41BF-8358-B0E84C4E249A", @@ -2820,7 +2838,16 @@ "hideInGraph": true } ], - "correlations": [], + "correlations": [ + { + "myField": "C972C40D-0C81-455D-8598-37DC80F7A538", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "notes": {} }, { @@ -2934,6 +2961,23 @@ "id": "8C3AE7B5-1456-40D2-B7F8-A0040DE2B6D3", "extProps": {} }, + { + "defKey": "PurchaserId", + "defName": "", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "6BA0DD86-8AC3-4B2F-80EF-3FA9D8082D53" + }, { "defKey": "PurchaserName", "defName": "", @@ -3091,64 +3135,12 @@ "extProps": {} }, { - "defKey": "WaybillNo", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "0C34D400-F397-427C-87B0-AFECF916E612", - "extProps": {} - }, - { - "defKey": "SourceExpressName", - "defName": "", - "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "2FA383BC-182B-435F-985D-6BEA9D63233D", - "extProps": {} - }, - { - "defKey": "SourceExpressId", + "defKey": "CreateTime", "defName": "", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "DATETIME", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3165,16 +3157,15 @@ "attr7": "", "attr8": "", "attr9": "", - "id": "9568B26B-0575-4F00-B77A-E565C33C093D", + "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", "extProps": {} }, { - "defKey": "TargetExpressName", - "defName": "", + "defKey": "OrderState", + "defName": "采购单状态(待发货 = 0, 部分发货=1, 待收货 = 10, 部分收货=11, 已签收 = 20, 已取消 = 100)", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "type": "", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3182,25 +3173,16 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "4173F07C-FE4D-428D-89EE-237685C1CC11", - "extProps": {} + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "A2094D2A-A910-4E4C-9AD6-E70856604538" }, { - "defKey": "TargetExpressId", - "defName": "", + "defKey": "Remark", + "defName": "采购备注", "comment": "", - "domain": "", - "type": "VARCHAR", - "len": 100, + "type": "", + "len": "", "scale": "", "primaryKey": false, "notNull": false, @@ -3208,24 +3190,15 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "A0DCE354-A64C-40D4-AA33-A00994B7E382", - "extProps": {} + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "27FA741F-D759-4FC1-A3CD-685565EA77D9" }, { - "defKey": "CreateTime", - "defName": "", + "defKey": "IsEnabled", + "defName": "是否有效", "comment": "", - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "type": "DATETIME", + "type": "bit", "len": "", "scale": "", "primaryKey": false, @@ -3234,17 +3207,9 @@ "defaultValue": "", "hideInGraph": false, "refDict": "", - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "D68D9A98-589F-4C60-ACB6-BF81B95B5325", - "extProps": {} + "extProps": {}, + "domain": "", + "id": "9872FE5C-94C0-479F-BDAC-20756B572B19" } ], "indexes": [], @@ -3331,7 +3296,16 @@ "hideInGraph": true } ], - "correlations": [], + "correlations": [ + { + "myField": "DD093BC7-0374-421D-A4B5-7D471C5444B2", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "notes": {} }, { @@ -3848,7 +3822,16 @@ "hideInGraph": true } ], - "correlations": [], + "correlations": [ + { + "myField": "2CE3E553-81E6-40B3-A711-98A8EBF41716", + "refEntity": "3A48F81A-49D5-423B-8A92-228615DCEA6F", + "refField": "31AF4355-53ED-42E2-AB7F-A8AC17D17DBB", + "myRows": "1", + "refRows": "n", + "innerType": "" + } + ], "notes": {} }, { @@ -5232,8 +5215,8 @@ "id": "3966D419-4D42-4E32-8161-B50C04FDD25C" }, { - "defKey": "ExpressState", - "defName": "物流状态", + "defKey": "WaybillNo", + "defName": "快递单号", "comment": "", "type": "VARCHAR", "len": 100, @@ -5246,24 +5229,7 @@ "refDict": "", "extProps": {}, "domain": "", - "id": "E1E7DF2E-8F08-495E-A640-61628027163D" - }, - { - "defKey": "ExpressChangeTime", - "defName": "物流变更时间", - "comment": "", - "type": "", - "len": "", - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", - "id": "329B45D7-BCE9-4895-B52D-C953E95DB4B2" + "id": "B133B86C-528B-4238-A33D-277D28AA8F6A" }, { "defKey": "CreateTime", @@ -5633,85 +5599,486 @@ ], "correlations": [], "indexes": [] - } - ], - "views": [], - "dicts": [], - "viewGroups": [], - "dataTypeMapping": { - "referURL": "", - "mappings": [ - { - "defKey": "string", - "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", - "defName": "字串", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", - "797A1496-D649-4261-89B4-544132EC3F36": "String", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" - }, - { - "defKey": "double", - "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", - "defName": "小数", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", - "797A1496-D649-4261-89B4-544132EC3F36": "Double", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { + "id": "73446503-276D-4398-8476-E340878E9998", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } }, - { - "defKey": "int", - "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", - "defName": "整数", - "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT", - "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT", - "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT", - "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER", - "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT", - "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER", - "592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER", - "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4", - "11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT", - "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "INTEGER", - "797A1496-D649-4261-89B4-544132EC3F36": "Integer", - "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Integer", - "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Integer", - "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "float", - "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "int", - "B91D99E0-9B7C-416C-8737-B760957DAF09": "*int", - "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "i32", - "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "INTEGER", - "483F9346-C99E-4014-A1D2-A554606BD8A3": "INT" + "defKey": "PurchaseExpressOrder", + "defName": "采购快递单表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "WaybillNo", + "defName": "快递单号", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2F5F7CE6-3716-4A40-AB49-799B0E5406C5" + }, + { + "defKey": "SourceExpressName", + "defName": "原快递公司名称", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0EB0BB06-1FAA-43E3-8FC8-75F1FEB64D45" + }, + { + "defKey": "SourceExpressId", + "defName": "原快递公司Id", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2D47643E-34E7-4C06-9CB1-0452235C0C0B" + }, + { + "defKey": "TargetExpressName", + "defName": "目标快递公司名称(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A3CEEA34-BEB3-4402-B9BF-8B0B2DD72583" + }, + { + "defKey": "TargetExpressId", + "defName": "目标快递公司Id(kuaidi100)", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "365A9F77-0CBB-4DA2-BC46-C1C7DF78EF37" + }, + { + "defKey": "ExpressChangedTime", + "defName": "变更时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "DAFC4ABA-700B-4F87-92AD-BCED26BBC5A1" + }, + { + "defKey": "ExpressState", + "defName": "物流状态", + "comment": "", + "type": "VARCHAR", + "len": 100, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "D560A0AC-6337-48DE-BB87-53E2F93AD6CB" + }, + { + "defKey": "ExpressContent", + "defName": "物流内容", + "comment": "", + "type": "VARCHAR", + "len": 2000, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "5EC575FD-393B-426D-B036-7538C53BEB45" + }, + { + "defKey": "OrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "CAF3A8D1-D3CB-48C7-908D-27E155394414" + }, + { + "defKey": "ShopId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "48E0FDF8-B79D-4FE9-85C7-4F39D557C9CD" + }, + { + "defKey": "PurchaseOrderId", + "defName": "", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0EF2B8C0-7851-45D7-8224-E2C07307AE30" + }, + { + "defKey": "CreateTime", + "defName": "创建时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "id": "9CB5F1D3-E8FC-4315-9F92-31BE1496C3D8" + } + ], + "correlations": [], + "indexes": [] + } + ], + "views": [], + "dicts": [], + "viewGroups": [], + "dataTypeMapping": { + "referURL": "", + "mappings": [ + { + "defKey": "string", + "id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "defName": "字串", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT", + "797A1496-D649-4261-89B4-544132EC3F36": "String", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "string", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "String", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "VARCHAR", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "VARCHAR" + }, + { + "defKey": "double", + "id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "defName": "小数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL", + "797A1496-D649-4261-89B4-544132EC3F36": "Double", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "f64", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "DECIMAL", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "DECIMAL" + }, + { + "defKey": "int", + "id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", + "defName": "整数", + "29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT", + "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT", + "BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT", + "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER", + "89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT", + "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER", + "592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER", + "77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4", + "11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT", + "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "INTEGER", + "797A1496-D649-4261-89B4-544132EC3F36": "Integer", + "895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Integer", + "A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Integer", + "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "float", + "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "int", + "B91D99E0-9B7C-416C-8737-B760957DAF09": "*int", + "BDF457FD-9F98-4AC3-A705-7587B00A3BAB": "i32", + "56F4B55B-F0B8-4049-9E6B-50B95C1D793A": "INTEGER", + "483F9346-C99E-4014-A1D2-A554606BD8A3": "INT" }, { "defKey": "date", @@ -5894,12 +6261,52 @@ "count": 0, "originKey": "AF1D8C00-44CE-478C-BBE6-013CF93AF22D" }, + { + "id": "53bec785-6ee3-497e-bfa6-0318b99147db", + "shape": "table", + "position": { + "x": -260, + "y": 64.5 + }, + "count": 0, + "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" + }, + { + "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", + "shape": "table", + "position": { + "x": -250, + "y": 380 + }, + "count": 0, + "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" + }, + { + "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "shape": "table", + "position": { + "x": 390, + "y": -90 + }, + "count": 0, + "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" + }, + { + "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", + "shape": "table", + "position": { + "x": 2770, + "y": 103 + }, + "count": 0, + "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" + }, { "id": "34567615-fdb5-4d1d-b6ee-a8b61faa04b8", "shape": "table", "position": { - "x": 1690, - "y": -73.5 + "x": 2770, + "y": -53.5 }, "count": 0, "originKey": "474E5807-5650-43BD-8C5C-E16F36D58F85" @@ -5908,8 +6315,8 @@ "id": "33443e42-a883-42ec-acc0-46cc1446218d", "shape": "table", "position": { - "x": 1690, - "y": 614 + "x": 2770, + "y": 634 }, "count": 0, "originKey": "1E65E858-7177-4B30-9B39-32A6D1CB104C" @@ -5918,8 +6325,8 @@ "id": "129cac0b-4f1e-4d05-972f-73b2c710b6e0", "shape": "table", "position": { - "x": 1690, - "y": 388 + "x": 2770, + "y": 408 }, "count": 0, "originKey": "4CDAE2F8-5F79-4A75-8F5A-27226FDD1ACE" @@ -6042,103 +6449,54 @@ } }, { - "id": "7771087b-7bda-4ec6-a831-c50dc06395e9", - "shape": "erdRelation", - "source": { - "cell": "b968f678-c31b-4396-b761-dd3269ba6fb8", - "port": "1AC7EBFF-8FCC-40C9-A17B-2BACE1030CAB%out" - }, - "target": { - "cell": "2c258cf1-71de-432b-835a-7fe52c849443", - "port": "36136AA8-299D-4616-8F98-7172BFB06DDB%out" - }, - "relation": "1:n", - "fillColor": "#ACDAFC", - "attrs": { - "line": { - "strokeDasharray": "" - } - } - }, - { - "id": "53bec785-6ee3-497e-bfa6-0318b99147db", - "shape": "table", - "position": { - "x": -260, - "y": 64.5 - }, - "count": 0, - "originKey": "C52E23C2-6CC5-4404-92A5-7CCE77E8AB1E" - }, - { - "id": "9afa8d28-f5b8-4c34-8df4-b386c4dd32b9", - "shape": "table", - "position": { - "x": -250, - "y": 380 - }, - "count": 0, - "originKey": "93074B87-BE55-41BF-8358-B0E84C4E249A" - }, - { - "id": "414ef58f-57e8-4362-971a-85af3ea9a44f", + "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", "shape": "table", "position": { - "x": 390, - "y": -90 + "x": 501, + "y": 587 }, "count": 0, - "originKey": "3A48F81A-49D5-423B-8A92-228615DCEA6F" + "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" }, { - "id": "6593da18-d55c-47e3-bb4c-cf75fc56702a", + "id": "471ac35d-30de-48a3-8743-eec20f919eba", "shape": "table", "position": { - "x": 1690, - "y": 83 + "x": 1818, + "y": 495 }, "count": 0, - "originKey": "03EA3614-C1F5-4909-96A0-0687EDEABD4B" + "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" }, { "id": "2c258cf1-71de-432b-835a-7fe52c849443", "shape": "table", "position": { - "x": 1100, - "y": -90 + "x": 1250, + "y": -150 }, "count": 0, "originKey": "7DC43BAC-F8BC-4423-96C5-4C770CCD6214" }, { - "id": "ff369484-e2eb-4af8-9b98-6fd2d9f202f9", + "id": "e8ee81ef-5bfc-464d-9154-1464a42dff87", "shape": "table", "position": { - "x": 501, - "y": 587 + "x": 1250, + "y": 495 }, "count": 0, - "originKey": "B0921F8C-064A-48FC-A028-C849BD1EAC09" + "originKey": "73446503-276D-4398-8476-E340878E9998" }, { "id": "b968f678-c31b-4396-b761-dd3269ba6fb8", "shape": "table", "position": { - "x": 1100, - "y": 342 + "x": 1250, + "y": 245 }, "count": 0, "originKey": "EE319D46-61D9-47DB-80AD-AD97D460ACB4" - }, - { - "id": "471ac35d-30de-48a3-8743-eec20f919eba", - "shape": "table", - "position": { - "x": 1100, - "y": 614 - }, - "count": 0, - "originKey": "1ED24FEC-604E-4B36-9E51-17D572021F0C" } ] },