crops智慧农业
This commit is contained in:
parent
6ad345331d
commit
10b89f0da0
3
pom.xml
3
pom.xml
@ -180,6 +180,9 @@
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-pill</module>
|
||||
<module>ruoyi-crops</module>
|
||||
<module>01</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -60,6 +60,33 @@
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-pill</artifactId>
|
||||
<version>3.8.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-crops</artifactId>
|
||||
<version>3.8.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!--HuTool工具类-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.7.1</version>
|
||||
</dependency>
|
||||
<!--Gson工具类-->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -3,12 +3,14 @@ package com.ruoyi;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableScheduling
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
public class RuoYiApplication
|
||||
{
|
||||
|
@ -0,0 +1,98 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.crops.domain.CropsComprehensiveData;
|
||||
import com.ruoyi.crops.service.ICropsComprehensiveDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作物综合数据Controller
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/crops/data")
|
||||
public class CropsComprehensiveDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICropsComprehensiveDataService cropsComprehensiveDataService;
|
||||
|
||||
/**
|
||||
* 查询作物综合数据列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
// startPage();
|
||||
List<CropsComprehensiveData> list = cropsComprehensiveDataService.selectCropsComprehensiveDataList(cropsComprehensiveData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出作物综合数据列表
|
||||
*/
|
||||
|
||||
@Log(title = "作物综合数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
List<CropsComprehensiveData> list = cropsComprehensiveDataService.selectCropsComprehensiveDataList(cropsComprehensiveData);
|
||||
ExcelUtil<CropsComprehensiveData> util = new ExcelUtil<CropsComprehensiveData>(CropsComprehensiveData.class);
|
||||
util.exportExcel(response, list, "作物综合数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取作物综合数据详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(cropsComprehensiveDataService.selectCropsComprehensiveDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增作物综合数据
|
||||
*/
|
||||
|
||||
@Log(title = "作物综合数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
return toAjax(cropsComprehensiveDataService.insertCropsComprehensiveData(cropsComprehensiveData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改作物综合数据
|
||||
*/
|
||||
|
||||
@Log(title = "作物综合数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
return toAjax(cropsComprehensiveDataService.updateCropsComprehensiveData(cropsComprehensiveData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除作物综合数据
|
||||
*/
|
||||
|
||||
@Log(title = "作物综合数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(cropsComprehensiveDataService.deleteCropsComprehensiveDataByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.CropsDrought;
|
||||
import com.ruoyi.crops.service.ICropsDroughtService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作物旱情controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/crops/drought")
|
||||
public class CropsDroughtController extends BaseController {
|
||||
@Autowired
|
||||
private ICropsDroughtService iCropsDroughtService;
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/insertBatch")
|
||||
public AjaxResult insertBatch(@RequestBody Map<String, List<CropsDrought>> map){
|
||||
List<CropsDrought> cropDroughtList = map.get("cropDroughtList");
|
||||
return toAjax(iCropsDroughtService.insertBatch(cropDroughtList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间查询
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{time}")
|
||||
public List<CropsDrought> selectByTime(@PathVariable("time")Date time){
|
||||
return iCropsDroughtService.selectByTime(time);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.CropStructure;
|
||||
import com.ruoyi.crops.domain.CropsGrowth;
|
||||
import com.ruoyi.crops.service.ICropsGrowthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作物长势controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/crops/growth")
|
||||
public class CropsGrowthController extends BaseController {
|
||||
@Autowired
|
||||
private ICropsGrowthService iCropsGrowthService;
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/insertBatch")
|
||||
public AjaxResult insertBatch(@RequestBody Map<String, List<CropsGrowth>> map){
|
||||
List<CropsGrowth> cropGrowthList = map.get("cropGrowthList");
|
||||
return toAjax(iCropsGrowthService.insertBatch(cropGrowthList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间查询
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{time}")
|
||||
public List<CropsGrowth> selectByTime(@PathVariable("time") Date time){
|
||||
return iCropsGrowthService.selectByTime(time);
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.CropStructure;
|
||||
import com.ruoyi.crops.service.ICropsStructureService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.aspectj.weaver.loadtime.Aj;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 种植结构controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/crops/structure")
|
||||
public class CropsStructureController extends BaseController {
|
||||
@Autowired
|
||||
private ICropsStructureService iCropsStructureService;
|
||||
/**
|
||||
* 新增数据
|
||||
* @param cropStructure
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CropStructure cropStructure){
|
||||
return toAjax(iCropsStructureService.insertCropsStructure(cropStructure));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增数据
|
||||
* @param map map集合方式存放数组json字符串
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/insertBatch")
|
||||
public AjaxResult insertBatch(@RequestBody Map<String,List<CropStructure>> map){
|
||||
List<CropStructure> cropStructureList = map.get("cropStructureList");
|
||||
return toAjax(iCropsStructureService.insertBatch(cropStructureList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间查询
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{time}")
|
||||
public List<CropStructure> selectByTime(@PathVariable Date time){
|
||||
return iCropsStructureService.selectByTime(time);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.CropsYield;
|
||||
import com.ruoyi.crops.service.ICropsYieldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作物产量查询
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/crops/yield")
|
||||
public class CropsYieldConeroller extends BaseController {
|
||||
@Autowired
|
||||
private ICropsYieldService iCropsYieldService;
|
||||
|
||||
/**
|
||||
* 根据年份查询
|
||||
* @param year
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{year}")
|
||||
public List<CropsYield> selectByYear(@PathVariable Integer year){
|
||||
return iCropsYieldService.selectByYear(year);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/insertBatch")
|
||||
public AjaxResult insertBatch(@RequestBody Map<String,List<CropsYield>> map){
|
||||
List<CropsYield> cropYieldList = map.get("cropYieldList");
|
||||
return toAjax(iCropsYieldService.insertBatch(cropYieldList));
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.EnvironmentalData;
|
||||
import com.ruoyi.crops.service.IEnvironmentalService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 环境数据controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/environmental")
|
||||
public class EnvironmentalController extends BaseController {
|
||||
@Autowired
|
||||
private IEnvironmentalService iEnvironmentalService;
|
||||
|
||||
/**
|
||||
* 根据大棚编号查询
|
||||
* @param number
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{number}")
|
||||
private List<EnvironmentalData> selectByNumber(@PathVariable Integer number){
|
||||
return iEnvironmentalService.selectByNumber(number);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单条数据
|
||||
* @param environmentalData
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
private AjaxResult insert(@RequestBody EnvironmentalData environmentalData){
|
||||
return toAjax(iEnvironmentalService.insert(environmentalData));
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.ruoyi.crops.domain.GsonParseFoundationBean;
|
||||
import com.ruoyi.crops.service.IFoundationService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/foundation")
|
||||
public class FoundationController {
|
||||
@Autowired
|
||||
private IFoundationService foundationService;
|
||||
|
||||
@PostMapping("/{id}")
|
||||
public String Foundation(@PathVariable String id){
|
||||
return foundationService.getFoundation(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/workspaces/PJZ/coveragestores/")
|
||||
@RequestMapping
|
||||
public class Geoservercontroller {
|
||||
// @PutMapping("/{store}/{method}.{format}")
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.GreenhouseInformation;
|
||||
import com.ruoyi.crops.service.IGreenhouseService;
|
||||
import org.aspectj.weaver.loadtime.Aj;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大棚信息controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/greenhouse/information")
|
||||
public class GreenhouseController extends BaseController {
|
||||
@Autowired
|
||||
private IGreenhouseService iGreenhouseService;
|
||||
|
||||
@GetMapping("/{name}")
|
||||
public List<GreenhouseInformation> selectByName(@PathVariable String name){
|
||||
return iGreenhouseService.selectByName(name);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult insert(@RequestBody GreenhouseInformation greenhouseInformation){
|
||||
return toAjax(iGreenhouseService.insert(greenhouseInformation));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.IntelligentControl;
|
||||
import com.ruoyi.crops.service.IIntelligentControlService;
|
||||
import org.aspectj.weaver.loadtime.Aj;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水肥一体机智能控制controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/intelligent")
|
||||
public class IntelligentController extends BaseController {
|
||||
@Autowired
|
||||
private IIntelligentControlService iIntelligentControlService;
|
||||
|
||||
/**
|
||||
* 新增单条数据
|
||||
* @param intelligentControl
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult insert(@RequestBody IntelligentControl intelligentControl){
|
||||
return toAjax(iIntelligentControlService.insert(intelligentControl));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public List<IntelligentControl> selectAll(){
|
||||
return iIntelligentControlService.selectAll();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody IntelligentControl intelligentControl){
|
||||
return toAjax(iIntelligentControlService.edit(intelligentControl));
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.MachineParameter;
|
||||
import com.ruoyi.crops.service.IMachineParameterService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 水肥一体机参数controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/machine/parameter")
|
||||
public class MachineParameterController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IMachineParameterService machineParameterService;
|
||||
|
||||
/**
|
||||
* 根据大棚名称进行查询
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{name}")
|
||||
public List<MachineParameter> selectByName(@PathVariable String name){
|
||||
return machineParameterService.selectByName(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单条数据
|
||||
* @param machineParameter
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult insert(@RequestBody MachineParameter machineParameter){
|
||||
return toAjax(machineParameterService.insert(machineParameter));
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.OperationRecords;
|
||||
import com.ruoyi.crops.service.IOperationRecordsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 操作记录controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("operation/records")
|
||||
public class OperationRecordsController extends BaseController {
|
||||
@Autowired
|
||||
private IOperationRecordsService iOperationRecordsService;
|
||||
|
||||
/**
|
||||
* 查询全部记录
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public List<OperationRecords> listAll (){
|
||||
return iOperationRecordsService.selectAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单条数据
|
||||
* @param operationRecords
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult insert(@RequestBody OperationRecords operationRecords){
|
||||
return toAjax(iOperationRecordsService.insert(operationRecords));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.ServiceType;
|
||||
import com.ruoyi.crops.service.IServiceTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务类型controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/service/type")
|
||||
public class ServiceTypeController extends BaseController {
|
||||
@Autowired
|
||||
private IServiceTypeService typeService;
|
||||
|
||||
/**
|
||||
* 根据类型查询(有参)
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{type}")
|
||||
public List<ServiceType> selectByType(@PathVariable String type){
|
||||
return typeService.selectByType(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参查询全部展示
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public List<ServiceType> selectAll(){
|
||||
return typeService.selectAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单条数据
|
||||
* @param serviceType
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("insert")
|
||||
public AjaxResult insert(@RequestBody ServiceType serviceType){
|
||||
return toAjax(typeService.insert(serviceType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据数组批量删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
private AjaxResult remove(@PathVariable Long[] ids){
|
||||
return toAjax(typeService.deleteByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.User;
|
||||
import com.ruoyi.crops.domain.UserInfo;
|
||||
import com.ruoyi.crops.service.IUserInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user/info")
|
||||
|
||||
|
||||
public class UserInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IUserInfoService userInfoService;
|
||||
// @Scheduled(fixedDelay = 30*1000)
|
||||
@PostMapping
|
||||
public String userInfo(@RequestBody User user){
|
||||
return userInfoService.login(user);
|
||||
// System.out.println("执行1次");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.web.controller.crops;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
import com.ruoyi.crops.service.IWarningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预警信息controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("warning/information")
|
||||
public class WarningController extends BaseController {
|
||||
@Autowired
|
||||
private IWarningService iWarningService;
|
||||
|
||||
/**
|
||||
* 根据大棚编号查询
|
||||
* @param number
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{number}")
|
||||
public List<WarningInformation> selectByNumber(@PathVariable Integer number){
|
||||
return iWarningService.selectByNumber(number);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单条数据
|
||||
* @param warningInformation
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult insert(@RequestBody WarningInformation warningInformation){
|
||||
return toAjax(iWarningService.insert(warningInformation));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,98 @@
|
||||
package com.ruoyi.web.controller.pill;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.pill.domain.PillFactory;
|
||||
import com.ruoyi.pill.service.IPillFactoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产厂家信息Controller
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pill/factory")
|
||||
public class PillFactoryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPillFactoryService pillFactoryService;
|
||||
|
||||
/**
|
||||
* 查询生产厂家信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pill:factory:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PillFactory pillFactory)
|
||||
{
|
||||
startPage();
|
||||
List<PillFactory> list = pillFactoryService.selectPillFactoryList(pillFactory);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产厂家信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pill:factory:export')")
|
||||
@Log(title = "生产厂家信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PillFactory pillFactory)
|
||||
{
|
||||
List<PillFactory> list = pillFactoryService.selectPillFactoryList(pillFactory);
|
||||
ExcelUtil<PillFactory> util = new ExcelUtil<PillFactory>(PillFactory.class);
|
||||
util.exportExcel(response, list, "生产厂家信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产厂家信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pill:factory:query')")
|
||||
@GetMapping(value = "/{factoryId}")
|
||||
public AjaxResult getInfo(@PathVariable("factoryId") Long factoryId)
|
||||
{
|
||||
return success(pillFactoryService.selectPillFactoryByFactoryId(factoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产厂家信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pill:factory:add')")
|
||||
@Log(title = "生产厂家信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PillFactory pillFactory)
|
||||
{
|
||||
return toAjax(pillFactoryService.insertPillFactory(pillFactory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产厂家信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pill:factory:edit')")
|
||||
@Log(title = "生产厂家信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PillFactory pillFactory)
|
||||
{
|
||||
return toAjax(pillFactoryService.updatePillFactory(pillFactory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产厂家信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pill:factory:remove')")
|
||||
@Log(title = "生产厂家信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{factoryIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] factoryIds)
|
||||
{
|
||||
return toAjax(pillFactoryService.deletePillFactoryByFactoryIds(factoryIds));
|
||||
}
|
||||
}
|
@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
password: 123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
@ -129,3 +129,7 @@ xss:
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
url:
|
||||
foundation: 'http://api.nonghaiiot.com/api/foundation/getFoundationByUserId.zzdy'
|
||||
userInfo: 'http://api.nonghaiiot.com/admin/sys/login'
|
||||
|
21
ruoyi-admin/src/test/java/com/ruoyi/web/PssTest.java
Normal file
21
ruoyi-admin/src/test/java/com/ruoyi/web/PssTest.java
Normal file
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.web;
|
||||
|
||||
import com.ruoyi.pill.domain.PillFactory;
|
||||
import com.ruoyi.pill.service.IPillFactoryService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
public class PssTest {
|
||||
@Autowired
|
||||
private IPillFactoryService IpillFactoryService;
|
||||
|
||||
@Test
|
||||
public void testSelectFactory(){
|
||||
PillFactory pillFactory = new PillFactory();
|
||||
pillFactory.setFactoryName("云南");
|
||||
IpillFactoryService.selectPillFactoryList(pillFactory);
|
||||
|
||||
}
|
||||
}
|
35
ruoyi-crops/pom.xml
Normal file
35
ruoyi-crops/pom.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>3.8.5</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-crops</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.7.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -0,0 +1,123 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 作物种植结构;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-24
|
||||
*/
|
||||
|
||||
public class CropStructure{
|
||||
/** id */
|
||||
|
||||
private Integer id ;
|
||||
/** 区域 */
|
||||
private String zone ;
|
||||
/** 时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date imageDate ;
|
||||
/** 小麦面积 */
|
||||
private Double wheatArea ;
|
||||
/** 玉米面积 */
|
||||
private Double cornArea ;
|
||||
/** 花生面积 */
|
||||
private Double peanutArea ;
|
||||
/** 大豆面积 */
|
||||
private Double soybeanArea ;
|
||||
/** 其他面积 */
|
||||
private Double otherArea ;
|
||||
/** 总面积 */
|
||||
private Double toalArea ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getZone() {
|
||||
return zone;
|
||||
}
|
||||
|
||||
public void setZone(String zone) {
|
||||
this.zone = zone;
|
||||
}
|
||||
|
||||
public Date getImageDate() {
|
||||
return imageDate;
|
||||
}
|
||||
|
||||
public void setImageDate(Date imageDate) {
|
||||
this.imageDate = imageDate;
|
||||
}
|
||||
|
||||
public Double getWheatArea() {
|
||||
return wheatArea;
|
||||
}
|
||||
|
||||
public void setWheatArea(Double wheatArea) {
|
||||
this.wheatArea = wheatArea;
|
||||
}
|
||||
|
||||
public Double getCornArea() {
|
||||
return cornArea;
|
||||
}
|
||||
|
||||
public void setCornArea(Double cornArea) {
|
||||
this.cornArea = cornArea;
|
||||
}
|
||||
|
||||
public Double getPeanutArea() {
|
||||
return peanutArea;
|
||||
}
|
||||
|
||||
public void setPeanutArea(Double peanutArea) {
|
||||
this.peanutArea = peanutArea;
|
||||
}
|
||||
|
||||
public Double getSoybeanArea() {
|
||||
return soybeanArea;
|
||||
}
|
||||
|
||||
public void setSoybeanArea(Double soybeanArea) {
|
||||
this.soybeanArea = soybeanArea;
|
||||
}
|
||||
|
||||
public Double getOtherArea() {
|
||||
return otherArea;
|
||||
}
|
||||
|
||||
public void setOtherArea(Double otherArea) {
|
||||
this.otherArea = otherArea;
|
||||
}
|
||||
|
||||
public Double getToalArea() {
|
||||
return toalArea;
|
||||
}
|
||||
|
||||
public void setToalArea(Double toalArea) {
|
||||
this.toalArea = toalArea;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CropStructure{" +
|
||||
"id=" + id +
|
||||
", zone='" + zone + '\'' +
|
||||
", imageDate=" + imageDate +
|
||||
", wheatArea=" + wheatArea +
|
||||
", cornArea=" + cornArea +
|
||||
", peanutArea=" + peanutArea +
|
||||
", soybeanArea=" + soybeanArea +
|
||||
", otherArea=" + otherArea +
|
||||
", toalArea=" + toalArea +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,319 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 作物综合数据对象 crops_comprehensive_data
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public class CropsComprehensiveData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 镇耕地面积(万亩) */
|
||||
@Excel(name = "镇耕地面积(万亩)")
|
||||
private Float cultivatedArea;
|
||||
|
||||
/** 粮食总产(万吨) */
|
||||
@Excel(name = "粮食总产(万吨)")
|
||||
private Float foodstuffProduction;
|
||||
|
||||
/** 蔬菜种植面积(亩) */
|
||||
@Excel(name = "蔬菜种植面积(亩)")
|
||||
private Long vegetablePlantingArea;
|
||||
|
||||
/** 蔬菜总产(吨) */
|
||||
@Excel(name = "蔬菜总产(吨)")
|
||||
private Long vegetableProduction;
|
||||
|
||||
/** 农产品种类 */
|
||||
@Excel(name = "农产品种类")
|
||||
private Long type;
|
||||
|
||||
/** 农产品种植面积(亩) */
|
||||
@Excel(name = "农产品种植面积(亩)")
|
||||
private Long agriculturalPlantingArea;
|
||||
|
||||
/** 特色农业总产量(吨) */
|
||||
@Excel(name = "特色农业总产量(吨)")
|
||||
private Long agricultureProduction;
|
||||
|
||||
/** 特色农业年产值(万元) */
|
||||
@Excel(name = "特色农业年产值(万元)")
|
||||
private Long agricultureOutputVaule;
|
||||
|
||||
/** 总人口(人) */
|
||||
@Excel(name = "总人口(人)")
|
||||
private Long totalPopulation;
|
||||
|
||||
/** 占地面积(平方公里) */
|
||||
@Excel(name = "占地面积(平方公里)")
|
||||
private Float coverArea;
|
||||
|
||||
/** 示范大棚数量(个) */
|
||||
@Excel(name = "示范大棚数量(个)")
|
||||
private Long exampleGreenhouse;
|
||||
|
||||
/** 村居数量(个) */
|
||||
@Excel(name = "村居数量(个)")
|
||||
private Long rusticate;
|
||||
|
||||
/** 联合社耕地面积(万亩) */
|
||||
@Excel(name = "联合社耕地面积(万亩)")
|
||||
private Float cultivatedAlly;
|
||||
|
||||
/** 大棚数量(个) */
|
||||
@Excel(name = "大棚数量(个)")
|
||||
private Long greenhouse;
|
||||
|
||||
/** 农产品产值(万元) */
|
||||
@Excel(name = "农产品产值(万元)")
|
||||
private Long outputValue;
|
||||
|
||||
/** 庞家镇矢量边界 */
|
||||
@Excel(name = "庞家镇矢量边界")
|
||||
private String vectorBoundary;
|
||||
|
||||
/** 庞家镇村庄矢量边界 */
|
||||
@Excel(name = "庞家镇村庄矢量边界")
|
||||
private String villageVectorBoundary;
|
||||
|
||||
/** 图片 */
|
||||
private String img;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCultivatedArea(Float cultivatedArea)
|
||||
{
|
||||
this.cultivatedArea = cultivatedArea;
|
||||
}
|
||||
|
||||
public Float getCultivatedArea()
|
||||
{
|
||||
return cultivatedArea;
|
||||
}
|
||||
public void setFoodstuffProduction(Float foodstuffProduction)
|
||||
{
|
||||
this.foodstuffProduction = foodstuffProduction;
|
||||
}
|
||||
|
||||
public Float getFoodstuffProduction()
|
||||
{
|
||||
return foodstuffProduction;
|
||||
}
|
||||
public void setVegetablePlantingArea(Long vegetablePlantingArea)
|
||||
{
|
||||
this.vegetablePlantingArea = vegetablePlantingArea;
|
||||
}
|
||||
|
||||
public Long getVegetablePlantingArea()
|
||||
{
|
||||
return vegetablePlantingArea;
|
||||
}
|
||||
public void setVegetableProduction(Long vegetableProduction)
|
||||
{
|
||||
this.vegetableProduction = vegetableProduction;
|
||||
}
|
||||
|
||||
public Long getVegetableProduction()
|
||||
{
|
||||
return vegetableProduction;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setAgriculturalPlantingArea(Long agriculturalPlantingArea)
|
||||
{
|
||||
this.agriculturalPlantingArea = agriculturalPlantingArea;
|
||||
}
|
||||
|
||||
public Long getAgriculturalPlantingArea()
|
||||
{
|
||||
return agriculturalPlantingArea;
|
||||
}
|
||||
public void setAgricultureProduction(Long agricultureProduction)
|
||||
{
|
||||
this.agricultureProduction = agricultureProduction;
|
||||
}
|
||||
|
||||
public Long getAgricultureProduction()
|
||||
{
|
||||
return agricultureProduction;
|
||||
}
|
||||
public void setAgricultureOutputVaule(Long agricultureOutputVaule)
|
||||
{
|
||||
this.agricultureOutputVaule = agricultureOutputVaule;
|
||||
}
|
||||
|
||||
public Long getAgricultureOutputVaule()
|
||||
{
|
||||
return agricultureOutputVaule;
|
||||
}
|
||||
public void setTotalPopulation(Long totalPopulation)
|
||||
{
|
||||
this.totalPopulation = totalPopulation;
|
||||
}
|
||||
|
||||
public Long getTotalPopulation()
|
||||
{
|
||||
return totalPopulation;
|
||||
}
|
||||
public void setCoverArea(Float coverArea)
|
||||
{
|
||||
this.coverArea = coverArea;
|
||||
}
|
||||
|
||||
public Float getCoverArea()
|
||||
{
|
||||
return coverArea;
|
||||
}
|
||||
public void setExampleGreenhouse(Long exampleGreenhouse)
|
||||
{
|
||||
this.exampleGreenhouse = exampleGreenhouse;
|
||||
}
|
||||
|
||||
public Long getExampleGreenhouse()
|
||||
{
|
||||
return exampleGreenhouse;
|
||||
}
|
||||
public void setRusticate(Long rusticate)
|
||||
{
|
||||
this.rusticate = rusticate;
|
||||
}
|
||||
|
||||
public Long getRusticate()
|
||||
{
|
||||
return rusticate;
|
||||
}
|
||||
public void setCultivatedAlly(Float cultivatedAlly)
|
||||
{
|
||||
this.cultivatedAlly = cultivatedAlly;
|
||||
}
|
||||
|
||||
public Float getCultivatedAlly()
|
||||
{
|
||||
return cultivatedAlly;
|
||||
}
|
||||
public void setGreenhouse(Long greenhouse)
|
||||
{
|
||||
this.greenhouse = greenhouse;
|
||||
}
|
||||
|
||||
public Long getGreenhouse()
|
||||
{
|
||||
return greenhouse;
|
||||
}
|
||||
public void setOutputValue(Long outputValue)
|
||||
{
|
||||
this.outputValue = outputValue;
|
||||
}
|
||||
|
||||
public Long getOutputValue()
|
||||
{
|
||||
return outputValue;
|
||||
}
|
||||
public void setVectorBoundary(String vectorBoundary)
|
||||
{
|
||||
this.vectorBoundary = vectorBoundary;
|
||||
}
|
||||
|
||||
public String getVectorBoundary()
|
||||
{
|
||||
return vectorBoundary;
|
||||
}
|
||||
public void setVillageVectorBoundary(String villageVectorBoundary)
|
||||
{
|
||||
this.villageVectorBoundary = villageVectorBoundary;
|
||||
}
|
||||
|
||||
public String getVillageVectorBoundary()
|
||||
{
|
||||
return villageVectorBoundary;
|
||||
}
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setCreatedTime(Date createdTime)
|
||||
{
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getCreatedTime()
|
||||
{
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CropsComprehensiveData{" +
|
||||
"id=" + id +
|
||||
", cultivatedArea=" + cultivatedArea +
|
||||
", foodstuffProduction=" + foodstuffProduction +
|
||||
", vegetablePlantingArea=" + vegetablePlantingArea +
|
||||
", vegetableProduction=" + vegetableProduction +
|
||||
", type=" + type +
|
||||
", agriculturalPlantingArea=" + agriculturalPlantingArea +
|
||||
", agricultureProduction=" + agricultureProduction +
|
||||
", agricultureOutputVaule=" + agricultureOutputVaule +
|
||||
", totalPopulation=" + totalPopulation +
|
||||
", coverArea=" + coverArea +
|
||||
", exampleGreenhouse=" + exampleGreenhouse +
|
||||
", rusticate=" + rusticate +
|
||||
", cultivatedAlly=" + cultivatedAlly +
|
||||
", greenhouse=" + greenhouse +
|
||||
", outputValue=" + outputValue +
|
||||
", vectorBoundary='" + vectorBoundary + '\'' +
|
||||
", villageVectorBoundary='" + villageVectorBoundary + '\'' +
|
||||
", img='" + img + '\'' +
|
||||
", createdBy='" + createdBy + '\'' +
|
||||
", createdTime=" + createdTime +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 作物旱情;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-24
|
||||
*/
|
||||
public class CropsDrought implements Serializable,Cloneable{
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 区域 */
|
||||
private String zone ;
|
||||
/** 时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date imageDate ;
|
||||
/** 严重干旱面积 */
|
||||
private Double severeArea ;
|
||||
/** 中度干旱面积 */
|
||||
private Double modArea ;
|
||||
/** 轻度干旱面积 */
|
||||
private Double mildArea ;
|
||||
/** 适宜面积 */
|
||||
private Double suitArea ;
|
||||
/** 湿润面积 */
|
||||
private Double humidArea ;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getZone() {
|
||||
return zone;
|
||||
}
|
||||
|
||||
public void setZone(String zone) {
|
||||
this.zone = zone;
|
||||
}
|
||||
|
||||
public Date getImageDate() {
|
||||
return imageDate;
|
||||
}
|
||||
|
||||
public void setImageDate(Date imageDate) {
|
||||
this.imageDate = imageDate;
|
||||
}
|
||||
|
||||
public Double getSevereArea() {
|
||||
return severeArea;
|
||||
}
|
||||
|
||||
public void setSevereArea(Double severeArea) {
|
||||
this.severeArea = severeArea;
|
||||
}
|
||||
|
||||
public Double getModArea() {
|
||||
return modArea;
|
||||
}
|
||||
|
||||
public void setModArea(Double modArea) {
|
||||
this.modArea = modArea;
|
||||
}
|
||||
|
||||
public Double getMildArea() {
|
||||
return mildArea;
|
||||
}
|
||||
|
||||
public void setMildArea(Double mildArea) {
|
||||
this.mildArea = mildArea;
|
||||
}
|
||||
|
||||
public Double getSuitArea() {
|
||||
return suitArea;
|
||||
}
|
||||
|
||||
public void setSuitArea(Double suitArea) {
|
||||
this.suitArea = suitArea;
|
||||
}
|
||||
|
||||
public Double getHumidArea() {
|
||||
return humidArea;
|
||||
}
|
||||
|
||||
public void setHumidArea(Double humidArea) {
|
||||
this.humidArea = humidArea;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CropsDrought{" +
|
||||
"id=" + id +
|
||||
", zone='" + zone + '\'' +
|
||||
", imageDate=" + imageDate +
|
||||
", severeArea=" + severeArea +
|
||||
", modArea=" + modArea +
|
||||
", mildArea=" + mildArea +
|
||||
", suitArea=" + suitArea +
|
||||
", humidArea=" + humidArea +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 作物长势;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-24
|
||||
*/
|
||||
public class CropsGrowth {
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 区域 */
|
||||
private String zone ;
|
||||
/** 时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date imageDate ;
|
||||
/** 长势差面积 */
|
||||
private Double poorArea ;
|
||||
/** 长势较差面积 */
|
||||
private Double lowArea ;
|
||||
/** 长势适中面积 */
|
||||
private Double mediumArea ;
|
||||
/** 长势较好面积 */
|
||||
private Double goodArea ;
|
||||
/** 长势好面积 */
|
||||
private Double excellentArea ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getZone() {
|
||||
return zone;
|
||||
}
|
||||
|
||||
public void setZone(String zone) {
|
||||
this.zone = zone;
|
||||
}
|
||||
|
||||
public Date getImageDate() {
|
||||
return imageDate;
|
||||
}
|
||||
|
||||
public void setImageDate(Date imageDate) {
|
||||
this.imageDate = imageDate;
|
||||
}
|
||||
|
||||
public Double getPoorArea() {
|
||||
return poorArea;
|
||||
}
|
||||
|
||||
public void setPoorArea(Double poorArea) {
|
||||
this.poorArea = poorArea;
|
||||
}
|
||||
|
||||
public Double getLowArea() {
|
||||
return lowArea;
|
||||
}
|
||||
|
||||
public void setLowArea(Double lowArea) {
|
||||
this.lowArea = lowArea;
|
||||
}
|
||||
|
||||
public Double getMediumArea() {
|
||||
return mediumArea;
|
||||
}
|
||||
|
||||
public void setMediumArea(Double mediumArea) {
|
||||
this.mediumArea = mediumArea;
|
||||
}
|
||||
|
||||
public Double getGoodArea() {
|
||||
return goodArea;
|
||||
}
|
||||
|
||||
public void setGoodArea(Double goodArea) {
|
||||
this.goodArea = goodArea;
|
||||
}
|
||||
|
||||
public Double getExcellentArea() {
|
||||
return excellentArea;
|
||||
}
|
||||
|
||||
public void setExcellentArea(Double excellentArea) {
|
||||
this.excellentArea = excellentArea;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CropsGrowth{" +
|
||||
"id=" + id +
|
||||
", zone='" + zone + '\'' +
|
||||
", imageDate=" + imageDate +
|
||||
", poorArea=" + poorArea +
|
||||
", lowArea=" + lowArea +
|
||||
", mediumArea=" + mediumArea +
|
||||
", goodArea=" + goodArea +
|
||||
", excellentArea=" + excellentArea +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class CropsYield {
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 区域 */
|
||||
private String zone ;
|
||||
/** 时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date imageDate ;
|
||||
/** 作物类型 */
|
||||
private String cropType ;
|
||||
/** 产量 */
|
||||
private Double yield ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getZone() {
|
||||
return zone;
|
||||
}
|
||||
|
||||
public void setZone(String zone) {
|
||||
this.zone = zone;
|
||||
}
|
||||
|
||||
public Date getImageDate() {
|
||||
return imageDate;
|
||||
}
|
||||
|
||||
public void setImageDate(Date imageDate) {
|
||||
this.imageDate = imageDate;
|
||||
}
|
||||
|
||||
public String getCropType() {
|
||||
return cropType;
|
||||
}
|
||||
|
||||
public void setCropType(String croptype) {
|
||||
this.cropType = croptype;
|
||||
}
|
||||
|
||||
public Double getYield() {
|
||||
return yield;
|
||||
}
|
||||
|
||||
public void setYield(Double yield) {
|
||||
this.yield = yield;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CropsYield{" +
|
||||
"id=" + id +
|
||||
", zone='" + zone + '\'' +
|
||||
", imageDate=" + imageDate +
|
||||
", cropType='" + cropType + '\'' +
|
||||
", yield=" + yield +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
/**
|
||||
* 环境数据;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class EnvironmentalData{
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/**
|
||||
* 大棚编号
|
||||
*/
|
||||
private Integer greenhouseNumber;
|
||||
/** 土壤温度 */
|
||||
private Double soilTemperature ;
|
||||
/** 土壤湿度 */
|
||||
private Double soilHumidity ;
|
||||
/** 氮含量 */
|
||||
private Integer nitrogenContent ;
|
||||
/** 磷含量 */
|
||||
private Integer phosphorusContent ;
|
||||
/** 钾含量 */
|
||||
private Integer potassiumContent ;
|
||||
/** 空气温度 */
|
||||
private Double airTemperature ;
|
||||
/** 空气湿度 */
|
||||
private Double airHumidity ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getGreenhouseNumber() {
|
||||
return greenhouseNumber;
|
||||
}
|
||||
|
||||
public void setGreenhouseNumber(Integer greenhouseNumber) {
|
||||
this.greenhouseNumber = greenhouseNumber;
|
||||
}
|
||||
|
||||
public Double getSoilTemperature() {
|
||||
return soilTemperature;
|
||||
}
|
||||
|
||||
public void setSoilTemperature(Double soilTemperature) {
|
||||
this.soilTemperature = soilTemperature;
|
||||
}
|
||||
|
||||
public Double getSoilHumidity() {
|
||||
return soilHumidity;
|
||||
}
|
||||
|
||||
public void setSoilHumidity(Double soilHumidity) {
|
||||
this.soilHumidity = soilHumidity;
|
||||
}
|
||||
|
||||
public Integer getNitrogenContent() {
|
||||
return nitrogenContent;
|
||||
}
|
||||
|
||||
public void setNitrogenContent(Integer nitrogenContent) {
|
||||
this.nitrogenContent = nitrogenContent;
|
||||
}
|
||||
|
||||
public Integer getPhosphorusContent() {
|
||||
return phosphorusContent;
|
||||
}
|
||||
|
||||
public void setPhosphorusContent(Integer phosphorusContent) {
|
||||
this.phosphorusContent = phosphorusContent;
|
||||
}
|
||||
|
||||
public Integer getPotassiumContent() {
|
||||
return potassiumContent;
|
||||
}
|
||||
|
||||
public void setPotassiumContent(Integer potassiumContent) {
|
||||
this.potassiumContent = potassiumContent;
|
||||
}
|
||||
|
||||
public Double getAirTemperature() {
|
||||
return airTemperature;
|
||||
}
|
||||
|
||||
public void setAirTemperature(Double airTemperature) {
|
||||
this.airTemperature = airTemperature;
|
||||
}
|
||||
|
||||
public Double getAirHumidity() {
|
||||
return airHumidity;
|
||||
}
|
||||
|
||||
public void setAirHumidity(Double airHumidity) {
|
||||
this.airHumidity = airHumidity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnvironmentalData{" +
|
||||
"id=" + id +
|
||||
", greenhouseNumber=" + greenhouseNumber +
|
||||
", soilTemperature=" + soilTemperature +
|
||||
", soilHumidity=" + soilHumidity +
|
||||
", nitrogenContent=" + nitrogenContent +
|
||||
", phosphorusContent=" + phosphorusContent +
|
||||
", potassiumContent=" + potassiumContent +
|
||||
", airTemperature=" + airTemperature +
|
||||
", airHumidity=" + airHumidity +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
/**
|
||||
* 大棚信息;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class GreenhouseInformation {
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 区域 */
|
||||
private String zone ;
|
||||
/** 经营模式 */
|
||||
private String managementModel ;
|
||||
/** 园区介绍 */
|
||||
private String introduce ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getZone() {
|
||||
return zone;
|
||||
}
|
||||
|
||||
public void setZone(String zone) {
|
||||
this.zone = zone;
|
||||
}
|
||||
|
||||
public String getManagementModel() {
|
||||
return managementModel;
|
||||
}
|
||||
|
||||
public void setManagementModel(String managementModel) {
|
||||
this.managementModel = managementModel;
|
||||
}
|
||||
|
||||
public String getIntroduce() {
|
||||
return introduce;
|
||||
}
|
||||
|
||||
public void setIntroduce(String introduce) {
|
||||
this.introduce = introduce;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GreenhouseInformation{" +
|
||||
"id=" + id +
|
||||
", zone='" + zone + '\'' +
|
||||
", managementModel='" + managementModel + '\'' +
|
||||
", introduce='" + introduce + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class GsonParseFoundationBean {
|
||||
|
||||
public Integer code;
|
||||
public ArrayList<Foundation> data;
|
||||
public String msg;
|
||||
public Boolean result;
|
||||
public String time;
|
||||
|
||||
public class Foundation {
|
||||
public Integer foundationId;
|
||||
public String foundationName;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 水肥一体机智能控制;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class IntelligentControl{
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 大棚名称 */
|
||||
private String greenhouseName ;
|
||||
/** 阀门编号 */
|
||||
private Integer valveNumber ;
|
||||
/** 阀门状态 */
|
||||
private Integer valveStatus ;
|
||||
/** 开关 */
|
||||
private Integer disjunctor ;
|
||||
/** 进度 */
|
||||
private Double schedule;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getGreenhouseName() {
|
||||
return greenhouseName;
|
||||
}
|
||||
|
||||
public void setGreenhouseName(String greenhouseName) {
|
||||
this.greenhouseName = greenhouseName;
|
||||
}
|
||||
|
||||
public Integer getValveNumber() {
|
||||
return valveNumber;
|
||||
}
|
||||
|
||||
public void setValveNumber(Integer valveNumber) {
|
||||
this.valveNumber = valveNumber;
|
||||
}
|
||||
|
||||
public Integer getValveStatus() {
|
||||
return valveStatus;
|
||||
}
|
||||
|
||||
public void setValveStatus(Integer valveStatus) {
|
||||
this.valveStatus = valveStatus;
|
||||
}
|
||||
|
||||
public Integer getDisjunctor() {
|
||||
return disjunctor;
|
||||
}
|
||||
|
||||
public void setDisjunctor(Integer option) {
|
||||
this.disjunctor = option;
|
||||
}
|
||||
|
||||
public Double getSchedule() {
|
||||
return schedule;
|
||||
}
|
||||
|
||||
public void setSchedule(Double schedule) {
|
||||
this.schedule = schedule;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IntelligentControl{" +
|
||||
"id=" + id +
|
||||
", greenhouseName='" + greenhouseName + '\'' +
|
||||
", valveNumber=" + valveNumber +
|
||||
", valveStatus=" + valveStatus +
|
||||
", option=" + disjunctor +
|
||||
", schedule=" + schedule +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
/**
|
||||
* 水肥一体机参数;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class MachineParameter{
|
||||
/** id */
|
||||
private String id ;
|
||||
/** 大棚名称 */
|
||||
private String greenhouseName ;
|
||||
/** 压力 */
|
||||
private Double pressure ;
|
||||
/** 流量 */
|
||||
private Double flow ;
|
||||
/** 电导率 */
|
||||
private Double conductivity ;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getGreenhouseName() {
|
||||
return greenhouseName;
|
||||
}
|
||||
|
||||
public void setGreenhouseName(String greenhouseName) {
|
||||
this.greenhouseName = greenhouseName;
|
||||
}
|
||||
|
||||
public Double getPressure() {
|
||||
return pressure;
|
||||
}
|
||||
|
||||
public void setPressure(Double pressure) {
|
||||
this.pressure = pressure;
|
||||
}
|
||||
|
||||
public Double getFlow() {
|
||||
return flow;
|
||||
}
|
||||
|
||||
public void setFlow(Double flow) {
|
||||
this.flow = flow;
|
||||
}
|
||||
|
||||
public Double getConductivity() {
|
||||
return conductivity;
|
||||
}
|
||||
|
||||
public void setConductivity(Double conductivity) {
|
||||
this.conductivity = conductivity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MachineParameter{" +
|
||||
"id='" + id + '\'' +
|
||||
", greenhouseName='" + greenhouseName + '\'' +
|
||||
", pressure=" + pressure +
|
||||
", flow=" + flow +
|
||||
", conductivity=" + conductivity +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 操作记录;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class OperationRecords {
|
||||
/** id */
|
||||
private String id ;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime ;
|
||||
/** 操作内容 */
|
||||
private String operationContent ;
|
||||
/** 更新人 */
|
||||
private String updateBy ;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getOperationContent() {
|
||||
return operationContent;
|
||||
}
|
||||
|
||||
public void setOperationContent(String operationContent) {
|
||||
this.operationContent = operationContent;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OperationRecords{" +
|
||||
"id='" + id + '\'' +
|
||||
", updateTime=" + updateTime +
|
||||
", operationContent='" + operationContent + '\'' +
|
||||
", updateBy='" + updateBy + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 服务类型;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-26
|
||||
*/
|
||||
public class ServiceType {
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 服务类型 */
|
||||
private String serviceType ;
|
||||
/** 时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date time ;
|
||||
/** 服务名称 */
|
||||
private String serviceName ;
|
||||
/** 样式 */
|
||||
private String style ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getServiceType() {
|
||||
return serviceType;
|
||||
}
|
||||
|
||||
public void setServiceType(String serviceType) {
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getServiceName() {
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
public void setServiceName(String serviceName) {
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
|
||||
public String getStyle() {
|
||||
return style;
|
||||
}
|
||||
|
||||
public void setStyle(String style) {
|
||||
this.style = style;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServiceType{" +
|
||||
"id=" + id +
|
||||
", serviceType='" + serviceType + '\'' +
|
||||
", time=" + time +
|
||||
", serviceName='" + serviceName + '\'' +
|
||||
", style='" + style + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
30
ruoyi-crops/src/main/java/com/ruoyi/crops/domain/User.java
Normal file
30
ruoyi-crops/src/main/java/com/ruoyi/crops/domain/User.java
Normal file
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
public class User {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class UserInfo {
|
||||
private String id;
|
||||
private String token;
|
||||
private Long expire;
|
||||
private String userInfo;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Long getExpire() {
|
||||
return expire;
|
||||
}
|
||||
|
||||
public void setExpire(Long expire) {
|
||||
this.expire = expire;
|
||||
}
|
||||
|
||||
public String getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public void setUserInfo(String userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserInfo{" +
|
||||
"id=" + id +
|
||||
", token='" + token + '\'' +
|
||||
", expire=" + expire +
|
||||
", userInfo='" + userInfo + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.ruoyi.crops.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 预警信息统计;
|
||||
* @author : http://www.chiner.pro
|
||||
* @date : 2023-4-27
|
||||
*/
|
||||
public class WarningInformation{
|
||||
/** id */
|
||||
private Integer id ;
|
||||
/** 大棚编号 */
|
||||
private Integer greenhouseNumber ;
|
||||
/** 监测指标 */
|
||||
private String monitoringIndicators ;
|
||||
/** 监测数值 */
|
||||
private Double monitoringValues ;
|
||||
/** 异常原因 */
|
||||
private String abnormalCause ;
|
||||
/** 预警时间 */
|
||||
@JsonFormat(pattern = "yyyy/MM/dd")
|
||||
private Date warningTime ;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getGreenhouseNumber() {
|
||||
return greenhouseNumber;
|
||||
}
|
||||
|
||||
public void setGreenhouseName(Integer greenhouseNumber) {
|
||||
this.greenhouseNumber = greenhouseNumber;
|
||||
}
|
||||
|
||||
public String getMonitoringIndicators() {
|
||||
return monitoringIndicators;
|
||||
}
|
||||
|
||||
public void setMonitoringIndicators(String monitoringIndicators) {
|
||||
this.monitoringIndicators = monitoringIndicators;
|
||||
}
|
||||
|
||||
public Double getMonitoringValues() {
|
||||
return monitoringValues;
|
||||
}
|
||||
|
||||
public void setMonitoringValues(Double monitoringValues) {
|
||||
this.monitoringValues = monitoringValues;
|
||||
}
|
||||
|
||||
public String getAbnormalCause() {
|
||||
return abnormalCause;
|
||||
}
|
||||
|
||||
public void setAbnormalCause(String abnormalCause) {
|
||||
this.abnormalCause = abnormalCause;
|
||||
}
|
||||
|
||||
public Date getWarningTime() {
|
||||
return warningTime;
|
||||
}
|
||||
|
||||
public void setWarningTime(Date warningTime) {
|
||||
this.warningTime = warningTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WarningInformation{" +
|
||||
"id=" + id +
|
||||
", greenhouseName=" + greenhouseNumber +
|
||||
", monitoringIndicators='" + monitoringIndicators + '\'' +
|
||||
", monitoringValues=" + monitoringValues +
|
||||
", abnormalCause='" + abnormalCause + '\'' +
|
||||
", warningTime=" + warningTime +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.crops.domain.CropsComprehensiveData;
|
||||
|
||||
/**
|
||||
* 作物综合数据Mapper接口
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface CropsComprehensiveDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询作物综合数据
|
||||
*
|
||||
* @param id 作物综合数据主键
|
||||
* @return 作物综合数据
|
||||
*/
|
||||
public CropsComprehensiveData selectCropsComprehensiveDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询作物综合数据列表
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 作物综合数据集合
|
||||
*/
|
||||
public List<CropsComprehensiveData> selectCropsComprehensiveDataList(CropsComprehensiveData cropsComprehensiveData);
|
||||
|
||||
/**
|
||||
* 新增作物综合数据
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCropsComprehensiveData(CropsComprehensiveData cropsComprehensiveData);
|
||||
|
||||
/**
|
||||
* 修改作物综合数据
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCropsComprehensiveData(CropsComprehensiveData cropsComprehensiveData);
|
||||
|
||||
/**
|
||||
* 删除作物综合数据
|
||||
*
|
||||
* @param id 作物综合数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCropsComprehensiveDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除作物综合数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCropsComprehensiveDataByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsDrought;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface CropsDroughtMapper {
|
||||
public int insertBatch(@Param("list") List<CropsDrought> cropsDroughtList);
|
||||
|
||||
List<CropsDrought> selectByTime(Date time);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsGrowth;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface CropsGrowthMapper {
|
||||
|
||||
public int insertBatch(@Param("list")List<CropsGrowth> list);
|
||||
|
||||
public List<CropsGrowth> selectByTime(Date time);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.CropStructure;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface CropsStructureMapper {
|
||||
/**
|
||||
* 新增作物种植结构
|
||||
* @param cropStructure
|
||||
* @return
|
||||
*/
|
||||
public int insertCropsStructure(CropStructure cropStructure);
|
||||
|
||||
public int insertBatch(@Param("list") List<CropStructure> list);
|
||||
|
||||
public List<CropStructure> selectByTime(Date time);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsYield;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface CropsYieldMapper {
|
||||
public List<CropsYield> selectByYear(Integer year);
|
||||
|
||||
public int insertBatch(@Param("list") List<CropsYield> list);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.EnvironmentalData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EnvironmentalMapper {
|
||||
List<EnvironmentalData> selectByNumber(Integer number);
|
||||
|
||||
int insert(EnvironmentalData environmentalData);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.GreenhouseInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GreenhouseMapper {
|
||||
List<GreenhouseInformation> selectByName(String name);
|
||||
|
||||
int insert(GreenhouseInformation greenhouseInformation);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.IntelligentControl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IntelligentControlMapper {
|
||||
int insert(IntelligentControl intelligentControl);
|
||||
|
||||
List<IntelligentControl> selectAll();
|
||||
|
||||
int edit(IntelligentControl intelligentControl);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.MachineParameter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MachineParameterMapper {
|
||||
List<MachineParameter> selectByName(String name);
|
||||
|
||||
int insert(MachineParameter machineParameter);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.OperationRecords;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OperationRecordsMapper {
|
||||
List<OperationRecords> selectAll();
|
||||
|
||||
int insert(OperationRecords operationRecords);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.ServiceType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ServiceTypeMapper {
|
||||
|
||||
List<ServiceType> selectByType(String type);
|
||||
|
||||
int insert(ServiceType serviceType);
|
||||
|
||||
List<ServiceType> selectAll();
|
||||
|
||||
int deleteByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.ruoyi.crops.mapper;
|
||||
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WarningMapper {
|
||||
List<WarningInformation> selectByNumber(Integer number);
|
||||
|
||||
int insert(WarningInformation warningInformation);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.crops.domain.CropsComprehensiveData;
|
||||
|
||||
/**
|
||||
* 作物综合数据Service接口
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface ICropsComprehensiveDataService
|
||||
{
|
||||
/**
|
||||
* 查询作物综合数据
|
||||
*
|
||||
* @param id 作物综合数据主键
|
||||
* @return 作物综合数据
|
||||
*/
|
||||
public CropsComprehensiveData selectCropsComprehensiveDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询作物综合数据列表
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 作物综合数据集合
|
||||
*/
|
||||
public List<CropsComprehensiveData> selectCropsComprehensiveDataList(CropsComprehensiveData cropsComprehensiveData);
|
||||
|
||||
/**
|
||||
* 新增作物综合数据
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCropsComprehensiveData(CropsComprehensiveData cropsComprehensiveData);
|
||||
|
||||
/**
|
||||
* 修改作物综合数据
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCropsComprehensiveData(CropsComprehensiveData cropsComprehensiveData);
|
||||
|
||||
/**
|
||||
* 批量删除作物综合数据
|
||||
*
|
||||
* @param ids 需要删除的作物综合数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCropsComprehensiveDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除作物综合数据信息
|
||||
*
|
||||
* @param id 作物综合数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCropsComprehensiveDataById(Long id);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsDrought;
|
||||
import com.ruoyi.crops.domain.CropsYield;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface ICropsDroughtService {
|
||||
|
||||
public int insertBatch(List<CropsDrought> cropsYieldList);
|
||||
|
||||
public List<CropsDrought> selectByTime(Date time);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsGrowth;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface ICropsGrowthService {
|
||||
/**
|
||||
* 批量新增
|
||||
* @param cropGrowth
|
||||
* @return
|
||||
*/
|
||||
public int insertBatch(List<CropsGrowth> cropGrowth);
|
||||
|
||||
public List<CropsGrowth> selectByTime(Date time);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.CropStructure;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface ICropsStructureService {
|
||||
/**
|
||||
* 新增作物种植结构
|
||||
* @param cropStructure
|
||||
* @return
|
||||
*/
|
||||
public int insertCropsStructure(CropStructure cropStructure);
|
||||
|
||||
/**
|
||||
* 批量新增作物种植结构
|
||||
* @param cropStructureList
|
||||
* @return
|
||||
*/
|
||||
public int insertBatch(List<CropStructure> cropStructureList);
|
||||
|
||||
/**
|
||||
* 根据时间查询
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
public List<CropStructure> selectByTime(Date time);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsYield;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface ICropsYieldService {
|
||||
public List<CropsYield> selectByYear(Integer year);
|
||||
|
||||
public int insertBatch (List<CropsYield> cropYieldList);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.EnvironmentalData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IEnvironmentalService {
|
||||
List<EnvironmentalData> selectByNumber(Integer number);
|
||||
|
||||
|
||||
int insert(EnvironmentalData environmentalData);
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
public interface IFoundationService {
|
||||
String getFoundation(String id);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.GreenhouseInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IGreenhouseService {
|
||||
List<GreenhouseInformation> selectByName(String name);
|
||||
|
||||
int insert(GreenhouseInformation greenhouseInformation);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.IntelligentControl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IIntelligentControlService {
|
||||
int insert(IntelligentControl intelligentControl);
|
||||
|
||||
List<IntelligentControl> selectAll();
|
||||
|
||||
int edit(IntelligentControl intelligentControl);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.MachineParameter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IMachineParameterService {
|
||||
List<MachineParameter> selectByName(String name);
|
||||
|
||||
int insert(MachineParameter machineParameter);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.OperationRecords;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IOperationRecordsService {
|
||||
List<OperationRecords> selectAll();
|
||||
|
||||
int insert(OperationRecords operationRecords);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.ServiceType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IServiceTypeService {
|
||||
|
||||
List<ServiceType> selectByType(String type);
|
||||
|
||||
int insert(ServiceType serviceType);
|
||||
|
||||
List<ServiceType> selectAll();
|
||||
|
||||
int deleteByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.User;
|
||||
|
||||
public interface IUserInfoService {
|
||||
|
||||
String login(User user);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.crops.service;
|
||||
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IWarningService {
|
||||
List<WarningInformation> selectByNumber(Integer number);
|
||||
|
||||
int insert(WarningInformation warningInformation);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.crops.mapper.CropsComprehensiveDataMapper;
|
||||
import com.ruoyi.crops.domain.CropsComprehensiveData;
|
||||
import com.ruoyi.crops.service.ICropsComprehensiveDataService;
|
||||
|
||||
/**
|
||||
* 作物综合数据Service业务层处理
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Service
|
||||
public class CropsComprehensiveDataServiceImpl implements ICropsComprehensiveDataService
|
||||
{
|
||||
@Autowired
|
||||
private CropsComprehensiveDataMapper cropsComprehensiveDataMapper;
|
||||
|
||||
/**
|
||||
* 查询作物综合数据
|
||||
*
|
||||
* @param id 作物综合数据主键
|
||||
* @return 作物综合数据
|
||||
*/
|
||||
@Override
|
||||
public CropsComprehensiveData selectCropsComprehensiveDataById(Long id)
|
||||
{
|
||||
return cropsComprehensiveDataMapper.selectCropsComprehensiveDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询作物综合数据列表
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 作物综合数据
|
||||
*/
|
||||
@Override
|
||||
public List<CropsComprehensiveData> selectCropsComprehensiveDataList(CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
return cropsComprehensiveDataMapper.selectCropsComprehensiveDataList(cropsComprehensiveData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增作物综合数据
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCropsComprehensiveData(CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
return cropsComprehensiveDataMapper.insertCropsComprehensiveData(cropsComprehensiveData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改作物综合数据
|
||||
*
|
||||
* @param cropsComprehensiveData 作物综合数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCropsComprehensiveData(CropsComprehensiveData cropsComprehensiveData)
|
||||
{
|
||||
return cropsComprehensiveDataMapper.updateCropsComprehensiveData(cropsComprehensiveData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除作物综合数据
|
||||
*
|
||||
* @param ids 需要删除的作物综合数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCropsComprehensiveDataByIds(Long[] ids)
|
||||
{
|
||||
return cropsComprehensiveDataMapper.deleteCropsComprehensiveDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除作物综合数据信息
|
||||
*
|
||||
* @param id 作物综合数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCropsComprehensiveDataById(Long id)
|
||||
{
|
||||
return cropsComprehensiveDataMapper.deleteCropsComprehensiveDataById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsDrought;
|
||||
import com.ruoyi.crops.domain.CropsYield;
|
||||
import com.ruoyi.crops.mapper.CropsDroughtMapper;
|
||||
import com.ruoyi.crops.service.ICropsDroughtService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CropsDroughtServiceImpl implements ICropsDroughtService {
|
||||
@Autowired
|
||||
private CropsDroughtMapper cropsDroughtMapper;
|
||||
@Override
|
||||
public int insertBatch(List<CropsDrought> cropsYieldList) {
|
||||
return cropsDroughtMapper.insertBatch(cropsYieldList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CropsDrought> selectByTime(Date time) {
|
||||
return cropsDroughtMapper.selectByTime(time);
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsGrowth;
|
||||
import com.ruoyi.crops.mapper.CropsGrowthMapper;
|
||||
import com.ruoyi.crops.service.ICropsGrowthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CropsGrowthServiceImpl implements ICropsGrowthService {
|
||||
@Autowired
|
||||
private CropsGrowthMapper cropsGrowthMapper;
|
||||
@Override
|
||||
public int insertBatch(List<CropsGrowth> cropGrowth) {
|
||||
return cropsGrowthMapper.insertBatch(cropGrowth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CropsGrowth> selectByTime(Date time) {
|
||||
return cropsGrowthMapper.selectByTime(time);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.CropStructure;
|
||||
import com.ruoyi.crops.mapper.CropsStructureMapper;
|
||||
import com.ruoyi.crops.service.ICropsStructureService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CropsStructureServiceImpl implements ICropsStructureService {
|
||||
@Autowired
|
||||
private CropsStructureMapper cropsStructureMapper;
|
||||
|
||||
/**
|
||||
* 新增作物种植结构
|
||||
* @param cropStructure
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int insertCropsStructure(CropStructure cropStructure) {
|
||||
return cropsStructureMapper.insertCropsStructure(cropStructure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param cropStructureList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int insertBatch(List<CropStructure> cropStructureList) {
|
||||
return cropsStructureMapper.insertBatch(cropStructureList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CropStructure> selectByTime(Date time) {
|
||||
return cropsStructureMapper.selectByTime(time);
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.CropsYield;
|
||||
import com.ruoyi.crops.mapper.CropsYieldMapper;
|
||||
import com.ruoyi.crops.service.ICropsYieldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CropsYieldServiceImpl implements ICropsYieldService {
|
||||
@Autowired
|
||||
private CropsYieldMapper cropsYieldMapper;
|
||||
@Override
|
||||
public List<CropsYield> selectByYear(Integer year) {
|
||||
return cropsYieldMapper.selectByYear(year);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBatch(List<CropsYield> cropYieldList) {
|
||||
return cropsYieldMapper.insertBatch(cropYieldList);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.EnvironmentalData;
|
||||
import com.ruoyi.crops.mapper.EnvironmentalMapper;
|
||||
import com.ruoyi.crops.service.IEnvironmentalService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class EnvironmentalServiceImpl implements IEnvironmentalService {
|
||||
@Autowired
|
||||
private EnvironmentalMapper environmentalMapper;
|
||||
@Override
|
||||
public List<EnvironmentalData> selectByNumber(Integer number) {
|
||||
return environmentalMapper.selectByNumber(number);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(EnvironmentalData environmentalData) {
|
||||
return environmentalMapper.insert(environmentalData);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.ruoyi.crops.domain.GsonParseFoundationBean;
|
||||
import com.ruoyi.crops.service.IFoundationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class FoundationServiceImpl implements IFoundationService {
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private Gson gson;
|
||||
|
||||
@Value("${url.foundation}")
|
||||
private String url;
|
||||
@Override
|
||||
public String getFoundation(String id) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();//存放参数
|
||||
map.put("id", id);
|
||||
HashMap<String, String> headers = new HashMap<>();//存放请求头,可以存放多个请求头
|
||||
String token = (String) redisTemplate.opsForValue().get(id);
|
||||
headers.put("token", token);
|
||||
String result = HttpUtil.createPost(url).addHeaders(headers).form(map).execute().body();
|
||||
|
||||
GsonParseFoundationBean model = gson.fromJson(result, GsonParseFoundationBean.class);
|
||||
ArrayList<GsonParseFoundationBean.Foundation> foundations = model.data;
|
||||
for (GsonParseFoundationBean.Foundation Foundation : foundations) {
|
||||
Integer foundationId = Foundation.foundationId;
|
||||
String foundationName = Foundation.foundationName;
|
||||
// insert(foundationId,foundationName);
|
||||
}
|
||||
return token;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.GreenhouseInformation;
|
||||
import com.ruoyi.crops.mapper.GreenhouseMapper;
|
||||
import com.ruoyi.crops.service.IGreenhouseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class GreenhouseServiceImpl implements IGreenhouseService {
|
||||
@Autowired
|
||||
private GreenhouseMapper greenhouseMapper;
|
||||
@Override
|
||||
public List<GreenhouseInformation> selectByName(String name) {
|
||||
return greenhouseMapper.selectByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(GreenhouseInformation greenhouseInformation) {
|
||||
return greenhouseMapper.insert(greenhouseInformation);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.IntelligentControl;
|
||||
import com.ruoyi.crops.mapper.IntelligentControlMapper;
|
||||
import com.ruoyi.crops.service.IIntelligentControlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class IntelligentControlServiceImpl implements IIntelligentControlService {
|
||||
@Autowired
|
||||
private IntelligentControlMapper intelligentControlMapper;
|
||||
@Override
|
||||
public int insert(IntelligentControl intelligentControl) {
|
||||
return intelligentControlMapper.insert(intelligentControl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IntelligentControl> selectAll() {
|
||||
return intelligentControlMapper.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int edit(IntelligentControl intelligentControl) {
|
||||
return intelligentControlMapper.edit(intelligentControl);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.MachineParameter;
|
||||
import com.ruoyi.crops.mapper.MachineParameterMapper;
|
||||
import com.ruoyi.crops.service.IMachineParameterService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MachineParameterServiceImpl implements IMachineParameterService {
|
||||
@Autowired
|
||||
private MachineParameterMapper machineParameterMapper;
|
||||
@Override
|
||||
public List<MachineParameter> selectByName(String name) {
|
||||
return machineParameterMapper.selectByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(MachineParameter machineParameter) {
|
||||
return machineParameterMapper.insert(machineParameter);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.OperationRecords;
|
||||
import com.ruoyi.crops.mapper.OperationRecordsMapper;
|
||||
import com.ruoyi.crops.service.IOperationRecordsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class OperationRecordsServiceImppl implements IOperationRecordsService {
|
||||
@Autowired
|
||||
private OperationRecordsMapper operationRecordsMapper;
|
||||
@Override
|
||||
public List<OperationRecords> selectAll() {
|
||||
return operationRecordsMapper.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(OperationRecords operationRecords) {
|
||||
return operationRecordsMapper.insert(operationRecords);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.ServiceType;
|
||||
import com.ruoyi.crops.mapper.ServiceTypeMapper;
|
||||
import com.ruoyi.crops.service.IServiceTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ServiceTypeServiceImpl implements IServiceTypeService {
|
||||
@Autowired
|
||||
private ServiceTypeMapper serviceTypeMapper;
|
||||
@Override
|
||||
public List<ServiceType> selectByType(String type) {
|
||||
return serviceTypeMapper.selectByType(type);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ServiceType serviceType) {
|
||||
return serviceTypeMapper.insert(serviceType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServiceType> selectAll() {
|
||||
return serviceTypeMapper.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Long[] ids) {
|
||||
return serviceTypeMapper.deleteByIds(ids);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.crops.domain.User;
|
||||
import com.ruoyi.crops.domain.UserInfo;
|
||||
import com.ruoyi.crops.service.IUserInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Service
|
||||
public class UserInfoServiceImpl implements IUserInfoService {
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
@Value("${url.userInfo}")
|
||||
private String url;
|
||||
|
||||
@Override
|
||||
public String login(User user) {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("username", user.getUsername());
|
||||
paramMap.put("password", user.getPassword());
|
||||
String result = HttpUtil.post(url, paramMap);
|
||||
|
||||
UserInfo userInfo = JSONObject.parseObject(result, UserInfo.class);
|
||||
redisTemplate.opsForValue().set(userInfo.getId(), userInfo.getToken(), Duration.ofMillis(userInfo.getExpire()) );
|
||||
|
||||
return userInfo.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.ruoyi.crops.service.impl;
|
||||
|
||||
import com.ruoyi.crops.domain.WarningInformation;
|
||||
import com.ruoyi.crops.mapper.WarningMapper;
|
||||
import com.ruoyi.crops.service.IWarningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@Service
|
||||
public class WarningServiceImpl implements IWarningService {
|
||||
@Autowired
|
||||
private WarningMapper warningMapper;
|
||||
@Override
|
||||
public List<WarningInformation> selectByNumber(Integer number) {
|
||||
return warningMapper.selectByNumber(number);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(WarningInformation warningInformation) {
|
||||
return warningMapper.insert(warningInformation);
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.CropsComprehensiveDataMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.crops.domain.CropsComprehensiveData" id="CropsComprehensiveDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cultivatedArea" column="cultivated_area" />
|
||||
<result property="foodstuffProduction" column="foodstuff_production" />
|
||||
<result property="vegetablePlantingArea" column="vegetable_planting_area" />
|
||||
<result property="vegetableProduction" column="vegetable_production" />
|
||||
<result property="type" column="type" />
|
||||
<result property="agriculturalPlantingArea" column="agricultural_planting_area" />
|
||||
<result property="agricultureProduction" column="agriculture_production" />
|
||||
<result property="agricultureOutputVaule" column="agriculture_output_vaule" />
|
||||
<result property="totalPopulation" column="total_population" />
|
||||
<result property="coverArea" column="cover_area" />
|
||||
<result property="exampleGreenhouse" column="example_greenhouse" />
|
||||
<result property="rusticate" column="rusticate" />
|
||||
<result property="cultivatedAlly" column="cultivated_ally" />
|
||||
<result property="greenhouse" column="greenhouse" />
|
||||
<result property="outputValue" column="output_value" />
|
||||
<result property="vectorBoundary" column="vector_boundary" />
|
||||
<result property="villageVectorBoundary" column="village_vector_boundary" />
|
||||
<result property="img" column="img" />
|
||||
<result property="createdBy" column="created_by" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCropsComprehensiveDataVo">
|
||||
select id, cultivated_area, foodstuff_production, vegetable_planting_area, vegetable_production, type, agricultural_planting_area, agriculture_production, agriculture_output_vaule, total_population, cover_area, example_greenhouse, rusticate, cultivated_ally, greenhouse, output_value, vector_boundary, village_vector_boundary,img, created_by, created_time from crops_comprehensive_data
|
||||
</sql>
|
||||
|
||||
<select id="selectCropsComprehensiveDataList" parameterType="CropsComprehensiveData" resultMap="CropsComprehensiveDataResult">
|
||||
<include refid="selectCropsComprehensiveDataVo"/>
|
||||
<where>
|
||||
<if test="cultivatedArea != null "> and cultivated_area = #{cultivatedArea}</if>
|
||||
<if test="foodstuffProduction != null "> and foodstuff_production = #{foodstuffProduction}</if>
|
||||
<if test="vegetablePlantingArea != null "> and vegetable_planting_area = #{vegetablePlantingArea}</if>
|
||||
<if test="vegetableProduction != null "> and vegetable_production = #{vegetableProduction}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="agriculturalPlantingArea != null "> and agricultural_planting_area = #{agriculturalPlantingArea}</if>
|
||||
<if test="agricultureProduction != null "> and agriculture_production = #{agricultureProduction}</if>
|
||||
<if test="agricultureOutputVaule != null "> and agriculture_output_vaule = #{agricultureOutputVaule}</if>
|
||||
<if test="totalPopulation != null "> and total_population = #{totalPopulation}</if>
|
||||
<if test="coverArea != null "> and cover_area = #{coverArea}</if>
|
||||
<if test="exampleGreenhouse != null "> and example_greenhouse = #{exampleGreenhouse}</if>
|
||||
<if test="rusticate != null "> and rusticate = #{rusticate}</if>
|
||||
<if test="cultivatedAlly != null "> and cultivated_ally = #{cultivatedAlly}</if>
|
||||
<if test="greenhouse != null "> and greenhouse = #{greenhouse}</if>
|
||||
<if test="outputValue != null "> and output_value = #{outputValue}</if>
|
||||
<if test="vectorBoundary != null and vectorBoundary != ''"> and vector_boundary = #{vectorBoundary}</if>
|
||||
<if test="villageVectorBoundary != null and villageVectorBoundary != ''"> and village_vector_boundary = #{villageVectorBoundary}</if>
|
||||
<if test="img != null and img != ''"> and img = #{img}</if>
|
||||
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
|
||||
<if test="createdTime != null "> and created_time = #{createdTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCropsComprehensiveDataById" parameterType="Long" resultMap="CropsComprehensiveDataResult">
|
||||
<include refid="selectCropsComprehensiveDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCropsComprehensiveData" parameterType="com.ruoyi.crops.domain.CropsComprehensiveData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ruoyi.crops_comprehensive_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cultivatedArea != null">cultivated_area,</if>
|
||||
<if test="foodstuffProduction != null">foodstuff_production,</if>
|
||||
<if test="vegetablePlantingArea != null">vegetable_planting_area,</if>
|
||||
<if test="vegetableProduction != null">vegetable_production,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="agriculturalPlantingArea != null">agricultural_planting_area,</if>
|
||||
<if test="agricultureProduction != null">agriculture_production,</if>
|
||||
<if test="agricultureOutputVaule != null">agriculture_output_vaule,</if>
|
||||
<if test="totalPopulation != null">total_population,</if>
|
||||
<if test="coverArea != null">cover_area,</if>
|
||||
<if test="exampleGreenhouse != null">example_greenhouse,</if>
|
||||
<if test="rusticate != null">rusticate,</if>
|
||||
<if test="cultivatedAlly != null">cultivated_ally,</if>
|
||||
<if test="greenhouse != null">greenhouse,</if>
|
||||
<if test="outputValue != null">output_value,</if>
|
||||
<if test="vectorBoundary != null">vector_boundary,</if>
|
||||
<if test="villageVectorBoundary != null">village_vector_boundary,</if>
|
||||
<if test="img != null">img,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cultivatedArea != null">#{cultivatedArea},</if>
|
||||
<if test="foodstuffProduction != null">#{foodstuffProduction},</if>
|
||||
<if test="vegetablePlantingArea != null">#{vegetablePlantingArea},</if>
|
||||
<if test="vegetableProduction != null">#{vegetableProduction},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="agriculturalPlantingArea != null">#{agriculturalPlantingArea},</if>
|
||||
<if test="agricultureProduction != null">#{agricultureProduction},</if>
|
||||
<if test="agricultureOutputVaule != null">#{agricultureOutputVaule},</if>
|
||||
<if test="totalPopulation != null">#{totalPopulation},</if>
|
||||
<if test="coverArea != null">#{coverArea},</if>
|
||||
<if test="exampleGreenhouse != null">#{exampleGreenhouse},</if>
|
||||
<if test="rusticate != null">#{rusticate},</if>
|
||||
<if test="cultivatedAlly != null">#{cultivatedAlly},</if>
|
||||
<if test="greenhouse != null">#{greenhouse},</if>
|
||||
<if test="outputValue != null">#{outputValue},</if>
|
||||
<if test="vectorBoundary != null">#{vectorBoundary},</if>
|
||||
<if test="villageVectorBoundary != null">#{villageVectorBoundary},</if>
|
||||
<if test="img != null">#{img},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCropsComprehensiveData" parameterType="CropsComprehensiveData">
|
||||
update crops_comprehensive_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cultivatedArea != null">cultivated_area = #{cultivatedArea},</if>
|
||||
<if test="foodstuffProduction != null">foodstuff_production = #{foodstuffProduction},</if>
|
||||
<if test="vegetablePlantingArea != null">vegetable_planting_area = #{vegetablePlantingArea},</if>
|
||||
<if test="vegetableProduction != null">vegetable_production = #{vegetableProduction},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="agriculturalPlantingArea != null">agricultural_planting_area = #{agriculturalPlantingArea},</if>
|
||||
<if test="agricultureProduction != null">agriculture_production = #{agricultureProduction},</if>
|
||||
<if test="agricultureOutputVaule != null">agriculture_output_vaule = #{agricultureOutputVaule},</if>
|
||||
<if test="totalPopulation != null">total_population = #{totalPopulation},</if>
|
||||
<if test="coverArea != null">cover_area = #{coverArea},</if>
|
||||
<if test="exampleGreenhouse != null">example_greenhouse = #{exampleGreenhouse},</if>
|
||||
<if test="rusticate != null">rusticate = #{rusticate},</if>
|
||||
<if test="cultivatedAlly != null">cultivated_ally = #{cultivatedAlly},</if>
|
||||
<if test="greenhouse != null">greenhouse = #{greenhouse},</if>
|
||||
<if test="outputValue != null">output_value = #{outputValue},</if>
|
||||
<if test="vectorBoundary != null">vector_boundary = #{vectorBoundary},</if>
|
||||
<if test="villageVectorBoundary != null">village_vector_boundary = #{villageVectorBoundary},</if>
|
||||
<if test="img != null">village_vector_boundary = #{img},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCropsComprehensiveDataById" parameterType="Long">
|
||||
delete from crops_comprehensive_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCropsComprehensiveDataByIds" parameterType="String">
|
||||
delete from crops_comprehensive_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.CropsDroughtMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.CropsDrought" id="CropDroughtMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="zone" column="zone" jdbcType="VARCHAR"/>
|
||||
<result property="imageDate" column="imageDate" jdbcType="DATE"/>
|
||||
<result property="severeArea" column="severeArea" jdbcType="DOUBLE"/>
|
||||
<result property="modArea" column="modArea" jdbcType="DOUBLE"/>
|
||||
<result property="mildArea" column="mildArea" jdbcType="DOUBLE"/>
|
||||
<result property="suitArea" column="suitArea" jdbcType="DOUBLE"/>
|
||||
<result property="humidArea" column="humidArea" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch" parameterType="list" keyProperty="id" useGeneratedKeys="true" >
|
||||
insert into ruoyi.crop_drought(zone,imageDate,severeArea,modArea,mildArea,suitArea,humidArea)
|
||||
values
|
||||
<foreach collection="list" item="entity" separator=",">
|
||||
(#{entity.zone},#{entity.imageDate},#{entity.severeArea},#{entity.modArea},#{entity.mildArea},#{entity.suitArea},#{entity.humidArea})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectByTime" resultMap="CropDroughtMap">
|
||||
select * from ruoyi.crop_drought
|
||||
where imageDate = #{time}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.CropsGrowthMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.CropsGrowth" id="CropGrowthMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="zone" column="zone" jdbcType="VARCHAR"/>
|
||||
<result property="imageDate" column="imageDate" jdbcType="DATE"/>
|
||||
<result property="poorArea" column="poorArea" jdbcType="DOUBLE"/>
|
||||
<result property="lowArea" column="lowArea" jdbcType="DOUBLE"/>
|
||||
<result property="mediumArea" column="mediumArea" jdbcType="DOUBLE"/>
|
||||
<result property="goodArea" column="goodArea" jdbcType="DOUBLE"/>
|
||||
<result property="excellentArea" column="excellentArea" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
<sql id="selectCropsCropsGrowthVo">
|
||||
select id,zone,imageDate,poorArea,lowArea,mediumArea,goodArea,excellentArea from ruoyi.crop_growth
|
||||
</sql>
|
||||
|
||||
<insert id="insertBatch" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ruoyi.crop_growth(zone,imageDate,poorArea,lowArea,mediumArea,goodArea,excellentArea)
|
||||
values
|
||||
<foreach collection="list" item="entity" separator=",">
|
||||
(#{entity.zone},#{entity.imageDate},#{entity.poorArea},#{entity.lowArea},#{entity.mediumArea},#{entity.goodArea},#{entity.excellentArea})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectByTime" resultMap="CropGrowthMap">
|
||||
<include refid="selectCropsCropsGrowthVo">
|
||||
</include>
|
||||
where imageDate = #{time}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.CropsStructureMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.CropStructure" id="CropStructureMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="zone" column="zone" jdbcType="VARCHAR"/>
|
||||
<result property="imageDate" column="imageDate" jdbcType="DATE"/>
|
||||
<result property="wheatArea" column="wheatArea" jdbcType="DOUBLE"/>
|
||||
<result property="cornArea" column="cornArea" jdbcType="DOUBLE"/>
|
||||
<result property="peanutArea" column="peanutArea" jdbcType="DOUBLE"/>
|
||||
<result property="soybeanArea" column="soybeanArea" jdbcType="DOUBLE"/>
|
||||
<result property="otherArea" column="otherArea" jdbcType="DOUBLE"/>
|
||||
<result property="toalArea" column="toalArea" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCropsStructureVo">
|
||||
select id, zone, imageDate, wheatArea, cornArea, peanutArea, soybeanArea,otherArea, toalArea from ruoyi.crop_structure
|
||||
</sql>
|
||||
<!--新增数据-->
|
||||
<insert id="insertCropsStructure" parameterType="com.ruoyi.crops.domain.CropStructure" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ruoyi.crop_structure
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="zone != null">zone,</if>
|
||||
<if test="imageDate != null">imageDate,</if>
|
||||
<if test="wheatArea != null">wheatArea,</if>
|
||||
<if test="cornArea != null">cornArea,</if>
|
||||
<if test="peanutArea != null">peanutArea,</if>
|
||||
<if test="soybeanArea != null">soybeanArea,</if>
|
||||
<if test="otherArea != null">otherArea,</if>
|
||||
<if test="toalArea != null">toalArea,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="zone != null">#{zone},</if>
|
||||
<if test="imageDate != null">#{imageDate},</if>
|
||||
<if test="wheatArea != null">#{wheatArea},</if>
|
||||
<if test="cornArea != null">#{cornArea},</if>
|
||||
<if test="peanutArea != null">#{peanutArea},</if>
|
||||
<if test="soybeanArea != null">#{soybeanArea},</if>
|
||||
<if test="otherArea != null">#{otherArea},</if>
|
||||
<if test="toalArea != null">#{toalArea},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 批量新增数据 -->
|
||||
<insert id="insertBatch" parameterType="list" keyProperty="id" useGeneratedKeys="true" >
|
||||
insert into ruoyi.crop_structure(zone,imageDate,wheatArea,cornArea,peanutArea,soybeanArea,otherArea,toalArea)
|
||||
values
|
||||
<foreach collection="list" item="entity" separator=",">
|
||||
(#{entity.zone},#{entity.imageDate},#{entity.wheatArea},#{entity.cornArea},#{entity.peanutArea},#{entity.soybeanArea},#{entity.otherArea},#{entity.toalArea})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectByTime" resultMap="CropStructureMap">
|
||||
<include refid="selectCropsStructureVo">
|
||||
</include>
|
||||
where imageDate = #{time}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.CropsYieldMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.CropsYield" id="CropYieldMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="zone" column="zone" jdbcType="VARCHAR"/>
|
||||
<result property="imageDate" column="imageDate" jdbcType="DATE"/>
|
||||
<result property="cropType" column="cropType" jdbcType="VARCHAR"/>
|
||||
<result property="yield" column="yield" jdbcType="DOUBLE"/>
|
||||
|
||||
</resultMap>
|
||||
<sql id="selectCropsYieldVo">
|
||||
select id,zone,imageDate,cropType,yield from ruoyi.crop_yield
|
||||
</sql>
|
||||
<select id="selectByYear" resultMap="CropYieldMap">
|
||||
<include refid="selectCropsYieldVo">
|
||||
</include>
|
||||
where year(imageDate)=#{time}
|
||||
</select>
|
||||
|
||||
<insert id="insertBatch" parameterType="list" keyProperty="id" useGeneratedKeys="true" >
|
||||
insert into ruoyi.crop_yield(zone,imageDate,cropType,yield)
|
||||
values
|
||||
<foreach collection="list" item="entity" separator=",">
|
||||
(#{entity.zone},#{entity.imageDate},#{entity.cropType},#{entity.yield})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.EnvironmentalMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.EnvironmentalData" id="EnvironmentalDataMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="greenhouseNumber" column="greenhouse_number" jdbcType="INTEGER"/>
|
||||
<result property="soilTemperature" column="soil_temperature" jdbcType="DOUBLE"/>
|
||||
<result property="soilHumidity" column="soil_humidity" jdbcType="DOUBLE"/>
|
||||
<result property="nitrogenContent" column="nitrogen_content" jdbcType="INTEGER"/>
|
||||
<result property="phosphorusContent" column="phosphorus_content" jdbcType="INTEGER"/>
|
||||
<result property="potassiumContent" column="potassium_content" jdbcType="INTEGER"/>
|
||||
<result property="airTemperature" column="air_temperature" jdbcType="DOUBLE"/>
|
||||
<result property="airHumidity" column="air_humidity" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByNumber" resultMap="EnvironmentalDataMap">
|
||||
select *from ruoyi.environmental_data
|
||||
where greenhouse_number=#{number}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.environmental_data(greenhouse_number, soil_temperature, soil_humidity, nitrogen_content, phosphorus_content, potassium_content, air_temperature, air_humidity)
|
||||
VALUE(#{greenhouseNumber},#{soilTemperature},#{soilHumidity},#{nitrogenContent},#{phosphorusContent},#{potassiumContent},#{airTemperature},#{airHumidity})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.GreenhouseMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.GreenhouseInformation" id="GreenhouseInformationMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="zone" column="zone" jdbcType="VARCHAR"/>
|
||||
<result property="managementModel" column="management_model" jdbcType="VARCHAR"/>
|
||||
<result property="introduce" column="introduce" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByName" resultMap="GreenhouseInformationMap">
|
||||
select *from ruoyi.greenhouse_information
|
||||
where zone=#{name}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.greenhouse_information(zone, management_model, introduce)
|
||||
VALUE (#{zone},#{managementModel},#{introduce})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.IntelligentControlMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.IntelligentControl" id="IntelligentControlMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="greenhouseName" column="greenhouse_name" jdbcType="VARCHAR"/>
|
||||
<result property="valveNumber" column="valve_number" jdbcType="INTEGER"/>
|
||||
<result property="valveStatus" column="valve_status" jdbcType="INTEGER"/>
|
||||
<result property="disjunctor" column="disjunctor" jdbcType="INTEGER"/>
|
||||
<result property="schedule" column="schedule" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.intelligent_control (greenhouse_name, valve_number, valve_status, disjunctor , schedule)
|
||||
VALUE(#{greenhouseName},#{valveNumber},#{valveStatus},#{disjunctor},#{schedule})
|
||||
</insert>
|
||||
|
||||
<select id="selectAll" resultMap="IntelligentControlMap">
|
||||
select *
|
||||
from ruoyi.intelligent_control;
|
||||
</select>
|
||||
|
||||
<!-- 更新数据 -->
|
||||
<update id="edit" parameterType="com.ruoyi.crops.domain.IntelligentControl">
|
||||
update Intelligent_Control
|
||||
<set>
|
||||
<if test="greenhouseName != null and greenhouseName != ''">
|
||||
greenhouse_name = #{greenhouseName},
|
||||
</if>
|
||||
<if test="valveNumber != null and valveNumber != ''">
|
||||
valve_number = #{valveNumber},
|
||||
</if>
|
||||
<if test="valveStatus != null and valveStatus != ''">
|
||||
valve_status = #{valveStatus},
|
||||
</if>
|
||||
<if test="disjunctor != null and disjunctor != ''">
|
||||
disjunctor = #{disjunctor},
|
||||
</if>
|
||||
<if test="schedule != null and schedule != ''">
|
||||
schedule = #{schedule},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.MachineParameterMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.MachineParameter" id="MachineParameterMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="greenhouseName" column="greenhouse_name" jdbcType="VARCHAR"/>
|
||||
<result property="pressure" column="pressure" jdbcType="DOUBLE"/>
|
||||
<result property="flow" column="flow" jdbcType="DOUBLE"/>
|
||||
<result property="conductivity" column="conductivity" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
<sql id="selectMachineParameterVo">
|
||||
select id, greenhouse_name, pressure, flow, conductivity
|
||||
from ruoyi.machine_parameter
|
||||
</sql>
|
||||
<select id="selectByName" resultMap="MachineParameterMap">
|
||||
<include refid="selectMachineParameterVo">
|
||||
</include>
|
||||
where greenhouse_name=#{name}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.machine_parameter (greenhouse_name, pressure, flow, conductivity)
|
||||
VALUE (#{greenhouseName},#{pressure},#{flow},#{conductivity})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.OperationRecordsMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.OperationRecords" id="OperationRecordsMap">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="DATETIMEOFFSET"/>
|
||||
<result property="operationContent" column="operation_content" jdbcType="VARCHAR"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="OperationRecordsMap">
|
||||
select *
|
||||
from ruoyi.operation_records;
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.operation_records(update_time, operation_content, update_by)
|
||||
VALUE(#{updateTime},#{operationContent},#{updateBy})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.ServiceTypeMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.ServiceType" id="ServiceTypeMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="serviceType" column="service_type" jdbcType="VARCHAR"/>
|
||||
<result property="time" column="time" jdbcType="DATE"/>
|
||||
<result property="serviceName" column="service_name" jdbcType="VARCHAR"/>
|
||||
<result property="style" column="style" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectServiceTypeVo">
|
||||
select id,service_type,time,service_name,style from ruoyi.service_type
|
||||
</sql>
|
||||
<select id="selectByType" resultMap="ServiceTypeMap">
|
||||
<include refid="selectServiceTypeVo">
|
||||
</include>
|
||||
where service_type=#{type}
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into ruoyi.service_type(service_type, time, service_name, style)
|
||||
value (#{serviceType},#{time},#{serviceName},#{style})
|
||||
</insert>
|
||||
|
||||
<select id="selectAll" resultMap="ServiceTypeMap">
|
||||
<include refid="selectServiceTypeVo">
|
||||
</include>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIds" parameterType="string">
|
||||
delete from ruoyi.service_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.crops.mapper.WarningMapper">
|
||||
<resultMap type="com.ruoyi.crops.domain.WarningInformation" id="WarningInformationMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="greenhouseNumber" column="greenhouse_number" jdbcType="INTEGER"/>
|
||||
<result property="monitoringIndicators" column="monitoring_indicators" jdbcType="VARCHAR"/>
|
||||
<result property="monitoringValues" column="monitoring_values" jdbcType="DOUBLE"/>
|
||||
<result property="abnormalCause" column="abnormal_cause" jdbcType="VARCHAR"/>
|
||||
<result property="warningTime" column="warning_time" jdbcType="DATE"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByNumber" resultMap="WarningInformationMap">
|
||||
select * from ruoyi.warning_information
|
||||
where greenhouse_number= #{number}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into ruoyi.warning_information(greenhouse_number, monitoring_indicators, monitoring_values, abnormal_cause, warning_time)
|
||||
VALUE(#{greenhouseNumber},#{monitoringIndicators},#{monitoringValues},#{abnormalCause},#{warningTime})
|
||||
</insert>
|
||||
</mapper>
|
@ -115,10 +115,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
.antMatchers("/admins/**").permitAll();
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.headers().frameOptions().disable();
|
||||
// .anyRequest().authenticated()
|
||||
// .and()
|
||||
// .headers().frameOptions().disable();
|
||||
// 添加Logout filter
|
||||
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
|
||||
// 添加JWT filter
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 代码生成
|
||||
gen:
|
||||
# 作者
|
||||
author: ruoyi
|
||||
author: my
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.system
|
||||
packageName: com.ruoyi.crops
|
||||
# 自动去除表前缀,默认是false
|
||||
autoRemovePre: false
|
||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||
tablePrefix: sys_
|
||||
tablePrefix: crops_
|
||||
|
25
ruoyi-pill/pom.xml
Normal file
25
ruoyi-pill/pom.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>3.8.5</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-pill</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
126
ruoyi-pill/src/main/java/com/ruoyi/pill/domain/PillFactory.java
Normal file
126
ruoyi-pill/src/main/java/com/ruoyi/pill/domain/PillFactory.java
Normal file
@ -0,0 +1,126 @@
|
||||
package com.ruoyi.pill.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 生产厂家信息对象 pill_factory
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-18
|
||||
*/
|
||||
public class PillFactory extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 厂家ID */
|
||||
private Long factoryId;
|
||||
|
||||
/** 厂家名称 */
|
||||
@Excel(name = "厂家名称")
|
||||
private String factoryName;
|
||||
|
||||
/** 厂家编码 */
|
||||
@Excel(name = "厂家编码")
|
||||
private String factoryCode;
|
||||
|
||||
/** 联系人 */
|
||||
@Excel(name = "联系人")
|
||||
private String contact;
|
||||
|
||||
/** 电话 */
|
||||
@Excel(name = "电话")
|
||||
private String phone;
|
||||
|
||||
/** 关键字 */
|
||||
@Excel(name = "关键字")
|
||||
private String keyword;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
public void setFactoryId(Long factoryId)
|
||||
{
|
||||
this.factoryId = factoryId;
|
||||
}
|
||||
|
||||
public Long getFactoryId()
|
||||
{
|
||||
return factoryId;
|
||||
}
|
||||
public void setFactoryName(String factoryName)
|
||||
{
|
||||
this.factoryName = factoryName;
|
||||
}
|
||||
|
||||
public String getFactoryName()
|
||||
{
|
||||
return factoryName;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode)
|
||||
{
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode()
|
||||
{
|
||||
return factoryCode;
|
||||
}
|
||||
public void setContact(String contact)
|
||||
{
|
||||
this.contact = contact;
|
||||
}
|
||||
|
||||
public String getContact()
|
||||
{
|
||||
return contact;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setKeyword(String keyword)
|
||||
{
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
public String getKeyword()
|
||||
{
|
||||
return keyword;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("factoryId", getFactoryId())
|
||||
.append("factoryName", getFactoryName())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("contact", getContact())
|
||||
.append("phone", getPhone())
|
||||
.append("keyword", getKeyword())
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.pill.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.pill.domain.PillFactory;
|
||||
|
||||
/**
|
||||
* 生产厂家信息Mapper接口
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-18
|
||||
*/
|
||||
public interface PillFactoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产厂家信息
|
||||
*
|
||||
* @param factoryId 生产厂家信息主键
|
||||
* @return 生产厂家信息
|
||||
*/
|
||||
public PillFactory selectPillFactoryByFactoryId(Long factoryId);
|
||||
|
||||
/**
|
||||
* 查询生产厂家信息列表
|
||||
*
|
||||
* @param pillFactory 生产厂家信息
|
||||
* @return 生产厂家信息集合
|
||||
*/
|
||||
public List<PillFactory> selectPillFactoryList(PillFactory pillFactory);
|
||||
|
||||
/**
|
||||
* 新增生产厂家信息
|
||||
*
|
||||
* @param pillFactory 生产厂家信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPillFactory(PillFactory pillFactory);
|
||||
|
||||
/**
|
||||
* 修改生产厂家信息
|
||||
*
|
||||
* @param pillFactory 生产厂家信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePillFactory(PillFactory pillFactory);
|
||||
|
||||
/**
|
||||
* 删除生产厂家信息
|
||||
*
|
||||
* @param factoryId 生产厂家信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePillFactoryByFactoryId(Long factoryId);
|
||||
|
||||
/**
|
||||
* 批量删除生产厂家信息
|
||||
*
|
||||
* @param factoryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePillFactoryByFactoryIds(Long[] factoryIds);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.pill.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.pill.mapper.PillFactoryMapper;
|
||||
import com.ruoyi.pill.domain.PillFactory;
|
||||
import com.ruoyi.pill.service.IPillFactoryService;
|
||||
|
||||
/**
|
||||
* 生产厂家信息Service业务层处理
|
||||
*
|
||||
* @author my
|
||||
* @date 2023-04-18
|
||||
*/
|
||||
@Service
|
||||
public class PillFactoryServiceImpl implements IPillFactoryService
|
||||
{
|
||||
@Autowired
|
||||
private PillFactoryMapper pillFactoryMapper;
|
||||
|
||||
/**
|
||||
* 查询生产厂家信息
|
||||
*
|
||||
* @param factoryId 生产厂家信息主键
|
||||
* @return 生产厂家信息
|
||||
*/
|
||||
@Override
|
||||
public PillFactory selectPillFactoryByFactoryId(Long factoryId)
|
||||
{
|
||||
return pillFactoryMapper.selectPillFactoryByFactoryId(factoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产厂家信息列表
|
||||
*
|
||||
* @param pillFactory 生产厂家信息
|
||||
* @return 生产厂家信息
|
||||
*/
|
||||
@Override
|
||||
public List<PillFactory> selectPillFactoryList(PillFactory pillFactory)
|
||||
{
|
||||
return pillFactoryMapper.selectPillFactoryList(pillFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产厂家信息
|
||||
*
|
||||
* @param pillFactory 生产厂家信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPillFactory(PillFactory pillFactory)
|
||||
{
|
||||
pillFactory.setCreateTime(DateUtils.getNowDate());
|
||||
return pillFactoryMapper.insertPillFactory(pillFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产厂家信息
|
||||
*
|
||||
* @param pillFactory 生产厂家信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePillFactory(PillFactory pillFactory)
|
||||
{
|
||||
pillFactory.setUpdateTime(DateUtils.getNowDate());
|
||||
return pillFactoryMapper.updatePillFactory(pillFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产厂家信息
|
||||
*
|
||||
* @param factoryIds 需要删除的生产厂家信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePillFactoryByFactoryIds(Long[] factoryIds)
|
||||
{
|
||||
return pillFactoryMapper.deletePillFactoryByFactoryIds(factoryIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产厂家信息信息
|
||||
*
|
||||
* @param factoryId 生产厂家信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePillFactoryByFactoryId(Long factoryId)
|
||||
{
|
||||
return pillFactoryMapper.deletePillFactoryByFactoryId(factoryId);
|
||||
}
|
||||
}
|
101
ruoyi-pill/src/main/resources/mapper/pill/PillFactoryMapper.xml
Normal file
101
ruoyi-pill/src/main/resources/mapper/pill/PillFactoryMapper.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.pill.mapper.PillFactoryMapper">
|
||||
|
||||
<resultMap type="PillFactory" id="PillFactoryResult">
|
||||
<result property="factoryId" column="factory_id" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
<result property="contact" column="contact" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="keyword" column="keyword" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPillFactoryVo">
|
||||
select factory_id, factory_name, factory_code, contact, phone, keyword, status, create_by, create_time, update_by, update_time, remark from pill_factory
|
||||
</sql>
|
||||
|
||||
<select id="selectPillFactoryList" parameterType="PillFactory" resultMap="PillFactoryResult">
|
||||
<include refid="selectPillFactoryVo"/>
|
||||
<where>
|
||||
<if test="factoryName != null and factoryName != ''"> and factory_name like concat('%', #{factoryName}, '%')</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
<if test="contact != null and contact != ''"> and contact = #{contact}</if>
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="keyword != null and keyword != ''"> and keyword like concat('%', #{keyword}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPillFactoryByFactoryId" parameterType="Long" resultMap="PillFactoryResult">
|
||||
<include refid="selectPillFactoryVo"/>
|
||||
where factory_id = #{factoryId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPillFactory" parameterType="PillFactory" useGeneratedKeys="true" keyProperty="factoryId">
|
||||
insert into pill_factory
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="factoryName != null and factoryName != ''">factory_name,</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
||||
<if test="contact != null">contact,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="keyword != null">keyword,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="factoryName != null and factoryName != ''">#{factoryName},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
||||
<if test="contact != null">#{contact},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="keyword != null">#{keyword},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePillFactory" parameterType="PillFactory">
|
||||
update pill_factory
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="factoryName != null and factoryName != ''">factory_name = #{factoryName},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
|
||||
<if test="contact != null">contact = #{contact},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="keyword != null">keyword = #{keyword},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where factory_id = #{factoryId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePillFactoryByFactoryId" parameterType="Long">
|
||||
delete from pill_factory where factory_id = #{factoryId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePillFactoryByFactoryIds" parameterType="String">
|
||||
delete from pill_factory where factory_id in
|
||||
<foreach item="factoryId" collection="array" open="(" separator="," close=")">
|
||||
#{factoryId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
44
ruoyi-ui/src/api/crops/data.js
Normal file
44
ruoyi-ui/src/api/crops/data.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询作物综合数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: '/crops/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询作物综合数据详细
|
||||
export function getData(id) {
|
||||
return request({
|
||||
url: '/crops/data/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增作物综合数据
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/crops/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改作物综合数据
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/crops/data',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除作物综合数据
|
||||
export function delData(id) {
|
||||
return request({
|
||||
url: '/crops/data/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
ruoyi-ui/src/api/pill/factory.js
Normal file
44
ruoyi-ui/src/api/pill/factory.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询生产厂家信息列表
|
||||
export function listFactory(query) {
|
||||
return request({
|
||||
url: '/pill/factory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询生产厂家信息详细
|
||||
export function getFactory(factoryId) {
|
||||
return request({
|
||||
url: '/pill/factory/' + factoryId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增生产厂家信息
|
||||
export function addFactory(data) {
|
||||
return request({
|
||||
url: '/pill/factory',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改生产厂家信息
|
||||
export function updateFactory(data) {
|
||||
return request({
|
||||
url: '/pill/factory',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除生产厂家信息
|
||||
export function delFactory(factoryId) {
|
||||
return request({
|
||||
url: '/pill/factory/' + factoryId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
506
ruoyi-ui/src/views/crops/data/index.vue
Normal file
506
ruoyi-ui/src/views/crops/data/index.vue
Normal file
@ -0,0 +1,506 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="镇耕地面积(万亩)" prop="cultivatedArea">
|
||||
<el-input
|
||||
v-model="queryParams.cultivatedArea"
|
||||
placeholder="请输入镇耕地面积(万亩)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="粮食总产(万吨)" prop="foodstuffProduction">
|
||||
<el-input
|
||||
v-model="queryParams.foodstuffProduction"
|
||||
placeholder="请输入粮食总产(万吨)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="蔬菜种植面积(亩)" prop="vegetablePlantingArea">
|
||||
<el-input
|
||||
v-model="queryParams.vegetablePlantingArea"
|
||||
placeholder="请输入蔬菜种植面积(亩)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="蔬菜总产(吨)" prop="vegetableProduction">
|
||||
<el-input
|
||||
v-model="queryParams.vegetableProduction"
|
||||
placeholder="请输入蔬菜总产(吨)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="农产品种类" prop="type">
|
||||
<el-input
|
||||
v-model="queryParams.type"
|
||||
placeholder="请输入农产品种类"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="农产品种植面积(亩)" prop="agriculturalPlantingArea">
|
||||
<el-input
|
||||
v-model="queryParams.agriculturalPlantingArea"
|
||||
placeholder="请输入农产品种植面积(亩)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="特色农业总产量(吨)" prop="agricultureProduction">
|
||||
<el-input
|
||||
v-model="queryParams.agricultureProduction"
|
||||
placeholder="请输入特色农业总产量(吨)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="特色农业年产值(万元)" prop="agricultureOutputVaule">
|
||||
<el-input
|
||||
v-model="queryParams.agricultureOutputVaule"
|
||||
placeholder="请输入特色农业年产值(万元)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="总人口(人)" prop="totalPopulation">
|
||||
<el-input
|
||||
v-model="queryParams.totalPopulation"
|
||||
placeholder="请输入总人口(人)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="占地面积(平方公里)" prop="coverArea">
|
||||
<el-input
|
||||
v-model="queryParams.coverArea"
|
||||
placeholder="请输入占地面积(平方公里)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="示范大棚数量(个)" prop="exampleGreenhouse">
|
||||
<el-input
|
||||
v-model="queryParams.exampleGreenhouse"
|
||||
placeholder="请输入示范大棚数量(个)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="村居数量(个)" prop="rusticate">
|
||||
<el-input
|
||||
v-model="queryParams.rusticate"
|
||||
placeholder="请输入村居数量(个)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联合社耕地面积(万亩)" prop="cultivatedAlly">
|
||||
<el-input
|
||||
v-model="queryParams.cultivatedAlly"
|
||||
placeholder="请输入联合社耕地面积(万亩)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="大棚数量(个)" prop="greenhouse">
|
||||
<el-input
|
||||
v-model="queryParams.greenhouse"
|
||||
placeholder="请输入大棚数量(个)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="农产品产值(万元)" prop="outputValue">
|
||||
<el-input
|
||||
v-model="queryParams.outputValue"
|
||||
placeholder="请输入农产品产值(万元)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="庞家镇矢量边界" prop="vectorBoundary">
|
||||
<el-input
|
||||
v-model="queryParams.vectorBoundary"
|
||||
placeholder="请输入庞家镇矢量边界"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="庞家镇村庄矢量边界" prop="villageVectorBoundary">
|
||||
<el-input
|
||||
v-model="queryParams.villageVectorBoundary"
|
||||
placeholder="请输入庞家镇村庄矢量边界"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createdBy">
|
||||
<el-input
|
||||
v-model="queryParams.createdBy"
|
||||
placeholder="请输入创建人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.createdTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['crops:data:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['crops:data:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['crops:data:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['crops:data:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="id" />
|
||||
<el-table-column label="镇耕地面积(万亩)" align="center" prop="cultivatedArea" />
|
||||
<el-table-column label="粮食总产(万吨)" align="center" prop="foodstuffProduction" />
|
||||
<el-table-column label="蔬菜种植面积(亩)" align="center" prop="vegetablePlantingArea" />
|
||||
<el-table-column label="蔬菜总产(吨)" align="center" prop="vegetableProduction" />
|
||||
<el-table-column label="农产品种类" align="center" prop="type" />
|
||||
<el-table-column label="农产品种植面积(亩)" align="center" prop="agriculturalPlantingArea" />
|
||||
<el-table-column label="特色农业总产量(吨)" align="center" prop="agricultureProduction" />
|
||||
<el-table-column label="特色农业年产值(万元)" align="center" prop="agricultureOutputVaule" />
|
||||
<el-table-column label="总人口(人)" align="center" prop="totalPopulation" />
|
||||
<el-table-column label="占地面积(平方公里)" align="center" prop="coverArea" />
|
||||
<el-table-column label="示范大棚数量(个)" align="center" prop="exampleGreenhouse" />
|
||||
<el-table-column label="村居数量(个)" align="center" prop="rusticate" />
|
||||
<el-table-column label="联合社耕地面积(万亩)" align="center" prop="cultivatedAlly" />
|
||||
<el-table-column label="大棚数量(个)" align="center" prop="greenhouse" />
|
||||
<el-table-column label="农产品产值(万元)" align="center" prop="outputValue" />
|
||||
<el-table-column label="庞家镇矢量边界" align="center" prop="vectorBoundary" />
|
||||
<el-table-column label="庞家镇村庄矢量边界" align="center" prop="villageVectorBoundary" />
|
||||
<el-table-column label="创建人" align="center" prop="createdBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['crops:data:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['crops:data:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改作物综合数据对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="镇耕地面积(万亩)" prop="cultivatedArea">
|
||||
<el-input v-model="form.cultivatedArea" placeholder="请输入镇耕地面积(万亩)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="粮食总产(万吨)" prop="foodstuffProduction">
|
||||
<el-input v-model="form.foodstuffProduction" placeholder="请输入粮食总产(万吨)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="蔬菜种植面积(亩)" prop="vegetablePlantingArea">
|
||||
<el-input v-model="form.vegetablePlantingArea" placeholder="请输入蔬菜种植面积(亩)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="蔬菜总产(吨)" prop="vegetableProduction">
|
||||
<el-input v-model="form.vegetableProduction" placeholder="请输入蔬菜总产(吨)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="农产品种类" prop="type">
|
||||
<el-input v-model="form.type" placeholder="请输入农产品种类" />
|
||||
</el-form-item>
|
||||
<el-form-item label="农产品种植面积(亩)" prop="agriculturalPlantingArea">
|
||||
<el-input v-model="form.agriculturalPlantingArea" placeholder="请输入农产品种植面积(亩)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="特色农业总产量(吨)" prop="agricultureProduction">
|
||||
<el-input v-model="form.agricultureProduction" placeholder="请输入特色农业总产量(吨)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="特色农业年产值(万元)" prop="agricultureOutputVaule">
|
||||
<el-input v-model="form.agricultureOutputVaule" placeholder="请输入特色农业年产值(万元)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总人口(人)" prop="totalPopulation">
|
||||
<el-input v-model="form.totalPopulation" placeholder="请输入总人口(人)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="占地面积(平方公里)" prop="coverArea">
|
||||
<el-input v-model="form.coverArea" placeholder="请输入占地面积(平方公里)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="示范大棚数量(个)" prop="exampleGreenhouse">
|
||||
<el-input v-model="form.exampleGreenhouse" placeholder="请输入示范大棚数量(个)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="村居数量(个)" prop="rusticate">
|
||||
<el-input v-model="form.rusticate" placeholder="请输入村居数量(个)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联合社耕地面积(万亩)" prop="cultivatedAlly">
|
||||
<el-input v-model="form.cultivatedAlly" placeholder="请输入联合社耕地面积(万亩)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="大棚数量(个)" prop="greenhouse">
|
||||
<el-input v-model="form.greenhouse" placeholder="请输入大棚数量(个)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="农产品产值(万元)" prop="outputValue">
|
||||
<el-input v-model="form.outputValue" placeholder="请输入农产品产值(万元)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="庞家镇矢量边界" prop="vectorBoundary">
|
||||
<el-input v-model="form.vectorBoundary" placeholder="请输入庞家镇矢量边界" />
|
||||
</el-form-item>
|
||||
<el-form-item label="庞家镇村庄矢量边界" prop="villageVectorBoundary">
|
||||
<el-input v-model="form.villageVectorBoundary" placeholder="请输入庞家镇村庄矢量边界" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="创建人" prop="createdBy">-->
|
||||
<!-- <el-input v-model="form.createdBy" placeholder="请输入创建人" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="创建时间" prop="createdTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="form.createdTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="请选择创建时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listData, getData, delData, addData, updateData } from "@/api/crops/data";
|
||||
|
||||
export default {
|
||||
name: "Data",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 作物综合数据表格数据
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cultivatedArea: null,
|
||||
foodstuffProduction: null,
|
||||
vegetablePlantingArea: null,
|
||||
vegetableProduction: null,
|
||||
type: null,
|
||||
agriculturalPlantingArea: null,
|
||||
agricultureProduction: null,
|
||||
agricultureOutputVaule: null,
|
||||
totalPopulation: null,
|
||||
coverArea: null,
|
||||
exampleGreenhouse: null,
|
||||
rusticate: null,
|
||||
cultivatedAlly: null,
|
||||
greenhouse: null,
|
||||
outputValue: null,
|
||||
vectorBoundary: null,
|
||||
villageVectorBoundary: null,
|
||||
// createdBy: null,
|
||||
// createdTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询作物综合数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listData(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
cultivatedArea: null,
|
||||
foodstuffProduction: null,
|
||||
vegetablePlantingArea: null,
|
||||
vegetableProduction: null,
|
||||
type: null,
|
||||
agriculturalPlantingArea: null,
|
||||
agricultureProduction: null,
|
||||
agricultureOutputVaule: null,
|
||||
totalPopulation: null,
|
||||
coverArea: null,
|
||||
exampleGreenhouse: null,
|
||||
rusticate: null,
|
||||
cultivatedAlly: null,
|
||||
greenhouse: null,
|
||||
outputValue: null,
|
||||
vectorBoundary: null,
|
||||
villageVectorBoundary: null,
|
||||
// createdBy: null,
|
||||
// createdTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加作物综合数据";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getData(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改作物综合数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除作物综合数据编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delData(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('crops/data/export', {
|
||||
...this.queryParams
|
||||
}, `data_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user