tachain-sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +148 -60
- data/lib/tachain-sdk/api/api_declaration_api.rb +155 -84
- data/lib/tachain-sdk/api/api_declaration_upload_api.rb +103 -0
- data/lib/tachain-sdk/api/api_delivery_api.rb +218 -138
- data/lib/tachain-sdk/api/api_enum_api.rb +2 -2
- data/lib/tachain-sdk/api/api_material_api.rb +414 -0
- data/lib/tachain-sdk/api/api_order_api.rb +185 -167
- data/lib/tachain-sdk/api/api_order_workflow_api.rb +227 -24
- data/lib/tachain-sdk/api/api_process_route_api.rb +414 -0
- data/lib/tachain-sdk/api/api_product_api.rb +414 -0
- data/lib/tachain-sdk/api/api_production_api.rb +141 -136
- data/lib/tachain-sdk/api/api_reference_api.rb +192 -0
- data/lib/tachain-sdk/models/{product_bom_grouping_dto.rb → api_bom_line_request.rb} +82 -107
- data/lib/tachain-sdk/models/api_bom_line_response.rb +205 -0
- data/lib/tachain-sdk/models/api_catalog_delete_request.rb +191 -0
- data/lib/tachain-sdk/models/{stage_attachment_api_dto.rb → api_declaration_attachment_response.rb} +16 -108
- data/lib/tachain-sdk/models/api_declaration_delete_request.rb +127 -17
- data/lib/tachain-sdk/models/api_declaration_document_request.rb +5 -27
- data/lib/tachain-sdk/models/api_declaration_file_request.rb +172 -0
- data/lib/tachain-sdk/models/api_declaration_form_request.rb +177 -0
- data/lib/tachain-sdk/models/{order_stage_form_datum_api_dto.rb → api_declaration_form_response.rb} +16 -49
- data/lib/tachain-sdk/models/api_declaration_list_response.rb +185 -0
- data/lib/tachain-sdk/models/api_declaration_submit_request.rb +171 -20
- data/lib/tachain-sdk/models/{api_declaration_submit_result_dto.rb → api_declaration_submit_response.rb} +10 -42
- data/lib/tachain-sdk/models/api_delivery_create_request.rb +292 -0
- data/lib/tachain-sdk/models/{result_brand_report_unlinked_order_detail.rb → api_delivery_delete_request.rb} +84 -60
- data/lib/tachain-sdk/models/api_delivery_detail_create_request.rb +353 -0
- data/lib/tachain-sdk/models/{delivery_note_detail_api_dto.rb → api_delivery_detail_response.rb} +23 -82
- data/lib/tachain-sdk/models/api_delivery_detail_update_request.rb +358 -0
- data/lib/tachain-sdk/models/{delivery_note_api_dto.rb → api_delivery_response.rb} +22 -192
- data/lib/tachain-sdk/models/api_delivery_update_request.rb +287 -0
- data/lib/tachain-sdk/models/{order_stage_form_dto.rb → api_document_form_response.rb} +16 -65
- data/lib/tachain-sdk/models/{document_type_api_dto.rb → api_document_type_response.rb} +30 -125
- data/lib/tachain-sdk/models/api_enum_value_response.rb +193 -0
- data/lib/tachain-sdk/models/{api_response_string.rb → api_error_response.rb} +22 -34
- data/lib/tachain-sdk/models/api_fiber_composition_request.rb +193 -0
- data/lib/tachain-sdk/models/api_fiber_composition_response.rb +160 -0
- data/lib/tachain-sdk/models/{attachment_in_api_dto.rb → api_file_response.rb} +23 -115
- data/lib/tachain-sdk/models/api_file_upload_response.rb +150 -0
- data/lib/tachain-sdk/models/api_mapping_response.rb +182 -0
- data/lib/tachain-sdk/models/api_material_create_request.rb +556 -0
- data/lib/tachain-sdk/models/api_material_response.rb +349 -0
- data/lib/tachain-sdk/models/api_material_update_request.rb +582 -0
- data/lib/tachain-sdk/models/{result_mapping_order_select.rb → api_order_accept_request.rb} +105 -70
- data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +106 -29
- data/lib/tachain-sdk/models/api_order_create_request.rb +379 -0
- data/lib/tachain-sdk/models/api_order_declaration_verification_request.rb +293 -0
- data/lib/tachain-sdk/models/api_order_declaration_verification_response.rb +203 -0
- data/lib/tachain-sdk/models/api_order_delete_line_request.rb +315 -0
- data/lib/tachain-sdk/models/api_order_delete_request.rb +315 -0
- data/lib/tachain-sdk/models/api_order_line_create_request.rb +445 -0
- data/lib/tachain-sdk/models/{order_line_api_dto.rb → api_order_line_response.rb} +39 -330
- data/lib/tachain-sdk/models/api_order_line_update_request.rb +416 -0
- data/lib/tachain-sdk/models/api_order_receipt_pending_line_response.rb +171 -0
- data/lib/tachain-sdk/models/{microsoft_asp_net_core_mvc_problem_details.rb → api_order_receipt_pending_response.rb} +28 -45
- data/lib/tachain-sdk/models/api_order_receipt_result.rb +185 -0
- data/lib/tachain-sdk/models/{order_api_dto.rb → api_order_response.rb} +35 -291
- data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +102 -42
- data/lib/tachain-sdk/models/api_order_submit_audit_response.rb +196 -0
- data/lib/tachain-sdk/models/api_order_update_request.rb +408 -0
- data/lib/tachain-sdk/models/api_page_result1_api_delivery_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_material_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_order_response.rb +220 -0
- data/lib/tachain-sdk/models/api_page_result1_api_process_route_response.rb +220 -0
- data/lib/tachain-sdk/models/{api_response_api_declaration_list_dto.rb → api_page_result1_api_product_response.rb} +48 -27
- data/lib/tachain-sdk/models/api_page_result1_api_production_response.rb +220 -0
- data/lib/tachain-sdk/models/{result_api_enum.rb → api_process_route_create_request.rb} +88 -62
- data/lib/tachain-sdk/models/api_process_route_response.rb +237 -0
- data/lib/tachain-sdk/models/{paged_response_delivery_note_api_dto.rb → api_process_route_update_request.rb} +102 -91
- data/lib/tachain-sdk/models/api_process_step_request.rb +201 -0
- data/lib/tachain-sdk/models/api_process_step_response.rb +171 -0
- data/lib/tachain-sdk/models/api_product_create_request.rb +595 -0
- data/lib/tachain-sdk/models/api_product_response.rb +373 -0
- data/lib/tachain-sdk/models/api_product_update_request.rb +621 -0
- data/lib/tachain-sdk/models/api_production_create_request.rb +381 -0
- data/lib/tachain-sdk/models/{api_integration_delete_request.rb → api_production_delete_request.rb} +22 -11
- data/lib/tachain-sdk/models/api_production_raw_material_create_request.rb +320 -0
- data/lib/tachain-sdk/models/{production_raw_material_api_dto.rb → api_production_raw_material_response.rb} +18 -118
- data/lib/tachain-sdk/models/api_production_raw_material_update_request.rb +325 -0
- data/lib/tachain-sdk/models/{production_api_dto.rb → api_production_response.rb} +23 -156
- data/lib/tachain-sdk/models/api_production_sales_order_create_request.rb +309 -0
- data/lib/tachain-sdk/models/{production_sales_order_api_dto.rb → api_production_sales_order_response.rb} +17 -94
- data/lib/tachain-sdk/models/api_production_sales_order_update_request.rb +314 -0
- data/lib/tachain-sdk/models/api_production_update_request.rb +392 -0
- data/lib/tachain-sdk/models/api_receipt_pending_item_response.rb +207 -0
- data/lib/tachain-sdk/models/api_reference_page_response1_api_enum_value_response.rb +162 -0
- data/lib/tachain-sdk/models/api_reference_page_response1_api_mapping_response.rb +162 -0
- data/lib/tachain-sdk/models/{api_response_production_api_dto.rb → api_result1_api_declaration_list_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_declaration_submit_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_delivery_note_api_dto.rb → api_result1_api_delivery_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_file_upload_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_material_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_declaration_verification_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_api_declaration_submit_result_dto.rb → api_result1_api_order_receipt_pending_response.rb} +20 -33
- data/lib/tachain-sdk/models/api_result1_api_order_receipt_result.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_order_submit_audit_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_process_route_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_product_response.rb +186 -0
- data/lib/tachain-sdk/models/api_result1_api_production_response.rb +186 -0
- data/lib/tachain-sdk/models/{api_response_order_api_dto.rb → api_result1_string.rb} +22 -33
- data/lib/tachain-sdk/models/{attachment_in_api_create_dto.rb → api_verification_file_response.rb} +106 -84
- data/lib/tachain-sdk/models/api_verification_response.rb +218 -0
- data/lib/tachain-sdk/models/delete_v1_declaration_delete200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_declaration_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_declaration_required_documents200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_delivery_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +73 -171
- data/lib/tachain-sdk/models/get_v1_material_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_order_po_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_order_receipt_pending200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_process_route_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_product_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_production_list_paging200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_reference_enum_values200_response.rb +103 -0
- data/lib/tachain-sdk/models/get_v1_reference_mappings200_response.rb +103 -0
- data/lib/tachain-sdk/models/model1.rb +47 -14
- data/lib/tachain-sdk/models/model2.rb +190 -0
- data/lib/tachain-sdk/models/model3.rb +17 -33
- data/lib/tachain-sdk/models/model4.rb +17 -33
- data/lib/tachain-sdk/models/post_v1_declaration_submit200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_declaration_upload_file200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_material_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_declaration_verification200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_order_submit_audit200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_process_route_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_product_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/post_v1_production_create200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_delivery_confirm_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_delivery_return_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/models/put_v1_order_confirm_receipt200_response.rb +103 -0
- data/lib/tachain-sdk/version.rb +1 -1
- data/lib/tachain-sdk.rb +116 -51
- metadata +118 -53
- data/lib/tachain-sdk/models/api_declaration_list_dto.rb +0 -251
- data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +0 -334
- data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +0 -880
- data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +0 -749
- data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +0 -513
- data/lib/tachain-sdk/models/company.rb +0 -780
- data/lib/tachain-sdk/models/company_compliance_profile.rb +0 -547
- data/lib/tachain-sdk/models/company_utility_declaration.rb +0 -592
- data/lib/tachain-sdk/models/customer.rb +0 -569
- data/lib/tachain-sdk/models/factory.rb +0 -545
- data/lib/tachain-sdk/models/order.rb +0 -974
- data/lib/tachain-sdk/models/order_line.rb +0 -1184
- data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +0 -270
- data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +0 -296
- data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +0 -296
- data/lib/tachain-sdk/models/production_raw_material_dto.rb +0 -548
- data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +0 -331
- data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +0 -418
- data/lib/tachain-sdk/models/result_order_trace_report.rb +0 -721
- data/lib/tachain-sdk/models/supplier.rb +0 -585
- data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +0 -383
- data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +0 -456
- data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +0 -227
- data/lib/tachain-sdk/models/trader.rb +0 -506
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Tactic Chain Public API
|
|
3
|
+
|
|
4
|
+
#Public integration endpoints. Set your own base URL and credential before calling.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TachainSdk
|
|
17
|
+
# 新增专用集成请求;只接收本操作使用的业务字段。
|
|
18
|
+
class ApiProductionRawMaterialCreateRequest < ApiModelBase
|
|
19
|
+
# 采购订单明细ID
|
|
20
|
+
attr_accessor :purchase_order_detail_id
|
|
21
|
+
|
|
22
|
+
# 领料数量;计量单位自动使用所选采购订单行的采购单位。
|
|
23
|
+
attr_accessor :quantity_used
|
|
24
|
+
|
|
25
|
+
# 生产损耗率(%);完整保存时请明确填写,无损耗填 0,审核前校验不可为空。 条件:生产审核前必填;无损耗填 0。更新按完整明细保存,省略会写为空。
|
|
26
|
+
attr_accessor :loss
|
|
27
|
+
|
|
28
|
+
# 订单编号
|
|
29
|
+
attr_accessor :order_number
|
|
30
|
+
|
|
31
|
+
# 采购订单日期。外部生产接口按订单号+日期+行号解析采购订单明细时使用。
|
|
32
|
+
attr_accessor :order_date
|
|
33
|
+
|
|
34
|
+
# 订单行号
|
|
35
|
+
attr_accessor :line_number
|
|
36
|
+
|
|
37
|
+
# 查询返回的客户公司 ID,可选。优先使用 CustomerName 或 CustomerCode。
|
|
38
|
+
attr_accessor :customer_id
|
|
39
|
+
|
|
40
|
+
# 客户英文名、当地语言名称或简称,精确匹配当前公司的有效客户关系。
|
|
41
|
+
attr_accessor :customer_name
|
|
42
|
+
|
|
43
|
+
# 当前公司维护的客户编码或启用的 Customer/Company 外部映射值。 条件:外部流水号或单号重复时用于消歧;多个客户字段必须一致。
|
|
44
|
+
attr_accessor :customer_code
|
|
45
|
+
|
|
46
|
+
# 查询返回的供应商公司 ID,可选。优先使用 SupplierName 或 SupplierCode。
|
|
47
|
+
attr_accessor :supplier_id
|
|
48
|
+
|
|
49
|
+
# 供应商英文名、当地语言名称或简称,精确匹配当前公司的有效供应商关系。
|
|
50
|
+
attr_accessor :supplier_name
|
|
51
|
+
|
|
52
|
+
# 当前公司维护的供应商编码或启用的 Supplier/Company 外部映射值。 条件:外部流水号或单号重复时用于消歧;多个供应商字段必须一致。
|
|
53
|
+
attr_accessor :supplier_code
|
|
54
|
+
|
|
55
|
+
# 买方外部系统的订单明细流水号;重复时补充交易对方和订单条件。
|
|
56
|
+
attr_accessor :customer_ext_no
|
|
57
|
+
|
|
58
|
+
# 卖方外部系统的订单明细流水号;重复时补充交易对方和订单条件。
|
|
59
|
+
attr_accessor :supplier_ext_no
|
|
60
|
+
|
|
61
|
+
# 查询返回的系统订单明细唯一流水号。
|
|
62
|
+
attr_accessor :unique_no
|
|
63
|
+
|
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
+
def self.attribute_map
|
|
66
|
+
{
|
|
67
|
+
:'purchase_order_detail_id' => :'purchaseOrderDetailId',
|
|
68
|
+
:'quantity_used' => :'quantityUsed',
|
|
69
|
+
:'loss' => :'loss',
|
|
70
|
+
:'order_number' => :'orderNumber',
|
|
71
|
+
:'order_date' => :'orderDate',
|
|
72
|
+
:'line_number' => :'lineNumber',
|
|
73
|
+
:'customer_id' => :'customerId',
|
|
74
|
+
:'customer_name' => :'customerName',
|
|
75
|
+
:'customer_code' => :'customerCode',
|
|
76
|
+
:'supplier_id' => :'supplierId',
|
|
77
|
+
:'supplier_name' => :'supplierName',
|
|
78
|
+
:'supplier_code' => :'supplierCode',
|
|
79
|
+
:'customer_ext_no' => :'customerExtNo',
|
|
80
|
+
:'supplier_ext_no' => :'supplierExtNo',
|
|
81
|
+
:'unique_no' => :'uniqueNo'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Returns attribute mapping this model knows about
|
|
86
|
+
def self.acceptable_attribute_map
|
|
87
|
+
attribute_map
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Returns all the JSON keys this model knows about
|
|
91
|
+
def self.acceptable_attributes
|
|
92
|
+
acceptable_attribute_map.values
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Attribute type mapping.
|
|
96
|
+
def self.openapi_types
|
|
97
|
+
{
|
|
98
|
+
:'purchase_order_detail_id' => :'String',
|
|
99
|
+
:'quantity_used' => :'Float',
|
|
100
|
+
:'loss' => :'Float',
|
|
101
|
+
:'order_number' => :'String',
|
|
102
|
+
:'order_date' => :'Time',
|
|
103
|
+
:'line_number' => :'String',
|
|
104
|
+
:'customer_id' => :'String',
|
|
105
|
+
:'customer_name' => :'String',
|
|
106
|
+
:'customer_code' => :'String',
|
|
107
|
+
:'supplier_id' => :'String',
|
|
108
|
+
:'supplier_name' => :'String',
|
|
109
|
+
:'supplier_code' => :'String',
|
|
110
|
+
:'customer_ext_no' => :'String',
|
|
111
|
+
:'supplier_ext_no' => :'String',
|
|
112
|
+
:'unique_no' => :'String'
|
|
113
|
+
}
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# List of attributes with nullable: true
|
|
117
|
+
def self.openapi_nullable
|
|
118
|
+
Set.new([
|
|
119
|
+
:'purchase_order_detail_id',
|
|
120
|
+
:'loss',
|
|
121
|
+
:'order_number',
|
|
122
|
+
:'order_date',
|
|
123
|
+
:'line_number',
|
|
124
|
+
:'customer_id',
|
|
125
|
+
:'customer_name',
|
|
126
|
+
:'customer_code',
|
|
127
|
+
:'supplier_id',
|
|
128
|
+
:'supplier_name',
|
|
129
|
+
:'supplier_code',
|
|
130
|
+
:'customer_ext_no',
|
|
131
|
+
:'supplier_ext_no',
|
|
132
|
+
:'unique_no'
|
|
133
|
+
])
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Initializes the object
|
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
+
def initialize(attributes = {})
|
|
139
|
+
if (!attributes.is_a?(Hash))
|
|
140
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiProductionRawMaterialCreateRequest` initialize method"
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
144
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
145
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
146
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
147
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiProductionRawMaterialCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
148
|
+
end
|
|
149
|
+
h[k.to_sym] = v
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'purchase_order_detail_id')
|
|
153
|
+
self.purchase_order_detail_id = attributes[:'purchase_order_detail_id']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'quantity_used')
|
|
157
|
+
self.quantity_used = attributes[:'quantity_used']
|
|
158
|
+
else
|
|
159
|
+
self.quantity_used = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'loss')
|
|
163
|
+
self.loss = attributes[:'loss']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'order_number')
|
|
167
|
+
self.order_number = attributes[:'order_number']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'order_date')
|
|
171
|
+
self.order_date = attributes[:'order_date']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'line_number')
|
|
175
|
+
self.line_number = attributes[:'line_number']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'customer_id')
|
|
179
|
+
self.customer_id = attributes[:'customer_id']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'customer_name')
|
|
183
|
+
self.customer_name = attributes[:'customer_name']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'customer_code')
|
|
187
|
+
self.customer_code = attributes[:'customer_code']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'supplier_id')
|
|
191
|
+
self.supplier_id = attributes[:'supplier_id']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'supplier_name')
|
|
195
|
+
self.supplier_name = attributes[:'supplier_name']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'supplier_code')
|
|
199
|
+
self.supplier_code = attributes[:'supplier_code']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'customer_ext_no')
|
|
203
|
+
self.customer_ext_no = attributes[:'customer_ext_no']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'supplier_ext_no')
|
|
207
|
+
self.supplier_ext_no = attributes[:'supplier_ext_no']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'unique_no')
|
|
211
|
+
self.unique_no = attributes[:'unique_no']
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
216
|
+
# @return Array for valid properties with the reasons
|
|
217
|
+
def list_invalid_properties
|
|
218
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
219
|
+
invalid_properties = Array.new
|
|
220
|
+
if @quantity_used.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "quantity_used", quantity_used cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
invalid_properties
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Check to see if the all the properties in the model are valid
|
|
228
|
+
# @return true if the model is valid
|
|
229
|
+
def valid?
|
|
230
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
231
|
+
return false if @quantity_used.nil?
|
|
232
|
+
true
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Custom attribute writer method with validation
|
|
236
|
+
# @param [Object] quantity_used Value to be assigned
|
|
237
|
+
def quantity_used=(quantity_used)
|
|
238
|
+
if quantity_used.nil?
|
|
239
|
+
fail ArgumentError, 'quantity_used cannot be nil'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@quantity_used = quantity_used
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Checks equality by comparing each attribute.
|
|
246
|
+
# @param [Object] Object to be compared
|
|
247
|
+
def ==(o)
|
|
248
|
+
return true if self.equal?(o)
|
|
249
|
+
self.class == o.class &&
|
|
250
|
+
purchase_order_detail_id == o.purchase_order_detail_id &&
|
|
251
|
+
quantity_used == o.quantity_used &&
|
|
252
|
+
loss == o.loss &&
|
|
253
|
+
order_number == o.order_number &&
|
|
254
|
+
order_date == o.order_date &&
|
|
255
|
+
line_number == o.line_number &&
|
|
256
|
+
customer_id == o.customer_id &&
|
|
257
|
+
customer_name == o.customer_name &&
|
|
258
|
+
customer_code == o.customer_code &&
|
|
259
|
+
supplier_id == o.supplier_id &&
|
|
260
|
+
supplier_name == o.supplier_name &&
|
|
261
|
+
supplier_code == o.supplier_code &&
|
|
262
|
+
customer_ext_no == o.customer_ext_no &&
|
|
263
|
+
supplier_ext_no == o.supplier_ext_no &&
|
|
264
|
+
unique_no == o.unique_no
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# @see the `==` method
|
|
268
|
+
# @param [Object] Object to be compared
|
|
269
|
+
def eql?(o)
|
|
270
|
+
self == o
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Calculates hash code according to all attributes.
|
|
274
|
+
# @return [Integer] Hash code
|
|
275
|
+
def hash
|
|
276
|
+
[purchase_order_detail_id, quantity_used, loss, order_number, order_date, line_number, customer_id, customer_name, customer_code, supplier_id, supplier_name, supplier_code, customer_ext_no, supplier_ext_no, unique_no].hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Builds the object from hash
|
|
280
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
281
|
+
# @return [Object] Returns the model itself
|
|
282
|
+
def self.build_from_hash(attributes)
|
|
283
|
+
return nil unless attributes.is_a?(Hash)
|
|
284
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
285
|
+
transformed_hash = {}
|
|
286
|
+
openapi_types.each_pair do |key, type|
|
|
287
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
288
|
+
transformed_hash["#{key}"] = nil
|
|
289
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
290
|
+
# check to ensure the input is an array given that the attribute
|
|
291
|
+
# is documented as an array but the input is not
|
|
292
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
293
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
294
|
+
end
|
|
295
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
296
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
new(transformed_hash)
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Returns the object in the form of hash
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_hash
|
|
305
|
+
hash = {}
|
|
306
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
307
|
+
value = self.send(attr)
|
|
308
|
+
if value.nil?
|
|
309
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
310
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
hash[param] = _to_hash(value)
|
|
314
|
+
end
|
|
315
|
+
hash
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
@@ -14,9 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TachainSdk
|
|
17
|
-
#
|
|
18
|
-
class
|
|
19
|
-
#
|
|
17
|
+
# 集成接口专用 ApiProductionRawMaterialResponse;只读业务返回字段,不参与写入模型。
|
|
18
|
+
class ApiProductionRawMaterialResponse < ApiModelBase
|
|
19
|
+
# 生产领料关联记录 ID;与 purchaseOrderDetailId 采购订单明细 ID 不同。
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
22
22
|
# 生产批次ID
|
|
@@ -25,39 +25,21 @@ module TachainSdk
|
|
|
25
25
|
# 采购订单明细ID
|
|
26
26
|
attr_accessor :purchase_order_detail_id
|
|
27
27
|
|
|
28
|
-
#
|
|
28
|
+
# 所选采购订单行的原料名称。
|
|
29
29
|
attr_accessor :material_name
|
|
30
30
|
|
|
31
|
-
#
|
|
31
|
+
# 本次领料数量,按所选采购订单行的采购单位计量。
|
|
32
32
|
attr_accessor :quantity_used
|
|
33
33
|
|
|
34
|
-
#
|
|
34
|
+
# 领料数量 quantityUsed 的单位,自动取自所选采购订单行的 unit,不接收调用方写入。
|
|
35
35
|
attr_accessor :unit
|
|
36
36
|
|
|
37
|
-
# 租户ID
|
|
38
|
-
attr_accessor :tenant_id
|
|
39
|
-
|
|
40
|
-
# 环境类型:0正式,1测试
|
|
41
|
-
attr_accessor :environment_type
|
|
42
|
-
|
|
43
|
-
# 创建用户ID
|
|
44
|
-
attr_accessor :created_by
|
|
45
|
-
|
|
46
37
|
# 创建时间
|
|
47
38
|
attr_accessor :created_at
|
|
48
39
|
|
|
49
|
-
#
|
|
50
|
-
attr_accessor :company_id
|
|
51
|
-
|
|
52
|
-
# 成品入库单ID,(MTS Only)
|
|
53
|
-
attr_accessor :receipt_id
|
|
54
|
-
|
|
55
|
-
# -9 禁用, -1 删除, 0 正常
|
|
40
|
+
# 记录状态:0 正常,-1 已删除,-9 禁用。
|
|
56
41
|
attr_accessor :status
|
|
57
42
|
|
|
58
|
-
# 修改用户ID
|
|
59
|
-
attr_accessor :updated_by
|
|
60
|
-
|
|
61
43
|
# 更新时间
|
|
62
44
|
attr_accessor :updated_at
|
|
63
45
|
|
|
@@ -67,10 +49,10 @@ module TachainSdk
|
|
|
67
49
|
# 订单可用量
|
|
68
50
|
attr_accessor :available_quantity
|
|
69
51
|
|
|
70
|
-
#
|
|
52
|
+
# 计量单位名称。
|
|
71
53
|
attr_accessor :u_name
|
|
72
54
|
|
|
73
|
-
#
|
|
55
|
+
# 订单号。
|
|
74
56
|
attr_accessor :order_number
|
|
75
57
|
|
|
76
58
|
# 采购订单日期。外部生产接口按订单号+日期+行号解析采购订单明细时使用。
|
|
@@ -82,30 +64,22 @@ module TachainSdk
|
|
|
82
64
|
# 订单唯一标识
|
|
83
65
|
attr_accessor :unique_no
|
|
84
66
|
|
|
85
|
-
#
|
|
67
|
+
# 所选采购订单行的原料编码。
|
|
86
68
|
attr_accessor :material_code
|
|
87
69
|
|
|
88
|
-
#
|
|
70
|
+
# 关联采购订单明细的加工阶段编码。
|
|
89
71
|
attr_accessor :scope_code
|
|
90
72
|
|
|
91
|
-
#
|
|
92
|
-
attr_accessor :single_component
|
|
93
|
-
|
|
94
|
-
# BOM 分组父级 ID,按 BOM 分组展开领料明细时用于保留层级关系。
|
|
95
|
-
attr_accessor :parent_id
|
|
96
|
-
|
|
97
|
-
# 供应商名称
|
|
73
|
+
# 供应商名称。
|
|
98
74
|
attr_accessor :supplier_name
|
|
99
75
|
|
|
100
|
-
#
|
|
101
|
-
attr_accessor :attachments
|
|
102
|
-
|
|
103
|
-
# 采购单订单数量
|
|
76
|
+
# 所选采购订单行的采购数量,来源为订单行 quantity。
|
|
104
77
|
attr_accessor :quantity
|
|
105
78
|
|
|
106
|
-
#
|
|
79
|
+
# 所选采购订单行的采购单位,来源为订单行 unit。
|
|
107
80
|
attr_accessor :po_unit
|
|
108
81
|
|
|
82
|
+
# 是否转运:0 否,1 是。
|
|
109
83
|
attr_accessor :is_transfer
|
|
110
84
|
|
|
111
85
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -117,14 +91,8 @@ module TachainSdk
|
|
|
117
91
|
:'material_name' => :'materialName',
|
|
118
92
|
:'quantity_used' => :'quantityUsed',
|
|
119
93
|
:'unit' => :'unit',
|
|
120
|
-
:'tenant_id' => :'tenantId',
|
|
121
|
-
:'environment_type' => :'environmentType',
|
|
122
|
-
:'created_by' => :'createdBy',
|
|
123
94
|
:'created_at' => :'createdAt',
|
|
124
|
-
:'company_id' => :'companyId',
|
|
125
|
-
:'receipt_id' => :'receiptId',
|
|
126
95
|
:'status' => :'status',
|
|
127
|
-
:'updated_by' => :'updatedBy',
|
|
128
96
|
:'updated_at' => :'updatedAt',
|
|
129
97
|
:'loss' => :'loss',
|
|
130
98
|
:'available_quantity' => :'availableQuantity',
|
|
@@ -135,10 +103,7 @@ module TachainSdk
|
|
|
135
103
|
:'unique_no' => :'uniqueNo',
|
|
136
104
|
:'material_code' => :'materialCode',
|
|
137
105
|
:'scope_code' => :'scopeCode',
|
|
138
|
-
:'single_component' => :'singleComponent',
|
|
139
|
-
:'parent_id' => :'parentId',
|
|
140
106
|
:'supplier_name' => :'supplierName',
|
|
141
|
-
:'attachments' => :'attachments',
|
|
142
107
|
:'quantity' => :'quantity',
|
|
143
108
|
:'po_unit' => :'poUnit',
|
|
144
109
|
:'is_transfer' => :'isTransfer'
|
|
@@ -164,14 +129,8 @@ module TachainSdk
|
|
|
164
129
|
:'material_name' => :'String',
|
|
165
130
|
:'quantity_used' => :'Float',
|
|
166
131
|
:'unit' => :'String',
|
|
167
|
-
:'tenant_id' => :'String',
|
|
168
|
-
:'environment_type' => :'Integer',
|
|
169
|
-
:'created_by' => :'String',
|
|
170
132
|
:'created_at' => :'Time',
|
|
171
|
-
:'company_id' => :'String',
|
|
172
|
-
:'receipt_id' => :'Integer',
|
|
173
133
|
:'status' => :'Integer',
|
|
174
|
-
:'updated_by' => :'String',
|
|
175
134
|
:'updated_at' => :'Time',
|
|
176
135
|
:'loss' => :'Float',
|
|
177
136
|
:'available_quantity' => :'Float',
|
|
@@ -182,10 +141,7 @@ module TachainSdk
|
|
|
182
141
|
:'unique_no' => :'String',
|
|
183
142
|
:'material_code' => :'String',
|
|
184
143
|
:'scope_code' => :'String',
|
|
185
|
-
:'single_component' => :'String',
|
|
186
|
-
:'parent_id' => :'String',
|
|
187
144
|
:'supplier_name' => :'String',
|
|
188
|
-
:'attachments' => :'Array<Object>',
|
|
189
145
|
:'quantity' => :'Float',
|
|
190
146
|
:'po_unit' => :'String',
|
|
191
147
|
:'is_transfer' => :'Integer'
|
|
@@ -201,14 +157,8 @@ module TachainSdk
|
|
|
201
157
|
:'material_name',
|
|
202
158
|
:'quantity_used',
|
|
203
159
|
:'unit',
|
|
204
|
-
:'tenant_id',
|
|
205
|
-
:'environment_type',
|
|
206
|
-
:'created_by',
|
|
207
160
|
:'created_at',
|
|
208
|
-
:'company_id',
|
|
209
|
-
:'receipt_id',
|
|
210
161
|
:'status',
|
|
211
|
-
:'updated_by',
|
|
212
162
|
:'updated_at',
|
|
213
163
|
:'loss',
|
|
214
164
|
:'available_quantity',
|
|
@@ -219,10 +169,7 @@ module TachainSdk
|
|
|
219
169
|
:'unique_no',
|
|
220
170
|
:'material_code',
|
|
221
171
|
:'scope_code',
|
|
222
|
-
:'single_component',
|
|
223
|
-
:'parent_id',
|
|
224
172
|
:'supplier_name',
|
|
225
|
-
:'attachments',
|
|
226
173
|
:'quantity',
|
|
227
174
|
:'po_unit',
|
|
228
175
|
:'is_transfer'
|
|
@@ -233,14 +180,14 @@ module TachainSdk
|
|
|
233
180
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
234
181
|
def initialize(attributes = {})
|
|
235
182
|
if (!attributes.is_a?(Hash))
|
|
236
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::
|
|
183
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TachainSdk::ApiProductionRawMaterialResponse` initialize method"
|
|
237
184
|
end
|
|
238
185
|
|
|
239
186
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
240
187
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
241
188
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
242
189
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
243
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::
|
|
190
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TachainSdk::ApiProductionRawMaterialResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
244
191
|
end
|
|
245
192
|
h[k.to_sym] = v
|
|
246
193
|
}
|
|
@@ -269,38 +216,14 @@ module TachainSdk
|
|
|
269
216
|
self.unit = attributes[:'unit']
|
|
270
217
|
end
|
|
271
218
|
|
|
272
|
-
if attributes.key?(:'tenant_id')
|
|
273
|
-
self.tenant_id = attributes[:'tenant_id']
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
if attributes.key?(:'environment_type')
|
|
277
|
-
self.environment_type = attributes[:'environment_type']
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
if attributes.key?(:'created_by')
|
|
281
|
-
self.created_by = attributes[:'created_by']
|
|
282
|
-
end
|
|
283
|
-
|
|
284
219
|
if attributes.key?(:'created_at')
|
|
285
220
|
self.created_at = attributes[:'created_at']
|
|
286
221
|
end
|
|
287
222
|
|
|
288
|
-
if attributes.key?(:'company_id')
|
|
289
|
-
self.company_id = attributes[:'company_id']
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
if attributes.key?(:'receipt_id')
|
|
293
|
-
self.receipt_id = attributes[:'receipt_id']
|
|
294
|
-
end
|
|
295
|
-
|
|
296
223
|
if attributes.key?(:'status')
|
|
297
224
|
self.status = attributes[:'status']
|
|
298
225
|
end
|
|
299
226
|
|
|
300
|
-
if attributes.key?(:'updated_by')
|
|
301
|
-
self.updated_by = attributes[:'updated_by']
|
|
302
|
-
end
|
|
303
|
-
|
|
304
227
|
if attributes.key?(:'updated_at')
|
|
305
228
|
self.updated_at = attributes[:'updated_at']
|
|
306
229
|
end
|
|
@@ -341,24 +264,10 @@ module TachainSdk
|
|
|
341
264
|
self.scope_code = attributes[:'scope_code']
|
|
342
265
|
end
|
|
343
266
|
|
|
344
|
-
if attributes.key?(:'single_component')
|
|
345
|
-
self.single_component = attributes[:'single_component']
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
if attributes.key?(:'parent_id')
|
|
349
|
-
self.parent_id = attributes[:'parent_id']
|
|
350
|
-
end
|
|
351
|
-
|
|
352
267
|
if attributes.key?(:'supplier_name')
|
|
353
268
|
self.supplier_name = attributes[:'supplier_name']
|
|
354
269
|
end
|
|
355
270
|
|
|
356
|
-
if attributes.key?(:'attachments')
|
|
357
|
-
if (value = attributes[:'attachments']).is_a?(Array)
|
|
358
|
-
self.attachments = value
|
|
359
|
-
end
|
|
360
|
-
end
|
|
361
|
-
|
|
362
271
|
if attributes.key?(:'quantity')
|
|
363
272
|
self.quantity = attributes[:'quantity']
|
|
364
273
|
end
|
|
@@ -398,14 +307,8 @@ module TachainSdk
|
|
|
398
307
|
material_name == o.material_name &&
|
|
399
308
|
quantity_used == o.quantity_used &&
|
|
400
309
|
unit == o.unit &&
|
|
401
|
-
tenant_id == o.tenant_id &&
|
|
402
|
-
environment_type == o.environment_type &&
|
|
403
|
-
created_by == o.created_by &&
|
|
404
310
|
created_at == o.created_at &&
|
|
405
|
-
company_id == o.company_id &&
|
|
406
|
-
receipt_id == o.receipt_id &&
|
|
407
311
|
status == o.status &&
|
|
408
|
-
updated_by == o.updated_by &&
|
|
409
312
|
updated_at == o.updated_at &&
|
|
410
313
|
loss == o.loss &&
|
|
411
314
|
available_quantity == o.available_quantity &&
|
|
@@ -416,10 +319,7 @@ module TachainSdk
|
|
|
416
319
|
unique_no == o.unique_no &&
|
|
417
320
|
material_code == o.material_code &&
|
|
418
321
|
scope_code == o.scope_code &&
|
|
419
|
-
single_component == o.single_component &&
|
|
420
|
-
parent_id == o.parent_id &&
|
|
421
322
|
supplier_name == o.supplier_name &&
|
|
422
|
-
attachments == o.attachments &&
|
|
423
323
|
quantity == o.quantity &&
|
|
424
324
|
po_unit == o.po_unit &&
|
|
425
325
|
is_transfer == o.is_transfer
|
|
@@ -434,7 +334,7 @@ module TachainSdk
|
|
|
434
334
|
# Calculates hash code according to all attributes.
|
|
435
335
|
# @return [Integer] Hash code
|
|
436
336
|
def hash
|
|
437
|
-
[id, production_id, purchase_order_detail_id, material_name, quantity_used, unit,
|
|
337
|
+
[id, production_id, purchase_order_detail_id, material_name, quantity_used, unit, created_at, status, updated_at, loss, available_quantity, u_name, order_number, order_date, line_number, unique_no, material_code, scope_code, supplier_name, quantity, po_unit, is_transfer].hash
|
|
438
338
|
end
|
|
439
339
|
|
|
440
340
|
# Builds the object from hash
|