|
@@ -35,129 +35,5 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
public class FpgGatherDataController extends JeecgController<FpgGatherData, IFpgGatherDataService> {
|
|
|
@Autowired
|
|
|
private IFpgGatherDataService fpgGatherDataService;
|
|
|
-
|
|
|
- /**
|
|
|
- * 分页列表查询
|
|
|
- *
|
|
|
- * @param fpgGatherData
|
|
|
- * @param pageNo
|
|
|
- * @param pageSize
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
- //@AutoLog(value = "峰平谷数据采集-分页列表查询")
|
|
|
- @ApiOperation(value="峰平谷数据采集-分页列表查询", notes="峰平谷数据采集-分页列表查询")
|
|
|
- @GetMapping(value = "/list")
|
|
|
- public Result<IPage<FpgGatherData>> queryPageList(FpgGatherData fpgGatherData,
|
|
|
- @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
- @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
- QueryWrapper<FpgGatherData> queryWrapper = QueryGenerator.initQueryWrapper(fpgGatherData, req.getParameterMap());
|
|
|
- Page<FpgGatherData> page = new Page<FpgGatherData>(pageNo, pageSize);
|
|
|
- IPage<FpgGatherData> pageList = fpgGatherDataService.page(page, queryWrapper);
|
|
|
- return Result.OK(pageList);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 添加
|
|
|
- *
|
|
|
- * @param fpgGatherData
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "峰平谷数据采集-添加")
|
|
|
- @ApiOperation(value="峰平谷数据采集-添加", notes="峰平谷数据采集-添加")
|
|
|
- @RequiresPermissions("jeecgModuleLesm:fpg_gather_data:add")
|
|
|
- @PostMapping(value = "/add")
|
|
|
- public Result<String> add(@RequestBody FpgGatherData fpgGatherData) {
|
|
|
- fpgGatherDataService.save(fpgGatherData);
|
|
|
- return Result.OK("添加成功!");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 编辑
|
|
|
- *
|
|
|
- * @param fpgGatherData
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "峰平谷数据采集-编辑")
|
|
|
- @ApiOperation(value="峰平谷数据采集-编辑", notes="峰平谷数据采集-编辑")
|
|
|
- @RequiresPermissions("jeecgModuleLesm:fpg_gather_data:edit")
|
|
|
- @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
- public Result<String> edit(@RequestBody FpgGatherData fpgGatherData) {
|
|
|
- fpgGatherDataService.updateById(fpgGatherData);
|
|
|
- return Result.OK("编辑成功!");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 通过id删除
|
|
|
- *
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "峰平谷数据采集-通过id删除")
|
|
|
- @ApiOperation(value="峰平谷数据采集-通过id删除", notes="峰平谷数据采集-通过id删除")
|
|
|
- @RequiresPermissions("jeecgModuleLesm:fpg_gather_data:delete")
|
|
|
- @DeleteMapping(value = "/delete")
|
|
|
- public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
- fpgGatherDataService.removeById(id);
|
|
|
- return Result.OK("删除成功!");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量删除
|
|
|
- *
|
|
|
- * @param ids
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "峰平谷数据采集-批量删除")
|
|
|
- @ApiOperation(value="峰平谷数据采集-批量删除", notes="峰平谷数据采集-批量删除")
|
|
|
- @RequiresPermissions("jeecgModuleLesm:fpg_gather_data:deleteBatch")
|
|
|
- @DeleteMapping(value = "/deleteBatch")
|
|
|
- public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
|
- this.fpgGatherDataService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
- return Result.OK("批量删除成功!");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 通过id查询
|
|
|
- *
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- //@AutoLog(value = "峰平谷数据采集-通过id查询")
|
|
|
- @ApiOperation(value="峰平谷数据采集-通过id查询", notes="峰平谷数据采集-通过id查询")
|
|
|
- @GetMapping(value = "/queryById")
|
|
|
- public Result<FpgGatherData> queryById(@RequestParam(name="id",required=true) String id) {
|
|
|
- FpgGatherData fpgGatherData = fpgGatherDataService.getById(id);
|
|
|
- if(fpgGatherData==null) {
|
|
|
- return Result.error("未找到对应数据");
|
|
|
- }
|
|
|
- return Result.OK(fpgGatherData);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 导出excel
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param fpgGatherData
|
|
|
- */
|
|
|
- @RequiresPermissions("jeecgModuleLesm:fpg_gather_data:exportXls")
|
|
|
- @RequestMapping(value = "/exportXls")
|
|
|
- public ModelAndView exportXls(HttpServletRequest request, FpgGatherData fpgGatherData) {
|
|
|
- return super.exportXls(request, fpgGatherData, FpgGatherData.class, "峰平谷数据采集");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 通过excel导入数据
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param response
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequiresPermissions("jeecgModuleLesm:fpg_gather_data:importExcel")
|
|
|
- @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
|
|
- public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
|
- return super.importExcel(request, response, FpgGatherData.class);
|
|
|
- }
|
|
|
|
|
|
}
|