|
@@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
- /**
|
|
|
+/**
|
|
|
* @Description: 精益事件设备启停配置表
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2024-09-20
|
|
@@ -36,7 +36,7 @@ import java.util.List;
|
|
|
public class LeanEventsHostController extends JeecgController<LeanEventsHost, ILeanEventsHostService> {
|
|
|
@Autowired
|
|
|
private ILeanEventsHostService leanEventsHostService;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
@@ -50,15 +50,15 @@ public class LeanEventsHostController extends JeecgController<LeanEventsHost, IL
|
|
|
@ApiOperation(value="精益事件设备启停配置表-分页列表查询", notes="精益事件设备启停配置表-分页列表查询")
|
|
|
@GetMapping(value = "/list")
|
|
|
public Result<IPage<LeanEventsHost>> queryPageList(LeanEventsHost leanEventsHost,
|
|
|
- @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
- @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
QueryWrapper<LeanEventsHost> queryWrapper = QueryGenerator.initQueryWrapper(leanEventsHost, req.getParameterMap());
|
|
|
Page<LeanEventsHost> page = new Page<LeanEventsHost>(pageNo, pageSize);
|
|
|
IPage<LeanEventsHost> pageList = leanEventsHostService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
@@ -71,9 +71,10 @@ public class LeanEventsHostController extends JeecgController<LeanEventsHost, IL
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody LeanEventsHost leanEventsHost) {
|
|
|
leanEventsHostService.save(leanEventsHost);
|
|
|
+ leanEventsHostService.updateEviceInformationCache();
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
@@ -88,7 +89,7 @@ public class LeanEventsHostController extends JeecgController<LeanEventsHost, IL
|
|
|
leanEventsHostService.edit(leanEventsHostEditParam);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
@@ -101,9 +102,10 @@ public class LeanEventsHostController extends JeecgController<LeanEventsHost, IL
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
leanEventsHostService.removeById(id);
|
|
|
+ leanEventsHostService.updateEviceInformationCache();
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
@@ -115,9 +117,10 @@ public class LeanEventsHostController extends JeecgController<LeanEventsHost, IL
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
|
this.leanEventsHostService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
+ leanEventsHostService.updateEviceInformationCache();
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|
|
@@ -135,41 +138,41 @@ public class LeanEventsHostController extends JeecgController<LeanEventsHost, IL
|
|
|
return Result.OK(leanEventsHost);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 导出excel
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param leanEventsHost
|
|
|
- */
|
|
|
- @RequestMapping(value = "/exportXls")
|
|
|
- public ModelAndView exportXls(HttpServletRequest request, LeanEventsHost leanEventsHost) {
|
|
|
- return super.exportXls(request, leanEventsHost, LeanEventsHost.class, "精益事件设备启停配置表");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 导出excel
|
|
|
+ *
|
|
|
+ * @param request
|
|
|
+ * @param leanEventsHost
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/exportXls")
|
|
|
+ public ModelAndView exportXls(HttpServletRequest request, LeanEventsHost leanEventsHost) {
|
|
|
+ return super.exportXls(request, leanEventsHost, LeanEventsHost.class, "精益事件设备启停配置表");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 通过excel导入数据
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param response
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
|
|
+ /**
|
|
|
+ * 通过excel导入数据
|
|
|
+ *
|
|
|
+ * @param request
|
|
|
+ * @param response
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
|
|
@ApiOperation(value="精益事件设备启停配置表-导入", notes="精益事件设备启停配置表-导入")
|
|
|
- public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
|
- return super.importExcel(request, response, LeanEventsHost.class);
|
|
|
- }
|
|
|
+ public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ return super.importExcel(request, response, LeanEventsHost.class);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取精益事件设备启停配置
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "获取精益事件设备启停配置")
|
|
|
- @ApiOperation(value="获取精益事件设备启停配置", notes="获取精益事件设备启停配置")
|
|
|
- @GetMapping(value = "/getConfig")
|
|
|
- public Result<List<LeanEventsHost>> getConfig(String id) {
|
|
|
- List<LeanEventsHost> leanEventsHosts = leanEventsHostService.getConfig(id);
|
|
|
- return Result.OK(leanEventsHosts);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取精益事件设备启停配置
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "获取精益事件设备启停配置")
|
|
|
+ @ApiOperation(value="获取精益事件设备启停配置", notes="获取精益事件设备启停配置")
|
|
|
+ @GetMapping(value = "/getConfig")
|
|
|
+ public Result<List<LeanEventsHost>> getConfig(String id) {
|
|
|
+ List<LeanEventsHost> leanEventsHosts = leanEventsHostService.getConfig(id);
|
|
|
+ return Result.OK(leanEventsHosts);
|
|
|
+ }
|
|
|
|
|
|
}
|