小bug修复,修改上传文件名称生成逻辑

This commit is contained in:
mi9688
2024-11-26 18:35:22 +08:00
parent 45b3381eb2
commit 032f980f34
14 changed files with 893 additions and 3 deletions

View File

@ -0,0 +1,110 @@
package com.fastbee.data.controller.aaScreenAgricultural;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.fastbee.common.annotation.Log;
import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.enums.BusinessType;
import com.fastbee.crop.domain.AgricultureCropInfo;
import com.fastbee.crop.service.IAgricultureCropInfoService;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.common.core.page.TableDataInfo;
/**
* 农作物信息管理Controller
*
* @author kerwincui
* @date 2024-11-26
*/
@RestController
@RequestMapping("/crop/info")
@Api(tags = "农作物信息管理")
public class AgricultureCropInfoController extends BaseController
{
@Autowired
private IAgricultureCropInfoService agricultureCropInfoService;
/**
* 查询农作物信息管理列表
*/
@PreAuthorize("@ss.hasPermi('crop:crop:list')")
@GetMapping("/list")
@ApiOperation("查询农作物信息管理列表")
public TableDataInfo list(AgricultureCropInfo agricultureCropInfo)
{
startPage();
List<AgricultureCropInfo> list = agricultureCropInfoService.selectAgricultureCropInfoList(agricultureCropInfo);
return getDataTable(list);
}
/**
* 导出农作物信息管理列表
*/
@ApiOperation("导出农作物信息管理列表")
@PreAuthorize("@ss.hasPermi('crop:crop:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, AgricultureCropInfo agricultureCropInfo)
{
List<AgricultureCropInfo> list = agricultureCropInfoService.selectAgricultureCropInfoList(agricultureCropInfo);
ExcelUtil<AgricultureCropInfo> util = new ExcelUtil<AgricultureCropInfo>(AgricultureCropInfo.class);
util.exportExcel(response, list, "农作物信息管理数据");
}
/**
* 获取农作物信息管理详细信息
*/
@PreAuthorize("@ss.hasPermi('crop:crop:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取农作物信息管理详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(agricultureCropInfoService.selectAgricultureCropInfoById(id));
}
/**
* 新增农作物信息管理
*/
@PreAuthorize("@ss.hasPermi('crop:crop:add')")
@PostMapping
@ApiOperation("新增农作物信息管理")
public AjaxResult add(@RequestBody AgricultureCropInfo agricultureCropInfo)
{
return toAjax(agricultureCropInfoService.insertAgricultureCropInfo(agricultureCropInfo));
}
/**
* 修改农作物信息管理
*/
@PreAuthorize("@ss.hasPermi('crop:crop:edit')")
@PutMapping
@ApiOperation("修改农作物信息管理")
public AjaxResult edit(@RequestBody AgricultureCropInfo agricultureCropInfo)
{
return toAjax(agricultureCropInfoService.updateAgricultureCropInfo(agricultureCropInfo));
}
/**
* 删除农作物信息管理
*/
@PreAuthorize("@ss.hasPermi('crop:crop:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除农作物信息管理")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(agricultureCropInfoService.deleteAgricultureCropInfoByIds(ids));
}
}

View File

@ -0,0 +1,110 @@
package com.fastbee.data.controller.aaScreenAgricultural;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.fastbee.common.annotation.Log;
import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.enums.BusinessType;
import com.fastbee.crop.domain.AgricultureCropYield;
import com.fastbee.crop.service.IAgricultureCropYieldService;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.common.core.page.TableDataInfo;
/**
* 作物产量记录Controller
*
* @author kerwincui
* @date 2024-11-26
*/
@RestController
@RequestMapping("/crop/yield")
@Api(tags = "作物产量记录")
public class AgricultureCropYieldController extends BaseController
{
@Autowired
private IAgricultureCropYieldService agricultureCropYieldService;
/**
* 查询作物产量记录列表
*/
@PreAuthorize("@ss.hasPermi('crop:yield:list')")
@GetMapping("/list")
@ApiOperation("查询作物产量记录列表")
public TableDataInfo list(AgricultureCropYield agricultureCropYield)
{
startPage();
List<AgricultureCropYield> list = agricultureCropYieldService.selectAgricultureCropYieldList(agricultureCropYield);
return getDataTable(list);
}
/**
* 导出作物产量记录列表
*/
@ApiOperation("导出作物产量记录列表")
@PreAuthorize("@ss.hasPermi('crop:yield:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, AgricultureCropYield agricultureCropYield)
{
List<AgricultureCropYield> list = agricultureCropYieldService.selectAgricultureCropYieldList(agricultureCropYield);
ExcelUtil<AgricultureCropYield> util = new ExcelUtil<AgricultureCropYield>(AgricultureCropYield.class);
util.exportExcel(response, list, "作物产量记录数据");
}
/**
* 获取作物产量记录详细信息
*/
@PreAuthorize("@ss.hasPermi('crop:yield:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取作物产量记录详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(agricultureCropYieldService.selectAgricultureCropYieldById(id));
}
/**
* 新增作物产量记录
*/
@PreAuthorize("@ss.hasPermi('crop:yield:add')")
@PostMapping
@ApiOperation("新增作物产量记录")
public AjaxResult add(@RequestBody AgricultureCropYield agricultureCropYield)
{
return toAjax(agricultureCropYieldService.insertAgricultureCropYield(agricultureCropYield));
}
/**
* 修改作物产量记录
*/
@PreAuthorize("@ss.hasPermi('crop:yield:edit')")
@PutMapping
@ApiOperation("修改作物产量记录")
public AjaxResult edit(@RequestBody AgricultureCropYield agricultureCropYield)
{
return toAjax(agricultureCropYieldService.updateAgricultureCropYield(agricultureCropYield));
}
/**
* 删除作物产量记录
*/
@PreAuthorize("@ss.hasPermi('crop:yield:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除作物产量记录")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(agricultureCropYieldService.deleteAgricultureCropYieldByIds(ids));
}
}