|
@@ -0,0 +1,113 @@
|
|
|
+package com.ruoyi.web.controller.gas;
|
|
|
+
|
|
|
+import com.ruoyi.common.annotation.Log;
|
|
|
+import com.ruoyi.common.annotation.RepeatSubmit;
|
|
|
+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.core.validate.AddGroup;
|
|
|
+import com.ruoyi.common.core.validate.EditGroup;
|
|
|
+import com.ruoyi.common.core.validate.QueryGroup;
|
|
|
+import com.ruoyi.common.enums.BusinessType;
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
+import com.ruoyi.gas.domain.bo.GEmergencyRepairProcessBo;
|
|
|
+import com.ruoyi.gas.domain.vo.GEmergencyRepairProcessVo;
|
|
|
+import com.ruoyi.gas.service.IGEmergencyRepairProcessService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.constraints.NotEmpty;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 抢险维修审核Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2024-01-16
|
|
|
+ */
|
|
|
+@Validated
|
|
|
+@Api(value = "抢险维修审核控制器", tags = {"抢险维修审核管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/gas/emergencyRepairProcess")
|
|
|
+public class GEmergencyRepairProcessController extends BaseController {
|
|
|
+
|
|
|
+ private final IGEmergencyRepairProcessService iGEmergencyRepairProcessService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询抢险维修审核列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询抢险维修审核列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('gas:emergencyRepairProcess:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<GEmergencyRepairProcessVo> list(@Validated(QueryGroup.class) GEmergencyRepairProcessBo bo) {
|
|
|
+ return iGEmergencyRepairProcessService.queryPageList(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出抢险维修审核列表
|
|
|
+ */
|
|
|
+ @ApiOperation("导出抢险维修审核列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('gas:emergencyRepairProcess:export')")
|
|
|
+ @Log(title = "抢险维修审核", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public void export(@Validated GEmergencyRepairProcessBo bo, HttpServletResponse response) {
|
|
|
+ List<GEmergencyRepairProcessVo> list = iGEmergencyRepairProcessService.queryList(bo);
|
|
|
+ ExcelUtil.exportExcel(list, "抢险维修审核", GEmergencyRepairProcessVo.class, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取抢险维修审核详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("获取抢险维修审核详细信息")
|
|
|
+ @PreAuthorize("@ss.hasPermi('gas:emergencyRepairProcess:query')")
|
|
|
+ @GetMapping("/{id}")
|
|
|
+ public AjaxResult<GEmergencyRepairProcessVo> getInfo(@NotNull(message = "主键不能为空")
|
|
|
+ @PathVariable("id") String id) {
|
|
|
+ return AjaxResult.success(iGEmergencyRepairProcessService.queryById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增抢险维修审核
|
|
|
+ */
|
|
|
+ @ApiOperation("新增抢险维修审核")
|
|
|
+// @PreAuthorize("@ss.hasPermi('gas:emergencyRepairProcess:add')")
|
|
|
+ @Log(title = "抢险维修审核", businessType = BusinessType.INSERT)
|
|
|
+ @RepeatSubmit()
|
|
|
+ @PostMapping()
|
|
|
+ public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GEmergencyRepairProcessBo bo) {
|
|
|
+ return toAjax(iGEmergencyRepairProcessService.insertByBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改抢险维修审核
|
|
|
+ */
|
|
|
+ @ApiOperation("修改抢险维修审核")
|
|
|
+ @PreAuthorize("@ss.hasPermi('gas:emergencyRepairProcess:edit')")
|
|
|
+ @Log(title = "抢险维修审核", businessType = BusinessType.UPDATE)
|
|
|
+ @RepeatSubmit()
|
|
|
+ @PutMapping()
|
|
|
+ public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody GEmergencyRepairProcessBo bo) {
|
|
|
+ return toAjax(iGEmergencyRepairProcessService.updateByBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除抢险维修审核
|
|
|
+ */
|
|
|
+ @ApiOperation("删除抢险维修审核")
|
|
|
+ @PreAuthorize("@ss.hasPermi('gas:emergencyRepairProcess:remove')")
|
|
|
+ @Log(title = "抢险维修审核" , businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
|
+ @PathVariable String[] ids) {
|
|
|
+ return toAjax(iGEmergencyRepairProcessService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
|
|
+ }
|
|
|
+}
|