|
@@ -1,5 +1,6 @@
|
|
package org.jeecg.modules.system.app.controller;
|
|
package org.jeecg.modules.system.app.controller;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -11,6 +12,7 @@ import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
|
+import org.jeecg.common.util.DictAnnotationUtil;
|
|
import org.jeecg.modules.system.app.entity.AppInsure;
|
|
import org.jeecg.modules.system.app.entity.AppInsure;
|
|
import org.jeecg.modules.system.app.service.IAppInsureService;
|
|
import org.jeecg.modules.system.app.service.IAppInsureService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -20,7 +22,9 @@ import org.springframework.web.servlet.ModelAndView;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
- /**
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
* @Description: 保险表
|
|
* @Description: 保险表
|
|
* @Author: jeecg-boot
|
|
* @Author: jeecg-boot
|
|
* @Date: 2025-07-03
|
|
* @Date: 2025-07-03
|
|
@@ -66,7 +70,6 @@ public class AppInsureController extends JeecgController<AppInsure, IAppInsureSe
|
|
*/
|
|
*/
|
|
@AutoLog(value = "保险表-添加")
|
|
@AutoLog(value = "保险表-添加")
|
|
@Operation(summary="保险表-添加")
|
|
@Operation(summary="保险表-添加")
|
|
- @RequiresPermissions("org.jeecg.modules.app:nm_insure:add")
|
|
|
|
@PostMapping(value = "/add")
|
|
@PostMapping(value = "/add")
|
|
public Result<String> add(@RequestBody AppInsure appInsure) {
|
|
public Result<String> add(@RequestBody AppInsure appInsure) {
|
|
appInsureService.save(appInsure);
|
|
appInsureService.save(appInsure);
|
|
@@ -82,7 +85,6 @@ public class AppInsureController extends JeecgController<AppInsure, IAppInsureSe
|
|
*/
|
|
*/
|
|
@AutoLog(value = "保险表-编辑")
|
|
@AutoLog(value = "保险表-编辑")
|
|
@Operation(summary="保险表-编辑")
|
|
@Operation(summary="保险表-编辑")
|
|
- @RequiresPermissions("org.jeecg.modules.app:nm_insure:edit")
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
public Result<String> edit(@RequestBody AppInsure appInsure) {
|
|
public Result<String> edit(@RequestBody AppInsure appInsure) {
|
|
appInsureService.updateById(appInsure);
|
|
appInsureService.updateById(appInsure);
|
|
@@ -97,7 +99,6 @@ public class AppInsureController extends JeecgController<AppInsure, IAppInsureSe
|
|
*/
|
|
*/
|
|
@AutoLog(value = "保险表-通过id删除")
|
|
@AutoLog(value = "保险表-通过id删除")
|
|
@Operation(summary="保险表-通过id删除")
|
|
@Operation(summary="保险表-通过id删除")
|
|
- @RequiresPermissions("org.jeecg.modules.app:nm_insure:delete")
|
|
|
|
@DeleteMapping(value = "/delete")
|
|
@DeleteMapping(value = "/delete")
|
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
appInsureService.removeById(id);
|
|
appInsureService.removeById(id);
|
|
@@ -161,4 +162,19 @@ public class AppInsureController extends JeecgController<AppInsure, IAppInsureSe
|
|
return super.importExcel(request, response, AppInsure.class);
|
|
return super.importExcel(request, response, AppInsure.class);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 分页列表查询
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ //@AutoLog(value = "保险表-分页列表查询")
|
|
|
|
+ @Operation(summary="保险表-分页列表查询")
|
|
|
|
+ @GetMapping(value = "/findByList")
|
|
|
|
+ public Result<List<AppInsure>> findByList(@RequestParam(name="insuranceName",required=true) String insuranceName) {
|
|
|
|
+ LambdaQueryWrapper<AppInsure> query = new LambdaQueryWrapper<>();
|
|
|
|
+ List<AppInsure> list = appInsureService.list( query
|
|
|
|
+ .eq(AppInsure::getStatus, 0).eq(AppInsure::getInsuranceName,insuranceName));
|
|
|
|
+ DictAnnotationUtil.translateDictList(list);
|
|
|
|
+ return Result.OK(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|