| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.config.PropertiesConfig; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.lf.server.entity.ctrl.NameValueEntity; |
| | | import com.lf.server.helper.WebHelper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * FME服务类 |
| | |
| | | */ |
| | | @Service |
| | | public class FmeService { |
| | | @Autowired |
| | | PropertiesConfig propertiesConfig; |
| | | @Value("${sys.fmeUrl}") |
| | | private String fmeUrl; |
| | | |
| | | /** |
| | | * OSGB检查:.osgb + .xls/.xlsx |
| | | * OSGB检查:.osgb + *倾斜摄影*.xls/.xlsx |
| | | */ |
| | | public void checkOsgb() { |
| | | public void checkOsgb(String path) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 表格数据检查:.xls/.xlsx |
| | | * 表格数据检查:.xls/.xlsx(排除元数据) |
| | | */ |
| | | public void checkXls() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 点云检查:.laz + .xls/.xlsx |
| | | * 点云检查:.laz + *激光点云*.xls/.xlsx |
| | | */ |
| | | public void checkLaz() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 高程检查:.tif/.prj/.tfw/.tif.ovr + .dwg |
| | | * 高程检查:.tif/.prj/.tfw/.tif.ovr + *地形图*.dwg |
| | | */ |
| | | public void checkDem() { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 数学基础检查:.shp, .gdb, .xls/.xlsx |
| | | * 数学基础检查:.shp, .gdb, *元数据*.xls/.xlsx |
| | | */ |
| | | public void checkMath() { |
| | | public void checkMath(String taskGuid, String xmmc, String sjzy, String filePath) { |
| | | String url = getUrl("datax/task/run/B1入库质检_数学基础检查"); |
| | | |
| | | List<NameValueEntity> list = getKeyVals(); |
| | | list.add(new NameValueEntity("_name", taskGuid)); |
| | | list.add(new NameValueEntity("XMMC", xmmc)); |
| | | list.add(new NameValueEntity("SJZY", sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", filePath)); |
| | | |
| | | //String rs = |
| | | } |
| | | |
| | | /** |
| | |
| | | public void checkMeta() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取Url |
| | | */ |
| | | public String getUrl(String subUrl) { |
| | | String token = WebHelper.getToken(WebHelper.getRequest()); |
| | | |
| | | return fmeUrl + subUrl + "?token=" + token; |
| | | } |
| | | |
| | | /** |
| | | * 获取名称值对集合 |
| | | * |
| | | * @return 名称值对集合 |
| | | */ |
| | | public List<NameValueEntity> getKeyVals() { |
| | | List<NameValueEntity> list = new ArrayList<>(); |
| | | list.add(new NameValueEntity("_priority", 100)); |
| | | list.add(new NameValueEntity("_terminate_on_error", true)); |
| | | |
| | | return list; |
| | | } |
| | | } |