|
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.ws.rs.QueryParam;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -42,8 +43,8 @@ public class AdmFloorController {
|
|
|
public AdmResponse create(@RequestBody AdmCreateRequest<AdmFloor> createRequest, @QueryParam("projectId") String projectId) throws Exception {
|
|
|
// 组装上下文条件
|
|
|
InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
- List<AdmFloor> vos = CollUtil.newArrayList(createRequest.getContent());
|
|
|
- vos = service.doInsert(context, AdmFloor.class, vos);
|
|
|
+ //List<AdmFloor> vos = CollUtil.newArrayList(createRequest.getContent());
|
|
|
+ List<AdmFloor> vos = service.doInsert(context, AdmFloor.class, createRequest.getContent());
|
|
|
return AdmResponse.success(vos);
|
|
|
}
|
|
|
|
|
@@ -92,6 +93,7 @@ public class AdmFloorController {
|
|
|
|
|
|
/**
|
|
|
* 更新 outline
|
|
|
+ * TODO 暂时不知道具体的参数,先做所有字段的更新,之后有具体场景再做细化
|
|
|
* @param admFloor
|
|
|
* @return
|
|
|
* @throws Exception
|
|
@@ -99,8 +101,8 @@ public class AdmFloorController {
|
|
|
@PostMapping("/update-outline")
|
|
|
public AdmResponse updateOutline(@RequestBody AdmCreateRequest<AdmFloor> admFloor, @QueryParam("projectId") String projectId) throws Exception {
|
|
|
// 组装上下文条件
|
|
|
- InstanceUrlParam context = new InstanceUrlParam(groupCode, null, null, AdmCommonConstant.APP_ID);
|
|
|
- List<AdmFloor> vos = CollUtil.newArrayList();
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
+ List<AdmFloor> vos = CollUtil.newArrayList(admFloor.getContent());
|
|
|
vos = service.doUpdate(context, AdmFloor.class, vos);
|
|
|
return AdmResponse.success(vos);
|
|
|
}
|
|
@@ -136,6 +138,18 @@ public class AdmFloorController {
|
|
|
// 组装上下文条件
|
|
|
InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
request.setName("floor");
|
|
|
+ request.setProjection(null);
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
+ list.add("id");
|
|
|
+ list.add("name");
|
|
|
+ list.add("localId");
|
|
|
+ list.add("localName");
|
|
|
+ list.add("outline");
|
|
|
+ list.add("floorSequenceId");
|
|
|
+ list.add("modelId");
|
|
|
+ list.add("infos");
|
|
|
+ list.add("properties");
|
|
|
+ request.setProjection(list);
|
|
|
return service.doQuery(context, request, AdmFloor.class);
|
|
|
}
|
|
|
|