feat:完善项目
This commit is contained in:
@ -200,15 +200,16 @@ func (*Work) Instance(c *gin.Context) {
|
||||
*/
|
||||
func (*Work) Person(c *gin.Context) {
|
||||
form := &struct {
|
||||
MaterialID uint64 `json:"material_id" form:"material_id"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
EquipmentCode string `json:"equipment_code" form:"equipment_code"`
|
||||
EquipmentTitle string `json:"equipment_title" form:"equipment_title"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
PageForm
|
||||
}{}
|
||||
if err := bind(form)(c); err != nil {
|
||||
APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Person(form.MaterialID, form.Kind, form.Page, form.PageSize)
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Person(form.EquipmentCode, form.EquipmentTitle, form.Kind, form.Page, form.PageSize)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
@ -263,15 +264,16 @@ func (*Work) Person(c *gin.Context) {
|
||||
*/
|
||||
func (*Work) Workbench(c *gin.Context) {
|
||||
form := &struct {
|
||||
MaterialID uint64 `json:"material_id" form:"material_id"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
EquipmentCode string `json:"equipment_code" form:"equipment_code"`
|
||||
EquipmentTitle string `json:"equipment_title" form:"equipment_title"`
|
||||
Kind int `json:"kind" form:"kind"`
|
||||
PageForm
|
||||
}{}
|
||||
if err := bind(form)(c); err != nil {
|
||||
APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Workbench(form.MaterialID, form.Kind, form.Page, form.PageSize)
|
||||
data, err := work.NewInstance()(getSession()(c).(*service.Session)).Workbench(form.EquipmentCode, form.EquipmentTitle, form.Kind, form.Page, form.PageSize)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user