修复变更、增加筛选条件

This commit is contained in:
andy committed 2026-09-11 21:22:14 +08:00
1 parent 712ec51d68
commit e06afc8c33
137 files changed
+35872 -275

No files matched your search

+539 -6
View File
@@ -32,6 +32,14 @@
"data": { "$ref": "#/$defs/data" }
},
"allOf": [
{
"if": { "properties": { "data": { "properties": { "arrangement": { "required": ["vehicle_type"] } }, "required": ["arrangement"] } }, "required": ["data"] },
"then": { "properties": { "action": { "const": "arrangement_vehicle" }, "data": { "properties": { "arrangement": { "properties": { "mode": { "enum": ["create", "update"] } } } } } } }
},
{
"if": { "properties": { "data": { "properties": { "arrangement": { "required": ["ticket_description"] } }, "required": ["arrangement"] } }, "required": ["data"] },
"then": { "properties": { "action": { "const": "arrangement_transport" }, "data": { "properties": { "arrangement": { "properties": { "mode": { "enum": ["create", "update"] } } } } } } }
},
{
"if": { "properties": { "action": { "const": "team_order_create" } }, "required": ["action"] },
"then": {
@@ -119,7 +127,29 @@
}
},
{
"if": { "properties": { "action": { "const": "arrangement_guide" } }, "required": ["action"] },
"if": { "properties": {
"action": {
"const": "arrangement_guide"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "create"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
}, "required": ["action",
"data"] },
"then": {
"properties": {
"data": {
@@ -136,7 +166,29 @@
}
},
{
"if": { "properties": { "action": { "const": "arrangement_vehicle" } }, "required": ["action"] },
"if": { "properties": {
"action": {
"const": "arrangement_vehicle"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "create"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
}, "required": ["action",
"data"] },
"then": {
"properties": {
"data": {
@@ -154,7 +206,29 @@
}
},
{
"if": { "properties": { "action": { "const": "arrangement_transport" } }, "required": ["action"] },
"if": { "properties": {
"action": {
"const": "arrangement_transport"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "create"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
}, "required": ["action",
"data"] },
"then": {
"properties": {
"data": {
@@ -171,7 +245,29 @@
}
},
{
"if": { "properties": { "action": { "const": "arrangement_other" } }, "required": ["action"] },
"if": { "properties": {
"action": {
"const": "arrangement_other"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "create"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
}, "required": ["action",
"data"] },
"then": {
"properties": {
"data": {
@@ -311,6 +407,396 @@
}
}
}
},
{
"if": {
"properties": {
"action": {
"const": "arrangement_guide"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "update"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
},
"required": [
"action",
"data"
]
},
"then": {
"properties": {
"data": {
"required": [
"existing_refs",
"arrangement"
],
"properties": {
"existing_refs": {
"required": [
"identifier"
]
},
"arrangement": {
"type": "object",
"additionalProperties": false,
"required": [
"mode",
"changes"
],
"properties": {
"mode": {
"const": "update"
},
"changes": {
"type": "object",
"additionalProperties": false,
"required": [
"resource"
],
"properties": {
"resource": {
"$ref": "#/$defs/namedRef"
},
"remark": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
}
}
}
},
{
"if": {
"properties": {
"action": {
"const": "arrangement_vehicle"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "update"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
},
"required": [
"action",
"data"
]
},
"then": {
"properties": {
"data": {
"required": [
"existing_refs",
"arrangement"
],
"properties": {
"existing_refs": {
"required": [
"identifier"
]
},
"arrangement": {
"type": "object",
"additionalProperties": false,
"required": [
"mode",
"changes",
"selection"
],
"properties": {
"mode": {
"const": "update"
},
"vehicle_type": { "type": "string", "minLength": 1, "pattern": "\\S" },
"changes": {
"type": "object",
"additionalProperties": false,
"required": [
"supplier",
"quantity"
],
"properties": {
"supplier": {
"$ref": "#/$defs/namedRef"
},
"remark": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"minimum": 1
}
}
},
"selection": {
"type": "object",
"additionalProperties": false,
"required": [
"start_date",
"end_date"
],
"properties": {
"start_date": {
"type": "string",
"format": "date"
},
"end_date": {
"type": "string",
"format": "date"
}
}
}
}
}
}
}
}
}
},
{
"if": {
"properties": {
"action": {
"const": "arrangement_transport"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "update"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
},
"required": [
"action",
"data"
]
},
"then": {
"properties": {
"data": {
"required": [
"existing_refs",
"arrangement"
],
"properties": {
"existing_refs": {
"required": [
"identifier"
]
},
"arrangement": {
"type": "object",
"additionalProperties": false,
"required": [
"mode",
"changes",
"selection"
],
"properties": {
"mode": {
"const": "update"
},
"ticket_description": { "type": "string", "minLength": 1, "pattern": "\\S" },
"changes": {
"type": "object",
"additionalProperties": false,
"required": [
"supplier",
"quantity"
],
"properties": {
"supplier": {
"$ref": "#/$defs/namedRef"
},
"remark": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"minimum": 1
}
}
},
"selection": {
"type": "object",
"additionalProperties": false,
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date"
}
}
}
}
}
}
}
}
}
},
{
"if": {
"properties": {
"action": {
"const": "arrangement_other"
},
"data": {
"properties": {
"arrangement": {
"properties": {
"mode": {
"const": "update"
}
},
"required": [
"mode"
]
}
},
"required": [
"arrangement"
]
}
},
"required": [
"action",
"data"
]
},
"then": {
"properties": {
"data": {
"required": [
"existing_refs",
"arrangement"
],
"properties": {
"existing_refs": {
"required": [
"identifier"
]
},
"arrangement": {
"type": "object",
"additionalProperties": false,
"required": [
"mode",
"changes",
"selection"
],
"properties": {
"mode": {
"const": "update"
},
"changes": {
"type": "object",
"additionalProperties": false,
"required": [
"supplier"
],
"properties": {
"supplier": {
"$ref": "#/$defs/namedRef"
},
"remark": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"minimum": 1
},
"filing": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"number": {
"type": "string",
"minLength": 1
},
"entry_port": {
"type": "string",
"minLength": 1
},
"exit_port": {
"type": "string",
"minLength": 1
}
}
}
}
},
"selection": {
"type": "object",
"additionalProperties": false,
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"format": "date"
},
"filing_date": {
"type": "string",
"format": "date"
}
}
}
}
}
}
}
}
}
}
],
"$defs": {
@@ -490,8 +976,32 @@
"properties": {
"mode": { "enum": ["create", "update"] },
"changes": { "$ref": "#/$defs/arrangementChanges" },
"selection": {
"type": "object",
"additionalProperties": false,
"properties": {
"start_date": {
"type": "string",
"format": "date"
},
"end_date": {
"type": "string",
"format": "date"
},
"date": {
"type": "string",
"format": "date"
},
"filing_date": {
"type": "string",
"format": "date"
}
}
},
"resource": { "$ref": "#/$defs/namedRef" },
"supplier": { "$ref": "#/$defs/namedRef" },
"vehicle_type": { "type": "string", "minLength": 1, "pattern": "\\S" },
"ticket_description": { "type": "string", "minLength": 1, "pattern": "\\S" },
"item": { "type": "string", "minLength": 1 },
"room_type": { "type": "string", "minLength": 1 },
"date": { "type": "string", "format": "date" },
@@ -508,8 +1018,31 @@
"additionalProperties": false,
"minProperties": 1,
"properties": {
"end_date": { "type": "string", "format": "date" },
"room_count": { "type": "integer", "minimum": 1 }
"resource": {
"$ref": "#/$defs/namedRef"
},
"end_date": {
"type": "string",
"format": "date"
},
"room_count": {
"type": "integer",
"minimum": 1
},
"supplier": {
"$ref": "#/$defs/namedRef"
},
"quantity": {
"type": "integer",
"minimum": 1
},
"remark": {
"type": "string",
"minLength": 1
},
"filing": {
"$ref": "#/$defs/filing"
}
}
},
"filing": {