unit_conversion_dto.go
1.1 KB
package dto
import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
type UnitConversionDto struct {
// 单位换算ID
UnitConversionId int `json:"unitConversionId,omitempty"`
// 企业id
//CompanyId int `json:"companyId,omitempty"`
// 组织ID
//OrgId int `json:"orgId,omitempty"`
// 工作位置
*domain.WorkStation `json:"workStation,omitempty"`
// material
*domain.Material `json:"material,omitempty"`
// 转换前单位数量
FromUnitQuantity *domain.UnitQuantity `json:"fromUnitQuantity,omitempty"`
// 转换后单位数量
ToUnitQuantity *domain.UnitQuantity `json:"toUnitQuantity,omitempty"`
// 智能称重标识 1:是 2:否
IntelligentWeighingFlag int `json:"intelligentWeighingFlag,omitempty"`
}
func (d *UnitConversionDto) LoadDto(m *domain.UnitConversion) *UnitConversionDto {
d.UnitConversionId = m.UnitConversionId
d.WorkStation = m.WorkStation
d.Material = m.Material
d.FromUnitQuantity = m.FromUnitQuantity
d.ToUnitQuantity = m.ToUnitQuantity
d.IntelligentWeighingFlag = m.IntelligentWeighingFlag
return d
}