Browse Source

竖井,添加bug

lvxianyun 3 years ago
parent
commit
3734de1ce2

+ 2 - 2
src/main/java/com/persagy/proxy/adm/controller/AdmShaftController.java

@@ -80,7 +80,7 @@ public class AdmShaftController {
      * @throws Exception
      */
     @PostMapping("/create")
-    public AdmResponse create(@RequestBody AdmCreateRequest<AdmShaft> createRequest, @QueryParam("projectId") String projectId) throws Exception {       
+    public AdmResponse create(@RequestBody AdmCreateRequest<AdmShaft> createRequest) throws Exception {
         List<AdmShaft> vos = CollUtil.newArrayList(createRequest.getContent());
         List<AdmShaft> unRelationShaft = new ArrayList<>();
         List<AdmShaft> admShafts = new ArrayList<>(vos.size());
@@ -93,7 +93,7 @@ public class AdmShaftController {
                 unRelationShaft.add(admShaft);
             }else{
                 //插入对象 添加关系
-                List<AdmShaft> shafts = service.doInsert(AdmContextUtil.toDmpContext(), AdmShaft.class, unRelationShaft);
+                List<AdmShaft> shafts = service.doInsert(AdmContextUtil.toDmpContext(), AdmShaft.class, CollUtil.newArrayList(admShaft));
                 admShaft.getBuildingList().stream().forEach(admBuilding ->{
                     if(StrUtil.isNotEmpty(admBuilding.getId())){
                         relationDTOS.add(new RelationDTO(null, "ArchSubset", "Bd2Sh", null, shafts.get(0).getId() , admBuilding.getId()));