| | |
| | | entity.setToken(WebHelper.getToken(req)); |
| | | } |
| | | |
| | | int count = publishService.insertForPub(entity); |
| | | String method = getConvertMethod(entity.getType()); |
| | | int count = publishService.postForPub(entity, method, req); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取转换方法 |
| | | */ |
| | | private String getConvertMethod(String type) throws Exception { |
| | | switch (type) { |
| | | case "DOM": |
| | | return "Convert/ToTiles"; |
| | | case "MPT": |
| | | case "3DML": |
| | | return "Convert/ToSG"; |
| | | case "BIM": |
| | | return "Convert/ToTileset"; |
| | | default: |
| | | throw new Exception("数据类型不匹配"); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除多条") |
| | | @ApiImplicitParams({ |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 插入发布数据 |
| | | * 发送发布请求 |
| | | */ |
| | | public int insertForPub(PubEntity entity) throws Exception { |
| | | public int postForPub(PubEntity entity, String method, HttpServletRequest req) throws Exception { |
| | | Thread.sleep(30000); |
| | | |
| | | return 0; |