| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.ctrl.FmeReqEntity; |
| | | 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.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | |
| | | /** |
| | | * 1.OSGB检查:.osgb + *倾斜摄影*.xls/.xlsx |
| | | */ |
| | | public void checkOsgb(String path) { |
| | | public String checkOsgb(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A8成果质检_OSGB检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("DMYX_FBL", fme.imgResolution)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 2.表格数据检查:.xls/.xlsx(排除元数据) |
| | | */ |
| | | public void checkXls() { |
| | | public String checkXls(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A3成果质检_表格数据检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("SJZY", fme.sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 3.点云检查:.laz + *激光点云*.xls/.xlsx |
| | | */ |
| | | public void checkLaz() { |
| | | public String checkLaz(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A9成果质检_点云检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("LAZ_MD", fme.lazDensity)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 4.高程检查:.tif/.prj/.tfw/.tif.ovr + *地形图*.dwg |
| | | */ |
| | | public void checkDem() { |
| | | public String checkDem(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A6成果质检_高程检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("GCZWC", fme.demTolerance)); |
| | | list.add(new NameValueEntity("ChangeRate", fme.demChangeRate)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 5.属性检查:*dlg*.gdb + *地形图*.dwg |
| | | */ |
| | | public void checkAttrs() { |
| | | public String checkAttrs(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A5成果质检_属性检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("SJZY", fme.sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 6.拓扑检查:*地形图*.dwg |
| | | */ |
| | | public void checkTopology() { |
| | | public String checkTopology(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A4成果质检_拓扑检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("S_MCDRC", fme.polyTolerance)); |
| | | list.add(new NameValueEntity("S_XCDRC", fme.lineTolerance)); |
| | | list.add(new NameValueEntity("S_DCDRC", fme.pointTolerance)); |
| | | list.add(new NameValueEntity("OFFSET_GCD", fme.gcdOffset)); |
| | | list.add(new NameValueEntity("OFFSET_KZD", fme.kzdOffset)); |
| | | list.add(new NameValueEntity("Range_OFFSET", fme.rangeOffset)); |
| | | list.add(new NameValueEntity("XG_MAX", fme.xgMax)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 7.图面整饰检查:.dwg |
| | | */ |
| | | public void checkDecorate() { |
| | | public String checkDecorate(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A10成果质检_图面整饰检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("S_XLS2", fme.xlsList)); |
| | | list.add(new NameValueEntity("S_XLS", "$(OrgUserStorage)\\质检配置文件\\质检配置表总.xlsx")); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 8.原点检查:*剖面图*.dwg |
| | | */ |
| | | public void checkOrigin() { |
| | | public String checkOrigin(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A11成果质检_原点检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 9.栅格检查:.tif/.prj/.tfw/.tif.ovr + .xls/.xlsx |
| | | */ |
| | | public void checkDom() { |
| | | public String checkDom(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/A7成果质检_栅格检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("SJZY", fme.sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("S_CoordinateSystem", fme.coordinateSystem)); |
| | | list.add(new NameValueEntity("DMYX_FBL", fme.imgResolution)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 10.数学基础检查:.shp, .gdb, *元数据*.xls/.xlsx |
| | | */ |
| | | public String checkMath(String taskGuid, String xmmc, String sjzy, String filePath, HttpServletRequest req) { |
| | | public String checkMath(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/B1入库质检_数学基础检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(taskGuid); |
| | | list.add(new NameValueEntity("XMMC", xmmc)); |
| | | list.add(new NameValueEntity("SJZY", sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", filePath)); |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("SJZY", fme.sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | |
| | | /** |
| | | * 11.元数据检查:*元数据*.xls/.xlsx |
| | | */ |
| | | public void checkMeta() { |
| | | public String checkMeta(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/B5入库质检_元数据检查", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("SJZY", fme.sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | | * 12.总质检:.zip/.7z + .xls/.xlsx |
| | | */ |
| | | public String checkMain(FmeReqEntity fme, HttpServletRequest req) { |
| | | String url = getUrl("datax/task/run/B0入库质检__总", req); |
| | | |
| | | List<NameValueEntity> list = getKeyValues(fme.name); |
| | | list.add(new NameValueEntity("XMMC", fme.xmmc)); |
| | | list.add(new NameValueEntity("SJZY", fme.sjzy)); |
| | | list.add(new NameValueEntity("GCXMYSB", fme.zipPath)); |
| | | list.add(new NameValueEntity("S_WBSBG", fme.wbsPath)); |
| | | list.add(new NameValueEntity("S_DZDK", fme.isDiZai)); |
| | | list.add(new NameValueEntity("DZ_ZLLX", fme.diZaiType)); |
| | | |
| | | return RestHelper.postForRest(url, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 获取名称值对集合 |
| | | * |
| | | * @return 名称值对集合 |
| | | */ |
| | | public List<NameValueEntity> getKeyValues(String taskGuid) { |
| | | public List<NameValueEntity> getKeyValues(String guid) { |
| | | List<NameValueEntity> list = new ArrayList<>(); |
| | | list.add(new NameValueEntity("_name", taskGuid)); |
| | | list.add(new NameValueEntity("_name", guid)); |
| | | list.add(new NameValueEntity("_priority", 100)); |
| | | list.add(new NameValueEntity("_terminate_on_error", true)); |
| | | list.add(new NameValueEntity("_terminate_on_error", false)); |
| | | list.add(new NameValueEntity("IID", "")); |
| | | list.add(new NameValueEntity("FANOUT_DIR", "$(OrgResultStorage)")); |
| | | list.add(new NameValueEntity("IID_JL", "$(OrgUserStorage)\\质检配置文件\\IID记录表.xlsx")); |
| | | list.add(new NameValueEntity("S_ZJXZ", "$(OrgUserStorage)\\质检配置文件\\质检细则总.xlsx")); |
| | | list.add(new NameValueEntity("S_BZPZB", "$(OrgUserStorage)\\质检配置文件\\质检配置表总.xlsx")); |
| | | list.add(new NameValueEntity("IID_JL", "$(ZJPZWJ)\\IID记录表.xlsx")); |
| | | list.add(new NameValueEntity("S_ZJXZ", "$(ZJPZWJ)\\质检细则总.xlsx")); |
| | | list.add(new NameValueEntity("S_BZPZB", "$(ZJPZWJ)\\质检配置表总.xlsx")); |
| | | |
| | | return list; |
| | | } |