孔洞逻辑完成
This commit is contained in:
@@ -19,14 +19,17 @@ class PathRepositoryImpl implements PathRepository {
|
||||
required ReferencePoint reference,
|
||||
required int heading,
|
||||
required OuterBoundary outer,
|
||||
required List<HoleBoundary> holes,
|
||||
required Map<String, HoleBoundary> holes,
|
||||
required int workType,
|
||||
}) async {
|
||||
final body = {
|
||||
'reference': reference.toJson(),
|
||||
'heading': heading,
|
||||
'outer': outer.toJson(),
|
||||
'holes': holes.map((hole) => hole.toJson()).toList(),
|
||||
'holes': holes != null && holes.isNotEmpty
|
||||
? holes.values.first
|
||||
.toJson() // 取第一个值并序列化,去掉外层 Map
|
||||
: {},
|
||||
'workType': workType,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user