1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- package dto
- import (
- "gas-cylinder-api/app/admin/model"
- "gas-cylinder-api/common/dto"
- common "gas-cylinder-api/common/model"
- "time"
- )
- // 入库安全检查
- type InspectRecordGetPageReq struct {
- dto.Pagination `search:"-"`
- State int `form:"state" search:"type:exact;column:state;table:inspect_record"` // 订单状态 状态 0-待整改 1-整改中 2-已整改 -1 合格
- InspectStartTime string `form:"inspectStartTime" search:"type:gte;column:inspect_time;table:inspect_record"` // 检查开始时间
- InspectEndTime string `form:"inspectEndTime" search:"type:lte;column:inspect_time;table:inspect_record"` // 检查结束时间
- CustomerName string `form:"customerName" search:"-"` // 客户名称
- InspectorName string `form:"inspectorName" search:"-"` // 检查人
- InspectRecordOrder
- }
- type InspectRecordOrder struct {
- CreatedAtOrder string `search:"type:order;column:created_at;table:inspect_record" form:"createdAtOrder" default:"desc"`
- }
- func (m *InspectRecordGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type InspectRecordInsertReq struct {
- Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码
- OrderId string `json:"orderId"`
- model.ProvInspectRecord
- common.ControlBy `swaggerignore:"true"`
- common.DeptBy `swaggerignore:"true"`
- }
- func (s *InspectRecordInsertReq) Generate(model *model.InspectRecord) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.OrderId = s.OrderId
- model.ProvInspectRecord = s.ProvInspectRecord
- model.ProvInspectRecord.InspectTime = time.Now().Format("2006-01-02 15:04:05")
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- if s.DeptBy.DeptId != 0 {
- model.DeptId = s.DeptId
- }
- }
- func (s *InspectRecordInsertReq) GetId() interface{} {
- return s.Id
- }
- func (s *InspectRecordInsertReq) UpdateGenerate(model *model.InspectRecord) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.AfterRectifyImg = s.AfterRectifyImg
- model.State = s.State
- model.Remark = s.Remark
- model.InspectExpandList = s.InspectExpandList
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- }
- type InspectRecordGetReq struct {
- Id int `uri:"id"`
- }
- func (s *InspectRecordGetReq) GetId() interface{} {
- return s.Id
- }
- // 入库安全检查
- type InspectRecordGetByOrderReq struct {
- OrderId string `form:"orderId" search:"type:exact;column:order_id;table:inspect_record"` // 检查开始时间
- }
- func (m *InspectRecordGetByOrderReq) GetNeedSearch() interface{} {
- return *m
- }
|