liujiandao
2024-04-07 4630cbf64d1d4f33376efaaec7b4fcb90b01bf05
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
syntax = "proto3";
 
option go_package = "./qualityinspect";
 
service QualityInspectService {
  rpc SendPurchaseInspect(SendPurchaseInspectRequest) returns(SendPurchaseInspectResponse) {}
  rpc GetInspectList(GetInspectListRequest) returns(GetInspectListResponse) {}
}
message SendPurchaseInspectRequest {
  repeated QualityInspect list = 1;
}
 
message QualityInspect {
  string id = 1; //检验单id
  InspectType inspect_type = 2; // 检验类型
  string send_inspector_id = 3; // 送检员ID
  MaterialType material_type = 4; // 物料类型(数字)
  string material_name = 5; // 物料名称
  string material_id = 6; // 物料编码
  string material_tp = 7; // 物料型号
  string material_unit = 8; // 物料单位
  string supplier = 9; // 供应商
  string batch_id = 10; // 批号
  string warehouse_name = 11; // 收料仓库
  string warehouse_pos = 12; // 仓位
  double report_amount = 13; // 报检数量
  InspectMethod inspect_method = 14; // 检验方式
  double inspect_amount = 15; // 检验数量
  InspectStatus status = 16; // 状态
  string submit_id = 17; // 提交人ID
  double reject_amount = 18; // 退货数量
  double exchange_amount = 19; // 换货数量
  double repair_amount = 20; // 委外修数量
  int32 inspect_delete = 21; // 质量检验删除 1-未删除 2-已删除
  string purchase_order_id = 22; // 采购单号
 
}
 
enum InspectType
{
  DefaultInspectType = 0;
  InspectTypeIncome    = 1;  // 来料检验
  InspectTypePurchase  = 2;  // 采购质检
  InspectTypeOutsource = 3;  // 委外检验
  InspectTypeReject    = 4;  // 客户退货检验
}
 
enum MaterialType {
  DefaultMaterialType = 0;
  MaterialTypeRaw      =  1; // 原材料
  MaterialTypeSemi     =2;           // 半成品
  MaterialTypeFinished   =3;         // 成品
}
 
enum InspectMethod
{
  DefaultInspectMethod = 0;
  InspectMethodAll  = 1; // 全检
  InspectMethodSpot = 2; //抽检
}
 
 
// InspectStatus 检验状态
enum InspectStatus {
  InspectStatusNull = 0;
  InspectStatusWaitInspect   = 1; // 待检查
  InspectStatusAuditing      = 2; // 审核中
  InspectStatusAuditFinish   = 3; // 审核完成
  InspectStatusInspectFinish = 4; // 检查完成
}
 
 
message SendPurchaseInspectResponse {
  int32   Code  = 1;
  string  Msg   = 2;
}
 
 
message GetInspectListRequest{
  repeated string purchase_order_id = 1;
}
 
message GetInspectListResponse{
  int32   Code  = 1;
  string  Msg   = 2;
  repeated QualityInspect List = 3;
  int64 Total = 4;
}