| | |
| | | private String getType(String type) throws Exception { |
| | | switch (type) { |
| | | case "DOM": |
| | | return "type in ('tif', 'tiff', 'img', 'jp2', 'jpg') and mata_type in (1, 3, 4, 5)"; |
| | | return "type in ('tif', 'tiff', 'img', 'jp2', 'jpg') and mata_type in (1, 2, 3, 4, 5)"; |
| | | case "DEM": |
| | | return "type in ('tif', 'tiff', 'dem') and mata_type = 2"; |
| | | case "Vector": |
| | |
| | | public Result() { |
| | | } |
| | | |
| | | /** |
| | | * 任务名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 任务状态,0:创建,1:初始化,2:执行,3:完成,4:错误,5:取消 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务编号 |
| | | */ |
| | | private Integer data_id; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | private String description; |
| | | |
| | | /** |
| | | * 进度 |
| | | */ |
| | | private Double process; |
| | | |
| | | /** |
| | | * 执行的命令 |
| | | */ |
| | | private Integer command; |
| | | |
| | | public String getName() { |
| | |
| | | CreateLayerEntity.Layer layer = entity.getLayer(); |
| | | layer.setName(pub.getName() + "_" + pub.getTime()); |
| | | layer.setProjection(getEpsg(pub)); |
| | | // layer.setType(TYPES.indexOf(pub.getType())) |
| | | layer.setType(2); |
| | | layer.setType(getPublishType(pub)); |
| | | layer.setEnhance_type(pub.getEnhanceType()); |
| | | layer.setEnhance_factor(pub.getEnhanceFactor()); |
| | | layer.setNodata(getNoData(pub, metas)); |
| | |
| | | } |
| | | |
| | | return entity; |
| | | } |
| | | |
| | | /** |
| | | * 获取发布类型 |
| | | */ |
| | | private int getPublishType(PubEntity pub) { |
| | | if (null != pub.getColorTable() || null != pub.getGradientColorTable()) { |
| | | return StaticData.I2; |
| | | } |
| | | |
| | | return TYPES.indexOf(pub.getType()); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 插入数简服务 |
| | | * 更新数简服务 |
| | | */ |
| | | public Integer updateSjService(PubEntity pub) { |
| | | PublishEntity entity = publishService.selectById(pub.getPubid()); |