/// <summary>
        /// 存储所需修改IssueReceiptD的数据集合的临时表
        /// </summary>
        private IDataEntityType CreateDTmpTable(IQueryService qrySrv)
        {
            string typeName = "Temp_UpdateSalesIssueD_" + DateTime.Now.ToString("HHmmssfff");// 临时表表名的处理
            DependencyObjectType defaultType = new DependencyObjectType(typeName, new Attribute[] { });
            IBusinessTypeService businessSrv = this.GetServiceForThisTypeKey <IBusinessTypeService>();

            #region 字段

            defaultType.RegisterSimpleProperty("item_no", businessSrv.SimpleItemCodeType, string.Empty, false, new Attribute[] { businessSrv.SimpleItemCode });

            defaultType.RegisterSimpleProperty("item_feature_no", businessSrv.SimpleItemFeatureType, string.Empty, false, new Attribute[] { businessSrv.SimpleItemFeature });

            defaultType.RegisterSimpleProperty("picking_unit_no", businessSrv.SimpleUnitCodeType, string.Empty, false, new Attribute[] { businessSrv.SimpleUnitCode });

            defaultType.RegisterSimpleProperty("doc_no", businessSrv.SimpleDocNoType, string.Empty, false, new Attribute[] { businessSrv.SimpleDocNo });

            SimplePropertyAttribute tempAttr = new SimplePropertyAttribute(GeneralDBType.Int32);
            defaultType.RegisterSimpleProperty("seq", typeof(Int32), 0, false, new Attribute[] { tempAttr });

            defaultType.RegisterSimpleProperty("warehouse_no", businessSrv.GetBusinessType("WarehouseCode"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("WarehouseCode") });

            defaultType.RegisterSimpleProperty("storage_spaces_no", businessSrv.GetBusinessType("Bin"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("Bin") });

            defaultType.RegisterSimpleProperty("lot_no", businessSrv.SimpleLotCodeType, string.Empty, false, new Attribute[] { businessSrv.SimpleLotCode });

            defaultType.RegisterSimpleProperty("picking_qty", businessSrv.SimpleQuantityType, 0M, false, new Attribute[] { businessSrv.SimpleQuantity });

            tempAttr = new SimplePropertyAttribute(GeneralDBType.String, 1000);
            defaultType.RegisterSimpleProperty("barcode_no", typeof(string), string.Empty, false, new Attribute[] { tempAttr });

            #endregion

            qrySrv.CreateTempTable(defaultType);
            return(defaultType);
        }
        /// <summary>
        /// 创建存储传入参数集合的临时表
        /// </summary>
        private void CreateTemp()
        {
            IBusinessTypeService businessSrv = this.GetServiceForThisTypeKey <IBusinessTypeService>();

            string typeName = "Temp_Scan" + DateTime.Now.ToString("HHmmssfff");// 临时表表名的处理
            DependencyObjectType defaultType = new DependencyObjectType(typeName, new Attribute[] { });

            #region 单头
            defaultType.RegisterSimpleProperty("ID", businessSrv.SimplePrimaryKeyType, Maths.GuidDefaultValue(), false, new Attribute[] { businessSrv.SimplePrimaryKey });
            //人员
            defaultType.RegisterSimpleProperty("employee_no", businessSrv.GetBusinessType("BusinessCode"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("BusinessCode") });
            SimplePropertyAttribute tempAttr = new SimplePropertyAttribute(GeneralDBType.String);
            tempAttr.Size = 10;
            //部门
            defaultType.RegisterSimpleProperty("picking_department_no", typeof(string), string.Empty, false, new Attribute[] { tempAttr });
            //工厂编号
            defaultType.RegisterSimpleProperty("site_no", businessSrv.GetBusinessType("Factory"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("Factory") });
            //信息批号
            tempAttr.Size = 30;
            defaultType.RegisterSimpleProperty("info_lot_no", typeof(string), string.Empty, false, new Attribute[] { tempAttr });
            _tempScan = defaultType;
            _qurService.CreateTempTable(_tempScan);
            #endregion

            typeName    = "Temp_ScanDetail" + DateTime.Now.ToString("HHmmssfff");// 临时表表名的处理
            defaultType = new DependencyObjectType(typeName, new Attribute[] { });
            #region 单身
            defaultType.RegisterSimpleProperty("ID", businessSrv.SimplePrimaryKeyType, Maths.GuidDefaultValue(), false, new Attribute[] { businessSrv.SimplePrimaryKey });
            //信息批号
            tempAttr.Size = 30;
            defaultType.RegisterSimpleProperty("info_lot_no", typeof(string), string.Empty, false, new Attribute[] { tempAttr });
            //序号
            tempAttr = new SimplePropertyAttribute(GeneralDBType.Int32);
            defaultType.RegisterSimpleProperty("SequenceNumber", typeof(Int32), 0, false, new Attribute[] { tempAttr });
            //品号
            defaultType.RegisterSimpleProperty("item_no", businessSrv.GetBusinessType("ItemCode"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("ItemCode") });
            //特征码
            defaultType.RegisterSimpleProperty("item_feature_no", businessSrv.GetBusinessType("ItemFeature"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("ItemFeature") });
            //单位
            defaultType.RegisterSimpleProperty("picking_unit_no", businessSrv.GetBusinessType("UnitCode"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("UnitCode") });
            //仓库
            defaultType.RegisterSimpleProperty("warehouse_no", businessSrv.GetBusinessType("WarehouseCode"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("WarehouseCode") });
            //库位
            defaultType.RegisterSimpleProperty("storage_spaces_no", businessSrv.GetBusinessType("Bin"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("Bin") });
            //批号
            defaultType.RegisterSimpleProperty("lot_no", businessSrv.GetBusinessType("LotCode"), string.Empty, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("LotCode") });
            //拣货数量
            defaultType.RegisterSimpleProperty("picking_qty", businessSrv.GetBusinessType("Quantity"), 0M, false, new Attribute[] { businessSrv.GetSimplePropertyAttribute("Quantity") });
            //条码编号
            tempAttr      = new SimplePropertyAttribute(GeneralDBType.String);
            tempAttr.Size = 1000;
            defaultType.RegisterSimpleProperty("barcode_no", typeof(string), string.Empty, false, new Attribute[] { tempAttr });
            _tempScanDetail = defaultType;
            _qurService.CreateTempTable(_tempScanDetail);
            #endregion
        }
示例#3
0
        private void CreateTempTable()
        {
            IBusinessTypeService businessTypeSrv = GetServiceForThisTypeKey <IBusinessTypeService>();

            #region 单头临时表
            string tempName = "Table_scan" + "_" + DateTime.Now.ToString("HHmmssfff");
            DependencyObjectType    defaultType = new DependencyObjectType(tempName, new Attribute[] { null });
            SimplePropertyAttribute tempAttr    = new SimplePropertyAttribute(GeneralDBType.String);
            #region 字段
            //营运据点
            defaultType.RegisterSimpleProperty("site_no", typeof(string),
                                               string.Empty, false, new Attribute[] { tempAttr });
            //条码编号
            defaultType.RegisterSimpleProperty("barcode_no", typeof(string),
                                               string.Empty, false, new Attribute[] { tempAttr });
            //料件编号
            defaultType.RegisterSimpleProperty("item_no", businessTypeSrv.GetBusinessType("ItemCode"),
                                               string.Empty, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("ItemCode") });
            //产品特征
            defaultType.RegisterSimpleProperty("item_feature_no", businessTypeSrv.GetBusinessType("ItemFeature"),
                                               string.Empty, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("ItemFeature") });
            //库位编号
            defaultType.RegisterSimpleProperty("warehouse_no", businessTypeSrv.GetBusinessType("WarehouseCode"),
                                               string.Empty, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("WarehouseCode") });
            //储位编号
            defaultType.RegisterSimpleProperty("storage_spaces_no", businessTypeSrv.GetBusinessType("Bin"),
                                               string.Empty, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("Bin") });
            //批号
            defaultType.RegisterSimpleProperty("lot_no", businessTypeSrv.GetBusinessType("LotCode"),
                                               string.Empty, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("LotCode") });
            //盘点数量
            defaultType.RegisterSimpleProperty("qty", businessTypeSrv.GetBusinessType("Quantity"),
                                               0M, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("Quantity") });
            //盘点人员
            defaultType.RegisterSimpleProperty("employee_no", businessTypeSrv.GetBusinessType("BusinessCode"),
                                               string.Empty, false, new Attribute[] { businessTypeSrv.GetSimplePropertyAttribute("BusinessCode") });
            //盘点日期
            defaultType.RegisterSimpleProperty("complete_date", typeof(DateTime),
                                               OrmDataOption.EmptyDateTime, false, new Attribute[] { new SimplePropertyAttribute(GeneralDBType.Date) });
            //交易对象类型
            defaultType.RegisterSimpleProperty("transaction_type", typeof(string),
                                               string.Empty, false, new Attribute[] { tempAttr });
            tempAttr.Size = 10;
            //交易对象编号
            defaultType.RegisterSimpleProperty("transaction_no", typeof(string),
                                               string.Empty, false, new Attribute[] { tempAttr });
            #endregion
            _Table_scan = defaultType;
            _qurService.CreateTempTable(_Table_scan);
            #endregion
        }