zhou.xiaoning 4 سال پیش
والد
کامیت
ad2ad76c0d
8فایلهای تغییر یافته به همراه6605 افزوده شده و 5142 حذف شده
  1. 0 33
      controllers/wr/wr.go
  2. 2197 2335
      docs/docs.go
  3. 2197 2335
      docs/swagger.json
  4. 1998 340
      docs/swagger.yaml
  5. 95 0
      models/common.go
  6. 0 23
      models/delivery.go
  7. 0 72
      models/wr.go
  8. 118 4
      models/wrTrade.go

+ 0 - 33
controllers/wr/wr.go

@@ -1,36 +1,3 @@
 package wr
 
-import (
-	"mtp2_if/global/app"
-	"mtp2_if/global/e"
-	"mtp2_if/logger"
-	"mtp2_if/models"
-	"net/http"
-
-	"github.com/gin-gonic/gin"
-)
-
 // 仓单服务
-
-// GetWRCategoryInfo 获取现货分类信息
-// @Summary 获取现货分类信息
-// @Produce json
-// @Success 200 {object} models.WRCategoryTree
-// @Failure 500 {object} app.Response
-// @Router /WR/GetWRCategoryInfo [get]
-// @Tags 仓单服务
-func GetWRCategoryInfo(c *gin.Context) {
-	appG := app.Gin{C: c}
-
-	categories, err := models.CreateCategoryTree(0)
-	if err != nil {
-		// 查询失败
-		logger.GetLogger().Errorf("GetWRCategoryInfo failed: %s", err.Error())
-		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
-		return
-	}
-
-	// 查询成功返回
-	logger.GetLogger().Debugln("GetWRCategoryInfo successed: %v", categories)
-	appG.Response(http.StatusOK, e.SUCCESS, categories)
-}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2197 - 2335
docs/docs.go


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2197 - 2335
docs/swagger.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1998 - 340
docs/swagger.yaml


+ 95 - 0
models/common.go

@@ -241,6 +241,23 @@ func (Systemparam) TableName() string {
 	return "SYSTEMPARAM"
 }
 
+// Ermcpmemberfuncmenu 企业成员菜单表
+type Ermcpmemberfuncmenu struct {
+	Userid       int64     `json:"userid"  xorm:"'USERID'" binding:"required"`             // 用户ID
+	Roleid       int32     `json:"roleid"  xorm:"'ROLEID'" binding:"required"`             // 角色权限ID(0-管理员 22-业务员 23-跟单员 24-交易员)
+	Resourcecode string    `json:"resourcecode"  xorm:"'RESOURCECODE'" binding:"required"` // 菜单代码
+	Modifysrc    int32     `json:"modifysrc"  xorm:"'MODIFYSRC'"`                          // 修改来源 - 1:管理端 2:终端
+	Modifytime   time.Time `json:"modifytime"  xorm:"'MODIFYTIME'"`                        // 修改时间
+	Modifyid     int64     `json:"modifyid"  xorm:"'MODIFYID'"`                            // 修改人
+	Modifyremark string    `json:"modifyremark"  xorm:"'MODIFYREMARK'"`                    // 修改备注
+	Isvalid      int32     `json:"isvalid"  xorm:"'ISVALID'"`                              // 是否有效 - 0:无效 1:有效
+}
+
+// TableName is ERMCP_MEMBERFUNCMENU
+func (Ermcpmemberfuncmenu) TableName() string {
+	return "ERMCP_MEMBERFUNCMENU"
+}
+
 // QuotePrimaryMenu 报价牌一级分类菜单
 type QuotePrimaryMenu struct {
 	Index        int                  `json:"Index"`        // 序号
@@ -778,3 +795,81 @@ func GetRoleFuncMenuLists(loginID int, resourceCode string) ([]Funcmenulist, err
 
 	return funcMenuLists, nil
 }
+
+// GetErmcpRoleFuncMenuLists 企业风管专用的终端权限,区分企业和企业成员
+func GetErmcpRoleFuncMenuLists(loginID int, resourceCode string) ([]Funcmenulist, error) {
+	funcMenuLists := make([]Funcmenulist, 0)
+
+	// 获取对应的Loginaccount信息
+	var loginAccount Loginaccount
+	has, err := db.GetEngine().Where("LOGINID = ?", loginID).Get(&loginAccount)
+	if err != nil {
+		return nil, err
+	}
+	if !has {
+		return nil, errors.New("没有对应的登录用户信息")
+	}
+
+	// 获取对应的Useraccount信息
+	var userAccount Useraccount
+	has, err = db.GetEngine().Table("USERACCOUNT U").
+		Join("INNER", "LOGINACCOUNT L", "L.USERID = U.USERID").
+		Where("L.LOGINID = ?", loginID).Get(&userAccount)
+	if err != nil {
+		return nil, err
+	}
+	if !has {
+		return nil, errors.New("没有对应的用户信息")
+	}
+
+	// 判断是企业还是企业成员
+	if userAccount.Usertype == 2 {
+		// UserType=2:企业。原逻辑:根据LoginAccount表"ClientRoleID"查询”ERMCP_MemberFuncMenu“表中该用户对应角色的菜单权限
+		sql := fmt.Sprintf(`select F.* from FUNCMENULIST F where F.MENUTYPE = 3 
+							and 
+							F.RESOURCECODE in 
+							(select R.RESOURCECODE from ERMCP_MEMBERFUNCMENU R 
+								where R.ISVALID = 1 and R.USERID = %d and R.ROLEID = %d)`, loginAccount.Userid, loginAccount.Clientroleid)
+		if len(resourceCode) != 0 {
+			sql += fmt.Sprintf(" and F.RESOURCECODE = '%s'", resourceCode)
+		}
+		if err := db.GetEngine().SQL(sql).Find(&funcMenuLists); err != nil {
+			return nil, err
+		}
+	} else if userAccount.Usertype == 7 {
+		// UserType=7:企业成员
+		// 查询本用户的角色ID  - AreaRole表
+		// 根据 ”ParentuserID ”和 自己的角色查询“ERMCP_MemberFuncMenu“表中的菜单权限
+		areaRoles := make([]Arearole, 0)
+		if err := db.GetEngine().Where("USERID = ?", loginAccount.Userid).Find(&areaRoles); err != nil {
+			return nil, err
+		}
+		if len(areaRoles) == 0 {
+			// 无角色,返回空数组s
+			return make([]Funcmenulist, 0), nil
+		}
+		// 构建RoleID列表
+		roleIDs := ""
+		for _, areaRole := range areaRoles {
+			roleIDs += strconv.Itoa(int(areaRole.Roletype))
+		}
+		if len(roleIDs) > 0 {
+			roleIDs = roleIDs[1:]
+		}
+		sql := fmt.Sprintf(`select F.* from FUNCMENULIST F where F.MENUTYPE = 3 
+							and 
+							F.RESOURCECODE in 
+							(select R.RESOURCECODE from ERMCP_MEMBERFUNCMENU R 
+								where R.ISVALID = 1 and R.USERID = %d and R.ROLEID in (%s))`, userAccount.Parentuserid, roleIDs)
+		if len(resourceCode) != 0 {
+			sql += fmt.Sprintf(" and F.RESOURCECODE = '%s'", resourceCode)
+		}
+		if err := db.GetEngine().SQL(sql).Find(&funcMenuLists); err != nil {
+			return nil, err
+		}
+	} else {
+		return nil, errors.New("错误的用户类型")
+	}
+
+	return funcMenuLists, nil
+}

+ 0 - 23
models/delivery.go

@@ -6,29 +6,6 @@ import (
 	"mtp2_if/db"
 )
 
-// Deliverygoods 现货品种表
-type Deliverygoods struct {
-	Deliverygoodsid   int32   `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'" binding:"required"`     // 交割商品ID(SEQ_DELIVERYGOODS)
-	Deliverygoodscode string  `json:"deliverygoodscode"  xorm:"'DELIVERYGOODSCODE'" binding:"required"` // 交割商品代码
-	Deliverygoodsname string  `json:"deliverygoodsname"  xorm:"'DELIVERYGOODSNAME'"`                    // 交割商品名称
-	Goodsunitid       int32   `json:"goodsunitid"  xorm:"'GOODSUNITID'"`                                // 交割商品单位ID
-	Deliverygoodstype int32   `json:"deliverygoodstype"  xorm:"'DELIVERYGOODSTYPE'"`                    // 交割商品类型: 1-整装不拆分 2-散装记录明细 3:整装拆分 4:散装不记录明细
-	Standardqty       int64   `json:"standardqty"  xorm:"'STANDARDQTY'"`                                // 标准数量(库位数量) [标准品特有]
-	Standardqtyrange  float64 `json:"standardqtyrange"  xorm:"'STANDARDQTYRANGE'"`                      // 标准数量偏差范围 [标准品特有]
-	Auditflag         int32   `json:"auditflag"  xorm:"'AUDITFLAG'"`                                    // 交割是否需要审核 - 0:不需要 1:需要审核   默认为0
-	Isvalid           int32   `json:"isvalid"  xorm:"'ISVALID'"`                                        // 是否有效 - 0:无效 1:有效
-	Agreeunit         int64   `json:"agreeunit"  xorm:"'AGREEUNIT'"`                                    // 合约单位[散货时默认为1, 整装时默认为标准数量]
-	Issplit           int32   `json:"issplit"  xorm:"'ISSPLIT'"`                                        // 是否拆分 - 0:不拆分 1:拆分 [整装]   0:不记录明细 1:记录明细 [散货] - 作废整装时不拆分,则标准数量=合约单位;拆分时标准数量为合约单位的整数倍;整装时必须记录明细表数据
-	Qtydecimalplace   int32   `json:"qtydecimalplace"  xorm:"'QTYDECIMALPLACE'"`                        // 成交量小数位
-	Categoryid        int32   `json:"categoryid"  xorm:"'CATEGORYID'"`                                  // 类别ID(SEQ_WRCATEGORY)
-	Dgstatus          int32   `json:"dgstatus"  xorm:"'DGSTATUS'"`                                      // 品种状态 - 作废 - 0:未激活 1:正常
-}
-
-// TableName is DELIVERYGOODS
-func (Deliverygoods) TableName() string {
-	return "DELIVERYGOODS"
-}
-
 // Deliveryrelation 商品交割关系表
 type Deliveryrelation struct {
 	Goodsid           int64   `json:"goodsid"  xorm:"'GOODSID'" binding:"required"`               // 交易合约ID

+ 0 - 72
models/wr.go

@@ -1,72 +0,0 @@
-package models
-
-// 仓单服务
-
-import (
-	"mtp2_if/db"
-	"time"
-)
-
-// Wrcategory 现货分类表
-type Wrcategory struct {
-	Categoryid       int32     `json:"categoryid"  xorm:"'CATEGORYID'" binding:"required"` // 类别ID(SEQ_WRCATEGORY)
-	Categoryname     string    `json:"categoryname"  xorm:"'CATEGORYNAME'"`                // 类别名称
-	Parentcategoryid int32     `json:"parentcategoryid"  xorm:"'PARENTCATEGORYID'"`        // 父类别ID
-	Categorydesc     string    `json:"categorydesc"  xorm:"'CATEGORYDESC'"`                // 类别描述
-	Isvalid          int32     `json:"isvalid"  xorm:"'ISVALID'"`                          // 是否有效 - 0:无效 1:有效
-	Iconurl          string    `json:"iconurl"  xorm:"'ICONURL'"`                          // 图标地址
-	Creatorid        int64     `json:"creatorid"  xorm:"'CREATORID'"`                      // 创建人
-	Createtime       time.Time `json:"createtime"  xorm:"'CREATETIME'"`                    // 创建时间
-	Updatorid        int64     `json:"updatorid"  xorm:"'UPDATORID'"`                      // 更新人
-	Updatetime       time.Time `json:"updatetime"  xorm:"'UPDATETIME'"`                    // 更新时间
-	Orderindex       int32     `json:"orderindex"  xorm:"'ORDERINDEX'"`                    // 顺序
-	Areauserid       int64     `json:"areauserid"  xorm:"'AREAUSERID'"`                    // 所属机构
-}
-
-// TableName is WRCATEGORY
-func (Wrcategory) TableName() string {
-	return "WRCATEGORY"
-}
-
-// WRCategoryTree 现货分类
-type WRCategoryTree struct {
-	Categoryid       int32  `json:"categoryid"  xorm:"'CATEGORYID'" binding:"required"` // 类别ID(SEQ_WRCATEGORY)
-	Categoryname     string `json:"categoryname"  xorm:"'CATEGORYNAME'"`                // 类别名称
-	Parentcategoryid int32  `json:"parentcategoryid"  xorm:"'PARENTCATEGORYID'"`        // 父类别ID
-	Categorydesc     string `json:"categorydesc"  xorm:"'CATEGORYDESC'"`                // 类别描述
-	Iconurl          string `json:"iconurl"  xorm:"'ICONURL'"`                          // 图标地址
-	Orderindex       int32  `json:"orderindex"  xorm:"'ORDERINDEX'"`                    // 顺序
-	Areauserid       int64  `json:"areauserid"  xorm:"'AREAUSERID'"`                    // 所属机构
-
-	SubCategory []WRCategoryTree `json:"subcategory" xorm:"-"` // 子分类
-}
-
-// CreateCategoryTree 生成现货分类信息
-func CreateCategoryTree(parentCategoryID int) ([]WRCategoryTree, error) {
-	engine := db.GetEngine()
-
-	wrCategoryTrees := make([]WRCategoryTree, 0)
-	session := engine.Table("WRCATEGORY WR")
-	if parentCategoryID != 0 {
-		session = session.Where("WR.PARENTCATEGORYID = ?", parentCategoryID)
-	} else {
-		session = session.Where("WR.PARENTCATEGORYID is null")
-	}
-	session = session.Asc("WR.ORDERINDEX")
-	if err := session.Find(&wrCategoryTrees); err != nil {
-		return nil, err
-	}
-
-	for i := range wrCategoryTrees {
-		category := &wrCategoryTrees[i]
-
-		// 递归生成子分类
-		subs, err := CreateCategoryTree(int(category.Categoryid))
-		if err != nil {
-			return nil, err
-		}
-		category.SubCategory = subs
-	}
-
-	return wrCategoryTrees, nil
-}

+ 118 - 4
models/wrTrade.go

@@ -7,11 +7,74 @@ import (
 
 // 100.10仓单贸易
 
-// Wrstandard 仓单标准表
+// Deliverygoods 现货品种表
+type Deliverygoods struct {
+	Deliverygoodsid   int32   `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'" binding:"required"`     // 现货品种ID(SEQ_DELIVERYGOODS)
+	Deliverygoodscode string  `json:"deliverygoodscode"  xorm:"'DELIVERYGOODSCODE'" binding:"required"` // 现货品种代码
+	Deliverygoodsname string  `json:"deliverygoodsname"  xorm:"'DELIVERYGOODSNAME'"`                    // 现货品种名称
+	Goodsunitid       int32   `json:"goodsunitid"  xorm:"'GOODSUNITID'"`                                // 现货品种单位ID
+	Deliverygoodstype int32   `json:"deliverygoodstype"  xorm:"'DELIVERYGOODSTYPE'"`                    // 现货品种类型: 1-整装不拆分 2-散装记录明细 3:整装拆分 4:散装不记录明细
+	Standardqty       int64   `json:"standardqty"  xorm:"'STANDARDQTY'"`                                // 标准数量(库位数量) [标准品特有]
+	Standardqtyrange  float64 `json:"standardqtyrange"  xorm:"'STANDARDQTYRANGE'"`                      // 标准数量偏差范围 [标准品特有]
+	Auditflag         int32   `json:"auditflag"  xorm:"'AUDITFLAG'"`                                    // 交割是否需要审核 - 0:不需要 1:需要审核   默认为0
+	Isvalid           int32   `json:"isvalid"  xorm:"'ISVALID'"`                                        // 是否有效 - 0:无效 1:有效
+	Issplit           int32   `json:"issplit"  xorm:"'ISSPLIT'"`                                        // 是否拆分 - 0:不拆分 1:拆分 [整装]   0:不记录明细 1:记录明细 [散货] - 作废整装时不拆分,则标准数量=合约单位;拆分时标准数量为合约单位的整数倍;整装时必须记录明细表数据
+	Agreeunit         int64   `json:"agreeunit"  xorm:"'AGREEUNIT'"`                                    // 合约单位[散货时默认为1, 整装时默认为标准数量]
+	Qtydecimalplace   int32   `json:"qtydecimalplace"  xorm:"'QTYDECIMALPLACE'"`                        // 成交量小数位
+	Categoryid        int32   `json:"categoryid"  xorm:"'CATEGORYID'"`                                  // 类别ID(SEQ_WRCATEGORY)
+	Dgstatus          int32   `json:"dgstatus"  xorm:"'DGSTATUS'"`                                      // 品种状态 - 作废 - 0:未激活 1:正常
+	Areauserid        int64   `json:"areauserid"  xorm:"'AREAUSERID'"`                                  // 所属机构
+	Remark            string  `json:"remark"  xorm:"'REMARK'"`                                          // 备注
+}
+
+// TableName is DELIVERYGOODS
+func (Deliverygoods) TableName() string {
+	return "DELIVERYGOODS"
+}
+
+// Dgfactoryitemtype 品种要素项表
+type Dgfactoryitemtype struct {
+	Dgfactoryitemtypeid int64     `json:"dgfactoryitemtypeid"  xorm:"'DGFACTORYITEMTYPEID'" binding:"required"` // 要素项类型ID(SEQ_DGFACTORYITEMTYPE)1-999:预留为特殊类型	1:仓库 - 选择项                2.品牌 - 选择项>1000(序列自增)	选择项	录入项
+	Deliverygoodsid     int32     `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'" binding:"required"`         // 品种ID
+	Itemtypename        string    `json:"itemtypename"  xorm:"'ITEMTYPENAME'"`                                  // 要素项类型名称
+	Itemtypemode        int32     `json:"itemtypemode"  xorm:"'ITEMTYPEMODE'"`                                  // 要素项类型模式 -1:选择项 2:录入项
+	Orderindex          int32     `json:"orderindex"  xorm:"'ORDERINDEX'"`                                      // 顺序
+	Unitid              int32     `json:"unitid"  xorm:"'UNITID'"`                                              // 单位ID - [录入项]
+	Minivalue           int64     `json:"minivalue"  xorm:"'MINIVALUE'"`                                        // 最小变动值 - [录入项]
+	Minivaluedp         int64     `json:"minivaluedp"  xorm:"'MINIVALUEDP'"`                                    // 最小变动值小数位 - [录入项]
+	Creatorid           int64     `json:"creatorid"  xorm:"'CREATORID'"`                                        // 创建人
+	Createtime          time.Time `json:"createtime"  xorm:"'CREATETIME'"`                                      // 创建时间
+	Updatorid           int64     `json:"updatorid"  xorm:"'UPDATORID'"`                                        // 更新人
+	Updatetime          time.Time `json:"updatetime"  xorm:"'UPDATETIME'"`                                      // 更新时间
+	Isvalid             int32     `json:"isvalid"  xorm:"'ISVALID'"`                                            // 是否有效 - 0:无效 1:有效
+}
+
+// TableName is DGFACTORYITEMTYPE
+func (Dgfactoryitemtype) TableName() string {
+	return "DGFACTORYITEMTYPE"
+}
+
+// Dgfactoryitem 品种选择项定义表
+type Dgfactoryitem struct {
+	Dgfactoryitemid     int64  `json:"dgfactoryitemid"  xorm:"'DGFACTORYITEMID'" binding:"required"` // 选择项ID(SEQ_DGFACTORYITEM)
+	Deliverygoodsid     int32  `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`                    // 品种ID
+	Dgfactoryitemtypeid int64  `json:"dgfactoryitemtypeid"  xorm:"'DGFACTORYITEMTYPEID'"`            // 要素项类型
+	Dgfactoryitemvalue  string `json:"dgfactoryitemvalue"  xorm:"'DGFACTORYITEMVALUE'"`              // 要素项值(类型为仓库时填写仓库名称)
+	Warehouseid         int64  `json:"warehouseid"  xorm:"'WAREHOUSEID'"`                            // 仓库ID(类型为仓库时填写)
+	Isvalid             int32  `json:"isvalid"  xorm:"'ISVALID'"`                                    // 是否有效 - 0:无效 1:有效
+	Orderindex          int32  `json:"orderindex"  xorm:"'ORDERINDEX'"`                              // 顺序
+}
+
+// TableName is DGFACTORYITEM
+func (Dgfactoryitem) TableName() string {
+	return "DGFACTORYITEM"
+}
+
+// Wrstandard 现货品类表
 type Wrstandard struct {
-	Wrstandardid    int64     `json:"wrstandardid"  xorm:"'WRSTANDARDID'" binding:"required"` // 仓单标准ID(SEQ_WRSTANDARD)
-	Wrstandardcode  string    `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`                // 仓单标准代码
-	Wrstandardname  string    `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`                // 仓单标准名称
+	Wrstandardid    int64     `json:"wrstandardid"  xorm:"'WRSTANDARDID'" binding:"required"` // 现货品类ID(SEQ_WRSTANDARD)
+	Wrstandardcode  string    `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`                // 现货品类代码
+	Wrstandardname  string    `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`                // 现货品类名称
 	Deliverygoodsid int32     `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`              // 品种ID
 	Unitid          int32     `json:"unitid"  xorm:"'UNITID'"`                                // 单位ID
 	Minivalue       int64     `json:"minivalue"  xorm:"'MINIVALUE'"`                          // 最小变动值
@@ -25,6 +88,9 @@ type Wrstandard struct {
 	Updatetime      time.Time `json:"updatetime"  xorm:"'UPDATETIME'"`                        // 更新时间
 	Factoryitemjson string    `json:"factoryitemjson"  xorm:"'FACTORYITEMJSON'"`              // 要素项定义Json[{"DGFactoryItemTypeID": ,"ItemTypeMode": ,"FactoryItemIDs": },{.....},]DGFactoryItemTypeID - 要素项类型ID --DGFactoryItem->DGFactoryItemTypeIDItemTypeMode - 要素项类型模式 --DGFactoryItem->ItemTypeModeFactoryItemIDs - 选择项IDs--DGFactoryItem->DGFactoryItemID, 逗号分隔
 	Isvalid         int32     `json:"isvalid"  xorm:"'ISVALID'"`                              // 是否有效 - 0:无效 1:有效
+	Areauserid      int64     `json:"areauserid"  xorm:"'AREAUSERID'"`                        // 所属机构
+	Remark          string    `json:"remark"  xorm:"'REMARK'"`                                // 备注
+	Convertfactor   float64   `json:"convertfactor"  xorm:"'CONVERTFACTOR'"`                  // 标仓系数
 }
 
 // TableName is WRSTANDARD
@@ -32,6 +98,54 @@ func (Wrstandard) TableName() string {
 	return "WRSTANDARD"
 }
 
+// Wrstandardfactoryitem 现货品类要素项定义表
+type Wrstandardfactoryitem struct {
+	Wrstandardid        int64 `json:"wrstandardid"  xorm:"'WRSTANDARDID'" binding:"required"`               // 现货品类ID
+	Dgfactoryitemtypeid int64 `json:"dgfactoryitemtypeid"  xorm:"'DGFACTORYITEMTYPEID'" binding:"required"` // 要素项类型ID
+	Dgfactoryitemid     int64 `json:"dgfactoryitemid"  xorm:"'DGFACTORYITEMID'" binding:"required"`         // 要素项ID - 输入项默认为0,选择项为选择项ID
+}
+
+// TableName is WRSTANDARDFACTORYITEM
+func (Wrstandardfactoryitem) TableName() string {
+	return "WRSTANDARDFACTORYITEM"
+}
+
+// Wrfactortype 仓单要素类型表
+type Wrfactortype struct {
+	Wrfactortypeid   int64  `json:"wrfactortypeid"  xorm:"'WRFACTORTYPEID'" binding:"required"` // 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+	Wrfactortypename string `json:"wrfactortypename"  xorm:"'WRFACTORTYPENAME'"`                // 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+	Deliverygoodsid  int32  `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`                  // 交割商品ID
+	Brandid          int64  `json:"brandid"  xorm:"'BRANDID'"`                                  // 品牌ID(1交割品种升贴水参数表 AutoID) - 作废
+	Qualityid        int64  `json:"qualityid"  xorm:"'QUALITYID'"`                              // 品质ID(1交割品种升贴水参数表 AutoID) - 作废
+	Specid           int64  `json:"specid"  xorm:"'SPECID'"`                                    // 规格ID(1交割品种升贴水参数表 AutoID) - 作废
+	Warehouseid      int64  `json:"warehouseid"  xorm:"'WAREHOUSEID'"`                          // 仓库ID
+	Deliverymonthid  int64  `json:"deliverymonthid"  xorm:"'DELIVERYMONTHID'"`                  // 月份ID(1交割品种升贴水参数表 AutoID) - 作废
+	Wrstandardid     int64  `json:"wrstandardid"  xorm:"'WRSTANDARDID'"`                        // 现货品类ID
+	Wrstandardcode   string `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`                    // 现货品类代码
+	Optioncompare    string `json:"optioncompare"  xorm:"'OPTIONCOMPARE'"`                      // 选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+}
+
+// TableName is WRFACTORTYPE
+func (Wrfactortype) TableName() string {
+	return "WRFACTORTYPE"
+}
+
+// Wrfactortypeitem 仓单要素类型选择项表
+type Wrfactortypeitem struct {
+	Wrfactortypeid      int64     `json:"wrfactortypeid"  xorm:"'WRFACTORTYPEID'" binding:"required"`           // 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+	Dgfactoryitemtypeid int64     `json:"dgfactoryitemtypeid"  xorm:"'DGFACTORYITEMTYPEID'" binding:"required"` // 要素选择项类型ID
+	Dgfactoryitemid     int64     `json:"dgfactoryitemid"  xorm:"'DGFACTORYITEMID'" binding:"required"`         // 选择项ID
+	Creatorid           int64     `json:"creatorid"  xorm:"'CREATORID'"`                                        // 创建人
+	Createtime          time.Time `json:"createtime"  xorm:"'CREATETIME'"`                                      // 创建时间
+	Updatorid           int64     `json:"updatorid"  xorm:"'UPDATORID'"`                                        // 更新人
+	Updatetime          time.Time `json:"updatetime"  xorm:"'UPDATETIME'"`                                      // 更新时间
+}
+
+// TableName is WRFACTORTYPEITEM
+func (Wrfactortypeitem) TableName() string {
+	return "WRFACTORTYPEITEM"
+}
+
 // Warehouseinfo 仓库信息表
 type Warehouseinfo struct {
 	Autoid          int64     `json:"autoid"  xorm:"'AUTOID'" binding:"required"`               // 自增ID

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است