Commit fc9c31ed authored by 单奇雲's avatar 单奇雲

冲突

parents edbc4a0e 3e833c1e
package com.yeejoin.amos.fas.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @author suhg
*/
@ApiModel(description = "坐标实体(ue4及非ue4)")
public class BasePointPositionBo {
/**
* ue4点坐标
*/
@ApiModelProperty("ue4坐标")
private String ue4Location;
/**
* ue4旋转
*/
@ApiModelProperty("ue4旋转")
private String ue4Rotation;
@ApiModelProperty("ue4缩放")
private String ue4Extent;
/**
* 平台3维模型坐标
*/
@ApiModelProperty("3d点坐标,非ue4用")
private String position3d;
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
public String getUe4Extent() {
return ue4Extent;
}
public void setUe4Extent(String ue4Extent) {
this.ue4Extent = ue4Extent;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
}
package com.yeejoin.amos.fas.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
/**
* @author suhg
*/
@ApiModel(description = "绑定点参数实体")
public class BindPointBo extends BasePointPositionBo{
/**
* 点id
*/
@NotNull
@ApiModelProperty("巡检点id")
private Long pointId;
/**
* 点类型枚举
*/
@NotNull
@ApiModelProperty("点类型")
private String pointType;
public Long getPointId() {
return pointId;
}
public void setPointId(Long pointId) {
this.pointId = pointId;
}
public String getPointType() {
return pointType;
}
public void setPointType(String pointType) {
this.pointType = pointType;
}
}
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
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 com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
@RestController
@RequestMapping("/api/view3d")
......@@ -21,6 +27,14 @@ public class View3dController extends BaseController{
@Autowired
private IRiskSourceService riskSourceService;
@Autowired
private IView3dService view3dService;
@ApiOperation(httpMethod = "GET", value = "点3d坐标设置", notes = "按照点类型3d坐标设置" )
@PostMapping(value = "/point/bind",produces = "application/json;charset=UTF-8")
public CommonResponse setPoint3dPosition(@ApiParam(name = "参数",required = true) @RequestBody List<BindPointBo> pointBoList){
return view3dService.setPoint3dPosition(pointBoList);
}
@ApiOperation(value = "区域树查询", notes = "区域树查询")
@GetMapping(value = "/region/tree")
......@@ -38,6 +52,11 @@ public class View3dController extends BaseController{
return CommonResponseUtil.success(riskSourceService.findRegionById(id,orgCode));
}
@ApiOperation(value = "区域详情查询", notes = "区域详情查询")
@PostMapping(value="region/bind")
public CommonResponse getRegionBind() {
return CommonResponseUtil.success();
}
}
package com.yeejoin.amos.fas.business.service.impl;
import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* @author DELL
*/
@Service("view3dService")
public class View3dServiceImpl implements IView3dService {
@Override
@Transactional(rollbackFor = Exception.class)
public CommonResponse setPoint3dPosition(List<BindPointBo> pointBoList) {
if (CollectionUtils.isEmpty(pointBoList)){
return CommonResponseUtil.failure("点不能为空");
}
pointBoList.forEach(pointBo ->{
this.savePointPositionByType(pointBo.getPointType(),pointBo);
});
return null;
}
public void savePointPositionByType(String pointType,BindPointBo pointBo){
}
}
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.bo.BindPointBo;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import java.util.List;
/**
* @author DELL
*/
public interface IView3dService {
CommonResponse setPoint3dPosition(List<BindPointBo> pointBoList);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment