|
@@ -0,0 +1,106 @@
|
|
|
+package com.slibra.web.controller.business;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.slibra.common.annotation.Log;
|
|
|
+import com.slibra.common.core.controller.BaseController;
|
|
|
+import com.slibra.common.core.domain.AjaxResult;
|
|
|
+import com.slibra.common.enums.BusinessType;
|
|
|
+import com.slibra.business.domain.TXinyiForecastComparison;
|
|
|
+import com.slibra.business.service.ITXinyiForecastComparisonService;
|
|
|
+import com.slibra.common.utils.poi.ExcelUtil;
|
|
|
+import com.slibra.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 信义预测对比Controller
|
|
|
+ *
|
|
|
+ * @author slibra
|
|
|
+ * @date 2024-06-20
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/business/comparison")
|
|
|
+public class TXinyiForecastComparisonController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private ITXinyiForecastComparisonService tXinyiForecastComparisonService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询信义预测对比列表
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:comparison:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(TXinyiForecastComparison tXinyiForecastComparison)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<TXinyiForecastComparison> list = tXinyiForecastComparisonService.selectTXinyiForecastComparisonList(tXinyiForecastComparison);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出信义预测对比列表
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:comparison:export')")
|
|
|
+ @Log(title = "信义预测对比", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, TXinyiForecastComparison tXinyiForecastComparison)
|
|
|
+ {
|
|
|
+ List<TXinyiForecastComparison> list = tXinyiForecastComparisonService.selectTXinyiForecastComparisonList(tXinyiForecastComparison);
|
|
|
+ ExcelUtil<TXinyiForecastComparison> util = new ExcelUtil<TXinyiForecastComparison>(TXinyiForecastComparison.class);
|
|
|
+ util.exportExcel(response, list, "信义预测对比数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取信义预测对比详细信息
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:comparison:query')")
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
+ {
|
|
|
+ return success(tXinyiForecastComparisonService.selectTXinyiForecastComparisonById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增信义预测对比
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:comparison:add')")
|
|
|
+ @Log(title = "信义预测对比", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody TXinyiForecastComparison tXinyiForecastComparison)
|
|
|
+ {
|
|
|
+ tXinyiForecastComparison.setCreateBy(getUsername());
|
|
|
+ return toAjax(tXinyiForecastComparisonService.insertTXinyiForecastComparison(tXinyiForecastComparison));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改信义预测对比
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:comparison:edit')")
|
|
|
+ @Log(title = "信义预测对比", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody TXinyiForecastComparison tXinyiForecastComparison)
|
|
|
+ {
|
|
|
+ tXinyiForecastComparison.setUpdateBy(getUsername());
|
|
|
+ return toAjax(tXinyiForecastComparisonService.updateTXinyiForecastComparison(tXinyiForecastComparison));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除信义预测对比
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:comparison:remove')")
|
|
|
+ @Log(title = "信义预测对比", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
+ {
|
|
|
+ return toAjax(tXinyiForecastComparisonService.deleteTXinyiForecastComparisonByIds(ids));
|
|
|
+ }
|
|
|
+}
|