|  | @@ -0,0 +1,105 @@
 | 
	
		
			
				|  |  | +package com.ruoyi.web.controller.warehouse.finance;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +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.domain.model.LoginUser;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.core.page.TableDataInfo;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.enums.BusinessType;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.utils.ServletUtils;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.utils.poi.ExcelUtil;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.utils.spring.SpringUtils;
 | 
	
		
			
				|  |  | +import com.ruoyi.finance.domain.TFee;
 | 
	
		
			
				|  |  | +import com.ruoyi.finance.domain.TWareHouseFees;
 | 
	
		
			
				|  |  | +import com.ruoyi.finance.service.ITFeeService;
 | 
	
		
			
				|  |  | +import com.ruoyi.framework.web.service.TokenService;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.Map;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/**
 | 
	
		
			
				|  |  | + * 财务付费数据主Controller
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * @author ruoyi
 | 
	
		
			
				|  |  | + * @date 2021-01-18
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +@RestController
 | 
	
		
			
				|  |  | +@RequestMapping("/finance/payment")
 | 
	
		
			
				|  |  | +public class TPaymentController extends BaseController {
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private ITFeeService tFeeService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 查询财务数据主列表
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @PreAuthorize("@ss.hasPermi('finance:payment:list')")
 | 
	
		
			
				|  |  | +    @GetMapping("/list")
 | 
	
		
			
				|  |  | +    public TableDataInfo list(TFee tFee) {
 | 
	
		
			
				|  |  | +        tFee.setfBilltype("FF");
 | 
	
		
			
				|  |  | +        startPage();
 | 
	
		
			
				|  |  | +        List<TFee> list = tFeeService.selectTFeeList(tFee);
 | 
	
		
			
				|  |  | +        return getDataTable(list);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 导出财务数据主列表
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @PreAuthorize("@ss.hasPermi('finance:payment: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:payment:query')")
 | 
	
		
			
				|  |  | +    @GetMapping(value = "/{fId}")
 | 
	
		
			
				|  |  | +    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
 | 
	
		
			
				|  |  | +        return AjaxResult.success(tFeeService.selectTFeeById(fId));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 新增财务数据主
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @PreAuthorize("@ss.hasPermi('finance:payment:add')")
 | 
	
		
			
				|  |  | +    @Log(title = "财务数据主", businessType = BusinessType.INSERT)
 | 
	
		
			
				|  |  | +    @PostMapping(value = "/add")
 | 
	
		
			
				|  |  | +    @RepeatSubmit
 | 
	
		
			
				|  |  | +    public AjaxResult add(@RequestParam("tFee") String tFee,
 | 
	
		
			
				|  |  | +                          @RequestParam("tFeeDo") String tFeeDo ) {
 | 
	
		
			
				|  |  | +        String billsType = "FF";
 | 
	
		
			
				|  |  | +        // 获取当前的用户
 | 
	
		
			
				|  |  | +        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
 | 
	
		
			
				|  |  | +        return tFeeService.insertTFeeTFeeDo(tFee,tFeeDo,loginUser,billsType);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 修改财务数据主
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @PreAuthorize("@ss.hasPermi('finance:payment:edit')")
 | 
	
		
			
				|  |  | +    @Log(title = "财务数据主", businessType = BusinessType.UPDATE)
 | 
	
		
			
				|  |  | +    @PutMapping
 | 
	
		
			
				|  |  | +    public AjaxResult edit(@RequestBody TFee tFee) {
 | 
	
		
			
				|  |  | +        return toAjax(tFeeService.updateTFee(tFee));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 删除财务数据主
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @PreAuthorize("@ss.hasPermi('finance:payment:remove')")
 | 
	
		
			
				|  |  | +    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
 | 
	
		
			
				|  |  | +    @DeleteMapping("/{fIds}")
 | 
	
		
			
				|  |  | +    public AjaxResult remove(@PathVariable Long[] fIds) {
 | 
	
		
			
				|  |  | +        return toAjax(tFeeService.deleteTFeeByIds(fIds));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +}
 |