| | |
| | | select * from lf.sys_flow; |
| | | ----------------------------------------------------------------------------------------------------- 16.å
æ°æ®è¡¨-New |
| | | -- DROP TABLE IF EXISTS lf.sys_meta; DROP TABLE IF EXISTS lf.sys_meta_file; |
| | | create table lf.sys_meta ( |
| | | create table lf.sys_meta_new ( |
| | | id serial primary key, |
| | | eventid varchar(38) default new_guid(), |
| | | metaid integer default 0, |
| | |
| | | geom geometry(MultiPolygon, 4490) |
| | | ); |
| | | -- drop index index_sys_meta_geom; |
| | | create index index_sys_meta_geom on lf.sys_meta using GIST (geom); |
| | | create index index_sys_meta_geom on lf.sys_meta_new using GIST (geom); |
| | | comment on table lf.sys_meta is 'å
æ°æ®è¡¨'; |
| | | comment on column lf.sys_meta.id is '主é®ID'; |
| | | comment on column lf.sys_meta.eventid is 'GUID'; |
| | |
| | | comment on column lf.sys_meta.geom is '空é´ä½ç½®'; |
| | | -- insert into lf.sys_meta(dirid,depid,geom,sizes,name,path) values (1,1,ST_PolygonFromText('MultiPolygon (((100 0,120 0,120 20,100 20,100 0)))', 4490),0.001,'a.jpg','c:\a.jpg'); |
| | | |
| | | select * from lf.sys_meta; select a.*,st_astext(geom) from lf.sys_meta a; |
| | | select * from lf.sys_meta_new; select a.*,st_astext(geom) from lf.sys_meta a; |
| | | ----------------------------------------------------------------------------------------------------- å
æ°æ®æµè¯è¡¨ * |
| | | -- drop table if exists md.md_zxcg; |
| | | create table md.md_zxcg( |
| | |
| | | delete from lf.sys_meta where id > 150; |
| | | delete from lf.sys_meta_file where metaid > 150; |
| | | |
| | | select * from lf.sys_dir; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | select * from lf.sys_meta_new; |
| | | insert into lf.sys_meta_new (name,dirid) value ('项ç®WBS导åº.xlsx',57,'file'); |
| | | insert into lf.sys_meta_new (name,dirid) value ('00116BT02-CR001#ESV-DW-0001 å°é¢.pdf',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('00116BT02-CR001#ESV-DW-0001ï¼å¤§æ²³æ²¿æ²³ç©¿è¶å°å½¢å¾ï¼.pdf',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('00116BT02-CR001#ESV-IN-0001ï¼èµæå¾çº¸ç®å½ï¼.pdf',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('1ç±».gdb.zip',74); |
| | | insert into lf.sys_meta_new (name,dirid) value ('2ç±».gdb.zip',74); |
| | | insert into lf.sys_meta_new (name,dirid) value ('æçæç.gdb.zip',74); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | insert into lf.sys_meta_new (name,dirid) value ('',63); |
| | | |
| | | |
| | | |
| | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.ctrl.FmeReqEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.data.FmeService; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | protected FmeService fmeService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢æ°æ®æææ§") |
| | | @GetMapping(value = "/selectDataValid") |
| | | public ResponseMsg<Object> selectDataValid(HttpServletRequest req) { |
| | | @ApiOperation(value = "æ¥è¯¢æ°å¦åºç¡æ£æ¥") |
| | | @GetMapping(value = "/selectCheckMath") |
| | | public ResponseMsg<Object> selectCheckMath(HttpServletRequest req) { |
| | | try { |
| | | String taskGuid = StringHelper.getGuid(); |
| | | String xmmc = "西æ°ä¸è¾åçº¿å¤©ç¶æ°ç®¡éå·¥ç¨ï¼åé²çª-ä¸å«ï¼ï¼00116BT02ï¼"; |
| | | // æµéä¸ä¸|åå¯ä¸ä¸|å°ç¾ä¸ä¸|æ´åºä¸ä¸ |
| | | String sjzy = "æµéä¸ä¸"; |
| | | String filePath = "D:\\Project\\Data\\LF\\temp\\20230106135746\\æ°å¦åºç¡æ£æ¥.zip"; |
| | | FmeReqEntity fme = new FmeReqEntity(); |
| | | fme.name = StringHelper.getGuid(); |
| | | fme.xmmc = "西æ°ä¸è¾åçº¿å¤©ç¶æ°ç®¡éå·¥ç¨ï¼åé²çª-ä¸å«ï¼ï¼00116BT02ï¼"; |
| | | fme.sjzy = "æµéä¸ä¸"; |
| | | fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230106135746\\æ°å¦åºç¡æ£æ¥.zip"; |
| | | |
| | | String rs = fmeService.checkMath(taskGuid, xmmc, sjzy, filePath, req); |
| | | String rs = fmeService.checkMath(fme, req); |
| | | if (StringHelper.isEmpty(rs)) { |
| | | return fail("æ£æ¥å¤±è´¥"); |
| | | } |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢å
¥åºè´¨æ£æ»") |
| | | @GetMapping(value = "/selectCheckMain") |
| | | public ResponseMsg<Object> selectCheckMain(HttpServletRequest req) { |
| | | try { |
| | | FmeReqEntity fme = new FmeReqEntity(); |
| | | fme.name = StringHelper.getGuid(); |
| | | fme.xmmc = "西æ°ä¸è¾åçº¿å¤©ç¶æ°ç®¡éå·¥ç¨ï¼åé²çª-ä¸å«ï¼ï¼00116BT02ï¼"; |
| | | fme.sjzy = "æµéä¸ä¸"; |
| | | fme.zipPath = "D:\\Project\\Data\\LF\\temp\\20230106135746\\西æ°ä¸è¾åçº¿å¤©ç¶æ°ç®¡éå·¥ç¨ï¼åé²çª-ä¸å«ï¼ï¼00116BT02ï¼.7z"; |
| | | fme.wbsPath = "D:\\Project\\Data\\LF\\temp\\20230106135746\\项ç®WBS导åº.xlsx"; |
| | | fme.isDiZai = "NO"; |
| | | fme.diZaiType = "NO"; |
| | | |
| | | String rs = fmeService.checkMain(fme, req); |
| | | if (StringHelper.isEmpty(rs)) { |
| | | return fail("æ£æ¥å¤±è´¥"); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.ctrl; |
| | | |
| | | /** |
| | | * FME请æ±å®ä½ç±» |
| | | * @author WWW |
| | | */ |
| | | public class FmeReqEntity { |
| | | public FmeReqEntity() { |
| | | } |
| | | |
| | | /** |
| | | * ä»»å¡åç§° |
| | | */ |
| | | public String name; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | public String xmmc; |
| | | |
| | | /** |
| | | * æ°æ®ä¸ä¸ï¼æµéä¸ä¸ | åå¯ä¸ä¸ | å°ç¾ä¸ä¸ | æ´åºä¸ä¸ |
| | | */ |
| | | public String sjzy; |
| | | |
| | | /** |
| | | * å¾
æ£å缩å
|
| | | */ |
| | | public String zipPath; |
| | | |
| | | /** |
| | | * WBSè¡¨æ ¼ |
| | | */ |
| | | public String wbsPath; |
| | | |
| | | /** |
| | | * æ¯/å¦ä¸ºå°ç¾æ°æ®ï¼YES|NO |
| | | */ |
| | | public String isDiZai; |
| | | |
| | | /** |
| | | * å°ç¾æ°æ®ç±»åï¼å´©å¡æ²»ç | ä¸ç¨³å®æå¡æ²»ç | å°é¢å¡é·æ²»ç | é«é¡è¾¹å¡æ²»ç | æ³¥ç³æµæ²»ç | æ°´æ¯æ²»ç | æ»å¡æ²»ç | NO |
| | | */ |
| | | public String diZaiType; |
| | | } |
| | |
| | | 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; |
| | |
| | | /** |
| | | * 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() { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 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("IID", "")); |