From ed8c7a5effd0d423ce1118b680ecdca6fe732609 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 七月 2025 16:43:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/P2022036_Service --- src/main/java/com/lf/server/controller/all/CrdsController.java | 57 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/lf/server/controller/all/CrdsController.java b/src/main/java/com/lf/server/controller/all/CrdsController.java index 704fde6..4fd8e09 100644 --- a/src/main/java/com/lf/server/controller/all/CrdsController.java +++ b/src/main/java/com/lf/server/controller/all/CrdsController.java @@ -4,10 +4,12 @@ import com.lf.server.entity.all.ResponseMsg; import com.lf.server.entity.all.StaticData; import com.lf.server.entity.data.DirEntity; +import com.lf.server.entity.data.MetaEntity; import com.lf.server.helper.HttpHelper; import com.lf.server.helper.StringHelper; import com.lf.server.service.data.DirService; import com.lf.server.service.data.FmeService; +import com.lf.server.service.data.MetaService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -35,16 +37,22 @@ @Autowired FmeService fmeService; + @Autowired + MetaService metaService; + @SysLog() @ApiOperation(value = "鏌ヨ椤圭洰") + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "瑗�") + }) @GetMapping(value = "/selectProject") - public ResponseMsg<List<DirEntity>> selectProject() { + public ResponseMsg<List<DirEntity>> selectProject(String name) { try { - List<DirEntity> list = dirService.selectProject(); + List<DirEntity> list = dirService.selectProject(name); return success(list); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @@ -57,7 +65,7 @@ return success(list); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @@ -75,24 +83,20 @@ return fmeService.getTaskStatus(id, req); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @SysLog() @ApiOperation(value = "璇锋眰鎵撳寘") @ApiImplicitParams({ - @ApiImplicitParam(name = "dirId", value = "鐩綍ID", dataType = "Integer", paramType = "57"), + @ApiImplicitParam(name = "dirCode", value = "鐩綍缂栫爜", dataType = "String", paramType = "01"), @ApiImplicitParam(name = "major", value = "涓撲笟", dataType = "String", paramType = "绌胯法瓒�"), @ApiImplicitParam(name = "isCut", value = "鏄惁瑁佸壀", dataType = "String", paramType = "NO") }) @GetMapping(value = "/uploadReqPackaging") - public ResponseMsg<Object> uploadReqPackaging(Integer dirId, String major, String isCut, HttpServletRequest req) { + public ResponseMsg<Object> uploadReqPackaging(String dirCode, String major, String isCut, HttpServletRequest req) { try { - if (null == dirId || dirId < StaticData.TWO) { - return fail("鐩綍ID涓嶈兘涓虹┖涓斿ぇ浜�1"); - } - boolean isMajor = StaticData.CROSSING.equals(major) || StaticData.ROUTE.equals(major); if (!isMajor) { return fail("涓撲笟鍙兘鏄�滅┛璺ㄨ秺鈥濇垨鈥滅嚎璺��"); @@ -103,16 +107,19 @@ return fail("鏄惁瑁佸壀鍙兘鏄�淵ES鈥濇垨鈥淣O鈥�"); } - DirEntity dir = dirService.selectDir(dirId); + if (StringHelper.isEmpty(dirCode)) { + return fail("鐩綍缂栫爜涓嶈兘涓虹┖"); + } + DirEntity dir = dirService.selectByCode(dirCode); if (null == dir) { - return fail("鐩綍(id = " + dirId + ")涓嶅瓨鍦�"); + return fail("鐩綍缂栫爜涓�" + dirCode + "鐨勭洰褰曚笉瀛樺湪"); } - String id = fmeService.crdsPackaging(dir.getFullName(), major, isCut, req); + String id = fmeService.crdsPackaging(dirCode, major, isCut, req); return success(id); } catch (Exception ex) { - return fail(ex.getMessage(), null); + return fail(ex, null); } } @@ -134,4 +141,24 @@ log.error(ex.getMessage(), ex); } } + + @SysLog() + @ApiOperation(value = "鏍规嵁鐩綍缂栫爜鏌ヨ鍏冩暟鎹枃浠�") + @ApiImplicitParams({ + @ApiImplicitParam(name = "dircode", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "01") + }) + @GetMapping(value = "/selectMetasByDirCode") + public ResponseMsg<Object> selectMetasByDirCode(String dircode) { + try { + if (StringHelper.isEmpty(dircode)) { + return fail("鐩綍缂栫爜涓嶈兘涓虹┖"); + } + + List<MetaEntity> list = metaService.selectMetasByDirCode(dircode); + + return success(null == list ? 0 : list.size(), list); + } catch (Exception ex) { + return fail(ex, null); + } + } } -- Gitblit v1.9.3