| | |
| | | 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.RestHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | 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 |
| | | * 1.OSGB检查:.osgb + *倾斜摄影*.xls/.xlsx |
| | | */ |
| | | public void checkOsgb(){ |
| | | public void checkOsgb(String path) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 表格数据检查:.xls/.xlsx |
| | | * 2.表格数据检查:.xls/.xlsx(排除元数据) |
| | | */ |
| | | public void checkXls(){ |
| | | public void checkXls() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 点云检查:.laz + .xls/.xlsx |
| | | * 3.点云检查:.laz + *激光点云*.xls/.xlsx |
| | | */ |
| | | public void checkLaz(){ |
| | | public void checkLaz() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 高程检查:.tif/.tfw/.tif.ovr + .dwg |
| | | * 4.高程检查:.tif/.prj/.tfw/.tif.ovr + *地形图*.dwg |
| | | */ |
| | | public void checkDem(){ |
| | | public void checkDem() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 属性检查:.dwg, *dlg.gdb |
| | | * 5.属性检查:*dlg*.gdb + *地形图*.dwg |
| | | */ |
| | | public void checkAttrs(){ |
| | | public void checkAttrs() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 拓扑检查:*地形图.dwg |
| | | * 6.拓扑检查:*地形图*.dwg |
| | | */ |
| | | public void checkTopology(){ |
| | | public void checkTopology() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 图面整饰检查:.dwg |
| | | * 7.图面整饰检查:.dwg |
| | | */ |
| | | public void checkDecorate(){ |
| | | public void checkDecorate() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 原点检查:剖面图.dwg |
| | | * 8.原点检查:*剖面图*.dwg |
| | | */ |
| | | public void checkOrigin(){ |
| | | public void checkOrigin() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 栅格检查:.tif/.tfw/.tif.ovr + .xls/.xlsx |
| | | * 9.栅格检查:.tif/.prj/.tfw/.tif.ovr + .xls/.xlsx |
| | | */ |
| | | public void checkDom(){ |
| | | public void checkDom() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 数学基础检查:.shp, .gdb, .xls/.xlsx |
| | | * 10.数学基础检查:.shp, .gdb, *元数据*.xls/.xlsx |
| | | */ |
| | | public void checkMath(){ |
| | | public String checkMath(String taskGuid, String xmmc, String sjzy, String filePath, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/B1入库质检_数学基础检查", req); |
| | | |
| | | 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)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 11.元数据检查:*元数据*.xls/.xlsx |
| | | */ |
| | | public void checkMeta() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 元数据检查:.xls/.xlsx |
| | | * 获取Url |
| | | */ |
| | | public void checkMeta(){ |
| | | public String getUrl(String subUrl, HttpServletRequest req) { |
| | | String token = WebHelper.getToken(req); |
| | | |
| | | 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; |
| | | } |
| | | } |