作者 yangfu

服务初始化

正在显示 78 个修改的文件 包含 1410 行增加1 行删除
version: v1
kind: HttpApi
metadata:
service: device
path: /devices
endpoints:
- method: createDevice
route:
post: /
- method: updateDevice
route:
put: /{deviceId}
- method: getDevice
route:
get: /{deviceId}
- method: removeDevice
route:
delete: /{deviceId}
- method: listDevice
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: product
path: /products
endpoints:
- method: createProduct
route:
post: /
- method: updateProduct
route:
put: /{productId}
- method: getProduct
route:
get: /{productId}
- method: removeProduct
route:
delete: /{productId}
- method: listProduct
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: productCalendar
path: /product-calendars
endpoints:
- method: createProductCalendar
route:
post: /
- method: updateProductCalendar
route:
put: /{productCalendarId}
- method: getProductCalendar
route:
get: /{productCalendarId}
- method: removeProductCalendar
route:
delete: /{productCalendarId}
- method: listProductCalendar
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: productGroup
path: /product-groups
endpoints:
- method: createProductGroup
route:
post: /
- method: updateProductGroup
route:
put: /{productGroupId}
- method: getProductGroup
route:
get: /{productGroupId}
- method: removeProductGroup
route:
delete: /{productGroupId}
- method: listProductGroup
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: productJob
path: /product-jobs
endpoints:
- method: createProductJob
route:
post: /
- method: updateProductJob
route:
put: /{productJobId}
- method: getProductJob
route:
get: /{productJobId}
- method: removeProductJob
route:
delete: /{productJobId}
- method: listProductJob
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: productLine
path: /product-lines
endpoints:
- method: createProductLine
route:
post: /
- method: updateProductLine
route:
put: /{lineId}
- method: getProductLine
route:
get: /{lineId}
- method: removeProductLine
route:
delete: /{lineId}
- method: listProductLine
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: productPlan
path: /product-plans
endpoints:
- method: createProductPlan
route:
post: /
- method: updateProductPlan
route:
put: /{productPlanId}
- method: getProductPlan
route:
get: /{productPlanId}
- method: removeProductPlan
route:
delete: /{productPlanId}
- method: listProductPlan
route:
get: /
params:
- name: offset
- name: limit
- method: receiveMaterial
route:
post: /receive-material
- method: returnMaterial
route:
post: /return-material
- method: setOnline
route:
post: /set-online
- method: setOnline
route:
post: /set-offline
- method: switch
route:
post: /switch
- method: submitProductRecord
route:
post: /submit-product-record
\ No newline at end of file
... ...
version: v1
kind: HttpApi
metadata:
service: productSection
path: /product-sections
endpoints:
- method: createProductSection
route:
post: /
- method: updateProductSection
route:
put: /{sectionId}
- method: getProductSection
route:
get: /{sectionId}
- method: removeProductSection
route:
delete: /{sectionId}
- method: listProductSection
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: unitConversion
path: /unit-conversions
endpoints:
- method: createUnitConversion
route:
post: /
- method: updateUnitConversion
route:
put: /{unitConversionId}
- method: getUnitConversion
route:
get: /{unitConversionId}
- method: removeUnitConversion
route:
delete: /{unitConversionId}
- method: listUnitConversion
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: HttpApi
metadata:
service: workshop
path: /workshops
endpoints:
- method: createWorkshop
route:
post: /
- method: updateWorkshop
route:
put: /{workshopId}
- method: getWorkshop
route:
get: /{workshopId}
- method: removeWorkshop
route:
delete: /{workshopId}
- method: listWorkshop
route:
get: /
params:
- name: offset
- name: limit
... ...
... ... @@ -6,6 +6,10 @@ metadata:
attributes:
- ref: deviceId
required: true
- ref: companyId
required: true
- ref: orgId
required: true
- ref: deviceCode
required: true
- ref: deviceName
... ...
... ... @@ -13,4 +13,4 @@ metadata:
- name: productPlan
description: 生产计划信息(批次)
type:
primitive: productPlan
schema: productPlan
... ...
version: v1
kind: Method
metadata:
name: createDevice
type: command
description: 创建设备服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: deviceCode
required: true
- ref: deviceName
required: true
- ref: deviceModel
required: true
- ref: deviceType
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: brand
required: true
- ref: deviceStatus
required: true
- ref: riskLevel
required: true
result:
- name: device
type:
schema: device
required: true
... ...
version: v1
kind: Method
metadata:
name: getDevice
type: query
description: 返回设备服务
payload:
- ref: deviceId
required: true
result:
- name: device
type:
schema: device
required: true
... ...
version: v1
kind: Method
metadata:
name: listDevice
type: query
description: 返回设备服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: devices
type:
array: device
required: true
... ...
version: v1
kind: Method
metadata:
name: removeDevice
type: command
description: 移除设备服务
payload:
- ref: deviceId
required: true
result:
- name: device
type:
schema: device
required: true
... ...
version: v1
kind: Method
metadata:
name: updateDevice
type: command
description: 更新设备服务
payload:
- ref: deviceId
required: true
- ref: deviceCode
required: true
- ref: deviceName
required: true
- ref: deviceModel
required: true
- ref: deviceType
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: brand
required: true
- ref: deviceStatus
required: true
- ref: riskLevel
required: true
result:
- name: device
type:
schema: device
required: true
... ...
version: v1
kind: Service
metadata:
name: device
description: 设备服务
... ...
version: v1
kind: Method
metadata:
name: createProduct
type: command
description: 创建产品服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: productCode
required: true
- ref: productName
required: true
- ref: productCategory
required: true
- name: productSpec
description: 产品规格
type:
schema: unitQuantity
result:
- name: product
type:
schema: product
required: true
... ...
version: v1
kind: Method
metadata:
name: getProduct
type: query
description: 返回产品服务
payload:
- ref: productId
required: true
result:
- name: product
type:
schema: product
required: true
... ...
version: v1
kind: Method
metadata:
name: listProduct
type: query
description: 返回产品服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: products
type:
array: product
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProduct
type: command
description: 移除产品服务
payload:
- ref: productId
required: true
result:
- name: product
type:
schema: product
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProduct
type: command
description: 更新产品服务
payload:
- ref: productId
required: true
- ref: productCode
required: true
- ref: productName
required: true
- ref: productCategory
required: true
- name: productSpec
description: 产品规格
type:
schema: unitQuantity
result:
- name: product
type:
schema: product
required: true
... ...
version: v1
kind: Service
metadata:
name: product
description: 产品服务
... ...
version: v1
kind: Method
metadata:
name: createProductCalendar
type: command
description: 创建工厂日历服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: workOn
required: true
- ref: calendarSelected
required: true
- ref: inWorkAt
required: true
- ref: outWorkAt
required: true
- ref: breakTime
required: true
- ref: workTime
required: true
result:
- name: productCalendar
type:
schema: productCalendar
required: true
... ...
version: v1
kind: Method
metadata:
name: getProductCalendar
type: query
description: 返回工厂日历服务
payload:
- ref: productCalendarId
required: true
result:
- name: productCalendar
type:
schema: productCalendar
required: true
... ...
version: v1
kind: Method
metadata:
name: listProductCalendar
type: query
description: 返回工厂日历服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: productCalendars
type:
array: productCalendar
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProductCalendar
type: command
description: 移除工厂日历服务
payload:
- ref: productCalendarId
required: true
result:
- name: productCalendar
type:
schema: productCalendar
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProductCalendar
type: command
description: 更新工厂日历服务
payload:
- ref: productCalendarId
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: workOn
required: true
- ref: calendarSelected
required: true
- ref: inWorkAt
required: true
- ref: outWorkAt
required: true
- ref: breakTime
required: true
- ref: workTime
required: true
result:
- name: productCalendar
type:
schema: productCalendar
required: true
... ...
version: v1
kind: Service
metadata:
name: productCalendar
description: 工厂日历服务
... ...
version: v1
kind: Method
metadata:
name: createProductGroup
type: command
description: 创建生产班组服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: groupName
required: true
- ref: groupLeader
required: true
- ref: groupMembers
required: true
- ref: workOn
required: true
result:
- name: productGroup
type:
schema: productGroup
required: true
... ...
version: v1
kind: Method
metadata:
name: getProductGroup
type: query
description: 返回生产班组服务
payload:
- ref: productGroupId
required: true
result:
- name: productGroup
type:
schema: productGroup
required: true
... ...
version: v1
kind: Method
metadata:
name: listProductGroup
type: query
description: 返回生产班组服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: productGroups
type:
array: productGroup
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProductGroup
type: command
description: 移除生产班组服务
payload:
- ref: productGroupId
required: true
result:
- name: productGroup
type:
schema: productGroup
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProductGroup
type: command
description: 更新生产班组服务
payload:
- ref: productGroupId
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: groupName
required: true
- ref: groupLeader
required: true
- ref: groupMembers
required: true
- ref: workOn
required: true
result:
- name: productGroup
type:
schema: productGroup
required: true
... ...
version: v1
kind: Service
metadata:
name: productGroup
description: 生产班组服务
... ...
version: v1
kind: Method
metadata:
name: createProductJob
type: command
description: 创建工位服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: jobName
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- name: relatedDevices
description: 关联设备列表
type:
array: int
result:
- name: productJob
type:
schema: productJob
required: true
... ...
version: v1
kind: Method
metadata:
name: getProductJob
type: query
description: 返回工位服务
payload:
- ref: productJobId
required: true
result:
- name: productJob
type:
schema: productJob
required: true
... ...
version: v1
kind: Method
metadata:
name: listProductJob
type: query
description: 返回工位服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: productJobs
type:
array: productJob
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProductJob
type: command
description: 移除工位服务
payload:
- ref: productJobId
required: true
result:
- name: productJob
type:
schema: productJob
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProductJob
type: command
description: 更新工位服务
payload:
- ref: productJobId
required: true
- ref: jobName
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- name: relatedDevices
description: 关联设备列表
type:
array: int
result:
- name: productJob
type:
schema: productJob
required: true
... ...
version: v1
kind: Service
metadata:
name: productJob
description: 工位服务
... ...
version: v1
kind: Method
metadata:
name: createProductLine
type: command
description: 创建生产线
payload:
- ref: workshopId
required: true
- ref: lineName
required: true
result:
- name: productLine
type:
schema: productLine
required: true
... ...
version: v1
kind: Method
metadata:
name: getProductLine
type: query
description: 返回生产线
payload:
- ref: workshopId
required: true
- ref: lineId
required: true
result:
- name: productLine
type:
schema: productLine
required: true
... ...
version: v1
kind: Method
metadata:
name: listProductLine
type: query
description: 返回生产线列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: productLines
type:
array: productLine
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProductLine
type: command
description: 移除生产线
payload:
- ref: workshopId
required: true
- ref: lineId
required: true
result:
- name: productLine
type:
schema: productLine
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProductLine
type: command
description: 更新生产线
payload:
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: lineName
required: true
result:
- name: productLine
type:
schema: productLine
required: true
... ...
version: v1
kind: Service
metadata:
name: productLine
description: 生产线服务
... ...
version: v1
kind: Method
metadata:
name: createProductPlan
type: command
description: 创建生产计划服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: workshopId
required: true
- ref: batchNumber
required: true
- ref: productDate
required: true
- ref: workOn
required: true
- ref: machine
required: true
- ref: planProductName
required: true
- ref: planDevoted
required: true
- ref: remark
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: getProductPlan
type: query
description: 返回生产计划服务
payload:
- ref: productPlanId
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: listProductPlan
type: query
description: 返回生产计划服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: productPlans
type:
array: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: receiveMaterial
type: command
description: 领料
payload:
- ref: productPlanId
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProductPlan
type: command
description: 移除生产计划服务
payload:
- ref: productPlanId
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: returnMaterial
type: command
description: 退料
payload:
- ref: productPlanId
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: setOffline
type: command
description: 计划下线
payload:
- ref: productPlanId
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: setOnline
type: command
description: 计划上线
payload:
- ref: productPlanId
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: submitProductRecord
type: command
description: 提交成品记录 (成品 二级品)
payload:
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: switch
type: command
description: 换单
payload:
- name: fromProductPlanId
description: 下线计划ID
type:
primitive: int
- name: toProductPlanId
description: 上线计划ID
type:
primitive: int
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProductPlan
type: command
description: 更新生产计划服务
payload:
- ref: productPlanId
required: true
- ref: companyId
required: false
- ref: orgId
required: false
- ref: workshopId
required: true
- ref: batchNumber
required: true
- ref: productDate
required: true
- ref: workOn
required: true
- ref: machine
required: true
- ref: planProductName
required: true
- ref: planDevoted
required: true
- ref: remark
required: true
result:
- name: productPlan
type:
schema: productPlan
required: true
... ...
version: v1
kind: Service
metadata:
name: productPlan
description: 生产计划服务
... ...
version: v1
kind: Method
metadata:
name: createProductSection
type: command
description: 创建工段服务
payload:
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionName
required: true
result:
- name: productSection
type:
schema: productSection
required: true
... ...
version: v1
kind: Method
metadata:
name: getProductSection
type: query
description: 返回工段服务
payload:
- ref: workshopId
required: true
- ref: sectionId
required: true
result:
- name: productSection
type:
schema: productSection
required: true
... ...
version: v1
kind: Method
metadata:
name: listProductSection
type: query
description: 返回工段服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: productSections
type:
array: productSection
required: true
... ...
version: v1
kind: Method
metadata:
name: removeProductSection
type: command
description: 移除工段服务
payload:
- ref: workshopId
required: true
- ref: sectionId
required: true
result:
- name: productSection
type:
schema: productSection
required: true
... ...
version: v1
kind: Method
metadata:
name: updateProductSection
type: command
description: 更新工段服务
payload:
- ref: workshopId
required: true
- ref: sectionId
required: true
- ref: sectionName
required: true
result:
- name: productSection
type:
schema: productSection
required: true
... ...
version: v1
kind: Service
metadata:
name: productSection
description: 工段服务
... ...
version: v1
kind: Method
metadata:
name: createUnitConversion
type: command
description: 创建单位换算服务
payload:
- ref: companyId
required: true
- ref: orgId
required: true
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: material
required: true
- ref: fromUnitQuantity
required: true
- ref: toUnitQuantity
required: true
- ref: intelligentWeighingFlag
required: true
result:
- name: unitConversion
type:
schema: unitConversion
required: true
... ...
version: v1
kind: Method
metadata:
name: getUnitConversion
type: query
description: 返回单位换算服务
payload:
- ref: unitConversionId
required: true
result:
- name: unitConversion
type:
schema: unitConversion
required: true
... ...
version: v1
kind: Method
metadata:
name: listUnitConversion
type: query
description: 返回单位换算服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: unitConversions
type:
array: unitConversion
required: true
... ...
version: v1
kind: Method
metadata:
name: removeUnitConversion
type: command
description: 移除单位换算服务
payload:
- ref: unitConversionId
required: true
result:
- name: unitConversion
type:
schema: unitConversion
required: true
... ...
version: v1
kind: Method
metadata:
name: updateUnitConversion
type: command
description: 更新单位换算服务
payload:
- ref: unitConversionId
required: true
- ref: companyId
required: false
- ref: orgId
required: false
- ref: workshopId
required: true
- ref: lineId
required: true
- ref: sectionId
required: true
- ref: material
required: true
- ref: fromUnitQuantity
required: true
- ref: toUnitQuantity
required: true
- ref: intelligentWeighingFlag
required: true
result:
- name: unitConversion
type:
schema: unitConversion
required: true
... ...
version: v1
kind: Service
metadata:
name: unitConversion
description: 单位换算服务
... ...
version: v1
kind: Method
metadata:
name: createWorkshop
type: command
description: 创建车间服务
payload:
- ref: workshopName
required: true
- name: principalId
description: 负责人ID
type:
primitive: int
result:
- name: workshop
type:
schema: workshop
required: true
... ...
version: v1
kind: Method
metadata:
name: getWorkshop
type: query
description: 返回车间服务
payload:
- ref: workshopId
required: true
result:
- name: workshop
type:
schema: workshop
required: true
... ...
version: v1
kind: Method
metadata:
name: listWorkshop
type: query
description: 返回车间服务列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: workshops
type:
array: workshop
required: true
... ...
version: v1
kind: Method
metadata:
name: removeWorkshop
type: command
description: 移除车间服务
payload:
- ref: workshopId
required: true
result:
- name: workshop
type:
schema: workshop
required: true
... ...
version: v1
kind: Method
metadata:
name: updateWorkshop
type: command
description: 更新车间服务
payload:
- ref: workshopId
required: true
- ref: workshopName
required: true
- name: principalId
description: 负责人ID
type:
primitive: int
required: true
result:
- name: workshop
type:
schema: workshop
required: true
... ...
version: v1
kind: Service
metadata:
name: workshop
description: 车间服务
... ...