dcs 7 månader sedan
förälder
incheckning
5b0012c2ff
28 ändrade filer med 3561 tillägg och 0 borttagningar
  1. 1 0
      pom.xml
  2. 25 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/Application.java
  3. 110 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/config/BimfaceConfig.java
  4. 30 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/controller/BimAttributeController.java
  5. 484 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/controller/BimModelController.java
  6. 33 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/AreaDao.java
  7. 19 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimAttributeDao.java
  8. 19 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimElementDao.java
  9. 41 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimFamilyPartItemDao.java
  10. 95 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimModelDao.java
  11. 20 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimPartItemRegularDao.java
  12. 64 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimAttribute.java
  13. 122 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimElement.java
  14. 141 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimFamilyPartItem.java
  15. 37 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimFamilyRegular.java
  16. 166 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimModel.java
  17. 45 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimPartItemRegular.java
  18. 42 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/model/bimface/Area.java
  19. 47 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/service/BimAttributeService.java
  20. 1561 0
      virgo.bim/src/main/java/com/bosshand/virgo/bim/service/BimModelService.java
  21. 64 0
      virgo.bim/src/main/resources/application-dev.properties
  22. 64 0
      virgo.bim/src/main/resources/application-prd.properties
  23. 68 0
      virgo.bim/src/main/resources/application.properties
  24. 40 0
      virgo.bim/src/main/resources/mapper/BimAttributeMapper.xml
  25. 68 0
      virgo.bim/src/main/resources/mapper/BimElementMapper.xml
  26. 118 0
      virgo.bim/src/main/resources/mapper/BimFamilyPartItemMapper.xml
  27. 34 0
      virgo.bim/src/main/resources/mapper/BimPartItemRegularMapper.xml
  28. 3 0
      virgo.zuul/src/main/resources/application.properties

+ 1 - 0
pom.xml

@@ -28,6 +28,7 @@
 		<module>virgo.config</module>
 		<module>virgo.eureka</module>
 		<module>virgo.api</module>			
+		<module>virgo.bim</module>
 		<module>virgo.manager</module>
 		<module>virgo.zuul</module>
 		<module>virgo.file</module>

+ 25 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/Application.java

@@ -0,0 +1,25 @@
+package com.bosshand.virgo.bim;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@EnableFeignClients
+@Configuration
+@SpringBootApplication
+@EnableTransactionManagement
+@EnableEurekaClient
+@MapperScan("com.bosshand.virgo.core.dao,com.bosshand.virgo.bim.dao")
+@ComponentScan(basePackages = {"com.bosshand"})
+public class Application {
+
+	public static void main(String[] args) {
+		SpringApplication.run(Application.class, args);
+	}
+
+}

+ 110 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/config/BimfaceConfig.java

@@ -0,0 +1,110 @@
+package com.bosshand.virgo.bim.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
+@Component
+@Configuration
+public class BimfaceConfig {
+	
+	@Value("${bimface.app.AppKey}")
+	private String appKey;
+	
+	@Value("${bimface.app.AppSecret}")
+	private String appSecret;
+	
+	@Value("${bimface.app.accessToken.url}")
+	private String accessTokenUrl;
+	
+	@Value("${bimface.app.viewToken.url}")
+	private String viewTokenUrl;
+	
+	@Value("${bimface.app.upload.url}")
+	private String uploadUrl;
+	
+	@Value("${bimface.app.translate.url}")
+	private String translateUrl;
+	
+	@Value("${bimface.app.elementIds.url}")
+	private String elementIdsUrl;
+	
+	@Value("${bimface.app.integrate.url}")
+	private String integrateUrl;
+	
+	@Value("${bimface.app.integrations.url}")
+	private String integrations;
+	
+	public String getAppKey() {
+		return appKey;
+	}
+
+	public void setAppKey(String appKey) {
+		this.appKey = appKey;
+	}
+
+	public String getAppSecret() {
+		return appSecret;
+	}
+
+	public void setAppSecret(String appSecret) {
+		this.appSecret = appSecret;
+	}
+
+	public String getAccessTokenUrl() {
+		return accessTokenUrl;
+	}
+
+	public void setAccessTokenUrl(String accessTokenUrl) {
+		this.accessTokenUrl = accessTokenUrl;
+	}
+
+	public String getViewTokenUrl() {
+		return viewTokenUrl;
+	}
+
+	public void setViewTokenUrl(String viewTokenUrl) {
+		this.viewTokenUrl = viewTokenUrl;
+	}
+
+	public String getUploadUrl() {
+		return uploadUrl;
+	}
+
+	public void setUploadUrl(String uploadUrl) {
+		this.uploadUrl = uploadUrl;
+	}
+
+	public String getTranslateUrl() {
+		return translateUrl;
+	}
+
+	public void setTranslateUrl(String translateUrl) {
+		this.translateUrl = translateUrl;
+	}
+
+	public String getElementIdsUrl() {
+		return elementIdsUrl;
+	}
+
+	public void setElementIdsUrl(String elementIdsUrl) {
+		this.elementIdsUrl = elementIdsUrl;
+	}
+
+	public String getIntegrateUrl() {
+		return integrateUrl;
+	}
+
+	public void setIntegrateUrl(String integrateUrl) {
+		this.integrateUrl = integrateUrl;
+	}
+
+	public String getIntegrations() {
+		return integrations;
+	}
+
+	public void setIntegrations(String integrations) {
+		this.integrations = integrations;
+	}
+	
+}

+ 30 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/controller/BimAttributeController.java

@@ -0,0 +1,30 @@
+package com.bosshand.virgo.bim.controller;
+
+import com.bosshand.virgo.bim.model.BimAttribute;
+import com.bosshand.virgo.bim.service.BimAttributeService;
+import com.bosshand.virgo.core.response.Response;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+public class BimAttributeController {
+
+    @Autowired
+    BimAttributeService bimAttributeService;
+
+    @RequestMapping(value = "/bimAttribute", method = RequestMethod.POST)
+    public Response save(@RequestBody BimAttribute bimAttribute) {
+        return Response.ok(bimAttributeService.save(bimAttribute));
+    }
+
+    @RequestMapping(value = "/bimAttribute", method = RequestMethod.PUT)
+    public Response update(@RequestBody BimAttribute bimAttribute) {
+        return Response.ok(bimAttributeService.update(bimAttribute));
+    }
+
+    @RequestMapping(value = "/bimAttribute/{id}", method = RequestMethod.DELETE)
+    public Response delete(@PathVariable long id) {
+        bimAttributeService.delete(id);
+        return Response.ok();
+    }
+}

+ 484 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/controller/BimModelController.java

@@ -0,0 +1,484 @@
+package com.bosshand.virgo.bim.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.bosshand.virgo.bim.model.*;
+import com.bosshand.virgo.bim.service.BimAttributeService;
+import com.bosshand.virgo.bim.service.BimModelService;
+import com.bosshand.virgo.bim.service.FileClient;
+import com.bosshand.virgo.core.response.Response;
+import com.bosshand.virgo.core.utils.FileUtil;
+import com.bosshand.virgo.exception.BadRequestException;
+import com.bosshand.virgo.exception.Constant;
+import com.bosshand.virgo.exception.ServiceException;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("bim")
+public class BimModelController {
+
+    @Autowired
+    BimModelService bimModelService;
+
+    @Autowired
+    BimAttributeService bimAttributeService;
+
+    @Autowired
+    FileClient fileClient;
+
+    @RequestMapping(value = "/test/{artifactsId}", method = RequestMethod.GET)
+    public Response getArtifactsId(@PathVariable long artifactsId) {
+        return Response.ok(bimModelService.getArtifactsId(artifactsId));
+    }
+
+    @RequestMapping(value = "/uploadFile/{type}", method = RequestMethod.POST)
+    public Response uploadFile(@ApiParam(name = "uploadFile", required = true) MultipartFile uploadFile, @PathVariable int type) {
+        Response rp = fileClient.uploadFile(uploadFile, 1);
+        String str = rp.getData().toString();
+        String fileLocation = str.substring(str.lastIndexOf("http"), str.indexOf(",", str.lastIndexOf("http")));
+        return Response.ok(bimModelService.save(uploadFile.getOriginalFilename(), fileLocation, type));
+    }
+
+    @RequestMapping(value = "/uploadFile/{type}/{id}", method = RequestMethod.POST)
+    public Response reUploadFile(@ApiParam(name = "uploadFile", required = true) MultipartFile uploadFile, @PathVariable int type, @PathVariable String id) {
+        Response rp = fileClient.uploadFile(uploadFile, 1);
+        String str = rp.getData().toString();
+        String fileLocation = str.substring(str.lastIndexOf("http"), str.indexOf(",", str.lastIndexOf("http")));
+        return Response.ok(bimModelService.updateFile(uploadFile.getOriginalFilename(), fileLocation, type, id));
+    }
+
+    @RequestMapping(value = "/download/{id}", method = RequestMethod.GET)
+    public void downloadFile(@PathVariable String id, final HttpServletResponse response) throws Exception {
+
+        byte[] data = null;
+        OutputStream outputStream = null;
+        try {
+            BimModel model = bimModelService.get(id);
+            data = FileUtil.readFromUrl(model.getLocation());
+            response.setCharacterEncoding("UTF-8");
+            response.setContentType("application/x-msdownload");
+            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(model.getName(), "UTF-8"));
+            OutputStream outputSream = response.getOutputStream();
+            outputSream.write(data);
+            outputSream.flush();
+        } catch (IOException e) {
+            throw new BadRequestException("Fail to write stream", Constant.RET_DOCUMENT_ERROR, e);
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+    }
+
+    @RequestMapping(value = "/{id}/{type}", method = RequestMethod.PUT)
+    public Response updateType(@PathVariable String id, @PathVariable int type) {
+        bimModelService.updateType(id, type);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+    public Response uploadToBim(@PathVariable String id) {
+        try {
+            bimModelService.uploadToBim(id);
+            return Response.ok();
+        } catch (ServiceException | UnsupportedEncodingException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/{id}/{fileId}", method = RequestMethod.GET)
+    public Response downloadFromBim(@PathVariable String id, @PathVariable String fileId) {
+        bimModelService.downloadFromBim(id, fileId);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/translate/{id}", method = RequestMethod.GET)
+    public Response translate(@PathVariable String id) {
+        try {
+            bimModelService.translate(id);
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/viewToken/{fileId}", method = RequestMethod.GET)
+    public Response viewToken(@PathVariable String fileId) {
+        try {
+            return Response.ok(bimModelService.viewToken(fileId));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/viewToken/scene/{sceneId}", method = RequestMethod.GET)
+    public Response viewTokenBySceneId(@PathVariable String sceneId) {
+        try {
+            return Response.ok(bimModelService.viewTokenBySceneId(sceneId));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/elements/{id}", method = RequestMethod.GET)
+    public Response elements(@PathVariable String id) {
+        try {
+            return Response.ok(bimModelService.elements(id));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/elements/values/{id}", method = RequestMethod.GET)
+    public Response elementPropertyValues(@PathVariable String id) {
+        try {
+            return Response.ok(bimModelService.elements(id));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/elements/{fileId}/{familyType}", method = RequestMethod.GET)
+    public Response elementsByFileId(@PathVariable String fileId, @PathVariable String familyType) {
+        try {
+            return Response.ok(bimModelService.elementsByFileId(fileId, familyType));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/tree/{id}", method = RequestMethod.GET)
+    public Response tree(@PathVariable String id) {
+        try {
+            return Response.ok(bimModelService.tree(id));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/treeByFileId/{id}", method = RequestMethod.GET)
+    public Response treeByFileId(@PathVariable String id) {
+        try {
+            return Response.ok(bimModelService.treeByFileId(id));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/floors/{id}", method = RequestMethod.GET)
+    public Response floors(@PathVariable String id) {
+        try {
+            return Response.ok(bimModelService.floors(id));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/areas/{fileId}", method = RequestMethod.GET)
+    public Response areas(@PathVariable String fileId) {
+        try {
+            return Response.ok(bimModelService.areas(fileId));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/rooms/{fileId}", method = RequestMethod.GET)
+    public Response rooms(@PathVariable String fileId) {
+        try {
+            return Response.ok(bimModelService.rooms(fileId));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public Response list() {
+        return Response.ok(bimModelService.getList());
+    }
+
+    @RequestMapping(value = "/list/info", method = RequestMethod.GET)
+    public String listInfo() {
+        return bimModelService.listInfo().toJSONString();
+    }
+
+    @RequestMapping(value = "/list/type/{type}", method = RequestMethod.GET)
+    public Response getListByType(@PathVariable int type) {
+        return Response.ok(bimModelService.getListByType(type));
+    }
+
+    @RequestMapping(value = "/list/{ids}", method = RequestMethod.GET)
+    public Response getListByIds(@PathVariable String ids) {
+        return Response.ok(bimModelService.getListByIds(ids));
+    }
+
+    @RequestMapping(value = "/list/bims/{ids}", method = RequestMethod.GET)
+    public String getBimIds(@PathVariable String ids) {
+        List<BimModel> listByIds = bimModelService.getListByIds(ids);
+        return JSON.toJSONString(listByIds);
+    }
+
+    @RequestMapping(value = "/integrate", method = RequestMethod.PUT)
+    public Response modelIntegrate(@RequestBody String[] fileIds) {
+        return Response.ok(bimModelService.modelIntegrate(fileIds));
+    }
+
+    @RequestMapping(value = "/integrate/{integrateId}", method = RequestMethod.PUT)
+    public Response modelIntegrateTree(@PathVariable String integrateId) {
+        return Response.ok(bimModelService.modelIntegrateTree(integrateId));
+    }
+
+    @RequestMapping(value = "/integrateId/{integrateId}", method = RequestMethod.GET)
+    public String integrateTree(@PathVariable String integrateId){
+        return bimModelService.modelIntegrateTree(integrateId).toJSONString();
+    }
+
+    @RequestMapping(value = "/integrate/files/{integrateId}", method = RequestMethod.GET)
+    public Response modelIntegrateFiles(@PathVariable String integrateId) {
+        return Response.ok(bimModelService.modelIntegrateFiles(integrateId));
+    }
+
+    @RequestMapping(value = "/viewToken/integrate/{integrateId}", method = RequestMethod.GET)
+    public Response viewTokenByIntegrateId(@PathVariable String integrateId) {
+        try {
+            return Response.ok(bimModelService.viewTokenByIntegrateId(integrateId));
+        } catch (ServiceException e) {
+            return Response.fail(Constant.CODE_BAD_REQUEST, Constant.RET_INPUT_ERROR);
+        }
+    }
+
+    /*@RequestMapping(value = "/family/matching/{integrateId}/{isMatching}", method = RequestMethod.GET)
+    public Response getByBimIntegrateId(@PathVariable String integrateId, @PathVariable int isMatching) {
+        return Response.ok(bimModelService.getByBimIntegrateId(integrateId, isMatching));
+    }*/
+
+    @RequestMapping(value = "/family/matching/{integrateId}/{isMatching}/{currPage}/{pageSize}", method = RequestMethod.GET)
+    public Response getByBimIntegrateIdByPage(@PathVariable String integrateId,
+                                              @PathVariable int isMatching,
+                                              @PathVariable int currPage,
+                                              @PathVariable int pageSize) {
+        if (bimModelService.modelIntegrateState(integrateId)) {
+            return Response.fail(20001, "模型还在集成中。。。。。");
+        }
+        int totalCount = bimModelService.getByBimIntegrateId(integrateId, isMatching);
+        List<BimFamilyPartItem> dataList = bimModelService.getByBimIntegrateId(integrateId, isMatching, currPage, pageSize);
+        Map<String, Object> result = new HashMap<>();
+        result.put("dataList", dataList);
+        result.put("totalCount", totalCount);
+        return Response.ok(result);
+    }
+
+    @ApiOperation("查询绑定数据")
+    @RequestMapping(value = "/family/matching/query", method = RequestMethod.POST)
+    public Response queryBimFamilyPartItem(@RequestBody BimFamilyPartItem bimFamilyPartItem) {
+        return Response.ok(bimModelService.queryBimFamilyPartItem(bimFamilyPartItem));
+    }
+
+    @RequestMapping(value = "/family/again/{integrateId}", method = RequestMethod.GET)
+    public Response getAgainByBimIntegrateId(@PathVariable String integrateId) {
+        //return Response.ok(bimModelService.getAgainByBimIntegrateId(integrateId));
+        bimModelService.getAgainByBimIntegrateId(integrateId);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/family/{integrateId}/{partItemId}", method = RequestMethod.GET)
+    public Response getByBimIntegrate(@PathVariable String integrateId, @PathVariable long partItemId) {
+        return Response.ok(bimModelService.getByBimIntegrateId(integrateId, partItemId));
+    }
+
+    @RequestMapping(value = "/family/integrateId/{integrateId}", method = RequestMethod.GET)
+    public String getByBimIntegrateId(@PathVariable String integrateId) {
+        return bimModelService.getByBimIntegrateId(integrateId).toJSONString();
+    }
+
+    @RequestMapping(value = "/family/elementId/{elementId}", method = RequestMethod.GET)
+    public Response getByElementId(@PathVariable String elementId) {
+        return Response.ok(bimModelService.getByElementId(elementId));
+    }
+
+    @RequestMapping(value = "/family", method = RequestMethod.POST)
+    public Response updatePartItem(@RequestBody BimFamilyPartItem bimFamilyPartItem) {
+        bimModelService.updatePartItem(bimFamilyPartItem);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/family/list", method = RequestMethod.POST)
+    public Response updatePartItemList(@RequestBody List<BimFamilyPartItem> list) {
+        bimModelService.updatePartItemList(list);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/regular", method = RequestMethod.POST)
+    public Response saveRegular(@RequestBody BimPartItemRegular bimPartItemRegular) {
+        bimModelService.saveRegular(bimPartItemRegular);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/regular", method = RequestMethod.PUT)
+    public Response updateRegular(@RequestBody BimPartItemRegular bimPartItemRegular) {
+        bimModelService.updateRegular(bimPartItemRegular);
+        return Response.ok();
+    }
+
+    @RequestMapping(value = "/regular/{partItemId}", method = RequestMethod.POST)
+    public Response getRegularByPartItemId(@PathVariable long partItemId) {
+        return Response.ok(bimModelService.getRegularByPartItemId(partItemId));
+    }
+
+    @ApiOperation(value = "批量获取构件属性", notes = "批量获取构件属性")
+    @RequestMapping(value = "/batch/integrate/{integrateId}", method = RequestMethod.POST)
+    public Response batchObtainAttribute(@PathVariable String integrateId, @RequestBody JSONObject json) {
+        List<BimAttribute> list = bimAttributeService.getIntegrateId(integrateId, json);
+        if (list != null && list.size() > 0) {
+            return Response.ok(list);
+        }
+        return Response.ok(bimModelService.batchObtainAttribute(integrateId, json));
+    }
+
+    /**
+     * 前台传入的参数
+     * [
+     * {
+     * "familyNameList": [
+     * "建筑面层-30mm",
+     * "建筑面层-250mm",
+     * "楼板-75mm"
+     * ],
+     * "partItemId": "1284",
+     * "partItemName": "地基与基础(GB50202-2018)"
+     * },
+     * {
+     * "familyNameList": [
+     * "PM-L型构造柱-直槎-通用左-90°",
+     * "PM-L型构造柱-直槎-基础",
+     * "PM-一字型构造柱-直槎-基础"
+     * ],
+     * "partItemId": "1529",
+     * "partItemName": "地基与基础(GB50202-2018)"
+     * }
+     * ]
+     *
+     * @param list
+     * @return
+     */
+    @ApiOperation(value = "用户根据族类型批量绑定分部分项", notes = "用户根据族类型批量绑定分部分项")
+    @RequestMapping(value = "/bimfamilyregular", method = RequestMethod.POST)
+    public Response bimFamilyRegular(@RequestBody List<BimFamilyRegular> list) {
+        bimModelService.bimFamilyRegular(list);
+        return Response.ok();
+    }
+
+    @ApiOperation(value = "获取全部族类型列表", notes = "获取全部族类型列表")
+    @RequestMapping(value = "/family/list/{integrateId}", method = RequestMethod.GET)
+    public Response getFamilyTypeList(@PathVariable String integrateId) {
+        return Response.ok(bimModelService.getListByBimIntegrateId(integrateId));
+    }
+
+    //------------------------------------------------------------------------------
+
+    @ApiOperation(value = "获取构件属性", notes = "获取构件属性")
+    @RequestMapping(value = "/getElementPropertyValues/{fileId}/{elementId}", method = RequestMethod.GET)
+    public Response getElementPropertyValues(@PathVariable String fileId, @PathVariable String elementId) {
+        return Response.ok(bimModelService.getElementPropertyValues(fileId, elementId));
+    }
+
+    /**
+     * @param fileId
+     * @param elementId
+     * @param array     [
+     *                  {
+     *                  "group": "dimension",
+     *                  "items": [
+     *                  {
+     *                  "code": "perimeter",
+     *                  "extension": "object",
+     *                  "key": "perimeter",
+     *                  "orderNumber": 0,
+     *                  "unit": "mm",
+     *                  "value": 17200,
+     *                  "valueType": 2
+     *                  }
+     *                  ]
+     *                  }
+     *                  ]
+     * @return
+     */
+    @ApiOperation(value = "修改单模型指定构件属性", notes = "修改单模型指定构件属性")
+    @RequestMapping(value = "/modifyElements/{fileId}/{elementId}", method = RequestMethod.PUT)
+    public Response modifyElements(@PathVariable String fileId, @PathVariable String elementId, @RequestBody JSONArray array) {
+        int cont = bimModelService.modifyElements(fileId, elementId, array);
+        if (cont == 1) {
+            return Response.ok();
+        }
+        return Response.fail(200000, "失败");
+    }
+
+    @ApiOperation(value = "修改集成模型指定构件属性", notes = "修改集成模型指定构件属性")
+    @RequestMapping(value = "/modifyIntegrateElements/{integrateId}/{fileId}/{elementId}", method = RequestMethod.PUT)
+    public Response modifyIntegrateElements(@PathVariable String integrateId, @PathVariable String fileId, @PathVariable String elementId, @RequestBody JSONArray array) {
+        int cont = bimModelService.modifyIntegrateElements(integrateId, fileId, elementId, array);
+        if (cont == 1) {
+            return Response.ok();
+        }
+        return Response.fail(200000, "失败");
+    }
+
+    @ApiOperation(value = "删除单模型指定构件属性", notes = "删除单模型指定构件属性")
+    @RequestMapping(value = "/deleteElements/{fileId}/{elementId}", method = RequestMethod.DELETE)
+    public Response deleteElements(@PathVariable String fileId, @PathVariable String elementId, @RequestBody JSONArray array) {
+        int cont = bimModelService.deleteElements(fileId, elementId, array);
+        if (cont == 1) {
+            return Response.ok();
+        }
+        return Response.fail(200000, "失败");
+    }
+
+    @ApiOperation(value = "删除集成模型指定构件属性", notes = "删除集成模型指定构件属性")
+    @RequestMapping(value = "/deleteIntegrateElements/{integrateId}/{fileId}/{elementId}", method = RequestMethod.DELETE)
+    public Response deleteIntegrateElements(@PathVariable String integrateId, @PathVariable String fileId, @PathVariable String elementId, @RequestBody JSONArray array) {
+        int cont = bimModelService.deleteIntegrateElements(integrateId, fileId, elementId, array);
+        if (cont == 1) {
+            return Response.ok();
+        }
+        return Response.fail(200000, "失败");
+    }
+
+    @ApiOperation(value = "获取构件", notes = "获取构件")
+    @RequestMapping(value = "/getModelElements", method = RequestMethod.POST)
+    public Response getModelElements(@RequestBody JSONObject json) {
+        return Response.ok(bimModelService.getModelElements(json));
+    }
+
+    @ApiOperation(value = "按条件查询构件列表", notes = "按条件查询构件列表")
+    @RequestMapping(value = "/queryModelElements", method = RequestMethod.POST)
+    public Response queryModelElements(@RequestBody BimElement bimElement) {
+        return Response.ok(bimModelService.getModelElements(bimElement));
+    }
+
+    /**
+     * 获取分区
+     */
+    @ApiOperation(value = "获取分区", notes = "获取分区")
+    @RequestMapping(value = "/partition/{integrateId}", method = RequestMethod.GET)
+    public Response partition(@PathVariable String integrateId) {
+        return Response.ok(bimModelService.partition(integrateId));
+    }
+
+}

+ 33 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/AreaDao.java

@@ -0,0 +1,33 @@
+package com.bosshand.virgo.bim.dao;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Criteria;
+import org.springframework.data.mongodb.core.query.Query;
+import org.springframework.stereotype.Component;
+
+import com.bosshand.virgo.bim.model.bimface.Area;
+
+@Component
+public class AreaDao {
+	
+	@Autowired
+	MongoTemplate mongoTemplate;
+	
+	public void batchSave(List<Area> list) {
+		mongoTemplate.insert(list, Area.class);
+	}
+	
+	public List<Area> getByFileId(String fileId) {
+		Query query = new Query(Criteria.where("fileId").is(fileId));
+		return mongoTemplate.find(query, Area.class);
+	}
+	
+	public List<Area> getByFloorId(String floorId) {
+		Query query = new Query(Criteria.where("floorId").is(floorId));
+		return mongoTemplate.find(query, Area.class);
+	}
+
+}

+ 19 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimAttributeDao.java

@@ -0,0 +1,19 @@
+package com.bosshand.virgo.bim.dao;
+
+import com.bosshand.virgo.bim.model.BimAttribute;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface BimAttributeDao {
+
+    public int save(BimAttribute bimAttribute);
+
+    public int delete(long id);
+
+    public int update(BimAttribute bimAttribute);
+
+    public List<BimAttribute> getIntegrateId(String integrateId, String fileId, String elementId);
+
+}

+ 19 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimElementDao.java

@@ -0,0 +1,19 @@
+package com.bosshand.virgo.bim.dao;
+
+import com.bosshand.virgo.bim.model.BimElement;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface BimElementDao {
+
+    List<BimElement> getList(String fileId, List<String> list);
+
+    List<BimElement> getByList(BimElement bimElement);
+
+    List<BimElement> getFileId(String fileId);
+
+    int batchSave(List<BimElement> bimElements);
+
+}

+ 41 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimFamilyPartItemDao.java

@@ -0,0 +1,41 @@
+package com.bosshand.virgo.bim.dao;
+
+import com.bosshand.virgo.bim.model.BimFamilyPartItem;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface BimFamilyPartItemDao {
+
+	public void save(BimFamilyPartItem bimFamilyPartItem);
+	
+	public void saveBatch(List<BimFamilyPartItem> list);
+
+	public void delete(String bimIntegrateId);
+
+	public List<BimFamilyPartItem> getMatching(String bimIntegrateId, int currIndex, int pageSize);
+	
+	public List<BimFamilyPartItem> getNoMatching(String bimIntegrateId, int currIndex, int pageSize);
+
+	int getMatchingTotalCount(String bimIntegrateId);
+
+	int getNoMatchingTotalCount(String bimIntegrateId);
+
+	public List<BimFamilyPartItem> queryBimFamilyPartItem(BimFamilyPartItem bimFamilyPartItem);
+
+	public List<BimFamilyPartItem> getByBimIntegrateId(String bimIntegrateId);
+
+	public List<BimFamilyPartItem> getByBimIntegrate(String bimIntegrateId, long partItemId);
+
+	public BimFamilyPartItem getByElementId(String elementId);
+
+	public void updatePartItem(BimFamilyPartItem bimFamilyPartItem);
+
+
+	List<String> getRegionList(String bimIntegrateId);
+
+	List<String> getBuildingFloorList(String bimIntegrateId);
+
+
+}

+ 95 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimModelDao.java

@@ -0,0 +1,95 @@
+package com.bosshand.virgo.bim.dao;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Criteria;
+import org.springframework.data.mongodb.core.query.Query;
+import org.springframework.data.mongodb.core.query.Update;
+import org.springframework.stereotype.Component;
+
+import com.bosshand.virgo.bim.model.BimModel;
+
+@Component
+public class BimModelDao {
+
+	@Autowired
+	MongoTemplate mongoTemplate;
+	
+	public void save(BimModel bimModel) {
+        mongoTemplate.save(bimModel);
+    }
+
+	public BimModel get(String id) {
+		Query query = new Query(Criteria.where("id").is(id));
+		return mongoTemplate.findOne(query, BimModel.class);
+	}
+
+	public List<BimModel> getList() {
+		Query query = new Query();
+		return mongoTemplate.find(query, BimModel.class);
+	}
+	
+	public List<BimModel> getListByIds(String[] ids) {
+		Query query = new Query(Criteria.where("id").in(Arrays.asList(ids)));
+		return mongoTemplate.find(query, BimModel.class);
+	}
+	
+	public void updateBimfaceInfo(BimModel bimModel) {
+		Query query = new Query(Criteria.where("id").is(bimModel.getId()));
+		Update update = new Update().set("bimfaceInfo", bimModel.getBimfaceInfo());
+		mongoTemplate.updateFirst(query, update, BimModel.class);
+	}
+
+	public void updateElementList(BimModel bimModel) {
+		Query query = new Query(Criteria.where("id").is(bimModel.getId()));
+		Update update = new Update().set("elementList", bimModel.getElementList());
+		mongoTemplate.updateFirst(query, update, BimModel.class);
+	}
+	
+	public void update(BimModel bimModel) {
+		Query query = new Query(Criteria.where("id").is(bimModel.getId()));
+		Update update = new Update().set("floorList", bimModel.getFloorList()).set("areaList", bimModel.getAreaList())
+				.set("roomList", bimModel.getRoomList());
+		mongoTemplate.updateFirst(query, update, BimModel.class);
+	}
+	
+	public void updateFile(BimModel bimModel) {
+		Query query = new Query(Criteria.where("id").is(bimModel.getId()));
+		Update update = new Update()
+				.set("name", bimModel.getName())
+				.set("location", bimModel.getLocation())
+				.set("bimfaceInfo", bimModel.getBimfaceInfo())
+				.set("elementList", bimModel.getElementList())
+				.set("floorList", bimModel.getFloorList())
+				.set("areaList", bimModel.getAreaList())
+				.set("roomList", bimModel.getRoomList())
+				.set("tree", bimModel.getTree())
+				.set("type", bimModel.getType())
+				.set("status", bimModel.getStatus())
+				.set("createTime", bimModel.getCreateTime())
+				.set("createUserId", bimModel.getCreateUserId())
+				.set("createUserName", bimModel.getCreateUserName());
+		mongoTemplate.updateFirst(query, update, BimModel.class);
+	}
+	
+	public void updateStatus(String id, int status) {
+		Query query = new Query(Criteria.where("id").is(id));
+		Update update = new Update().set("status", status);
+		mongoTemplate.updateFirst(query, update, BimModel.class);
+	}
+	
+	public void updateType(String id, int type) {
+		Query query = new Query(Criteria.where("id").is(id));
+		Update update = new Update().set("type", type);
+		mongoTemplate.upsert(query, update, BimModel.class);
+	}
+
+	public List<BimModel> getListByType(int type) {
+		Query query = new Query(Criteria.where("type").is(type));
+		return mongoTemplate.find(query, BimModel.class);
+	}
+
+}

+ 20 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/dao/BimPartItemRegularDao.java

@@ -0,0 +1,20 @@
+package com.bosshand.virgo.bim.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.bosshand.virgo.bim.model.BimPartItemRegular;
+
+@Mapper
+public interface BimPartItemRegularDao {
+	
+	void save(BimPartItemRegular bimPartItemRegular);
+
+	void update(BimPartItemRegular bimPartItemRegular);
+	
+	List<BimPartItemRegular> getList();
+	
+	BimPartItemRegular getPartItemId(long partItemId);
+
+}

+ 64 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimAttribute.java

@@ -0,0 +1,64 @@
+package com.bosshand.virgo.bim.model;
+
+public class BimAttribute {
+
+    private long id;
+
+    private String integrateId;
+
+    private String fileId;
+
+    private String elementId;
+
+    private String elementAttribute;
+
+    private String data;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getIntegrateId() {
+        return integrateId;
+    }
+
+    public void setIntegrateId(String integrateId) {
+        this.integrateId = integrateId;
+    }
+
+    public String getFileId() {
+        return fileId;
+    }
+
+    public void setFileId(String fileId) {
+        this.fileId = fileId;
+    }
+
+    public String getElementId() {
+        return elementId;
+    }
+
+    public void setElementId(String elementId) {
+        this.elementId = elementId;
+    }
+
+    public String getElementAttribute() {
+        return elementAttribute;
+    }
+
+    public void setElementAttribute(String elementAttribute) {
+        this.elementAttribute = elementAttribute;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+}

+ 122 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimElement.java

@@ -0,0 +1,122 @@
+package com.bosshand.virgo.bim.model;
+
+public class BimElement {
+    /**
+     * id
+     */
+    private long id;
+
+    /**
+     * 文件id
+     */
+    private String fileId;
+
+    /**
+     * 文件ids
+     */
+    private String [] fileIds;
+
+    /**
+     * 族类型
+     */
+    private String familyType;
+
+    /**
+     * 标识数据(标识)
+     */
+    private String identification;
+
+    /**
+     * 标识数据(专业-分项)
+     */
+    private String majorSubItem;
+
+    /**
+     * 标识数据(区域(构件号))
+     */
+    private String region;
+
+    /**
+     * 楼栋-楼层
+     */
+    private String buildingFloor;
+
+    /**
+     * 构件id
+     */
+    private String elementId;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getFileId() {
+        return fileId;
+    }
+
+    public void setFileId(String fileId) {
+        this.fileId = fileId;
+    }
+
+    public String[] getFileIds() {
+        return fileIds;
+    }
+
+    public void setFileIds(String[] fileIds) {
+        this.fileIds = fileIds;
+    }
+
+    public String getFamilyType() {
+        return familyType;
+    }
+
+    public void setFamilyType(String familyType) {
+        this.familyType = familyType;
+    }
+
+    public String getIdentification() {
+        return identification;
+    }
+
+    public void setIdentification(String identification) {
+        this.identification = identification;
+    }
+
+    public String getMajorSubItem() {
+        return majorSubItem;
+    }
+
+    public void setMajorSubItem(String majorSubItem) {
+        this.majorSubItem = majorSubItem;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    public String getBuildingFloor() {
+        return buildingFloor;
+    }
+
+    public void setBuildingFloor(String buildingFloor) {
+        this.buildingFloor = buildingFloor;
+    }
+
+    public String getElementId() {
+        return elementId;
+    }
+
+    public void setElementId(String elementId) {
+        this.elementId = elementId;
+    }
+
+
+}

+ 141 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimFamilyPartItem.java

@@ -0,0 +1,141 @@
+package com.bosshand.virgo.bim.model;
+
+public class BimFamilyPartItem {
+
+	private String id;
+
+	private String bimIntegrateId;
+
+	private String fileId;
+
+	private String elementId;
+	
+	private String familyTypeId;
+
+	private String familyType;
+
+	private String familyName;
+
+	/**
+	 * 标识数据(专业-分项)
+	 */
+	private String majorSubItem;
+
+	/**
+	 * 标识数据(区域(构件号))
+	 */
+	private String region;
+
+	/**
+	 * 楼栋-楼层
+	 */
+	private String buildingFloor;
+
+	private String partItem;
+	
+	private long partItemId;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getBimIntegrateId() {
+		return bimIntegrateId;
+	}
+
+	public void setBimIntegrateId(String bimIntegrateId) {
+		this.bimIntegrateId = bimIntegrateId;
+	}
+
+	public String getFileId() {
+		return fileId;
+	}
+
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+
+	public String getElementId() {
+		return elementId;
+	}
+
+	public void setElementId(String elementId) {
+		this.elementId = elementId;
+	}
+
+	public String getFamilyTypeId() {
+		return familyTypeId;
+	}
+
+	public void setFamilyTypeId(String familyTypeId) {
+		this.familyTypeId = familyTypeId;
+	}
+
+	public String getFamilyType() {
+		return familyType;
+	}
+
+	public void setFamilyType(String familyType) {
+		this.familyType = familyType;
+	}
+
+	public String getFamilyName() {
+		return familyName;
+	}
+
+	public void setFamilyName(String familyName) {
+		this.familyName = familyName;
+	}
+
+	public String getMajorSubItem() {
+		return majorSubItem;
+	}
+
+	public void setMajorSubItem(String majorSubItem) {
+		this.majorSubItem = majorSubItem;
+	}
+
+	public String getRegion() {
+		return region;
+	}
+
+	public void setRegion(String region) {
+		this.region = region;
+	}
+
+	public String getBuildingFloor() {
+		return buildingFloor;
+	}
+
+	public void setBuildingFloor(String buildingFloor) {
+		this.buildingFloor = buildingFloor;
+	}
+
+	public String getPartItem() {
+		return partItem;
+	}
+
+	public void setPartItem(String partItem) {
+		this.partItem = partItem;
+	}
+
+	public long getPartItemId() {
+		return partItemId;
+	}
+
+	public void setPartItemId(long partItemId) {
+		this.partItemId = partItemId;
+	}
+
+	@Override
+	public String toString() {
+		return "BimFamilyPartItem [id=" + id + ", bimIntegrateId=" + bimIntegrateId + ", elementId=" + elementId
+				+ ", familyType=" + familyType + ", familyName=" + familyName + ", partItem=" + partItem
+				+ ", partItemId=" + partItemId + "]";
+	}
+	
+}

+ 37 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimFamilyRegular.java

@@ -0,0 +1,37 @@
+package com.bosshand.virgo.bim.model;
+
+import java.util.List;
+
+public class BimFamilyRegular {
+
+    private long partItemId;
+
+    private String partItemName;
+
+    private List<String> familyNameList;
+
+    public long getPartItemId() {
+        return partItemId;
+    }
+
+    public void setPartItemId(long partItemId) {
+        this.partItemId = partItemId;
+    }
+
+    public String getPartItemName() {
+        return partItemName;
+    }
+
+    public void setPartItemName(String partItemName) {
+        this.partItemName = partItemName;
+    }
+
+    public List<String> getFamilyNameList() {
+        return familyNameList;
+    }
+
+    public void setFamilyNameList(List<String> familyNameList) {
+        this.familyNameList = familyNameList;
+    }
+
+}

+ 166 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimModel.java

@@ -0,0 +1,166 @@
+package com.bosshand.virgo.bim.model;
+
+import java.util.Date;
+import java.util.List;
+
+import com.bosshand.virgo.bim.model.bimface.Area;
+import com.bosshand.virgo.bim.model.bimface.Element;
+import com.bosshand.virgo.bim.model.bimface.Floor;
+import com.bosshand.virgo.bim.model.bimface.ModelInfo;
+import com.bosshand.virgo.bim.model.bimface.Room;
+
+
+public class BimModel {
+	
+	public final static int ongoing = 1;
+	
+	public final static int accomplish = 2;
+	
+	private String id;
+	
+	private String name;
+	
+	private String location;
+	
+	private ModelInfo bimfaceInfo;
+	
+	private List<Element> elementList;
+	
+	private List<Room> roomList;
+	
+	private List<Floor> floorList;
+	
+	private List<Area> areaList;
+	
+	private String tree;
+	
+	private int type;
+
+	public int getType() {
+		return type;
+	}
+
+	public void setType(int type) {
+		this.type = type;
+	}
+
+	public String getTree() {
+		return tree;
+	}
+
+	public void setTree(String tree) {
+		this.tree = tree;
+	}
+
+	private int status;
+	
+	private Date createTime;
+	
+	private long createUserId;
+	
+	private String createUserName;
+	
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public void setLocation(String location) {
+		this.location = location;
+	}
+
+	public ModelInfo getBimfaceInfo() {
+		return bimfaceInfo;
+	}
+
+	public void setBimfaceInfo(ModelInfo bimfaceInfo) {
+		this.bimfaceInfo = bimfaceInfo;
+	}
+
+	public List<Element> getElementList() {
+		return elementList;
+	}
+
+	public void setElementList(List<Element> elementList) {
+		this.elementList = elementList;
+	}
+
+	public List<Room> getRoomList() {
+		return roomList;
+	}
+
+	public void setRoomList(List<Room> roomList) {
+		this.roomList = roomList;
+	}
+
+	public List<Floor> getFloorList() {
+		return floorList;
+	}
+
+	public void setFloorList(List<Floor> floorList) {
+		this.floorList = floorList;
+	}
+
+	public List<Area> getAreaList() {
+		return areaList;
+	}
+
+	public void setAreaList(List<Area> areaList) {
+		this.areaList = areaList;
+	}
+
+	public int getStatus() {
+		return status;
+	}
+
+	public void setStatus(int status) {
+		this.status = status;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public long getCreateUserId() {
+		return createUserId;
+	}
+
+	public void setCreateUserId(long createUserId) {
+		this.createUserId = createUserId;
+	}
+
+	public String getCreateUserName() {
+		return createUserName;
+	}
+
+	public void setCreateUserName(String createUserName) {
+		this.createUserName = createUserName;
+	}
+
+	@Override
+	public String toString() {
+		return "BimModel [id=" + id + ", location=" + location + ", bimfaceInfo=" + bimfaceInfo + ", elementList="
+				+ elementList + ", roomList=" + roomList + ", floorList=" + floorList + ", areaList=" + areaList
+				+ ", status=" + status + ", createTime=" + createTime + ", createUserId=" + createUserId
+				+ ", createUserName=" + createUserName + "]";
+	}
+}

+ 45 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/BimPartItemRegular.java

@@ -0,0 +1,45 @@
+package com.bosshand.virgo.bim.model;
+
+public class BimPartItemRegular {
+	
+	private long id;
+
+	private long partItemId;
+	
+	private String partItemName;
+	
+	private String regular;
+
+	public long getId() {
+		return id;
+	}
+
+	public void setId(long id) {
+		this.id = id;
+	}
+
+	public long getPartItemId() {
+		return partItemId;
+	}
+
+	public void setPartItemId(long partItemId) {
+		this.partItemId = partItemId;
+	}
+
+	public String getPartItemName() {
+		return partItemName;
+	}
+
+	public void setPartItemName(String partItemName) {
+		this.partItemName = partItemName;
+	}
+
+	public String getRegular() {
+		return regular;
+	}
+
+	public void setRegular(String regular) {
+		this.regular = regular;
+	}
+	
+}

+ 42 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/model/bimface/Area.java

@@ -0,0 +1,42 @@
+package com.bosshand.virgo.bim.model.bimface;
+
+public class Area {
+	
+	private String fileId;
+	private String floorId;
+	private String areaId;
+	private String name;
+	private String attributes;
+	public String getFileId() {
+		return fileId;
+	}
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+	public String getFloorId() {
+		return floorId;
+	}
+	public void setFloorId(String floorId) {
+		this.floorId = floorId;
+	}
+	public String getAreaId() {
+		return areaId;
+	}
+	public void setAreaId(String areaId) {
+		this.areaId = areaId;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getAttributes() {
+		return attributes;
+	}
+	public void setAttributes(String attributes) {
+		this.attributes = attributes;
+	}
+	
+
+}

+ 47 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/service/BimAttributeService.java

@@ -0,0 +1,47 @@
+package com.bosshand.virgo.bim.service;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.bosshand.virgo.bim.dao.BimAttributeDao;
+import com.bosshand.virgo.bim.model.BimAttribute;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class BimAttributeService {
+
+    @Autowired
+    BimAttributeDao bimAttributeDao;
+
+    public BimAttribute save(BimAttribute bimAttribute) {
+        bimAttributeDao.save(bimAttribute);
+        return bimAttribute;
+    }
+
+    public int delete(long id) {
+        return bimAttributeDao.delete(id);
+    }
+
+    public BimAttribute update(BimAttribute bimAttribute) {
+        bimAttributeDao.update(bimAttribute);
+        return bimAttribute;
+    }
+
+    public List<BimAttribute> getIntegrateId(String integrateId, JSONObject json) {
+        JSONArray ids = json.getJSONArray("ids");
+        JSONObject jo = ids.getJSONObject(0);
+
+        JSONArray elementIds = jo.getJSONArray("elementIds");
+        List<String> list = new ArrayList<>();
+        for (int i = 0; i < elementIds.size(); i++) {
+            list.add(elementIds.getString(i));
+        }
+        String fileId = jo.getString("fileIdHash");
+        return bimAttributeDao.getIntegrateId(integrateId, fileId, String.join(",", list));
+    }
+
+
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1561 - 0
virgo.bim/src/main/java/com/bosshand/virgo/bim/service/BimModelService.java


+ 64 - 0
virgo.bim/src/main/resources/application-dev.properties

@@ -0,0 +1,64 @@
+spring.application.name=virgo-bim
+server.port=9109
+
+spring.servlet.multipart.max-file-size = 200MB
+spring.servlet.multipart.max-request-size = 200MB
+
+eureka.port=9101
+eureka.ip=10.0.2.92
+eureka.client.serviceUrl.defaultZone=http://${eureka.ip}:${eureka.port}/eureka/
+
+feign.client.config.default.connectTimeout=6000000
+feign.client.config.default.readTimeout=6000000
+
+logging.level.root= INFO
+logging.level.com.bosshand= DEBUG
+logging.file = /data/logs/virgo.bim.log
+
+spring.redis.database=1
+spring.redis.host=125.122.26.160:6666
+spring.redis.port=6666
+spring.redis.password=bosshand
+spring.redis.jedis.pool.max-active=8
+spring.redis.jedis.pool.max-wait=-1
+spring.redis.jedis.pool.max-idle=8
+spring.redis.jedis.pool.min-idle=0
+spring.redis.timeout=3000
+spring.redis.expire=3600
+
+spring.datasource.driverClassName=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://125.122.26.160:3306/virgo?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+spring.datasource.username=virgo
+spring.datasource.password=virgo_bosshand
+
+
+spring.druid.initialSize= 5        
+spring.druid.minIdle=5  
+spring.druid.maxActive= 20 
+spring.druid.maxWait=60000 
+spring.druid.timeBetweenEvictionRunsMillis= 60000 
+spring.druid.minEvictableIdleTimeMillis= 300000 
+spring.druid.validationQuery= SELECT 1 FROM DUAL 
+spring.druid.testWhileIdle= true 
+spring.druid.testOnBorrow= false
+spring.druid.testOnReturn= false 
+spring.druid.poolPreparedStatements= false                  
+spring.druid.maxPoolPreparedStatementPerConnectionSize= 20
+spring.druid.filters= stat,wall,log4j
+spring.druid.connectionProperties= 'druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000'  
+
+# mybatis
+mybatis.config-location=classpath:mybatis-config.xml
+mybatis.mapper-locations=classpath*:mapper/*.xml
+logging.level.com.bosshand.virgo.api.dao=debug
+
+
+spring.data.mongodb.uri=mongodb://localhost:27017/bim
+
+bimface.app.AppKey=IwwzZlDPatrtN4iOwSgpZjObYobfPOjO
+bimface.app.AppSecret=9PGvmj8Rh01lsNNuc1v4NYjvCowf4jaS
+bimface.app.accessToken.url=https://api.bimface.com/oauth2/token
+bimface.app.viewToken.url=https://api.bimface.com/view/token
+bimface.app.upload.url=https://file.bimface.com/upload
+bimface.app.translate.url=https://api.bimface.com/translate
+bimface.app.elementIds.url=https://api.bimface.com/data/v2/files/

+ 64 - 0
virgo.bim/src/main/resources/application-prd.properties

@@ -0,0 +1,64 @@
+spring.application.name=virgo-bim
+server.port=9109
+
+spring.servlet.multipart.max-file-size = 200MB
+spring.servlet.multipart.max-request-size = 200MB
+
+eureka.port=9101
+eureka.ip=10.23.243.161
+eureka.client.serviceUrl.defaultZone=http://${eureka.ip}:${eureka.port}/eureka/
+
+feign.client.config.default.connectTimeout=6000000
+feign.client.config.default.readTimeout=6000000
+
+logging.level.root= INFO
+logging.level.com.bosshand= DEBUG
+logging.file = /data/logs/virgo.bim.log
+
+spring.redis.database=1
+spring.redis.host=db01.prod:6379
+spring.redis.port=6379
+spring.redis.password=bosshand123
+spring.redis.jedis.pool.max-active=8
+spring.redis.jedis.pool.max-wait=-1
+spring.redis.jedis.pool.max-idle=8
+spring.redis.jedis.pool.min-idle=0
+spring.redis.timeout=3000
+spring.redis.expire=3600
+
+spring.datasource.driverClassName=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://db01.prod:3306/virgo?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+spring.datasource.username=virgo
+spring.datasource.password=virgo_bosshand
+
+
+spring.druid.initialSize= 5        
+spring.druid.minIdle=5  
+spring.druid.maxActive= 20 
+spring.druid.maxWait=60000 
+spring.druid.timeBetweenEvictionRunsMillis= 60000 
+spring.druid.minEvictableIdleTimeMillis= 300000 
+spring.druid.validationQuery= SELECT 1 FROM DUAL 
+spring.druid.testWhileIdle= true 
+spring.druid.testOnBorrow= false
+spring.druid.testOnReturn= false 
+spring.druid.poolPreparedStatements= false                  
+spring.druid.maxPoolPreparedStatementPerConnectionSize= 20
+spring.druid.filters= stat,wall,log4j
+spring.druid.connectionProperties= 'druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000'  
+
+# mybatis
+mybatis.config-location=classpath:mybatis-config.xml
+mybatis.mapper-locations=classpath*:mapper/*.xml
+logging.level.com.bosshand.virgo.api.dao=debug
+
+
+spring.data.mongodb.uri=mongodb://localhost:27017/bim
+
+bimface.app.AppKey=IwwzZlDPatrtN4iOwSgpZjObYobfPOjO
+bimface.app.AppSecret=9PGvmj8Rh01lsNNuc1v4NYjvCowf4jaS
+bimface.app.accessToken.url=https://api.bimface.com/oauth2/token
+bimface.app.viewToken.url=https://api.bimface.com/view/token
+bimface.app.upload.url=https://file.bimface.com/upload
+bimface.app.translate.url=https://api.bimface.com/translate
+bimface.app.elementIds.url=https://api.bimface.com/data/v2/files/

+ 68 - 0
virgo.bim/src/main/resources/application.properties

@@ -0,0 +1,68 @@
+spring.application.name=virgo-bim
+server.port=9109
+
+spring.servlet.multipart.max-file-size = 200MB
+spring.servlet.multipart.max-request-size = 200MB
+
+eureka.port=9101
+eureka.client.serviceUrl.defaultZone=http://localhost:${eureka.port}/eureka/
+
+feign.client.config.default.connectTimeout=6000000
+feign.client.config.default.readTimeout=6000000
+
+logging.level.root= INFO
+logging.level.com.bosshand= DEBUG
+logging.file = log/virgo.bim.log
+
+spring.redis.database=0
+spring.redis.host=125.122.26.160:6666
+spring.redis.port=6666
+spring.redis.password=bosshand
+spring.redis.jedis.pool.max-active=8
+spring.redis.jedis.pool.max-wait=-1
+spring.redis.jedis.pool.max-idle=8
+spring.redis.jedis.pool.min-idle=0
+spring.redis.timeout=3000
+spring.redis.expire=3600 
+
+spring.datasource.driverClassName=com.mysql.jdbc.Driver
+spring.datasource.url=jdbc:mysql://122.237.99.185:3306/realty?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+spring.datasource.username=virgo
+spring.datasource.password=virgo
+
+spring.druid.initialSize= 5        
+spring.druid.minIdle=5  
+spring.druid.maxActive= 20 
+spring.druid.maxWait=60000 
+spring.druid.timeBetweenEvictionRunsMillis= 60000 
+spring.druid.minEvictableIdleTimeMillis= 300000 
+spring.druid.validationQuery= SELECT 1 FROM DUAL 
+spring.druid.testWhileIdle= true 
+spring.druid.testOnBorrow= false
+spring.druid.testOnReturn= false 
+spring.druid.poolPreparedStatements= false                  
+spring.druid.maxPoolPreparedStatementPerConnectionSize= 20
+spring.druid.filters= stat,wall,log4j
+spring.druid.connectionProperties= 'druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000'
+
+# mybatis
+mybatis.config-location=classpath:mybatis-config.xml
+mybatis.mapper-locations=classpath*:mapper/*.xml
+logging.level.com.bosshand.virgo.api.dao=debug
+
+spring.data.mongodb.uri=mongodb://localhost:27017/bim
+
+bimface.app.AppKey=IwwzZlDPatrtN4iOwSgpZjObYobfPOjO
+bimface.app.AppSecret=9PGvmj8Rh01lsNNuc1v4NYjvCowf4jaS
+
+#bimface.app.AppKey=LSlrC4kYs4SwmEnAC63X93uDHHjeaHP4
+#bimface.app.AppSecret=EgfvWLwYJ0o9lPwLHvla9zqqZIJ1AKFT
+
+bimface.app.accessToken.url=https://api.bimface.com/oauth2/token
+bimface.app.viewToken.url=https://api.bimface.com/view/token
+bimface.app.upload.url=https://file.bimface.com/upload
+bimface.app.translate.url=https://api.bimface.com/translate
+bimface.app.elementIds.url=https://api.bimface.com/data/v2/files/
+bimface.app.integrate.url=https://api.bimface.com/integrate
+bimface.app.integrations.url=https://api.bimface.com/data/v2/integrations/
+

+ 40 - 0
virgo.bim/src/main/resources/mapper/BimAttributeMapper.xml

@@ -0,0 +1,40 @@
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.bosshand.virgo.bim.dao.BimAttributeDao">
+
+    <resultMap type="com.bosshand.virgo.bim.model.BimAttribute" id="bimAttributeResult">
+        <id column="id" property="id"/>
+        <result column="integrateId" property="integrateId"/>
+        <result column="fileId" property="fileId"/>
+        <result column="elementId" property="elementId"/>
+        <result column="elementAttribute" property="elementAttribute"/>
+        <result column="data" property="data"/>
+    </resultMap>
+
+    <select id="getIntegrateId" resultMap="bimAttributeResult">
+        SELECT * FROM bim_attribute where integrateId = #{integrateId} and fileId = #{fileId} and elementId in (${elementId})
+    </select>
+
+    <insert id="save" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO bim_attribute(integrateId,fileId,elementId,elementAttribute,data) VALUES (#{integrateId},#{fileId},#{elementId},#{elementAttribute},#{data})
+    </insert>
+
+    <update id="update" parameterType="com.bosshand.virgo.bim.model.BimAttribute">
+        UPDATE bim_attribute
+        <trim prefix="set" suffixOverrides=",">
+            <if test="integrateId!=null">integrateId=#{integrateId},</if>
+            <if test="fileId!=null">fileId=#{fileId},</if>
+            <if test="elementId!=null">elementId=#{elementId},</if>
+            <if test="elementAttribute!=null">elementAttribute=#{elementAttribute},</if>
+            <if test="data!=null">data=#{data},</if>
+        </trim>
+        WHERE id=#{id}
+    </update>
+
+    <delete id="delete">
+        DELETE FROM bim_attribute WHERE id=#{id}
+    </delete>
+
+</mapper>

+ 68 - 0
virgo.bim/src/main/resources/mapper/BimElementMapper.xml

@@ -0,0 +1,68 @@
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.bosshand.virgo.bim.dao.BimElementDao">
+
+    <resultMap type="com.bosshand.virgo.bim.model.BimElement" id="bimElementResult">
+        <id column="id" property="id"/>
+        <result column="fileId" property="fileId"/>
+        <result column="familyType" property="familyType"/>
+        <result column="elementId" property="elementId"/>
+        <result column="identification" property="identification"/>
+        <result column="majorSubItem" property="majorSubItem"/>
+        <result column="region" property="region"/>
+        <result column="buildingFloor" property="buildingFloor"/>
+    </resultMap>
+
+    <select id="getFileId" resultMap="bimElementResult">
+        SELECT * FROM bim_element where fileId = #{fileId}
+    </select>
+
+    <select id="getList" resultMap="bimElementResult">
+        SELECT * FROM bim_element WHERE fileId = #{fileId} AND familyType IN
+        <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
+            '${item}'
+        </foreach>
+    </select>
+
+    <select id="getByList" resultMap="bimElementResult">
+        SELECT * FROM bim_element
+        <where>
+            <if test="fileId != null">
+                and fileId = #{fileId}
+            </if>
+            <if test="fileIds != null">
+                and fileId in (
+                <foreach collection="fileIds" item="item" index="index" separator=",">
+                    #{item}
+                </foreach>
+                )
+            </if>
+            <if test="familyType != null">
+                and familyType = #{familyType}
+            </if>
+            <if test="majorSubItem != null">
+                and majorSubItem = #{majorSubItem}
+            </if>
+            <if test="region != null">
+                and region = #{region}
+            </if>
+            <if test="identification != null">
+                and identification = #{identification}
+            </if>
+            <if test="buildingFloor != null">
+                and buildingFloor = #{buildingFloor}
+            </if>
+        </where>
+    </select>
+
+    <insert id="batchSave">
+        insert into bim_element (fileId,familyType,elementId,identification,majorSubItem,region,buildingFloor) values
+        <foreach collection="list" item="t" index="index" separator=",">
+            (#{t.fileId}, #{t.familyType}, #{t.elementId}, #{t.identification}, #{t.majorSubItem}, #{t.region}, #{t.buildingFloor})
+        </foreach>
+    </insert>
+
+
+</mapper>

+ 118 - 0
virgo.bim/src/main/resources/mapper/BimFamilyPartItemMapper.xml

@@ -0,0 +1,118 @@
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+ 
+<mapper namespace="com.bosshand.virgo.bim.dao.BimFamilyPartItemDao">
+
+	<resultMap type="com.bosshand.virgo.bim.model.BimFamilyPartItem" id="bimFamilyPartItemResult">
+			<id column="id" property="id"/>
+			<result column="bimIntegrateId" property="bimIntegrateId"/>
+			<result column="fileId" property="fileId"/>
+			<result column="elementId" property="elementId"/>
+
+			<result column="familyTypeId" property="familyTypeId"/>
+			<result column="familyType" property="familyType"/>
+			<result column="familyName" property="familyName"/>
+			<result column="partItem" property="partItem"/>
+			<result column="partItemId" property="partItemId"/>
+
+			<result column="majorSubItem" property="majorSubItem"/>
+			<result column="region" property="region"/>
+			<result column="buildingFloor" property="buildingFloor"/>
+	</resultMap>
+
+	<sql id="query">
+		SELECT a.*, b.majorSubItem as majorSubItem, b.region as region, b.buildingFloor as buildingFloor
+		FROM bim_family_partItem a left join bim_element b on a.fileId = b.fileId and a.elementId = b.elementId
+	</sql>
+	
+	<select id="getByBimIntegrate" resultMap="bimFamilyPartItemResult">
+		SELECT * FROM bim_family_partItem where bimIntegrateId = #{bimIntegrateId} and partItemId = #{partItemId}
+	</select>
+	
+	<select id="getMatching" resultMap="bimFamilyPartItemResult">
+		<include refid="query"/>
+		where a.bimIntegrateId = #{bimIntegrateId} and a.partItemId != 0 limit #{currIndex} , #{pageSize}
+	</select>
+	
+	<select id="getNoMatching" resultMap="bimFamilyPartItemResult">
+		<include refid="query"/>
+		where a.bimIntegrateId = #{bimIntegrateId} and a.partItemId = 0 limit #{currIndex} , #{pageSize}
+	</select>
+
+	<select id="getMatchingTotalCount" parameterType="com.bosshand.virgo.bim.model.BimFamilyPartItem" resultType="Integer">
+		SELECT count(*) FROM bim_family_partItem where bimIntegrateId = #{bimIntegrateId} and partItemId != 0
+	</select>
+
+	<select id="getNoMatchingTotalCount" parameterType="com.bosshand.virgo.bim.model.BimFamilyPartItem" resultType="Integer">
+		SELECT count(*) FROM bim_family_partItem where bimIntegrateId = #{bimIntegrateId} and partItemId = 0
+	</select>
+
+	<select id="queryBimFamilyPartItem" resultMap="bimFamilyPartItemResult">
+		<include refid="query"/>
+		<where>
+			<if test="bimIntegrateId != null">
+				and a.bimIntegrateId = #{bimIntegrateId}
+			</if>
+			<if test="fileId != null">
+				and a.fileId = #{fileId}
+			</if>
+			<if test="partItemId != 0">
+				and a.partItemId = #{partItemId}
+			</if>
+			<if test="majorSubItem != null">
+				and b.majorSubItem = #{majorSubItem}
+			</if>
+			<if test="region != null">
+				and b.region = #{region}
+			</if>
+			<if test="buildingFloor != null">
+				and b.buildingFloor = #{buildingFloor}
+			</if>
+		</where>
+	</select>
+
+	<select id="getByBimIntegrateId" resultMap="bimFamilyPartItemResult">
+		SELECT * FROM bim_family_partItem where bimIntegrateId = #{bimIntegrateId}
+	</select>
+	
+	<select id="getByElementId" resultMap="bimFamilyPartItemResult">
+		SELECT * FROM bim_family_partItem where elementId = #{elementId}
+	</select>
+	
+	<insert id="save" useGeneratedKeys="true" keyProperty="id">
+		INSERT INTO bim_family_partItem(id, bimIntegrateId, elementId, familyType, familyName, partItem, partItemId)
+		VALUES (#{id}, #{bimIntegrateId}, #{elementId}, #{familyType}, #{familyName}, #{partItem}, #{partItemId})
+	</insert>
+	
+	<insert id="saveBatch">
+	    INSERT INTO bim_family_partItem(id, bimIntegrateId, fileId, elementId, familyTypeId, familyType, familyName, partItem, partItemId)
+	    VALUES
+	    <foreach collection ="list" item="b" separator =",">
+	         (#{b.id}, #{b.bimIntegrateId}, #{b.fileId}, #{b.elementId}, #{b.familyTypeId}, #{b.familyType}, #{b.familyName}, #{b.partItem}, #{b.partItemId})
+	    </foreach >
+	</insert>
+	
+	<delete id="delete">
+		DELETE FROM bim_family_partItem WHERE bimIntegrateId =#{bimIntegrateId}
+	</delete>
+	
+	<update id="updatePartItem" parameterType="com.bosshand.virgo.bim.model.BimFamilyPartItem">
+		UPDATE bim_family_partItem set partItem =#{partItem}, partItemId =#{partItemId} WHERE id=#{id}
+	</update>
+
+
+	<select id="getRegionList" resultType="java.lang.String">
+		SELECT b.region as region
+		FROM bim_family_partItem a left join bim_element b on a.fileId = b.fileId and a.elementId = b.elementId
+		where a.bimIntegrateId = #{bimIntegrateId} GROUP by b.region
+	</select>
+
+	<select id="getBuildingFloorList" resultType="java.lang.String">
+		SELECT b.buildingFloor as buildingFloor
+		FROM bim_family_partItem a left join bim_element b on a.fileId = b.fileId and a.elementId = b.elementId
+		where a.bimIntegrateId = #{bimIntegrateId} GROUP by b.buildingFloor
+	</select>
+
+
+</mapper>

+ 34 - 0
virgo.bim/src/main/resources/mapper/BimPartItemRegularMapper.xml

@@ -0,0 +1,34 @@
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+ 
+<mapper namespace="com.bosshand.virgo.bim.dao.BimPartItemRegularDao">
+
+	<resultMap type="com.bosshand.virgo.bim.model.BimPartItemRegular" id="bimPartItemRegularResult">
+			<id column="id" property="id"/>
+			<result column="partItemId" property="partItemId"/>
+			<result column="partItemName" property="partItemName"/>
+			<result column="regular" property="regular"/>
+	</resultMap>
+	
+	<select id="getList" resultMap="bimPartItemRegularResult">
+		SELECT * FROM bim_partItem_regular
+	</select>
+
+	<select id="getPartItemId" resultMap="bimPartItemRegularResult">
+		SELECT * FROM bim_partItem_regular where partItemId = #{partItemId}
+	</select>
+	
+	<insert id="save" useGeneratedKeys="true" keyProperty="id">
+		INSERT INTO bim_partItem_regular(partItemId, partItemName, regular) VALUES (#{partItemId}, #{partItemName}, #{regular})
+	</insert>
+	
+	<update id="update" parameterType="com.bosshand.virgo.bim.model.BimPartItemRegular">
+		UPDATE bim_partItem_regular
+		<trim prefix="set" suffixOverrides=",">
+			<if test="regular!=null">regular=#{regular},</if>
+		</trim>
+		WHERE id=#{id}
+	</update>
+	
+</mapper>

+ 3 - 0
virgo.zuul/src/main/resources/application.properties

@@ -22,6 +22,9 @@ zuul.routes.logout.serviceId=virgo-manager
 zuul.routes.file.path=/file/**
 zuul.routes.file.serviceId=virgo-file
 
+zuul.routes.bim.path=/bim/**
+zuul.routes.bim.serviceId=virgo-bim
+
 zuul.routes.ringzle.path=/ringzle/**
 zuul.routes.ringzle.serviceId=virgo-ringzle