package com.lf.server.service.data;
|
|
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服务类
|
* @author WWW
|
*/
|
@Service
|
public class FmeService {
|
@Value("${sys.fmeUrl}")
|
private String fmeUrl;
|
|
/**
|
* 1.OSGB检查:.osgb + *倾斜摄影*.xls/.xlsx
|
*/
|
public void checkOsgb(String path) {
|
|
}
|
|
/**
|
* 2.表格数据检查:.xls/.xlsx(排除元数据)
|
*/
|
public void checkXls() {
|
|
}
|
|
/**
|
* 3.点云检查:.laz + *激光点云*.xls/.xlsx
|
*/
|
public void checkLaz() {
|
|
}
|
|
/**
|
* 4.高程检查:.tif/.prj/.tfw/.tif.ovr + *地形图*.dwg
|
*/
|
public void checkDem() {
|
|
}
|
|
/**
|
* 5.属性检查:*dlg*.gdb + *地形图*.dwg
|
*/
|
public void checkAttrs() {
|
|
}
|
|
/**
|
* 6.拓扑检查:*地形图*.dwg
|
*/
|
public void checkTopology() {
|
|
}
|
|
/**
|
* 7.图面整饰检查:.dwg
|
*/
|
public void checkDecorate() {
|
|
}
|
|
/**
|
* 8.原点检查:*剖面图*.dwg
|
*/
|
public void checkOrigin() {
|
|
}
|
|
/**
|
* 9.栅格检查:.tif/.prj/.tfw/.tif.ovr + .xls/.xlsx
|
*/
|
public void checkDom() {
|
|
}
|
|
/**
|
* 10.数学基础检查:.shp, .gdb, *元数据*.xls/.xlsx
|
*/
|
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() {
|
|
}
|
|
/**
|
* 获取Url
|
*/
|
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));
|
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_BZPZB", "$(OrgUserStorage)\\质检配置文件\\质检配置表总.xlsx"));
|
list.add(new NameValueEntity("S_ZJXZ", "$(OrgUserStorage)\\质检配置文件\\质检细则总.xlsx"));
|
|
return list;
|
}
|
}
|