Ver código fonte

修复异味

lyq 1 ano atrás
pai
commit
f38ab3e8cb

+ 5 - 16
src/main/java/com/sooka/sponest/data/app/controller/AppDigitalForestController.java

@@ -22,50 +22,39 @@ public class AppDigitalForestController {
     @Resource
     AppDigitalForestService appDigitalForestService;
 
-
     @ApiOperation(value = "林业数据中心点位", notes = "林业数据中心点位")
     @PostMapping("resourceList")
     public AjaxResult resourceList(@RequestBody AppDigitalForestVO vo) {
         return appDigitalForestService.resourceList(vo);
     }
 
-
     @PostMapping("selectWeather")
     public AjaxResult selectWeather(@RequestBody AppDigitalForestWeather appDigitalForestWeather) {
         return AjaxResult.success(appDigitalForestService.selectWeather(appDigitalForestWeather));
     }
 
     @PostMapping("HeZuoShePoint")
-    public R<List<AgricultureBO>> HeZuoShePoint(@RequestBody AgricultureBO agricultureBO) {
-
+    public R<List<AgricultureBO>> heZuoShePoint(@RequestBody AgricultureBO agricultureBO) {
         return R.ok(appDigitalForestService.HeZuoShePoint(agricultureBO));
     }
 
-
     @PostMapping("ZhiBaoPoint")
-    public R<List<AgricultureBO>> ZhiBaoPoint(@RequestBody AgricultureBO agricultureBO) {
-
+    public R<List<AgricultureBO>> zhiBaoPoint(@RequestBody AgricultureBO agricultureBO) {
         return R.ok(appDigitalForestService.ZhiBaoPoint(agricultureBO));
     }
 
-
     @PostMapping("XuBaoPoint")
-    public R<List<AgricultureBO>> XuBaoPoint(@RequestBody AgricultureBO agricultureBO) {
-
+    public R<List<AgricultureBO>> xuBaoPoint(@RequestBody AgricultureBO agricultureBO) {
         return R.ok(appDigitalForestService.XuBaoPoint(agricultureBO));
     }
 
-
     @PostMapping("NongJiZhanPoint")
-    public R<List<AgricultureBO>> NongJiZhanPoint(@RequestBody AgricultureBO agricultureBO) {
-
+    public R<List<AgricultureBO>> nongJiZhanPoint(@RequestBody AgricultureBO agricultureBO) {
         return R.ok(appDigitalForestService.NongJiZhanPoint(agricultureBO));
     }
 
     @PostMapping("YangZhiPoint")
-    public R<List<AgricultureBO>> YangZhiPoint(@RequestBody AgricultureBO agricultureBO) {
-
+    public R<List<AgricultureBO>> yangZhiPoint(@RequestBody AgricultureBO agricultureBO) {
         return R.ok(appDigitalForestService.YangZhiPoint(agricultureBO));
     }
-
 }

+ 23 - 37
src/main/java/com/sooka/sponest/data/other/breedresources/controller/CenterdataTFarmBreedResourcesController.java

@@ -34,8 +34,8 @@ import java.util.*;
 @RestController
 @RequestMapping("/BreedResources")
 @Api(tags = "养殖资源信息控制器")
-public class CenterdataTFarmBreedResourcesController extends BaseController
-{
+public class CenterdataTFarmBreedResourcesController extends BaseController {
+
     @Autowired
     private ICenterdataTFarmBreedResourcesService centerdataTFarmBreedResourcesService;
 
@@ -43,18 +43,15 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
      * 查询养殖资源信息列表
      */
     @ApiOperation(value = "查询养殖资源信息列表", notes = "查询养殖资源信息列表")
-
     @RequiresPermissions("breed_resources:BreedResources:list")
     @GetMapping("/list")
-    public TableDataInfo list(CenterdataTFarmBreedResources centerdataTFarmBreedResources)
-    {
+    public TableDataInfo list(CenterdataTFarmBreedResources centerdataTFarmBreedResources) {
         startPage();
         List<CenterdataTFarmBreedResources> list = centerdataTFarmBreedResourcesService.selectCenterdataTFarmBreedResourcesList(centerdataTFarmBreedResources);
         return getDataTable(list);
     }
 
     @ApiOperation(value = "养殖资源信息管理导入", notes = "养殖资源信息管理导入")
-
     @Log(title = "养殖资源信息管理导入", businessType = BusinessType.IMPORT)
     @RequiresPermissions("machinery_info:MachineryInfo:import")
     @PostMapping("/import/importData")
@@ -68,7 +65,7 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
 
     @ApiOperation(value = "养殖资源信息管理导入模板", notes = "养殖资源信息管理导入模板")
     @PostMapping("/importTemplate")
-    public void importTemplate(HttpServletResponse response)  {
+    public void importTemplate(HttpServletResponse response) {
         ExcelUtil<CenterdataTFarmBreedResources> util = new ExcelUtil<>(CenterdataTFarmBreedResources.class);
         util.importTemplateExcel(response, "养殖资源信息数据");
     }
@@ -77,12 +74,10 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
      * 导出养殖资源信息列表
      */
     @ApiOperation(value = "导出养殖资源信息列表", notes = "导出养殖资源信息列表")
-
     @RequiresPermissions("breed_resources:BreedResources:export")
     @Log(title = "养殖资源信息", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, CenterdataTFarmBreedResources centerdataTFarmBreedResources)
-    {
+    public void export(HttpServletResponse response, CenterdataTFarmBreedResources centerdataTFarmBreedResources) {
         List<CenterdataTFarmBreedResources> list = centerdataTFarmBreedResourcesService.selectCenterdataTFarmBreedResourcesList(centerdataTFarmBreedResources);
         ExcelUtil<CenterdataTFarmBreedResources> util = new ExcelUtil<>(CenterdataTFarmBreedResources.class);
         util.exportExcel(response, list, "养殖资源信息数据");
@@ -92,11 +87,9 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
      * 获取养殖资源信息详细信息
      */
     @ApiOperation(value = "获取养殖资源信息详细信息", notes = "获取养殖资源信息详细信息")
-
     @RequiresPermissions("breed_resources:BreedResources:query")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") String id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") String id) {
         return AjaxResult.success(centerdataTFarmBreedResourcesService.selectCenterdataTFarmBreedResourcesById(id));
     }
 
@@ -104,15 +97,14 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
      * 新增养殖资源信息
      */
     @ApiOperation(value = "新增养殖资源信息", notes = "新增养殖资源信息")
-
     @RequiresPermissions("breed_resources:BreedResources:add")
     @Log(title = "养殖资源信息", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@Validated @RequestBody CenterdataTFarmBreedResources centerdataTFarmBreedResources){
+    public AjaxResult add(@Validated @RequestBody CenterdataTFarmBreedResources centerdataTFarmBreedResources) {
         String tableName = "centerdata_t_farm_breed_resources";
-        String[] keys = {"name","dept_id"};
+        String[] keys = {"name", "dept_id"};
         String[] values = {centerdataTFarmBreedResources.getName(), centerdataTFarmBreedResources.getDeptId()};
-        if(!centerdataTFarmBreedResourcesService.uniqueCheck(tableName, keys, values)){
+        if (!centerdataTFarmBreedResourcesService.uniqueCheck(tableName, keys, values)) {
             return AjaxResult.error(DataConstants.ERROR_MSG);
         }
         return toAjax(centerdataTFarmBreedResourcesService.insertCenterdataTFarmBreedResources(centerdataTFarmBreedResources));
@@ -122,16 +114,14 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
      * 修改养殖资源信息
      */
     @ApiOperation(value = "修改养殖资源信息", notes = "修改养殖资源信息")
-
     @RequiresPermissions("breed_resources:BreedResources:edit")
     @Log(title = "养殖资源信息", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@Validated @RequestBody CenterdataTFarmBreedResources centerdataTFarmBreedResources)
-    {
+    public AjaxResult edit(@Validated @RequestBody CenterdataTFarmBreedResources centerdataTFarmBreedResources) {
         String tableName = "centerdata_t_farm_breed_resources";
-        String[] keys = {"name","id"};
-        String[] values = {centerdataTFarmBreedResources.getName(),centerdataTFarmBreedResources.getId()};
-        if(!centerdataTFarmBreedResourcesService.uniqueCheck(tableName, keys, values)){
+        String[] keys = {"name", "id"};
+        String[] values = {centerdataTFarmBreedResources.getName(), centerdataTFarmBreedResources.getId()};
+        if (!centerdataTFarmBreedResourcesService.uniqueCheck(tableName, keys, values)) {
             return AjaxResult.error(DataConstants.ERROR_MSG);
         }
         return toAjax(centerdataTFarmBreedResourcesService.updateCenterdataTFarmBreedResources(centerdataTFarmBreedResources));
@@ -141,12 +131,10 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
      * 删除养殖资源信息
      */
     @ApiOperation(value = "删除养殖资源信息", notes = "删除养殖资源信息")
-
     @RequiresPermissions("breed_resources:BreedResources:remove")
     @Log(title = "养殖资源信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable String[] ids)
-    {
+    public AjaxResult remove(@PathVariable String[] ids) {
         return toAjax(centerdataTFarmBreedResourcesService.deleteCenterdataTFarmBreedResourcesByIds(ids));
     }
 
@@ -154,8 +142,7 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
     //数字农业远端调用
     @ApiOperation(value = "远端调用查询养殖资源信息", notes = "远端调用查询养殖资源信息")
     @GetMapping("/YangZhilistFen")
-    public TableDataInfo YangZhilistFen(CenterdataTFarmBreedResources centerdataTFarmBreedResources)
-    {
+    public TableDataInfo yangZhilistFen(CenterdataTFarmBreedResources centerdataTFarmBreedResources) {
         startPage();
         List<CenterdataTFarmBreedResources> list = centerdataTFarmBreedResourcesService.selectCenterdataTFarmBreedResourcesList(centerdataTFarmBreedResources);
         return getDataTable(list);
@@ -164,17 +151,16 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
     // 大数据-养殖数据分析
     @ApiOperation(value = "大数据-养殖数据分析", notes = "大数据-养殖数据分析")
     @GetMapping("/breedDataAnalysis")
-    public R breedDataAnalysis(CenterdataTFarmBreedResources centerdataTFarmBreedResources)
-    {
-        List<Map<String,Object>> list = centerdataTFarmBreedResourcesService.breedDataAnalysis(centerdataTFarmBreedResources);
+    public R breedDataAnalysis(CenterdataTFarmBreedResources centerdataTFarmBreedResources) {
+        List<Map<String, Object>> list = centerdataTFarmBreedResourcesService.breedDataAnalysis(centerdataTFarmBreedResources);
         List<String> types = new ArrayList<>();
         MultiValueMap<String, Object> countMap = new LinkedMultiValueMap<>();
         list.forEach(item -> {
-            types.add(MapUtils.getString(item,"dict_label"));
+            types.add(MapUtils.getString(item, "dict_label"));
 
-            String key = MapUtils.getString(item,"dict_value");
-            countMap.add(key + "_quantity", MapUtils.getLong(item,"quantity"));
-            countMap.add(key + "_revenue", MapUtils.getLong(item,"revenue"));
+            String key = MapUtils.getString(item, "dict_value");
+            countMap.add(key + "_quantity", MapUtils.getLong(item, "quantity"));
+            countMap.add(key + "_revenue", MapUtils.getLong(item, "revenue"));
         });
         // 返回值
         Map<String, Object> resultMap = new HashMap<>();
@@ -197,8 +183,8 @@ public class CenterdataTFarmBreedResourcesController extends BaseController
         }
         resultMap.put("series", series);
         map = centerdataTFarmBreedResourcesService.getBreedDataCount(centerdataTFarmBreedResources);
-        resultMap.put("breedFarm", MapUtils.getLong(map,"breedFarm"));
-        resultMap.put("breedFarmer", MapUtils.getLong(map,"breedFarmer"));
+        resultMap.put("breedFarm", MapUtils.getLong(map, "breedFarm"));
+        resultMap.put("breedFarmer", MapUtils.getLong(map, "breedFarmer"));
         return R.ok(resultMap);
     }
 }

+ 120 - 118
src/main/java/com/sooka/sponest/data/system/baidumap/domain/CenterdataTBaidumap.java

@@ -11,255 +11,257 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * @author ruoyi
  * @date 2022-05-06
  */
-public class CenterdataTBaidumap extends BaseBusinessEntity
-{
+public class CenterdataTBaidumap extends BaseBusinessEntity {
+
     private static final long serialVersionUID = 1L;
 
-    /** $column.columnComment */
+    /**
+     * $column.columnComment
+     */
     private String id;
 
-    /** 引用号 */
+    /**
+     * 引用号
+     */
     @Excel(name = "引用号")
     private String code;
 
-    /** 对应业务描述 */
+    /**
+     * 对应业务描述
+     */
     @Excel(name = "对应业务描述")
     private String content;
 
-    /** 对应业务标识 */
+    /**
+     * 对应业务标识
+     */
     @Excel(name = "对应业务标识")
     private String business;
 
-    /** 超图地址 */
+    /**
+     * 超图地址
+     */
     @Excel(name = "超图地址")
     private String url;
 
-    /** 数据集地址 */
+    /**
+     * 数据集地址
+     */
     @Excel(name = "数据集地址")
     private String dataset;
 
-    /** 中心点经度 */
+    /**
+     * 中心点经度
+     */
     @Excel(name = "中心点经度")
     private String centerLng;
 
-    /** 中心点纬度 */
+    /**
+     * 中心点纬度
+     */
     @Excel(name = "中心点纬度")
     private String centerLat;
 
-    /** 默认比例 */
+    /**
+     * 默认比例
+     */
     @Excel(name = "默认比例")
     private Long zoom;
 
-    /** 最大比例 */
+    /**
+     * 最大比例
+     */
     @Excel(name = "最大比例")
     private Long maxZoom;
 
-    /** 最小比例 */
+    /**
+     * 最小比例
+     */
     @Excel(name = "最小比例")
     private Long minZoom;
 
-    /** 启用滚轮放大缩小,默认禁用 0:否  1:是 */
+    /**
+     * 启用滚轮放大缩小,默认禁用 0:否  1:是
+     */
     @Excel(name = "启用滚轮放大缩小,默认禁用 0:否  1:是")
     private Integer enableScrollWheelZoom;
 
-    /** 启用双击放大,默认启用 0:否  1:是 */
+    /**
+     * 启用双击放大,默认启用 0:否  1:是
+     */
     @Excel(name = "启用双击放大,默认启用 0:否  1:是")
     private Integer enableDoubleClickZoom;
 
-    /** 启用键盘操作,默认禁用  0:否  1:是 */
+    /**
+     * 启用键盘操作,默认禁用  0:否  1:是
+     */
     @Excel(name = "启用键盘操作,默认禁用  0:否  1:是")
     private Integer enableKeyboard;
 
-    /** 启用自动适应容器尺寸变化,默认启用  0:否  1:是 */
+    /**
+     * 启用自动适应容器尺寸变化,默认启用  0:否  1:是
+     */
     @Excel(name = "启用自动适应容器尺寸变化,默认启用  0:否  1:是")
     private Integer enableAutoResize;
 
-    /** 数据状态(1-可用 2-不可用 ) */
+    /**
+     * 数据状态(1-可用 2-不可用 )
+     */
     @Excel(name = "数据状态(1-可用 2-不可用 )")
     private String dataStatus;
 
-    /** 数据所属部门(政或党的id) */
-    @Excel(name = "数据所属部门(政或党的id)")
-    private Long dataDeptId;
-
-    public void setId(String id)
-    {
+    public void setId(String id) {
         this.id = id;
     }
 
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
-    public void setCode(String code)
-    {
+
+    public void setCode(String code) {
         this.code = code;
     }
 
-    public String getCode()
-    {
+    public String getCode() {
         return code;
     }
-    public void setContent(String content)
-    {
+
+    public void setContent(String content) {
         this.content = content;
     }
 
-    public String getContent()
-    {
+    public String getContent() {
         return content;
     }
-    public void setBusiness(String business)
-    {
+
+    public void setBusiness(String business) {
         this.business = business;
     }
 
-    public String getBusiness()
-    {
+    public String getBusiness() {
         return business;
     }
-    public void setUrl(String url)
-    {
+
+    public void setUrl(String url) {
         this.url = url;
     }
 
-    public String getUrl()
-    {
+    public String getUrl() {
         return url;
     }
-    public void setDataset(String dataset)
-    {
+
+    public void setDataset(String dataset) {
         this.dataset = dataset;
     }
 
-    public String getDataset()
-    {
+    public String getDataset() {
         return dataset;
     }
-    public void setCenterLng(String centerLng)
-    {
+
+    public void setCenterLng(String centerLng) {
         this.centerLng = centerLng;
     }
 
-    public String getCenterLng()
-    {
+    public String getCenterLng() {
         return centerLng;
     }
-    public void setCenterLat(String centerLat)
-    {
+
+    public void setCenterLat(String centerLat) {
         this.centerLat = centerLat;
     }
 
-    public String getCenterLat()
-    {
+    public String getCenterLat() {
         return centerLat;
     }
-    public void setZoom(Long zoom)
-    {
+
+    public void setZoom(Long zoom) {
         this.zoom = zoom;
     }
 
-    public Long getZoom()
-    {
+    public Long getZoom() {
         return zoom;
     }
-    public void setMaxZoom(Long maxZoom)
-    {
+
+    public void setMaxZoom(Long maxZoom) {
         this.maxZoom = maxZoom;
     }
 
-    public Long getMaxZoom()
-    {
+    public Long getMaxZoom() {
         return maxZoom;
     }
-    public void setMinZoom(Long minZoom)
-    {
+
+    public void setMinZoom(Long minZoom) {
         this.minZoom = minZoom;
     }
 
-    public Long getMinZoom()
-    {
+    public Long getMinZoom() {
         return minZoom;
     }
-    public void setEnableScrollWheelZoom(Integer enableScrollWheelZoom)
-    {
+
+    public void setEnableScrollWheelZoom(Integer enableScrollWheelZoom) {
         this.enableScrollWheelZoom = enableScrollWheelZoom;
     }
 
-    public Integer getEnableScrollWheelZoom()
-    {
+    public Integer getEnableScrollWheelZoom() {
         return enableScrollWheelZoom;
     }
-    public void setEnableDoubleClickZoom(Integer enableDoubleClickZoom)
-    {
+
+    public void setEnableDoubleClickZoom(Integer enableDoubleClickZoom) {
         this.enableDoubleClickZoom = enableDoubleClickZoom;
     }
 
-    public Integer getEnableDoubleClickZoom()
-    {
+    public Integer getEnableDoubleClickZoom() {
         return enableDoubleClickZoom;
     }
-    public void setEnableKeyboard(Integer enableKeyboard)
-    {
+
+    public void setEnableKeyboard(Integer enableKeyboard) {
         this.enableKeyboard = enableKeyboard;
     }
 
-    public Integer getEnableKeyboard()
-    {
+    public Integer getEnableKeyboard() {
         return enableKeyboard;
     }
-    public void setEnableAutoResize(Integer enableAutoResize)
-    {
+
+    public void setEnableAutoResize(Integer enableAutoResize) {
         this.enableAutoResize = enableAutoResize;
     }
 
-    public Integer getEnableAutoResize()
-    {
+    public Integer getEnableAutoResize() {
         return enableAutoResize;
     }
-    public void setDataStatus(String dataStatus)
-    {
+
+    public void setDataStatus(String dataStatus) {
         this.dataStatus = dataStatus;
     }
 
-    public String getDataStatus()
-    {
+    public String getDataStatus() {
         return dataStatus;
     }
-    public void setDataDeptId(Long dataDeptId)
-    {
-        this.dataDeptId = dataDeptId;
-    }
-
-    public Long getDataDeptId()
-    {
-        return dataDeptId;
-    }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("code", getCode())
-            .append("content", getContent())
-            .append("business", getBusiness())
-            .append("url", getUrl())
-            .append("dataset", getDataset())
-            .append("centerLng", getCenterLng())
-            .append("centerLat", getCenterLat())
-            .append("zoom", getZoom())
-            .append("maxZoom", getMaxZoom())
-            .append("minZoom", getMinZoom())
-            .append("enableScrollWheelZoom", getEnableScrollWheelZoom())
-            .append("enableDoubleClickZoom", getEnableDoubleClickZoom())
-            .append("enableKeyboard", getEnableKeyboard())
-            .append("enableAutoResize", getEnableAutoResize())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("dataStatus", getDataStatus())
-            .append("dataDeptId", getDataDeptId())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("code", getCode())
+                .append("content", getContent())
+                .append("business", getBusiness())
+                .append("url", getUrl())
+                .append("dataset", getDataset())
+                .append("centerLng", getCenterLng())
+                .append("centerLat", getCenterLat())
+                .append("zoom", getZoom())
+                .append("maxZoom", getMaxZoom())
+                .append("minZoom", getMinZoom())
+                .append("enableScrollWheelZoom", getEnableScrollWheelZoom())
+                .append("enableDoubleClickZoom", getEnableDoubleClickZoom())
+                .append("enableKeyboard", getEnableKeyboard())
+                .append("enableAutoResize", getEnableAutoResize())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("dataStatus", getDataStatus())
+                .append("dataDeptId", getDataDeptId())
+                .toString();
     }
 }