src/main/java/com/yssh/config/InitConfig.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/controller/SuYuanController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/service/SuYuanService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/yssh/config/InitConfig.java
@@ -6,7 +6,6 @@ import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; @@ -22,10 +21,10 @@ //protected final Log logger = LogFactory.getLog(this.getClass()); protected final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired @Resource private CommonService commonService; @Autowired @Resource private DictRecordService dictRecordService; @Resource @@ -39,9 +38,8 @@ CacheUtils.init(); boolean tableExists = commonService.checkTableExists("dict_record"); if (!tableExists) { dictRecordService.createDictRecoTable(); } if (!tableExists) dictRecordService.createDictRecoTable(); // 读取dat数据 commonService.readDatData(); src/main/java/com/yssh/controller/SuYuanController.java
@@ -193,5 +193,14 @@ if (null == x || null == y || x.length == 0 || x.length != y.length) return Result.OK(null); return Result.OK(suYuanService.selectRects(x, y)); } @ApiOperation(value = "根据名称查询溯源ID", notes = "根据名称查询溯源ID") @ApiOperationSupport(order = 16) @GetMapping("/selectSuYuanIdByName") public Result selectSuYuanIdByName(@RequestParam(value = "name") String name) { if (null == name || name.length() == 0) return Result.OK(null); return Result.OK(suYuanService.selectSuYuanIdByName(name)); } } src/main/java/com/yssh/service/SuYuanService.java
@@ -319,4 +319,11 @@ return null; } public String selectSuYuanIdByName(String name) { MonitorPointPosition mpp = commonService.select3dCheckPointByName(name); if (null == mpp) return null; return mpp.getId().substring(0, mpp.getId().lastIndexOf("_") + 1) + "0"; } }