zhangqian
2024-04-19 cdb38521ea1f662b53bafb87412c38dfd0d5e11d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package constvar
 
type UserType int
 
const (
    UserTypeSuper   UserType = iota + 1 // 超级管理员
    UserTypePrimary                     // 主账户
    UserTypeSub                         // 子账户
)
 
const SystemTypeSrm = 4 //srm账号
 
type CodeStandardType string
 
const (
    CodeStandardType_PurchaseOrder CodeStandardType = "采购单编码"
    CodeStandardType_Supplier      CodeStandardType = "供应商编码"
)
 
type RecordStatus int //状态 0 新建 1 启用 2停用
 
const (
    RecordStatusCreate   RecordStatus = iota // 新建
    RecordStatusActive                       // 启用
    RecordStatusInactive                     // 停用
)
 
type OutsourcingOrderStatus int
 
// 管理端 待生产 领料审核拒绝都显示已分配委外商
const (
    OutsourcingOrderStatusCreate                 OutsourcingOrderStatus = iota // 新建待分配委外商
    OutsourcingOrderStatusAssigned                                             // 已分配委外商
    OutsourcingOrderStatusWaitProduce                                          // 待生产
    OutsourcingOrderStatusMaterialApplying                                     // 物料申请中/待领料审核
    OutsourcingOrderStatusMaterialExamineRefused                               // 领料审核拒绝
    OutsourcingOrderStatusProducing                                            // 生产中
    OutsourcingOrderStatusFinish                                               // 生产完成
    OutsourcingOrderStatusDeliveryFinish                                       // 发货完成
    OutsourcingOrderStatusReceiveFinish                                        // 收货完成
    OutsourcingOrderStatusClose                                                //关闭
)
 
// BoolType 布尔类型
type BoolType int
 
const (
    BoolTypeTrue  BoolType = 1 // true
    BoolTypeFalse BoolType = 2 // false
)
 
// MiniDictType 迷你字典类型
type MiniDictType int
 
const (
    MiniDictTypePlcBrand           MiniDictType = iota + 1 // PLC品牌
    MiniDictTypeBomVersionType                             // Bom版本类型
    EarlyWarningDay                                        //预警天数
    InspectionWayType                                      //质检方式类型
    OutsourcingSupplierType                                //委外供应商类型
    OutsourcingSupplierCreditGrade                         //信用等级
    OutsourcingSupplierRange                               //供货范围
)
 
func (t MiniDictType) Valid() bool {
    if t <= 0 {
        return false
    }
    return true
}