Pārlūkot izejas kodu

合同添加字段

MAC 5 gadi atpakaļ
vecāks
revīzija
6e11b89bfc

+ 24 - 0
src/dashoo.cn/backend/api/business/oilcontract/contract/contract.go

@@ -44,4 +44,28 @@ type OilContract struct {
 	ModifiedUserId       int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
 	ModifiedBy           string    `json:"ModifiedBy" xorm:"default '1' VARCHAR(50) 'ModifiedBy'"`
 	SubPackage           int       `json:"SubPackage" xorm:"default 0 comment('是否分包') INT(11) 'SubPackage'"`
+	ContractName         string    `json:"ContractName" xorm:"comment('合同名称') VARCHAR(500) 'ContractName'"`
+	ContractSonClass     string    `json:"ContractSonClass" xorm:"comment('合同子类') VARCHAR(500) 'ContractSonClass'"`
+	SmallClass           string    `json:"SmallClass" xorm:"comment('相应小类') VARCHAR(500) 'SmallClass'"`
+	SignedDate           time.Time `json:"SignedDate" xorm:"comment('签订日期') DATETIME 'SignedDate'"`
+	People               string    `json:"People" xorm:"comment('相对人') VARCHAR(500) 'People'"`
+	Number               string    `json:"Number" xorm:"comment('报审序号') VARCHAR(500) 'Number'"`
+	ChooseWay            string    `json:"ChooseWay" xorm:"comment('选商方式') VARCHAR(500) 'ChooseWay'"`
+	ContractMark         string    `json:"ContractMark" xorm:"comment('合同标的') VARCHAR(500) 'ContractMark'"`
+	Currency             string    `json:"Currency" xorm:"comment('币种') VARCHAR(500) 'Currency'"`
+	BudgetAmount         string    `json:"BudgetAmount" xorm:"comment('预算金额') DECIMAL(11,2) 'BudgetAmount'"`
+	PerformAmount        string    `json:"PerformAmount" xorm:"comment('履行金额') DECIMAL(11,2) 'PerformAmount'"`
+	IsInternal           int       `json:"IsInternal" xorm:"default 0 comment('是否内部合同') INT(11) 'IsInternal'"`
+	IsForeign            int       `json:"IsForeign" xorm:"default 0 comment('是否涉外合同') INT(11) 'IsForeign'"`
+	IsDeal               int       `json:"IsDeal" xorm:"default 0 comment('是否关联交易') INT(11) 'IsDeal'"`
+	MoneyFlows           string    `json:"MoneyFlows" xorm:"comment('资金流向') VARCHAR(500) 'MoneyFlows'"`
+	MoneyChannel         string    `json:"MoneyChannel" xorm:"comment('资金渠道') VARCHAR(500) 'MoneyChannel'"`
+	MoneyChannelSon      string    `json:"MoneyChannelSon" xorm:"comment('资金渠道子类') VARCHAR(500) 'MoneyChannelSon'"`
+	MoneyChannelSmall    string    `json:"MoneyChannelSmall" xorm:"comment('资金渠道小类') VARCHAR(500) 'MoneyChannelSmall'"`
+	SingUnit             string    `json:"SingUnit" xorm:"comment('签约单位') VARCHAR(500) 'SingUnit'"`
+	Place                string    `json:"Place" xorm:"comment('履行地点') VARCHAR(500) 'Place'"`
+	DisputeResolution    string    `json:"DisputeResolution" xorm:"comment('纠纷解决方式') VARCHAR(500) 'DisputeResolution'"`
+	SubmitDate           time.Time `json:"SubmitDate" xorm:"comment('提交日期') DATETIME 'SubmitDate'"`
+	SealName             string    `json:"SealName" xorm:"comment('用章名称') VARCHAR(500) 'SealName'"`
+	PoNumber             string    `json:"PoNumber" xorm:"comment('po编码') VARCHAR(500) 'PoNumber'"`
 }

+ 173 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contract.go

@@ -71,6 +71,31 @@ func (this *OilContractController) GetEntityList() {
 	ModifiedOn := this.GetString("ModifiedOn")
 	ModifiedUserId := this.GetString("ModifiedUserId")
 	ModifiedBy := this.GetString("ModifiedBy")
+	ContractName := this.GetString("ContractName")
+	ContractSonClass := this.GetString("ContractSonClass")
+	SmallClass := this.GetString("SmallClass")
+	SignedDate := this.GetString("SignedDate")
+	People := this.GetString("People")
+	Number := this.GetString("Number")
+	ChooseWay := this.GetString("ChooseWay")
+	ContractMark := this.GetString("ContractMark")
+	Currency := this.GetString("Currency")
+	BudgetAmount := this.GetString("BudgetAmount")
+	PerformAmount := this.GetString("PerformAmount")
+	IsInternal := this.GetString("IsInternal")
+	IsForeign := this.GetString("IsForeign")
+	IsDeal := this.GetString("IsDeal")
+	MoneyFlows := this.GetString("MoneyFlows")
+	MoneyChannel := this.GetString("MoneyChannel")
+	MoneyChannelSon := this.GetString("MoneyChannelSon")
+	MoneyChannelSmall := this.GetString("MoneyChannelSmall")
+	SingUnit := this.GetString("SingUnit")
+	Place := this.GetString("Place")
+	DisputeResolution := this.GetString("DisputeResolution")
+	SubmitDate := this.GetString("SubmitDate")
+	SealName := this.GetString("SealName")
+	PoNumber := this.GetString("PoNumber")
+	SubPackage := this.GetString("SubPackage")
 
 	if Id != "" {
 		where = where + " and Id like '%" + Id + "%'"
@@ -217,6 +242,108 @@ func (this *OilContractController) GetEntityList() {
 		}
 	}
 
+	if SubPackage != "" {
+		where = where + " and SubPackage like '%" + SubPackage + "%'"
+	}
+
+	if ContractName != "" {
+		where = where + " and ContractName like '%" + ContractName + "%'"
+	}
+
+	if ContractSonClass != "" {
+		where = where + " and ContractSonClass like '%" + ContractSonClass + "%'"
+	}
+
+	if SmallClass != "" {
+		where = where + " and SmallClass like '%" + SmallClass + "%'"
+	}
+
+	if People != "" {
+		where = where + " and People like '%" + People + "%'"
+	}
+
+	if Number != "" {
+		where = where + " and Number like '%" + Number + "%'"
+	}
+
+	if ChooseWay != "" {
+		where = where + " and ChooseWay like '%" + ChooseWay + "%'"
+	}
+
+	if ContractMark != "" {
+		where = where + " and ContractMark like '%" + ContractMark + "%'"
+	}
+
+	if Currency != "" {
+		where = where + " and Currency like '%" + Currency + "%'"
+	}
+
+	if BudgetAmount != "" {
+		where = where + " and BudgetAmount like '%" + BudgetAmount + "%'"
+	}
+
+	if PerformAmount != "" {
+		where = where + " and PerformAmount like '%" + PerformAmount + "%'"
+	}
+
+	if IsInternal != "" {
+		where = where + " and IsInternal like '%" + IsInternal + "%'"
+	}
+
+	if IsForeign != "" {
+		where = where + " and IsForeign like '%" + IsForeign + "%'"
+	}
+
+	if IsDeal != "" {
+		where = where + " and IsDeal like '%" + IsDeal + "%'"
+	}
+
+	if MoneyFlows != "" {
+		where = where + " and MoneyFlows like '%" + MoneyFlows + "%'"
+	}
+
+	if MoneyChannel != "" {
+		where = where + " and MoneyChannel like '%" + MoneyChannel + "%'"
+	}
+
+	if MoneyChannelSon != "" {
+		where = where + " and MoneyChannelSon like '%" + MoneyChannelSon + "%'"
+	}
+
+	if MoneyChannelSmall != "" {
+		where = where + " and MoneyChannelSmall like '%" + MoneyChannelSmall + "%'"
+	}
+
+	if SingUnit != "" {
+		where = where + " and SingUnit like '%" + SingUnit + "%'"
+	}
+
+	if Place != "" {
+		where = where + " and Place like '%" + Place + "%'"
+	}
+
+	if DisputeResolution != "" {
+		where = where + " and DisputeResolution like '%" + DisputeResolution + "%'"
+	}
+
+	if SubmitDate != "" {
+		where = where + " and SubmitDate like '%" + SubmitDate + "%'"
+	}
+
+	if SealName != "" {
+		where = where + " and SealName like '%" + SealName + "%'"
+	}
+
+	if PoNumber != "" {
+		where = where + " and PoNumber like '%" + PoNumber + "%'"
+	}
+
+	if SignedDate != "" {
+		where = where + " and PoNumber like '%" + SignedDate + "%'"
+	}
+
+
+
 	svc := contract.GetOilContractService(utils.DBE)
 	var list []contract.OilContract
 	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
@@ -436,6 +563,52 @@ func (this *OilContractController) UpdateEntity() {
 		"ModifiedBy",
 
 		"SubPackage",
+
+		"ContractName",
+
+		"ContractSonClass",
+
+		"SmallClass",
+
+		"SignedDate",
+
+		"People",
+
+		"Number",
+
+		"ChooseWay",
+
+		"ContractMark",
+
+		"Currency",
+
+		"BudgetAmount",
+
+		"PerformAmount",
+
+		"IsInternal",
+
+		"IsForeign",
+
+		"IsDeal",
+
+		"MoneyFlows",
+
+		"MoneyChannelSon",
+
+		"MoneyChannelSmall",
+
+		"SingUnit",
+
+		"Place",
+
+		"DisputeResolution",
+
+		"SubmitDate",
+
+		"SealName",
+
+		"PoNumber",
 	}
 	err := svc.UpdateEntityBytbl(OilContractName, id, &model, cols)
 	if err == nil {