|
@@ -0,0 +1,91 @@
|
|
|
+package com.ruoyi.web.controller.warehouse.finance;
|
|
|
+
|
|
|
+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.finance.domain.TFee;
|
|
|
+import com.ruoyi.finance.service.ITFeeService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 财务对账数据Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2021-01-18
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/finance/contrast")
|
|
|
+public class TContrastController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private ITFeeService tFeeService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询财务数据主列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('finance:contrast:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(TFee tFee) {
|
|
|
+ tFee.setfBilltype("DZ");
|
|
|
+ startPage();
|
|
|
+ List<TFee> list = tFeeService.selectTFeeList(tFee);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出财务数据主列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('finance:contrast:export')")
|
|
|
+ @Log(title = "财务数据主", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult export(TFee tFee) {
|
|
|
+ List<TFee> list = tFeeService.selectTFeeList(tFee);
|
|
|
+ ExcelUtil<TFee> util = new ExcelUtil<TFee>(TFee.class);
|
|
|
+ return util.exportExcel(list, "fee");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取财务数据主详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('finance:contrast:query')")
|
|
|
+ @GetMapping(value = "/{fId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("fId") Long fId) {
|
|
|
+ return AjaxResult.success(tFeeService.selectTFeeById(fId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增财务数据主
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('finance:contrast:add')")
|
|
|
+ @Log(title = "财务数据主", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody TFee tFee) {
|
|
|
+ return toAjax(tFeeService.insertTFee(tFee));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改财务数据主
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('finance:contrast:edit')")
|
|
|
+ @Log(title = "财务数据主", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody TFee tFee) {
|
|
|
+ return toAjax(tFeeService.updateTFee(tFee));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除财务数据主
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('finance:contrast:remove')")
|
|
|
+ @Log(title = "财务数据主", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{fIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] fIds) {
|
|
|
+ return toAjax(tFeeService.deleteTFeeByIds(fIds));
|
|
|
+ }
|
|
|
+}
|