123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- package dto
- import (
- "gas-cylinder-api/app/admin/model"
- "gas-cylinder-api/common/dto"
- common "gas-cylinder-api/common/model"
- )
- type GasCylinderAllotGetPageReq struct {
- dto.Pagination `search:"-"`
- My string `form:"my" search:"-"` // 我的 allot-我调拨的 accept-我签收的
- Status int `form:"status" search:"type:exact;column:status;table:gas_cylinder_allot"` // 1-调拨中 2-已完成 3-已取消 4-超时取消
- GasCylinderAllotOrder
- }
- type GasCylinderAllotOrder struct {
- CreatedAtOrder string `search:"type:order;column:created_at;table:gas_cylinder_allot" form:"createdAtOrder" default:"desc"`
- }
- func (m *GasCylinderAllotGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type GasCylinderAllotInsertReq struct {
- Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码
- OptType string `json:"optType" vd:"len($)>0;msg:'气瓶流转步骤不能为空'"` // 气瓶流转步骤
- AllotUserId int `json:"allotUserId" swaggerignore:"true"` // 调拨者用户id
- AcceptUserId int `json:"acceptUserId" vd:"$>0;msg:'接收者用户id不能为空'"` // 接收者用户id
- AllotCompanyId int `json:"allotCompanyId" swaggerignore:"true"` // 调拨者所属公司id
- AcceptCompanyId int `json:"acceptCompanyId" vd:"$>0;msg:'接收者公司id不能为空'"` // 接收者所属公司id
- InnerCodeList common.StringList `json:"innerCodeList" vd:"len($)>0;msg:'单位内编码不能为空'"` // 单位内编码列表
- GasCylinderStatus string `json:"gasCylinderStatus"` // 气瓶状态
- Status int `json:"status" swaggerignore:"true"` // 调拨状态
- AllotType int `json:"allotType" ` // 调拨类型 1-扫码调拨 2-一键调拨
- common.ControlBy `swaggerignore:"true"`
- common.DeptBy `swaggerignore:"true"`
- }
- func (s *GasCylinderAllotInsertReq) Generate(m *model.GasCylinderAllot) {
- if s.Id != 0 {
- m.Id = s.Id
- }
- m.OptType = s.OptType
- m.AllotUserId = s.CreateBy
- m.AcceptUserId = s.AcceptUserId
- m.AllotCompanyId = s.DeptId
- m.AcceptCompanyId = s.AcceptCompanyId
- m.InnerCodeList = s.InnerCodeList
- m.Status = model.GasCylinderAllotStateAllot
- m.AllotType = s.AllotType
- if s.ControlBy.UpdateBy != 0 {
- m.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- m.CreateBy = s.CreateBy
- }
- if s.DeptBy.DeptId != 0 {
- m.DeptId = s.DeptId
- }
- }
- func (s *GasCylinderAllotInsertReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderAllotUpdateReq struct {
- Id int `json:"id" comment:"编码"` // 编码
- Status string `json:"status" vd:"len($)>0;msg:'钢瓶位置不能为空'"` // 钢瓶规格名称
- Remark string `json:"remark"` // 备注
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *GasCylinderAllotUpdateReq) Generate(model *model.GasCylinderAllot) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- //model.Status = s.Status
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- }
- func (s *GasCylinderAllotUpdateReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderAllotGetReq struct {
- Id int `uri:"id" vd:"$>0;msg:'id不能为空'"`
- }
- func (s *GasCylinderAllotGetReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderAllotGetByOptTypeReq struct {
- OptType string `uri:"optType" vd:"len($)>0;msg:'气瓶流转步骤不能为空'"` // 气瓶流转步骤
- }
- type GasCylinderAllotDeleteReq struct {
- Id int `json:"id" vd:"$>0;msg:'id不能为空'"`
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *GasCylinderAllotDeleteReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderAllotCancelReq struct {
- Id int `json:"id" comment:"编码"` // 编码
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *GasCylinderAllotCancelReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderAllotSubmitReq struct {
- Id int `json:"id" comment:"编码"` // 编码
- OptType string `json:"optType" vd:"len($)>0;msg:'气瓶流转步骤不能为空'"` // 气瓶流转步骤
- AllotUserId int `json:"allotUserId" swaggerignore:"true"` // 调拨者用户id
- AcceptUserId int `json:"acceptUserId" vd:"$>0;msg:'接收者用户id不能为空'"` // 接收者用户id
- AllotCompanyId int `json:"allotCompanyId" swaggerignore:"true"` // 调拨者所属公司id
- AcceptCompanyId int `json:"acceptCompanyId" vd:"$>0;msg:'接收者公司id不能为空'"` // 接收者所属公司id
- InnerCodeList []string `json:"innerCodeList" vd:"len($)>0;msg:'单位内编码不能为空'"` // 单位内编码列表
- common.ControlBy `swaggerignore:"true"`
- common.DeptBy `swaggerignore:"true"`
- }
- func (s *GasCylinderAllotSubmitReq) GetId() interface{} {
- return s.Id
- }
|