tachain-sdk 0.1.0
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +226 -0
- data/Rakefile +10 -0
- data/git_push.sh +54 -0
- data/lib/tachain-sdk/api/api_declaration_api.rb +396 -0
- data/lib/tachain-sdk/api/api_delivery_api.rb +676 -0
- data/lib/tachain-sdk/api/api_enum_api.rb +94 -0
- data/lib/tachain-sdk/api/api_order_api.rb +846 -0
- data/lib/tachain-sdk/api/api_order_workflow_api.rb +170 -0
- data/lib/tachain-sdk/api/api_production_api.rb +466 -0
- data/lib/tachain-sdk/api_client.rb +397 -0
- data/lib/tachain-sdk/api_error.rb +58 -0
- data/lib/tachain-sdk/api_model_base.rb +88 -0
- data/lib/tachain-sdk/configuration.rb +329 -0
- data/lib/tachain-sdk/models/api_declaration_delete_request.rb +341 -0
- data/lib/tachain-sdk/models/api_declaration_document_request.rb +209 -0
- data/lib/tachain-sdk/models/api_declaration_list_dto.rb +251 -0
- data/lib/tachain-sdk/models/api_declaration_submit_request.rb +251 -0
- data/lib/tachain-sdk/models/api_declaration_submit_result_dto.rb +197 -0
- data/lib/tachain-sdk/models/api_integration_delete_request.rb +209 -0
- data/lib/tachain-sdk/models/api_order_confirm_receipt_request.rb +216 -0
- data/lib/tachain-sdk/models/api_order_submit_audit_request.rb +243 -0
- data/lib/tachain-sdk/models/api_response_api_declaration_list_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_api_declaration_submit_result_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_delivery_note_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_order_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_production_api_dto.rb +199 -0
- data/lib/tachain-sdk/models/api_response_string.rb +200 -0
- data/lib/tachain-sdk/models/attachment_in_api_create_dto.rb +262 -0
- data/lib/tachain-sdk/models/attachment_in_api_dto.rb +363 -0
- data/lib/tachain-sdk/models/brand_kpi_policy_result.rb +334 -0
- data/lib/tachain-sdk/models/brand_order_kpi_snapshot_dto.rb +880 -0
- data/lib/tachain-sdk/models/brand_order_supplier_order_snapshot_dto.rb +749 -0
- data/lib/tachain-sdk/models/brand_order_uncompleted_declare_snapshot_dto.rb +513 -0
- data/lib/tachain-sdk/models/company.rb +780 -0
- data/lib/tachain-sdk/models/company_compliance_profile.rb +547 -0
- data/lib/tachain-sdk/models/company_utility_declaration.rb +592 -0
- data/lib/tachain-sdk/models/customer.rb +569 -0
- data/lib/tachain-sdk/models/delivery_note_api_dto.rb +597 -0
- data/lib/tachain-sdk/models/delivery_note_detail_api_dto.rb +682 -0
- data/lib/tachain-sdk/models/document_type_api_dto.rb +480 -0
- data/lib/tachain-sdk/models/factory.rb +545 -0
- data/lib/tachain-sdk/models/get_v1_enum_get_list200_response.rb +201 -0
- data/lib/tachain-sdk/models/microsoft_asp_net_core_mvc_problem_details.rb +188 -0
- data/lib/tachain-sdk/models/model1.rb +157 -0
- data/lib/tachain-sdk/models/model3.rb +202 -0
- data/lib/tachain-sdk/models/model4.rb +202 -0
- data/lib/tachain-sdk/models/order.rb +974 -0
- data/lib/tachain-sdk/models/order_api_dto.rb +918 -0
- data/lib/tachain-sdk/models/order_line.rb +1184 -0
- data/lib/tachain-sdk/models/order_line_api_dto.rb +1277 -0
- data/lib/tachain-sdk/models/order_stage_form_api_dto.rb +270 -0
- data/lib/tachain-sdk/models/order_stage_form_datum_api_dto.rb +260 -0
- data/lib/tachain-sdk/models/order_stage_form_dto.rb +254 -0
- data/lib/tachain-sdk/models/paged_response_delivery_note_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/paged_response_order_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/paged_response_production_api_dto.rb +296 -0
- data/lib/tachain-sdk/models/product_bom_grouping_dto.rb +280 -0
- data/lib/tachain-sdk/models/production_api_dto.rb +639 -0
- data/lib/tachain-sdk/models/production_raw_material_api_dto.rb +481 -0
- data/lib/tachain-sdk/models/production_raw_material_dto.rb +548 -0
- data/lib/tachain-sdk/models/production_sales_order_api_dto.rb +436 -0
- data/lib/tachain-sdk/models/result_api_enum.rb +270 -0
- data/lib/tachain-sdk/models/result_brand_report_allocated_delivery_kpi_detail.rb +331 -0
- data/lib/tachain-sdk/models/result_brand_report_unlinked_order_detail.rb +229 -0
- data/lib/tachain-sdk/models/result_kpi_archived_data_change_detail.rb +418 -0
- data/lib/tachain-sdk/models/result_mapping_order_select.rb +335 -0
- data/lib/tachain-sdk/models/result_order_trace_report.rb +721 -0
- data/lib/tachain-sdk/models/stage_attachment_api_dto.rb +398 -0
- data/lib/tachain-sdk/models/supplier.rb +585 -0
- data/lib/tachain-sdk/models/supplier_onboarding_ext.rb +383 -0
- data/lib/tachain-sdk/models/template_dto_business_risk_warn_info_dto.rb +456 -0
- data/lib/tachain-sdk/models/template_dto_multi_so_line_complete_status.rb +227 -0
- data/lib/tachain-sdk/models/trader.rb +506 -0
- data/lib/tachain-sdk/signed_api_client.rb +65 -0
- data/lib/tachain-sdk/version.rb +15 -0
- data/lib/tachain-sdk.rb +108 -0
- data/spec/spec_helper.rb +111 -0
- data/tachain-sdk.gemspec +39 -0
- metadata +165 -0
|
@@ -0,0 +1,170 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module TachainSdk
|
|
16
|
+
class ApiOrderWorkflowApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# 销售方根据已入库的订单、生产、发货及申报资料提交审核。
|
|
23
|
+
# 支持 OrderId、OrderLineId,或 OrderNumber + OrderDate + CustomerId/CustomerName。 复用快速申报校验;Type=1 阻断,Type=0 返回 Code=409,确认后传 ConfirmWarnings=true 重试。 校验通过后执行现有状态和时间更新逻辑,不重复保存生产、发货或库存,不合并页面草稿。
|
|
24
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [ApiOrderSubmitAuditRequest] :api_order_submit_audit_request
|
|
27
|
+
# @return [nil]
|
|
28
|
+
def post_v1_order_submit_audit(x_credential_type, opts = {})
|
|
29
|
+
post_v1_order_submit_audit_with_http_info(x_credential_type, opts)
|
|
30
|
+
nil
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# 销售方根据已入库的订单、生产、发货及申报资料提交审核。
|
|
34
|
+
# 支持 OrderId、OrderLineId,或 OrderNumber + OrderDate + CustomerId/CustomerName。 复用快速申报校验;Type=1 阻断,Type=0 返回 Code=409,确认后传 ConfirmWarnings=true 重试。 校验通过后执行现有状态和时间更新逻辑,不重复保存生产、发货或库存,不合并页面草稿。
|
|
35
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [ApiOrderSubmitAuditRequest] :api_order_submit_audit_request
|
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
39
|
+
def post_v1_order_submit_audit_with_http_info(x_credential_type, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: ApiOrderWorkflowApi.post_v1_order_submit_audit ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'x_credential_type' is set
|
|
44
|
+
if @api_client.config.client_side_validation && x_credential_type.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiOrderWorkflowApi.post_v1_order_submit_audit"
|
|
46
|
+
end
|
|
47
|
+
# verify enum value
|
|
48
|
+
allowable_values = ["Token", "API Key"]
|
|
49
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
|
|
50
|
+
fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
|
|
51
|
+
end
|
|
52
|
+
# resource path
|
|
53
|
+
local_var_path = '/v1/order/SubmitAudit'
|
|
54
|
+
|
|
55
|
+
# query parameters
|
|
56
|
+
query_params = opts[:query_params] || {}
|
|
57
|
+
|
|
58
|
+
# header parameters
|
|
59
|
+
header_params = opts[:header_params] || {}
|
|
60
|
+
# HTTP header 'Content-Type'
|
|
61
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
62
|
+
if !content_type.nil?
|
|
63
|
+
header_params['Content-Type'] = content_type
|
|
64
|
+
end
|
|
65
|
+
header_params[:'X-Credential-Type'] = x_credential_type
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'api_order_submit_audit_request'])
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type]
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"ApiOrderWorkflowApi.post_v1_order_submit_audit",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: ApiOrderWorkflowApi#post_v1_order_submit_audit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# 采购方按整单或单条订单明细确认收货。
|
|
97
|
+
# 支持 OrderId、OrderLineId,或 OrderNumber + OrderDate + SupplierId/SupplierName。 LineNumber 可选,不传时处理整单;提供多个条件时取交集。 复用 /api/DeliveryNote/OrderReceivingDeliveryNote 的校验、收货及审核流程。 Code=207 表示部分完成,需检查 PendingOrderLineIds;Code=200 表示本次所有明细均已确认。
|
|
98
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @option opts [ApiOrderConfirmReceiptRequest] :api_order_confirm_receipt_request
|
|
101
|
+
# @return [nil]
|
|
102
|
+
def put_v1_order_confirm_receipt(x_credential_type, opts = {})
|
|
103
|
+
put_v1_order_confirm_receipt_with_http_info(x_credential_type, opts)
|
|
104
|
+
nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# 采购方按整单或单条订单明细确认收货。
|
|
108
|
+
# 支持 OrderId、OrderLineId,或 OrderNumber + OrderDate + SupplierId/SupplierName。 LineNumber 可选,不传时处理整单;提供多个条件时取交集。 复用 /api/DeliveryNote/OrderReceivingDeliveryNote 的校验、收货及审核流程。 Code=207 表示部分完成,需检查 PendingOrderLineIds;Code=200 表示本次所有明细均已确认。
|
|
109
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
110
|
+
# @param [Hash] opts the optional parameters
|
|
111
|
+
# @option opts [ApiOrderConfirmReceiptRequest] :api_order_confirm_receipt_request
|
|
112
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
113
|
+
def put_v1_order_confirm_receipt_with_http_info(x_credential_type, opts = {})
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: ApiOrderWorkflowApi.put_v1_order_confirm_receipt ...'
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'x_credential_type' is set
|
|
118
|
+
if @api_client.config.client_side_validation && x_credential_type.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiOrderWorkflowApi.put_v1_order_confirm_receipt"
|
|
120
|
+
end
|
|
121
|
+
# verify enum value
|
|
122
|
+
allowable_values = ["Token", "API Key"]
|
|
123
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
|
|
124
|
+
fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
|
|
125
|
+
end
|
|
126
|
+
# resource path
|
|
127
|
+
local_var_path = '/v1/order/ConfirmReceipt'
|
|
128
|
+
|
|
129
|
+
# query parameters
|
|
130
|
+
query_params = opts[:query_params] || {}
|
|
131
|
+
|
|
132
|
+
# header parameters
|
|
133
|
+
header_params = opts[:header_params] || {}
|
|
134
|
+
# HTTP header 'Content-Type'
|
|
135
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
136
|
+
if !content_type.nil?
|
|
137
|
+
header_params['Content-Type'] = content_type
|
|
138
|
+
end
|
|
139
|
+
header_params[:'X-Credential-Type'] = x_credential_type
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'api_order_confirm_receipt_request'])
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:debug_return_type]
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:operation => :"ApiOrderWorkflowApi.put_v1_order_confirm_receipt",
|
|
155
|
+
:header_params => header_params,
|
|
156
|
+
:query_params => query_params,
|
|
157
|
+
:form_params => form_params,
|
|
158
|
+
:body => post_body,
|
|
159
|
+
:auth_names => auth_names,
|
|
160
|
+
:return_type => return_type
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
164
|
+
if @api_client.config.debugging
|
|
165
|
+
@api_client.config.logger.debug "API called: ApiOrderWorkflowApi#put_v1_order_confirm_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
166
|
+
end
|
|
167
|
+
return data, status_code, headers
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
@@ -0,0 +1,466 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module TachainSdk
|
|
16
|
+
class ApiProductionApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# 删除生产记录单。
|
|
23
|
+
# 删除前会校验: 1. 生产单必须存在; 2. 生产单必须属于当前集成凭证对应租户和公司; 3. 生产单状态必须允许删除; 4. 领料或库存已被后续使用时,服务层会返回不可删除。
|
|
24
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :id query 方式传入的单个 ID,便于简单调用。
|
|
27
|
+
# @option opts [String] :number
|
|
28
|
+
# @option opts [String] :product_code
|
|
29
|
+
# @option opts [Integer] :type
|
|
30
|
+
# @option opts [ApiIntegrationDeleteRequest] :api_integration_delete_request
|
|
31
|
+
# @return [Model4]
|
|
32
|
+
def delete_v1_production_delete(x_credential_type, opts = {})
|
|
33
|
+
data, _status_code, _headers = delete_v1_production_delete_with_http_info(x_credential_type, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# 删除生产记录单。
|
|
38
|
+
# 删除前会校验: 1. 生产单必须存在; 2. 生产单必须属于当前集成凭证对应租户和公司; 3. 生产单状态必须允许删除; 4. 领料或库存已被后续使用时,服务层会返回不可删除。
|
|
39
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [String] :id query 方式传入的单个 ID,便于简单调用。
|
|
42
|
+
# @option opts [String] :number
|
|
43
|
+
# @option opts [String] :product_code
|
|
44
|
+
# @option opts [Integer] :type
|
|
45
|
+
# @option opts [ApiIntegrationDeleteRequest] :api_integration_delete_request
|
|
46
|
+
# @return [Array<(Model4, Integer, Hash)>] Model4 data, response status code and response headers
|
|
47
|
+
def delete_v1_production_delete_with_http_info(x_credential_type, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: ApiProductionApi.delete_v1_production_delete ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'x_credential_type' is set
|
|
52
|
+
if @api_client.config.client_side_validation && x_credential_type.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiProductionApi.delete_v1_production_delete"
|
|
54
|
+
end
|
|
55
|
+
# verify enum value
|
|
56
|
+
allowable_values = ["Token", "API Key"]
|
|
57
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
|
|
58
|
+
fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
|
|
59
|
+
end
|
|
60
|
+
# resource path
|
|
61
|
+
local_var_path = '/v1/production/Delete'
|
|
62
|
+
|
|
63
|
+
# query parameters
|
|
64
|
+
query_params = opts[:query_params] || {}
|
|
65
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
66
|
+
query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
|
|
67
|
+
query_params[:'productCode'] = opts[:'product_code'] if !opts[:'product_code'].nil?
|
|
68
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
69
|
+
|
|
70
|
+
# header parameters
|
|
71
|
+
header_params = opts[:header_params] || {}
|
|
72
|
+
# HTTP header 'Accept' (if needed)
|
|
73
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
74
|
+
# HTTP header 'Content-Type'
|
|
75
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
76
|
+
if !content_type.nil?
|
|
77
|
+
header_params['Content-Type'] = content_type
|
|
78
|
+
end
|
|
79
|
+
header_params[:'X-Credential-Type'] = x_credential_type
|
|
80
|
+
|
|
81
|
+
# form parameters
|
|
82
|
+
form_params = opts[:form_params] || {}
|
|
83
|
+
|
|
84
|
+
# http body (model)
|
|
85
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'api_integration_delete_request'])
|
|
86
|
+
|
|
87
|
+
# return_type
|
|
88
|
+
return_type = opts[:debug_return_type] || 'Model4'
|
|
89
|
+
|
|
90
|
+
# auth_names
|
|
91
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
|
|
92
|
+
|
|
93
|
+
new_options = opts.merge(
|
|
94
|
+
:operation => :"ApiProductionApi.delete_v1_production_delete",
|
|
95
|
+
:header_params => header_params,
|
|
96
|
+
:query_params => query_params,
|
|
97
|
+
:form_params => form_params,
|
|
98
|
+
:body => post_body,
|
|
99
|
+
:auth_names => auth_names,
|
|
100
|
+
:return_type => return_type
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug "API called: ApiProductionApi#delete_v1_production_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
106
|
+
end
|
|
107
|
+
return data, status_code, headers
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# 查询生产记录单及详细领料信息。
|
|
111
|
+
# 返回结果按生产单与领料明细展开: 同一个生产单有多条领料时,分页结果中可能出现多条相同生产单主信息, 每条数据的 `ProductionRawMaterial` 表示当前展开的领料明细。
|
|
112
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @option opts [String] :search_text 关键词搜索:支持生产单号(Production.Number)、生产单产品编码(Production.ProductCode)、生产单产品名称(Production.ProductName)、订单明细原料名称(OrderLine.MaterialName)、订单明细原料编码(OrderLine.MaterialCode)、订单明细产品编码(OrderLine.ProductCode)、订单明细产品名称(OrderLine.ProductName)。去除首尾空白后,使用完整关键词进行包含匹配,任一字段命中即可,并与其他筛选条件共同生效;不传、空字符串或纯空白时不附加关键词条件。
|
|
115
|
+
# @option opts [String] :number
|
|
116
|
+
# @option opts [String] :product_code
|
|
117
|
+
# @option opts [String] :product_name
|
|
118
|
+
# @option opts [Time] :production_date_start
|
|
119
|
+
# @option opts [Time] :production_date_end
|
|
120
|
+
# @option opts [String] :batch
|
|
121
|
+
# @option opts [Integer] :type
|
|
122
|
+
# @option opts [Integer] :status
|
|
123
|
+
# @option opts [String] :facility_id
|
|
124
|
+
# @option opts [String] :facility_code
|
|
125
|
+
# @option opts [Integer] :process_route_id
|
|
126
|
+
# @option opts [String] :process_route_code
|
|
127
|
+
# @option opts [String] :created_by
|
|
128
|
+
# @option opts [Time] :created_at_start
|
|
129
|
+
# @option opts [Time] :created_at_end
|
|
130
|
+
# @option opts [String] :sales_order_line_id
|
|
131
|
+
# @option opts [Float] :quantity_produced
|
|
132
|
+
# @option opts [String] :unit
|
|
133
|
+
# @option opts [String] :sort_by
|
|
134
|
+
# @option opts [String] :unique_no
|
|
135
|
+
# @option opts [String] :line_number
|
|
136
|
+
# @option opts [String] :product_category
|
|
137
|
+
# @option opts [String] :material_id
|
|
138
|
+
# @option opts [String] :material_code
|
|
139
|
+
# @option opts [String] :material_name
|
|
140
|
+
# @option opts [String] :product_id
|
|
141
|
+
# @option opts [String] :destination_country
|
|
142
|
+
# @option opts [String] :customer_ext_no
|
|
143
|
+
# @option opts [String] :supplier_ext_no
|
|
144
|
+
# @option opts [String] :origin_country
|
|
145
|
+
# @option opts [Time] :estimated_time_of_departure_start
|
|
146
|
+
# @option opts [Time] :estimated_time_of_departure_end
|
|
147
|
+
# @option opts [String] :season
|
|
148
|
+
# @option opts [String] :season_year
|
|
149
|
+
# @option opts [Time] :last_updated_at_start
|
|
150
|
+
# @option opts [Time] :last_updated_at_end
|
|
151
|
+
# @option opts [String] :color
|
|
152
|
+
# @option opts [Integer] :so_status 销售状态:6 销售方拒绝变更、7 拒绝接单、8 待销售确认变更、9 待接单、10 待生产、20 待发货、30 已发货、40 待收货、50 已收货、60 已使用、70 已用完。 相关收货确认状态:101 待提交(发货)、102 待收货(审核)、103 重新提交收货、111 取消收货审核、113 收货作废、114 收货驳回、115 收货拒绝、120 审核通过。 相关品牌审核状态:99101 品牌草稿、99102 品牌待审核、99103 重新提交待品牌审核、99111 品牌取消审核、99113 品牌审核作废、99114 品牌驳回、99115 品牌审核拒绝、99120 品牌审核通过。 收货确认和品牌审核状态仅作含义说明,不支持通过本参数筛选。
|
|
153
|
+
# @option opts [Integer] :po_status 采购状态:6 销售方拒绝变更、7 拒绝接单、8 待销售确认变更、9 待接单、10 待生产、20 待发货、30 已发货、40 待收货、50 已收货、60 已使用、70 已用完。 相关收货确认状态:101 待提交(发货)、102 待收货(审核)、103 重新提交收货、111 取消收货审核、113 收货作废、114 收货驳回、115 收货拒绝、120 审核通过。 相关品牌审核状态:99101 品牌草稿、99102 品牌待审核、99103 重新提交待品牌审核、99111 品牌取消审核、99113 品牌审核作废、99114 品牌驳回、99115 品牌审核拒绝、99120 品牌审核通过。 收货确认和品牌审核状态仅作含义说明,不支持通过本参数筛选。
|
|
154
|
+
# @option opts [String] :order_id
|
|
155
|
+
# @option opts [String] :order_number
|
|
156
|
+
# @option opts [Time] :order_date
|
|
157
|
+
# @option opts [Integer] :page (default to 1)
|
|
158
|
+
# @option opts [Integer] :page_size (default to 10)
|
|
159
|
+
# @return [PagedResponseProductionApiDto]
|
|
160
|
+
def get_v1_production_list_paging(x_credential_type, opts = {})
|
|
161
|
+
data, _status_code, _headers = get_v1_production_list_paging_with_http_info(x_credential_type, opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# 查询生产记录单及详细领料信息。
|
|
166
|
+
# 返回结果按生产单与领料明细展开: 同一个生产单有多条领料时,分页结果中可能出现多条相同生产单主信息, 每条数据的 `ProductionRawMaterial` 表示当前展开的领料明细。
|
|
167
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :search_text 关键词搜索:支持生产单号(Production.Number)、生产单产品编码(Production.ProductCode)、生产单产品名称(Production.ProductName)、订单明细原料名称(OrderLine.MaterialName)、订单明细原料编码(OrderLine.MaterialCode)、订单明细产品编码(OrderLine.ProductCode)、订单明细产品名称(OrderLine.ProductName)。去除首尾空白后,使用完整关键词进行包含匹配,任一字段命中即可,并与其他筛选条件共同生效;不传、空字符串或纯空白时不附加关键词条件。
|
|
170
|
+
# @option opts [String] :number
|
|
171
|
+
# @option opts [String] :product_code
|
|
172
|
+
# @option opts [String] :product_name
|
|
173
|
+
# @option opts [Time] :production_date_start
|
|
174
|
+
# @option opts [Time] :production_date_end
|
|
175
|
+
# @option opts [String] :batch
|
|
176
|
+
# @option opts [Integer] :type
|
|
177
|
+
# @option opts [Integer] :status
|
|
178
|
+
# @option opts [String] :facility_id
|
|
179
|
+
# @option opts [String] :facility_code
|
|
180
|
+
# @option opts [Integer] :process_route_id
|
|
181
|
+
# @option opts [String] :process_route_code
|
|
182
|
+
# @option opts [String] :created_by
|
|
183
|
+
# @option opts [Time] :created_at_start
|
|
184
|
+
# @option opts [Time] :created_at_end
|
|
185
|
+
# @option opts [String] :sales_order_line_id
|
|
186
|
+
# @option opts [Float] :quantity_produced
|
|
187
|
+
# @option opts [String] :unit
|
|
188
|
+
# @option opts [String] :sort_by
|
|
189
|
+
# @option opts [String] :unique_no
|
|
190
|
+
# @option opts [String] :line_number
|
|
191
|
+
# @option opts [String] :product_category
|
|
192
|
+
# @option opts [String] :material_id
|
|
193
|
+
# @option opts [String] :material_code
|
|
194
|
+
# @option opts [String] :material_name
|
|
195
|
+
# @option opts [String] :product_id
|
|
196
|
+
# @option opts [String] :destination_country
|
|
197
|
+
# @option opts [String] :customer_ext_no
|
|
198
|
+
# @option opts [String] :supplier_ext_no
|
|
199
|
+
# @option opts [String] :origin_country
|
|
200
|
+
# @option opts [Time] :estimated_time_of_departure_start
|
|
201
|
+
# @option opts [Time] :estimated_time_of_departure_end
|
|
202
|
+
# @option opts [String] :season
|
|
203
|
+
# @option opts [String] :season_year
|
|
204
|
+
# @option opts [Time] :last_updated_at_start
|
|
205
|
+
# @option opts [Time] :last_updated_at_end
|
|
206
|
+
# @option opts [String] :color
|
|
207
|
+
# @option opts [Integer] :so_status 销售状态:6 销售方拒绝变更、7 拒绝接单、8 待销售确认变更、9 待接单、10 待生产、20 待发货、30 已发货、40 待收货、50 已收货、60 已使用、70 已用完。 相关收货确认状态:101 待提交(发货)、102 待收货(审核)、103 重新提交收货、111 取消收货审核、113 收货作废、114 收货驳回、115 收货拒绝、120 审核通过。 相关品牌审核状态:99101 品牌草稿、99102 品牌待审核、99103 重新提交待品牌审核、99111 品牌取消审核、99113 品牌审核作废、99114 品牌驳回、99115 品牌审核拒绝、99120 品牌审核通过。 收货确认和品牌审核状态仅作含义说明,不支持通过本参数筛选。
|
|
208
|
+
# @option opts [Integer] :po_status 采购状态:6 销售方拒绝变更、7 拒绝接单、8 待销售确认变更、9 待接单、10 待生产、20 待发货、30 已发货、40 待收货、50 已收货、60 已使用、70 已用完。 相关收货确认状态:101 待提交(发货)、102 待收货(审核)、103 重新提交收货、111 取消收货审核、113 收货作废、114 收货驳回、115 收货拒绝、120 审核通过。 相关品牌审核状态:99101 品牌草稿、99102 品牌待审核、99103 重新提交待品牌审核、99111 品牌取消审核、99113 品牌审核作废、99114 品牌驳回、99115 品牌审核拒绝、99120 品牌审核通过。 收货确认和品牌审核状态仅作含义说明,不支持通过本参数筛选。
|
|
209
|
+
# @option opts [String] :order_id
|
|
210
|
+
# @option opts [String] :order_number
|
|
211
|
+
# @option opts [Time] :order_date
|
|
212
|
+
# @option opts [Integer] :page (default to 1)
|
|
213
|
+
# @option opts [Integer] :page_size (default to 10)
|
|
214
|
+
# @return [Array<(PagedResponseProductionApiDto, Integer, Hash)>] PagedResponseProductionApiDto data, response status code and response headers
|
|
215
|
+
def get_v1_production_list_paging_with_http_info(x_credential_type, opts = {})
|
|
216
|
+
if @api_client.config.debugging
|
|
217
|
+
@api_client.config.logger.debug 'Calling API: ApiProductionApi.get_v1_production_list_paging ...'
|
|
218
|
+
end
|
|
219
|
+
# verify the required parameter 'x_credential_type' is set
|
|
220
|
+
if @api_client.config.client_side_validation && x_credential_type.nil?
|
|
221
|
+
fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiProductionApi.get_v1_production_list_paging"
|
|
222
|
+
end
|
|
223
|
+
# verify enum value
|
|
224
|
+
allowable_values = ["Token", "API Key"]
|
|
225
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
|
|
226
|
+
fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
|
|
227
|
+
end
|
|
228
|
+
# resource path
|
|
229
|
+
local_var_path = '/v1/production/ListPaging'
|
|
230
|
+
|
|
231
|
+
# query parameters
|
|
232
|
+
query_params = opts[:query_params] || {}
|
|
233
|
+
query_params[:'searchText'] = opts[:'search_text'] if !opts[:'search_text'].nil?
|
|
234
|
+
query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
|
|
235
|
+
query_params[:'productCode'] = opts[:'product_code'] if !opts[:'product_code'].nil?
|
|
236
|
+
query_params[:'productName'] = opts[:'product_name'] if !opts[:'product_name'].nil?
|
|
237
|
+
query_params[:'productionDateStart'] = opts[:'production_date_start'] if !opts[:'production_date_start'].nil?
|
|
238
|
+
query_params[:'productionDateEnd'] = opts[:'production_date_end'] if !opts[:'production_date_end'].nil?
|
|
239
|
+
query_params[:'batch'] = opts[:'batch'] if !opts[:'batch'].nil?
|
|
240
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
241
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
242
|
+
query_params[:'facilityId'] = opts[:'facility_id'] if !opts[:'facility_id'].nil?
|
|
243
|
+
query_params[:'facilityCode'] = opts[:'facility_code'] if !opts[:'facility_code'].nil?
|
|
244
|
+
query_params[:'processRouteId'] = opts[:'process_route_id'] if !opts[:'process_route_id'].nil?
|
|
245
|
+
query_params[:'processRouteCode'] = opts[:'process_route_code'] if !opts[:'process_route_code'].nil?
|
|
246
|
+
query_params[:'createdBy'] = opts[:'created_by'] if !opts[:'created_by'].nil?
|
|
247
|
+
query_params[:'createdAtStart'] = opts[:'created_at_start'] if !opts[:'created_at_start'].nil?
|
|
248
|
+
query_params[:'createdAtEnd'] = opts[:'created_at_end'] if !opts[:'created_at_end'].nil?
|
|
249
|
+
query_params[:'salesOrderLineId'] = opts[:'sales_order_line_id'] if !opts[:'sales_order_line_id'].nil?
|
|
250
|
+
query_params[:'quantityProduced'] = opts[:'quantity_produced'] if !opts[:'quantity_produced'].nil?
|
|
251
|
+
query_params[:'unit'] = opts[:'unit'] if !opts[:'unit'].nil?
|
|
252
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
253
|
+
query_params[:'uniqueNo'] = opts[:'unique_no'] if !opts[:'unique_no'].nil?
|
|
254
|
+
query_params[:'lineNumber'] = opts[:'line_number'] if !opts[:'line_number'].nil?
|
|
255
|
+
query_params[:'productCategory'] = opts[:'product_category'] if !opts[:'product_category'].nil?
|
|
256
|
+
query_params[:'materialId'] = opts[:'material_id'] if !opts[:'material_id'].nil?
|
|
257
|
+
query_params[:'materialCode'] = opts[:'material_code'] if !opts[:'material_code'].nil?
|
|
258
|
+
query_params[:'materialName'] = opts[:'material_name'] if !opts[:'material_name'].nil?
|
|
259
|
+
query_params[:'productId'] = opts[:'product_id'] if !opts[:'product_id'].nil?
|
|
260
|
+
query_params[:'destinationCountry'] = opts[:'destination_country'] if !opts[:'destination_country'].nil?
|
|
261
|
+
query_params[:'customerExtNo'] = opts[:'customer_ext_no'] if !opts[:'customer_ext_no'].nil?
|
|
262
|
+
query_params[:'supplierExtNo'] = opts[:'supplier_ext_no'] if !opts[:'supplier_ext_no'].nil?
|
|
263
|
+
query_params[:'originCountry'] = opts[:'origin_country'] if !opts[:'origin_country'].nil?
|
|
264
|
+
query_params[:'estimatedTimeOfDepartureStart'] = opts[:'estimated_time_of_departure_start'] if !opts[:'estimated_time_of_departure_start'].nil?
|
|
265
|
+
query_params[:'estimatedTimeOfDepartureEnd'] = opts[:'estimated_time_of_departure_end'] if !opts[:'estimated_time_of_departure_end'].nil?
|
|
266
|
+
query_params[:'season'] = opts[:'season'] if !opts[:'season'].nil?
|
|
267
|
+
query_params[:'seasonYear'] = opts[:'season_year'] if !opts[:'season_year'].nil?
|
|
268
|
+
query_params[:'lastUpdatedAtStart'] = opts[:'last_updated_at_start'] if !opts[:'last_updated_at_start'].nil?
|
|
269
|
+
query_params[:'lastUpdatedAtEnd'] = opts[:'last_updated_at_end'] if !opts[:'last_updated_at_end'].nil?
|
|
270
|
+
query_params[:'color'] = opts[:'color'] if !opts[:'color'].nil?
|
|
271
|
+
query_params[:'soStatus'] = opts[:'so_status'] if !opts[:'so_status'].nil?
|
|
272
|
+
query_params[:'poStatus'] = opts[:'po_status'] if !opts[:'po_status'].nil?
|
|
273
|
+
query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
|
|
274
|
+
query_params[:'orderNumber'] = opts[:'order_number'] if !opts[:'order_number'].nil?
|
|
275
|
+
query_params[:'orderDate'] = opts[:'order_date'] if !opts[:'order_date'].nil?
|
|
276
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
277
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
278
|
+
|
|
279
|
+
# header parameters
|
|
280
|
+
header_params = opts[:header_params] || {}
|
|
281
|
+
# HTTP header 'Accept' (if needed)
|
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
283
|
+
header_params[:'X-Credential-Type'] = x_credential_type
|
|
284
|
+
|
|
285
|
+
# form parameters
|
|
286
|
+
form_params = opts[:form_params] || {}
|
|
287
|
+
|
|
288
|
+
# http body (model)
|
|
289
|
+
post_body = opts[:debug_body]
|
|
290
|
+
|
|
291
|
+
# return_type
|
|
292
|
+
return_type = opts[:debug_return_type] || 'PagedResponseProductionApiDto'
|
|
293
|
+
|
|
294
|
+
# auth_names
|
|
295
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
|
|
296
|
+
|
|
297
|
+
new_options = opts.merge(
|
|
298
|
+
:operation => :"ApiProductionApi.get_v1_production_list_paging",
|
|
299
|
+
:header_params => header_params,
|
|
300
|
+
:query_params => query_params,
|
|
301
|
+
:form_params => form_params,
|
|
302
|
+
:body => post_body,
|
|
303
|
+
:auth_names => auth_names,
|
|
304
|
+
:return_type => return_type
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
308
|
+
if @api_client.config.debugging
|
|
309
|
+
@api_client.config.logger.debug "API called: ApiProductionApi#get_v1_production_list_paging\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
310
|
+
end
|
|
311
|
+
return data, status_code, headers
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# 创建生产记录单。
|
|
315
|
+
# 重要处理: 1. 当前公司、租户、用户、环境由集成凭证决定,外部传入值会被覆盖; 2. `ProductBomGroupingList` 有值时,会展开为 `ProductionRawMaterialList`; 3. 领料明细不能为空,且每条有效领料数量必须大于 0; 4. 保存成功后按生产类型重算生产或入库阶段的申报完成度。
|
|
316
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
317
|
+
# @param [Hash] opts the optional parameters
|
|
318
|
+
# @option opts [ProductionApiDto] :production_api_dto
|
|
319
|
+
# @return [ApiResponseProductionApiDto]
|
|
320
|
+
def post_v1_production_create(x_credential_type, opts = {})
|
|
321
|
+
data, _status_code, _headers = post_v1_production_create_with_http_info(x_credential_type, opts)
|
|
322
|
+
data
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# 创建生产记录单。
|
|
326
|
+
# 重要处理: 1. 当前公司、租户、用户、环境由集成凭证决定,外部传入值会被覆盖; 2. `ProductBomGroupingList` 有值时,会展开为 `ProductionRawMaterialList`; 3. 领料明细不能为空,且每条有效领料数量必须大于 0; 4. 保存成功后按生产类型重算生产或入库阶段的申报完成度。
|
|
327
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @option opts [ProductionApiDto] :production_api_dto
|
|
330
|
+
# @return [Array<(ApiResponseProductionApiDto, Integer, Hash)>] ApiResponseProductionApiDto data, response status code and response headers
|
|
331
|
+
def post_v1_production_create_with_http_info(x_credential_type, opts = {})
|
|
332
|
+
if @api_client.config.debugging
|
|
333
|
+
@api_client.config.logger.debug 'Calling API: ApiProductionApi.post_v1_production_create ...'
|
|
334
|
+
end
|
|
335
|
+
# verify the required parameter 'x_credential_type' is set
|
|
336
|
+
if @api_client.config.client_side_validation && x_credential_type.nil?
|
|
337
|
+
fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiProductionApi.post_v1_production_create"
|
|
338
|
+
end
|
|
339
|
+
# verify enum value
|
|
340
|
+
allowable_values = ["Token", "API Key"]
|
|
341
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
|
|
342
|
+
fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
|
|
343
|
+
end
|
|
344
|
+
# resource path
|
|
345
|
+
local_var_path = '/v1/production/Create'
|
|
346
|
+
|
|
347
|
+
# query parameters
|
|
348
|
+
query_params = opts[:query_params] || {}
|
|
349
|
+
|
|
350
|
+
# header parameters
|
|
351
|
+
header_params = opts[:header_params] || {}
|
|
352
|
+
# HTTP header 'Accept' (if needed)
|
|
353
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
354
|
+
# HTTP header 'Content-Type'
|
|
355
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
356
|
+
if !content_type.nil?
|
|
357
|
+
header_params['Content-Type'] = content_type
|
|
358
|
+
end
|
|
359
|
+
header_params[:'X-Credential-Type'] = x_credential_type
|
|
360
|
+
|
|
361
|
+
# form parameters
|
|
362
|
+
form_params = opts[:form_params] || {}
|
|
363
|
+
|
|
364
|
+
# http body (model)
|
|
365
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'production_api_dto'])
|
|
366
|
+
|
|
367
|
+
# return_type
|
|
368
|
+
return_type = opts[:debug_return_type] || 'ApiResponseProductionApiDto'
|
|
369
|
+
|
|
370
|
+
# auth_names
|
|
371
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
|
|
372
|
+
|
|
373
|
+
new_options = opts.merge(
|
|
374
|
+
:operation => :"ApiProductionApi.post_v1_production_create",
|
|
375
|
+
:header_params => header_params,
|
|
376
|
+
:query_params => query_params,
|
|
377
|
+
:form_params => form_params,
|
|
378
|
+
:body => post_body,
|
|
379
|
+
:auth_names => auth_names,
|
|
380
|
+
:return_type => return_type
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
384
|
+
if @api_client.config.debugging
|
|
385
|
+
@api_client.config.logger.debug "API called: ApiProductionApi#post_v1_production_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
386
|
+
end
|
|
387
|
+
return data, status_code, headers
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# 修改生产记录单。
|
|
391
|
+
# 修改时仍按完整生产单保存: 有效领料明细会整体参与服务层处理,传入 `Status = -1` 的明细表示删除该明细。
|
|
392
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
393
|
+
# @param [Hash] opts the optional parameters
|
|
394
|
+
# @option opts [ProductionApiDto] :production_api_dto
|
|
395
|
+
# @return [ApiResponseProductionApiDto]
|
|
396
|
+
def put_v1_production_update(x_credential_type, opts = {})
|
|
397
|
+
data, _status_code, _headers = put_v1_production_update_with_http_info(x_credential_type, opts)
|
|
398
|
+
data
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# 修改生产记录单。
|
|
402
|
+
# 修改时仍按完整生产单保存: 有效领料明细会整体参与服务层处理,传入 `Status = -1` 的明细表示删除该明细。
|
|
403
|
+
# @param x_credential_type [String] Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @option opts [ProductionApiDto] :production_api_dto
|
|
406
|
+
# @return [Array<(ApiResponseProductionApiDto, Integer, Hash)>] ApiResponseProductionApiDto data, response status code and response headers
|
|
407
|
+
def put_v1_production_update_with_http_info(x_credential_type, opts = {})
|
|
408
|
+
if @api_client.config.debugging
|
|
409
|
+
@api_client.config.logger.debug 'Calling API: ApiProductionApi.put_v1_production_update ...'
|
|
410
|
+
end
|
|
411
|
+
# verify the required parameter 'x_credential_type' is set
|
|
412
|
+
if @api_client.config.client_side_validation && x_credential_type.nil?
|
|
413
|
+
fail ArgumentError, "Missing the required parameter 'x_credential_type' when calling ApiProductionApi.put_v1_production_update"
|
|
414
|
+
end
|
|
415
|
+
# verify enum value
|
|
416
|
+
allowable_values = ["Token", "API Key"]
|
|
417
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(x_credential_type)
|
|
418
|
+
fail ArgumentError, "invalid value for \"x_credential_type\", must be one of #{allowable_values}"
|
|
419
|
+
end
|
|
420
|
+
# resource path
|
|
421
|
+
local_var_path = '/v1/production/Update'
|
|
422
|
+
|
|
423
|
+
# query parameters
|
|
424
|
+
query_params = opts[:query_params] || {}
|
|
425
|
+
|
|
426
|
+
# header parameters
|
|
427
|
+
header_params = opts[:header_params] || {}
|
|
428
|
+
# HTTP header 'Accept' (if needed)
|
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
430
|
+
# HTTP header 'Content-Type'
|
|
431
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
432
|
+
if !content_type.nil?
|
|
433
|
+
header_params['Content-Type'] = content_type
|
|
434
|
+
end
|
|
435
|
+
header_params[:'X-Credential-Type'] = x_credential_type
|
|
436
|
+
|
|
437
|
+
# form parameters
|
|
438
|
+
form_params = opts[:form_params] || {}
|
|
439
|
+
|
|
440
|
+
# http body (model)
|
|
441
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'production_api_dto'])
|
|
442
|
+
|
|
443
|
+
# return_type
|
|
444
|
+
return_type = opts[:debug_return_type] || 'ApiResponseProductionApiDto'
|
|
445
|
+
|
|
446
|
+
# auth_names
|
|
447
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey', 'Signature', 'BearerToken', 'Timestamp']
|
|
448
|
+
|
|
449
|
+
new_options = opts.merge(
|
|
450
|
+
:operation => :"ApiProductionApi.put_v1_production_update",
|
|
451
|
+
:header_params => header_params,
|
|
452
|
+
:query_params => query_params,
|
|
453
|
+
:form_params => form_params,
|
|
454
|
+
:body => post_body,
|
|
455
|
+
:auth_names => auth_names,
|
|
456
|
+
:return_type => return_type
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
460
|
+
if @api_client.config.debugging
|
|
461
|
+
@api_client.config.logger.debug "API called: ApiProductionApi#put_v1_production_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
462
|
+
end
|
|
463
|
+
return data, status_code, headers
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
end
|