123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package com.persagy.proxy.adm.controller;
- import cn.hutool.core.collection.CollUtil;
- import com.persagy.proxy.adm.constant.AdmCommonConstant;
- import com.persagy.proxy.adm.model.AdmLocationPoint;
- import com.persagy.proxy.adm.model.AdmModelRel;
- import com.persagy.proxy.adm.request.AdmCreateRequest;
- import com.persagy.proxy.adm.request.AdmResponse;
- import com.persagy.proxy.adm.service.IAdmModelRelService;
- import com.persagy.proxy.common.entity.InstanceUrlParam;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- 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;
- /**
- * @ClassName AdmModelRelController
- * @Description: 模型修改设备元空间的建筑楼层信息
- * @Author linhuili
- * @Date 2021/8/31 14:30
- * @Version V1.0
- **/
- @RestController
- @RequestMapping("/rel/update")
- @Slf4j
- public class AdmModelRelController {
- @Value("${middleware.group.code}")
- private String groupCode;
- @Autowired
- private IAdmModelRelService service;
- /**
- * 模型修改设备元空间的建筑楼层信息
- * @param admModelRel
- * @return
- * @throws Exception
- */
- @PostMapping("/equip-ispace")
- public AdmResponse update(@RequestBody AdmModelRel admModelRel, @QueryParam("projectId") String projectId) throws Exception {
- // 组装上下文条件
- InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
- List<AdmModelRel> vos = new ArrayList<>();
- vos = service.doUpdateModelInfo(context, AdmModelRel.class,admModelRel);
- return AdmResponse.success(vos);
- }
- }
|