|
@@ -0,0 +1,125 @@
|
|
|
|
|
+package com.ruoyi.web.controller.project;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+import com.ruoyi.common.annotation.Log;
|
|
|
|
|
+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.enums.BusinessType;
|
|
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
|
+import com.ruoyi.service.project.IPdOutputValueService;
|
|
|
|
|
+import com.ruoyi.system.domain.PdOutputValue;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 产值审核评定(院班子审核员视角)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author ruoyi
|
|
|
|
|
+ */
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/performance/review")
|
|
|
|
|
+public class PdReviewController extends BaseController
|
|
|
|
|
+{
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IPdOutputValueService outputValueService;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询审核列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review:list')")
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
|
+ public TableDataInfo list(PdOutputValue outputValue)
|
|
|
|
|
+ {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ outputValue.setReviewStatus("pending");
|
|
|
|
|
+ List<PdOutputValue> list = outputValueService.selectOutputValueList(outputValue);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询审核详情
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review:list')")
|
|
|
|
|
+ @GetMapping("/{outputId}")
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable Long outputId)
|
|
|
|
|
+ {
|
|
|
|
|
+ return success(outputValueService.selectOutputValueById(outputId));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 审核通过(单个)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review')")
|
|
|
|
|
+ @Log(title = "产值审核", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping("/approve")
|
|
|
|
|
+ public AjaxResult approve(@RequestBody PdOutputValue outputValue)
|
|
|
|
|
+ {
|
|
|
|
|
+ outputValue.setReviewStatus("approved");
|
|
|
|
|
+ outputValue.setReviewedBy(getUsername());
|
|
|
|
|
+ return toAjax(outputValueService.reviewOutputValue(outputValue));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 审核不通过(单个)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review')")
|
|
|
|
|
+ @Log(title = "产值审核", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping("/reject")
|
|
|
|
|
+ public AjaxResult reject(@RequestBody PdOutputValue outputValue)
|
|
|
|
|
+ {
|
|
|
|
|
+ outputValue.setReviewStatus("rejected");
|
|
|
|
|
+ outputValue.setReviewedBy(getUsername());
|
|
|
|
|
+ return toAjax(outputValueService.reviewOutputValue(outputValue));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 批量审核
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review')")
|
|
|
|
|
+ @Log(title = "产值审核", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PutMapping("/batch")
|
|
|
|
|
+ public AjaxResult batchReview(@RequestBody List<PdOutputValue> list)
|
|
|
|
|
+ {
|
|
|
|
|
+ for (PdOutputValue ov : list)
|
|
|
|
|
+ {
|
|
|
|
|
+ ov.setReviewedBy(getUsername());
|
|
|
|
|
+ }
|
|
|
|
|
+ return toAjax(outputValueService.batchReviewOutputValues(list));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询审核日志
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review:list')")
|
|
|
|
|
+ @GetMapping("/log/list")
|
|
|
|
|
+ public TableDataInfo reviewLog(PdOutputValue outputValue)
|
|
|
|
|
+ {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ outputValue.setReviewStatus(null);
|
|
|
|
|
+ List<PdOutputValue> list = outputValueService.selectOutputValueList(outputValue);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 导出审核记录
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('output:review:export')")
|
|
|
|
|
+ @Log(title = "产值审核", businessType = BusinessType.EXPORT)
|
|
|
|
|
+ @GetMapping("/export")
|
|
|
|
|
+ public void export(HttpServletResponse response, PdOutputValue outputValue)
|
|
|
|
|
+ {
|
|
|
|
|
+ List<PdOutputValue> list = outputValueService.selectOutputValueList(outputValue);
|
|
|
|
|
+ ExcelUtil<PdOutputValue> util = new ExcelUtil<PdOutputValue>(PdOutputValue.class);
|
|
|
|
|
+ util.exportExcel(response, list, "审核记录");
|
|
|
|
|
+ }
|
|
|
|
|
+}
|