跳到主要内容

POST 编辑变更单(仅草稿/审批退回)

POST 写操作。body 为 JSON 对象。

接口编码所需范围后端接口
project.drawing.changes.updateproject:writePOST /v1/drawing/changes/update(comap-project)

必填字段

字段依据
id接口规格
attachments[].attachmentType接口规格
attachments[].fileId接口规格

条件必填(如「某状态时必填」)不在此表,以上方参数说明为准。 判定规则见必填字段的判定。

请求体字段(body)

字段类型必填说明
idinteger(int64)是变更单ID
oldVersionNostring—原版本号
newVersionNostring—目标(新)版本号
changeTypeCodestring—变更类型码
changeLevelstring—变更等级 NORMAL/IMPORTANT/URGENT
isUrgentinteger(int32)—是否紧急
problemDescriptionstring—问题描述
changeReasonstring—变更原因
backgroundstring—背景
involvesCustomerinteger(int32)—involvesCustomer
involvesQualityinteger(int32)—involvesQuality
involvesCostReductioninteger(int32)—involvesCostReduction
involvesProcessOptinteger(int32)—involvesProcessOpt
affectsFunctioninteger(int32)—affectsFunction
affectsInterchangeabilityinteger(int32)—affectsInterchangeability
affectsInventoryinteger(int32)—affectsInventory
affectsInTransitinteger(int32)—affectsInTransit
affectsBominteger(int32)—affectsBom
affectsDeliveredinteger(int32)—affectsDelivered
affectsSpareinteger(int32)—affectsSpare
affectsInProductioninteger(int32)—affectsInProduction
affectsPurchaseinteger(int32)—affectsPurchase
needSwitchSupplierinteger(int32)—needSwitchSupplier
handlingSuggestionstring—handlingSuggestion
purchaseHandlingSuggestionstring—purchaseHandlingSuggestion
bomHandlingSuggestionstring—bomHandlingSuggestion
inventoryHandlingSuggestionstring—inventoryHandlingSuggestion
projectHandlingSuggestionstring—projectHandlingSuggestion
effectSuggestionstring—effectSuggestion
executionOwnerIdinteger(int64)—执行负责人ID
plannedCompleteDatestring—计划完成日期 yyyy-MM-dd
attachments5DrawingChangeAttachmentItemDTO[]—随单一并绑定的附件(为 null 不处理;编辑时只增量绑定尚未绑定的 fileId)

「必填」仅反映接口规格声明的部分。服务内还有未体现在规格里的校验, 标「—」不等于可以不传;租户在主站配置的字段必填不约束本接口。 详见必填字段的判定与字段清单与自定义字段。

请求示例

curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "project.drawing.changes.update",
"body": {
"id": "1961000000000000001"
}
}'

错误处理​

响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:

错误码说明可重试
92101访问凭证无效否
92201接口未登记或已停用否
92202超出凭证授权范围——本接口需 project:write否
92204绑定员工无此接口的功能权限否
92203上游服务调用失败先查询处理结果,禁止盲目重试
92301请求过于频繁是
92205写操作处理超时,结果未知(下游可能仍在执行)否,先查询确认结果
92302有参数相同的写请求正在处理中等待并确认前一次结果,勿重复提交

除此之外,comap-project 自身的业务校验失败会原样透传其业务码与提示 (如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内, 以响应里的 message 为准。完整的平台层错误码见错误码说明。

← 返回图纸变更管理