You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.7 KiB
Go

package model
import "reflect"
/*
http://132.151.160.87:10010/wms-zj/monitor/orderQueryListAjax.do
*/
/*
用途:宽带装机工单查询
*/
type GetOrderQueryList struct {
Page string `map:"page"`
Rows string `map:"rows"`
OrgId string `map:"orgId"`
BusiNo string `map:"busiNo"`
BusiType string `map:"busiType"`
QueryFlag string `map:"queryFlag"`
OrdStatus string `map:"ordStatus"`
ParallelFlag string `map:"parallelFlag"`
QueryType string `map:"queryType"`
QueryValue string `map:"queryValue"`
ProdClass string `map:"prodClass"`
DelFlag string `map:"delFlag"`
IsCurrentArchive string `map:"isCurrentArchive"` //非当日报竣=2 当日报竣=1
}
func NewGetOrderQueryList(no string) *GetOrderQueryList {
return &GetOrderQueryList{
Page: "1",
Rows: "10",
OrgId: "330106", //西湖=330106 萧山=330109
BusiNo: no,
BusiType: "1",
QueryFlag: "2",
OrdStatus: "0",
ParallelFlag: "0",
QueryType: "0",
QueryValue: no,
ProdClass: "-1",
DelFlag: "-1",
IsCurrentArchive: "2",
}
}
func (th *GetOrderQueryList) GenReqParam() map[string]string {
return th.structToMap()
}
func (th *GetOrderQueryList) structToMap() map[string]string {
result := make(map[string]string)
t := reflect.TypeOf(*th)
v := reflect.ValueOf(*th)
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
value := v.Field(i)
// Use the tag value as the key in the map, if it exists; otherwise, use the field name.
tag := field.Tag.Get("map")
if tag == "" {
tag = field.Name
}
result[tag] = value.String()
}
return result
}