Jelajahi Sumber

添加 财务模块 后端接口

阿伏兔 4 tahun lalu
induk
melakukan
2cae79fd07

+ 90 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TFeeController.java

@@ -0,0 +1,90 @@
+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("/warehouse/fee")
+public class TFeeController extends BaseController {
+    @Autowired
+    private ITFeeService tFeeService;
+
+    /**
+     * 查询财务数据主列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:fee:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TFee tFee) {
+        startPage();
+        List<TFee> list = tFeeService.selectTFeeList(tFee);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出财务数据主列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:fee: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('warehouse:fee:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(tFeeService.selectTFeeById(fId));
+    }
+
+    /**
+     * 新增财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:fee:add')")
+    @Log(title = "财务数据主", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TFee tFee) {
+        return toAjax(tFeeService.insertTFee(tFee));
+    }
+
+    /**
+     * 修改财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:fee:edit')")
+    @Log(title = "财务数据主", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TFee tFee) {
+        return toAjax(tFeeService.updateTFee(tFee));
+    }
+
+    /**
+     * 删除财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:fee:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(tFeeService.deleteTFeeByIds(fIds));
+    }
+}

+ 90 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TFeeDoController.java

@@ -0,0 +1,90 @@
+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.TFeeDo;
+import com.ruoyi.finance.service.ITFeeDoService;
+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("/warehouse/do")
+public class TFeeDoController extends BaseController {
+    @Autowired
+    private ITFeeDoService tFeeDoService;
+
+    /**
+     * 查询财务数据明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:do:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TFeeDo tFeeDo) {
+        startPage();
+        List<TFeeDo> list = tFeeDoService.selectTFeeDoList(tFeeDo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出财务数据明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:do:export')")
+    @Log(title = "财务数据明细", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TFeeDo tFeeDo) {
+        List<TFeeDo> list = tFeeDoService.selectTFeeDoList(tFeeDo);
+        ExcelUtil<TFeeDo> util = new ExcelUtil<TFeeDo>(TFeeDo.class);
+        return util.exportExcel(list, "do");
+    }
+
+    /**
+     * 获取财务数据明细详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:do:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(tFeeDoService.selectTFeeDoById(fId));
+    }
+
+    /**
+     * 新增财务数据明细
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:do:add')")
+    @Log(title = "财务数据明细", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TFeeDo tFeeDo) {
+        return toAjax(tFeeDoService.insertTFeeDo(tFeeDo));
+    }
+
+    /**
+     * 修改财务数据明细
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:do:edit')")
+    @Log(title = "财务数据明细", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TFeeDo tFeeDo) {
+        return toAjax(tFeeDoService.updateTFeeDo(tFeeDo));
+    }
+
+    /**
+     * 删除财务数据明细
+     */
+    @PreAuthorize("@ss.hasPermi('warehouse:do:remove')")
+    @Log(title = "财务数据明细", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(tFeeDoService.deleteTFeeDoByIds(fIds));
+    }
+}

+ 92 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TStorageFeeCalculationController.java

@@ -0,0 +1,92 @@
+package com.ruoyi.web.controller.warehouse.warehouseBusiness;
+
+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.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
+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 2020-12-11
+ */
+@RestController
+@RequestMapping("/warehouseBusiness/storageFeeCalculation")
+public class TStorageFeeCalculationController extends BaseController {
+    @Autowired
+    private ITWarehouseBillsService itWarehouseBillsService;
+
+
+    /**
+     * 查询入库详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:storageFeeCalculation:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseBills tWarehouseBills) {
+        startPage();
+        tWarehouseBills.setfBilltype("CCF");
+        List<Map<String, Object>> list = itWarehouseBillsService.selectWarehouseBusinessList(tWarehouseBills);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出入库详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:storageFeeCalculation:export')")
+    @Log(title = "详情主表", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseBills tWarehouseBills) {
+        tWarehouseBills.setfBilltype("CCF");
+        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
+        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
+        return util.exportExcel(list, "warehousebills");
+    }
+
+    /**
+     * 获取入库仓库详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:storageFeeCalculation:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(itWarehouseBillsService.selectTWarehousebillsById(fId));
+    }
+
+    /**
+     * 新增库存费计算
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:storageFeeCalculation:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/add")
+    @RepeatSubmit
+    public AjaxResult add(@RequestBody TWarehouseBills tWarehouseBills) {
+        System.out.println(tWarehouseBills.toString());
+        String billsType = "CCF";
+        // 获取当前的用户
+//        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+//        return itWarehouseBillsService.insertStorageFeeCalculation(tWarehouseBills, loginUser, billsType);
+        return null;
+    }
+
+    /**
+     * 删除入库详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:storageFeeCalculation:remove')")
+    @Log(title = "详情主表", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(itWarehouseBillsService.deleteTWarehousebillsByIds(fIds));
+    }
+
+}

+ 232 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TFee.java

@@ -0,0 +1,232 @@
+package com.ruoyi.finance.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 财务数据主对象 t_fee
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+public class TFee extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private Long fId;
+
+    /**
+     * 业务编号(唯一格式+YYYY+YY+NNN,
+     * 编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始。)
+     * 对账 DZ
+     * <p>
+     * 收费 SF
+     * <p>
+     * 付费 FF
+     * <p>
+     * 发票 FP
+     */
+    @Excel(name = "业务编号(唯一格式+YYYY+YY+NNN, 编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始 对账 DZ 收费 SF 付费 FF 发票 FP")
+    private String fBillno;
+
+    /**
+     * 货权方
+     */
+    @Excel(name = "货权方")
+    private Long fCtrlcorpid;
+
+    /**
+     * 结算单位(下拉模糊搜索)
+     */
+    @Excel(name = "结算单位(下拉模糊搜索)")
+    private Long fCorpid;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String tMblno;
+
+    /**
+     * 应收合计
+     */
+    @Excel(name = "应收合计")
+    private BigDecimal fAmtdr;
+
+    /**
+     * 应付合计
+     */
+    @Excel(name = "应付合计")
+    private BigDecimal fAmtcr;
+
+    /**
+     * 单据类型(对账单 收费 付费 付费申请 收费申请,发票申请 销项发票 进项发票)
+     */
+    @Excel(name = "单据类型(对账单 收费 付费 付费申请 收费申请,发票申请 销项发票 进项发票)")
+    private String fBilltype;
+
+    /**
+     * 状态
+     */
+    @Excel(name = "状态")
+    private String fBillstatus;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String fRemarks;
+
+    /**
+     * 账单日期(审批流结束后更新)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账单日期(审批流结束后更新)", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fAccbilldate;
+
+    /**
+     * 删除状态
+     */
+    private String delFlag;
+
+    /**
+     * 制单部门
+     */
+    @Excel(name = "制单部门")
+    private Long fDeptid;
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfCtrlcorpid(Long fCtrlcorpid) {
+        this.fCtrlcorpid = fCtrlcorpid;
+    }
+
+    public Long getfCtrlcorpid() {
+        return fCtrlcorpid;
+    }
+
+    public void setfCorpid(Long fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    public Long getfCorpid() {
+        return fCorpid;
+    }
+
+    public void settMblno(String tMblno) {
+        this.tMblno = tMblno;
+    }
+
+    public String gettMblno() {
+        return tMblno;
+    }
+
+    public void setfAmtdr(BigDecimal fAmtdr) {
+        this.fAmtdr = fAmtdr;
+    }
+
+    public BigDecimal getfAmtdr() {
+        return fAmtdr;
+    }
+
+    public void setfAmtcr(BigDecimal fAmtcr) {
+        this.fAmtcr = fAmtcr;
+    }
+
+    public BigDecimal getfAmtcr() {
+        return fAmtcr;
+    }
+
+    public void setfBilltype(String fBilltype) {
+        this.fBilltype = fBilltype;
+    }
+
+    public String getfBilltype() {
+        return fBilltype;
+    }
+
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfRemarks(String fRemarks) {
+        this.fRemarks = fRemarks;
+    }
+
+    public String getfRemarks() {
+        return fRemarks;
+    }
+
+    public void setfAccbilldate(Date fAccbilldate) {
+        this.fAccbilldate = fAccbilldate;
+    }
+
+    public Date getfAccbilldate() {
+        return fAccbilldate;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setfDeptid(Long fDeptid) {
+        this.fDeptid = fDeptid;
+    }
+
+    public Long getfDeptid() {
+        return fDeptid;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("fId", getfId())
+                .append("fBillno", getfBillno())
+                .append("fCtrlcorpid", getfCtrlcorpid())
+                .append("fCorpid", getfCorpid())
+                .append("tMblno", gettMblno())
+                .append("fAmtdr", getfAmtdr())
+                .append("fAmtcr", getfAmtcr())
+                .append("fBilltype", getfBilltype())
+                .append("fBillstatus", getfBillstatus())
+                .append("fRemarks", getfRemarks())
+                .append("fAccbilldate", getfAccbilldate())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("fDeptid", getfDeptid())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 191 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TFeeDo.java

@@ -0,0 +1,191 @@
+package com.ruoyi.finance.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 财务数据明细对象 t_fee_do
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+public class TFeeDo extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private Long fId;
+
+    /**
+     * 父级id
+     */
+    @Excel(name = "父级id")
+    private Long fPid;
+
+    /**
+     * 行号
+     */
+    @Excel(name = "行号")
+    private Long fLineno;
+
+    /**
+     * 来源id
+     */
+    @Excel(name = "来源id")
+    private Long fSrcid;
+
+    /**
+     * 来源行号
+     */
+    @Excel(name = "来源行号")
+    private Long fSrclineno;
+
+    /**
+     * 收、付
+     */
+    @Excel(name = "收、付")
+    private String fSrcdc;
+
+    /**
+     * 费用名称()
+     */
+    @Excel(name = "费用名称()")
+    private Long fFeeid;
+
+    /**
+     * 原始金额
+     */
+    @Excel(name = "原始金额")
+    private BigDecimal fAmtdr;
+
+    /**
+     * 本次金额
+     */
+    @Excel(name = "本次金额")
+    private BigDecimal fAmt;
+
+    /**
+     * 状态(默认 T ,正常T 停用F 下拉选择)
+     */
+    @Excel(name = "状态(默认 T ,正常T 停用F 下拉选择)")
+    private String fStatus;
+
+    /**
+     * 删除状态
+     */
+    private String delFlag;
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfPid(Long fPid) {
+        this.fPid = fPid;
+    }
+
+    public Long getfPid() {
+        return fPid;
+    }
+
+    public void setfLineno(Long fLineno) {
+        this.fLineno = fLineno;
+    }
+
+    public Long getfLineno() {
+        return fLineno;
+    }
+
+    public void setfSrcid(Long fSrcid) {
+        this.fSrcid = fSrcid;
+    }
+
+    public Long getfSrcid() {
+        return fSrcid;
+    }
+
+    public void setfSrclineno(Long fSrclineno) {
+        this.fSrclineno = fSrclineno;
+    }
+
+    public Long getfSrclineno() {
+        return fSrclineno;
+    }
+
+    public void setfSrcdc(String fSrcdc) {
+        this.fSrcdc = fSrcdc;
+    }
+
+    public String getfSrcdc() {
+        return fSrcdc;
+    }
+
+    public void setfFeeid(Long fFeeid) {
+        this.fFeeid = fFeeid;
+    }
+
+    public Long getfFeeid() {
+        return fFeeid;
+    }
+
+    public void setfAmtdr(BigDecimal fAmtdr) {
+        this.fAmtdr = fAmtdr;
+    }
+
+    public BigDecimal getfAmtdr() {
+        return fAmtdr;
+    }
+
+    public void setfAmt(BigDecimal fAmt) {
+        this.fAmt = fAmt;
+    }
+
+    public BigDecimal getfAmt() {
+        return fAmt;
+    }
+
+    public void setfStatus(String fStatus) {
+        this.fStatus = fStatus;
+    }
+
+    public String getfStatus() {
+        return fStatus;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("fId", getfId())
+                .append("fPid", getfPid())
+                .append("fLineno", getfLineno())
+                .append("fSrcid", getfSrcid())
+                .append("fSrclineno", getfSrclineno())
+                .append("fSrcdc", getfSrcdc())
+                .append("fFeeid", getfFeeid())
+                .append("fAmtdr", getfAmtdr())
+                .append("fAmt", getfAmt())
+                .append("fStatus", getfStatus())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/mapper/TFeeDoMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.warehouse.mapper;
+
+import com.ruoyi.finance.domain.TFeeDo;
+
+import java.util.List;
+
+/**
+ * 财务数据明细Mapper接口
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+public interface TFeeDoMapper {
+    /**
+     * 查询财务数据明细
+     *
+     * @param fId 财务数据明细ID
+     * @return 财务数据明细
+     */
+    public TFeeDo selectTFeeDoById(Long fId);
+
+    /**
+     * 查询财务数据明细列表
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 财务数据明细集合
+     */
+    public List<TFeeDo> selectTFeeDoList(TFeeDo tFeeDo);
+
+    /**
+     * 新增财务数据明细
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 结果
+     */
+    public int insertTFeeDo(TFeeDo tFeeDo);
+
+    /**
+     * 修改财务数据明细
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 结果
+     */
+    public int updateTFeeDo(TFeeDo tFeeDo);
+
+    /**
+     * 删除财务数据明细
+     *
+     * @param fId 财务数据明细ID
+     * @return 结果
+     */
+    public int deleteTFeeDoById(Long fId);
+
+    /**
+     * 批量删除财务数据明细
+     *
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTFeeDoByIds(Long[] fIds);
+}

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/mapper/TFeeMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.warehouse.mapper;
+
+import com.ruoyi.finance.domain.TFee;
+
+import java.util.List;
+
+/**
+ * 财务数据主Mapper接口
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+public interface TFeeMapper {
+    /**
+     * 查询财务数据主
+     *
+     * @param fId 财务数据主ID
+     * @return 财务数据主
+     */
+    public TFee selectTFeeById(Long fId);
+
+    /**
+     * 查询财务数据主列表
+     *
+     * @param tFee 财务数据主
+     * @return 财务数据主集合
+     */
+    public List<TFee> selectTFeeList(TFee tFee);
+
+    /**
+     * 新增财务数据主
+     *
+     * @param tFee 财务数据主
+     * @return 结果
+     */
+    public int insertTFee(TFee tFee);
+
+    /**
+     * 修改财务数据主
+     *
+     * @param tFee 财务数据主
+     * @return 结果
+     */
+    public int updateTFee(TFee tFee);
+
+    /**
+     * 删除财务数据主
+     *
+     * @param fId 财务数据主ID
+     * @return 结果
+     */
+    public int deleteTFeeById(Long fId);
+
+    /**
+     * 批量删除财务数据主
+     *
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTFeeByIds(Long[] fIds);
+}

+ 62 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/ITFeeDoService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.finance.service;
+
+import com.ruoyi.finance.domain.TFeeDo;
+
+import java.util.List;
+
+
+/**
+ * 财务数据明细Service接口
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+public interface ITFeeDoService {
+    /**
+     * 查询财务数据明细
+     *
+     * @param fId 财务数据明细ID
+     * @return 财务数据明细
+     */
+    public TFeeDo selectTFeeDoById(Long fId);
+
+    /**
+     * 查询财务数据明细列表
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 财务数据明细集合
+     */
+    public List<TFeeDo> selectTFeeDoList(TFeeDo tFeeDo);
+
+    /**
+     * 新增财务数据明细
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 结果
+     */
+    public int insertTFeeDo(TFeeDo tFeeDo);
+
+    /**
+     * 修改财务数据明细
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 结果
+     */
+    public int updateTFeeDo(TFeeDo tFeeDo);
+
+    /**
+     * 批量删除财务数据明细
+     *
+     * @param fIds 需要删除的财务数据明细ID
+     * @return 结果
+     */
+    public int deleteTFeeDoByIds(Long[] fIds);
+
+    /**
+     * 删除财务数据明细信息
+     *
+     * @param fId 财务数据明细ID
+     * @return 结果
+     */
+    public int deleteTFeeDoById(Long fId);
+}

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/ITFeeService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.finance.service;
+
+import com.ruoyi.finance.domain.TFee;
+
+import java.util.List;
+
+/**
+ * 财务数据主Service接口
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+public interface ITFeeService {
+    /**
+     * 查询财务数据主
+     *
+     * @param fId 财务数据主ID
+     * @return 财务数据主
+     */
+    public TFee selectTFeeById(Long fId);
+
+    /**
+     * 查询财务数据主列表
+     *
+     * @param tFee 财务数据主
+     * @return 财务数据主集合
+     */
+    public List<TFee> selectTFeeList(TFee tFee);
+
+    /**
+     * 新增财务数据主
+     *
+     * @param tFee 财务数据主
+     * @return 结果
+     */
+    public int insertTFee(TFee tFee);
+
+    /**
+     * 修改财务数据主
+     *
+     * @param tFee 财务数据主
+     * @return 结果
+     */
+    public int updateTFee(TFee tFee);
+
+    /**
+     * 批量删除财务数据主
+     *
+     * @param fIds 需要删除的财务数据主ID
+     * @return 结果
+     */
+    public int deleteTFeeByIds(Long[] fIds);
+
+    /**
+     * 删除财务数据主信息
+     *
+     * @param fId 财务数据主ID
+     * @return 结果
+     */
+    public int deleteTFeeById(Long fId);
+}

+ 90 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeDoServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruoyi.finance.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.finance.domain.TFeeDo;
+import com.ruoyi.finance.service.ITFeeDoService;
+import com.ruoyi.warehouse.mapper.TFeeDoMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 财务数据明细Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+@Service
+public class TFeeDoServiceImpl implements ITFeeDoService {
+    @Autowired
+    private TFeeDoMapper tFeeDoMapper;
+
+    /**
+     * 查询财务数据明细
+     *
+     * @param fId 财务数据明细ID
+     * @return 财务数据明细
+     */
+    @Override
+    public TFeeDo selectTFeeDoById(Long fId) {
+        return tFeeDoMapper.selectTFeeDoById(fId);
+    }
+
+    /**
+     * 查询财务数据明细列表
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 财务数据明细
+     */
+    @Override
+    public List<TFeeDo> selectTFeeDoList(TFeeDo tFeeDo) {
+        return tFeeDoMapper.selectTFeeDoList(tFeeDo);
+    }
+
+    /**
+     * 新增财务数据明细
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 结果
+     */
+    @Override
+    public int insertTFeeDo(TFeeDo tFeeDo) {
+        tFeeDo.setCreateTime(DateUtils.getNowDate());
+        return tFeeDoMapper.insertTFeeDo(tFeeDo);
+    }
+
+    /**
+     * 修改财务数据明细
+     *
+     * @param tFeeDo 财务数据明细
+     * @return 结果
+     */
+    @Override
+    public int updateTFeeDo(TFeeDo tFeeDo) {
+        tFeeDo.setUpdateTime(DateUtils.getNowDate());
+        return tFeeDoMapper.updateTFeeDo(tFeeDo);
+    }
+
+    /**
+     * 批量删除财务数据明细
+     *
+     * @param fIds 需要删除的财务数据明细ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTFeeDoByIds(Long[] fIds) {
+        return tFeeDoMapper.deleteTFeeDoByIds(fIds);
+    }
+
+    /**
+     * 删除财务数据明细信息
+     *
+     * @param fId 财务数据明细ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTFeeDoById(Long fId) {
+        return tFeeDoMapper.deleteTFeeDoById(fId);
+    }
+}

+ 90 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -0,0 +1,90 @@
+package com.ruoyi.finance.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.finance.domain.TFee;
+import com.ruoyi.finance.service.ITFeeService;
+import com.ruoyi.warehouse.mapper.TFeeMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 财务数据主Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+@Service
+public class TFeeServiceImpl implements ITFeeService {
+    @Autowired
+    private TFeeMapper tFeeMapper;
+
+    /**
+     * 查询财务数据主
+     *
+     * @param fId 财务数据主ID
+     * @return 财务数据主
+     */
+    @Override
+    public TFee selectTFeeById(Long fId) {
+        return tFeeMapper.selectTFeeById(fId);
+    }
+
+    /**
+     * 查询财务数据主列表
+     *
+     * @param tFee 财务数据主
+     * @return 财务数据主
+     */
+    @Override
+    public List<TFee> selectTFeeList(TFee tFee) {
+        return tFeeMapper.selectTFeeList(tFee);
+    }
+
+    /**
+     * 新增财务数据主
+     *
+     * @param tFee 财务数据主
+     * @return 结果
+     */
+    @Override
+    public int insertTFee(TFee tFee) {
+        tFee.setCreateTime(DateUtils.getNowDate());
+        return tFeeMapper.insertTFee(tFee);
+    }
+
+    /**
+     * 修改财务数据主
+     *
+     * @param tFee 财务数据主
+     * @return 结果
+     */
+    @Override
+    public int updateTFee(TFee tFee) {
+        tFee.setUpdateTime(DateUtils.getNowDate());
+        return tFeeMapper.updateTFee(tFee);
+    }
+
+    /**
+     * 批量删除财务数据主
+     *
+     * @param fIds 需要删除的财务数据主ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTFeeByIds(Long[] fIds) {
+        return tFeeMapper.deleteTFeeByIds(fIds);
+    }
+
+    /**
+     * 删除财务数据主信息
+     *
+     * @param fId 财务数据主ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTFeeById(Long fId) {
+        return tFeeMapper.deleteTFeeById(fId);
+    }
+}

+ 119 - 0
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeDoMapper.xml

@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.warehouse.mapper.TFeeDoMapper">
+
+    <resultMap type="TFeeDo" id="TFeeDoResult">
+        <result property="fId" column="f_id"/>
+        <result property="fPid" column="f_pid"/>
+        <result property="fLineno" column="f_lineno"/>
+        <result property="fSrcid" column="f_srcid"/>
+        <result property="fSrclineno" column="f_srclineno"/>
+        <result property="fSrcdc" column="f_srcdc"/>
+        <result property="fFeeid" column="f_feeid"/>
+        <result property="fAmtdr" column="f_amtdr"/>
+        <result property="fAmt" column="f_amt"/>
+        <result property="fStatus" column="f_status"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectTFeeDoVo">
+        select f_id, f_pid, f_lineno, f_srcid, f_srclineno, f_srcdc, f_feeid, f_amtdr, f_amt, f_status, del_flag, create_by, create_time, update_by, update_time from t_fee_do
+    </sql>
+
+    <select id="selectTFeeDoList" parameterType="TFeeDo" resultMap="TFeeDoResult">
+        <include refid="selectTFeeDoVo"/>
+        <where>
+            <if test="fPid != null ">and f_pid = #{fPid}</if>
+            <if test="fLineno != null ">and f_lineno = #{fLineno}</if>
+            <if test="fSrcid != null ">and f_srcid = #{fSrcid}</if>
+            <if test="fSrclineno != null ">and f_srclineno = #{fSrclineno}</if>
+            <if test="fSrcdc != null  and fSrcdc != ''">and f_srcdc = #{fSrcdc}</if>
+            <if test="fFeeid != null ">and f_feeid = #{fFeeid}</if>
+            <if test="fAmtdr != null ">and f_amtdr = #{fAmtdr}</if>
+            <if test="fAmt != null ">and f_amt = #{fAmt}</if>
+            <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
+        </where>
+    </select>
+
+    <select id="selectTFeeDoById" parameterType="Long" resultMap="TFeeDoResult">
+        <include refid="selectTFeeDoVo"/>
+        where f_id = #{fId}
+    </select>
+
+    <insert id="insertTFeeDo" parameterType="TFeeDo">
+        insert into t_fee_do
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fId != null">f_id,</if>
+            <if test="fPid != null">f_pid,</if>
+            <if test="fLineno != null">f_lineno,</if>
+            <if test="fSrcid != null">f_srcid,</if>
+            <if test="fSrclineno != null">f_srclineno,</if>
+            <if test="fSrcdc != null">f_srcdc,</if>
+            <if test="fFeeid != null">f_feeid,</if>
+            <if test="fAmtdr != null">f_amtdr,</if>
+            <if test="fAmt != null">f_amt,</if>
+            <if test="fStatus != null">f_status,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fId != null">#{fId},</if>
+            <if test="fPid != null">#{fPid},</if>
+            <if test="fLineno != null">#{fLineno},</if>
+            <if test="fSrcid != null">#{fSrcid},</if>
+            <if test="fSrclineno != null">#{fSrclineno},</if>
+            <if test="fSrcdc != null">#{fSrcdc},</if>
+            <if test="fFeeid != null">#{fFeeid},</if>
+            <if test="fAmtdr != null">#{fAmtdr},</if>
+            <if test="fAmt != null">#{fAmt},</if>
+            <if test="fStatus != null">#{fStatus},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTFeeDo" parameterType="TFeeDo">
+        update t_fee_do
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fPid != null">f_pid = #{fPid},</if>
+            <if test="fLineno != null">f_lineno = #{fLineno},</if>
+            <if test="fSrcid != null">f_srcid = #{fSrcid},</if>
+            <if test="fSrclineno != null">f_srclineno = #{fSrclineno},</if>
+            <if test="fSrcdc != null">f_srcdc = #{fSrcdc},</if>
+            <if test="fFeeid != null">f_feeid = #{fFeeid},</if>
+            <if test="fAmtdr != null">f_amtdr = #{fAmtdr},</if>
+            <if test="fAmt != null">f_amt = #{fAmt},</if>
+            <if test="fStatus != null">f_status = #{fStatus},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTFeeDoById" parameterType="Long">
+        delete from t_fee_do where f_id = #{fId}
+    </delete>
+
+    <delete id="deleteTFeeDoByIds" parameterType="String">
+        delete from t_fee_do where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+
+</mapper>

+ 129 - 0
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.warehouse.mapper.TFeeMapper">
+
+    <resultMap type="TFee" id="TFeeResult">
+        <result property="fId" column="f_id"/>
+        <result property="fBillno" column="f_billno"/>
+        <result property="fCtrlcorpid" column="f_ctrlcorpid"/>
+        <result property="fCorpid" column="f_corpid"/>
+        <result property="tMblno" column="t_mblno"/>
+        <result property="fAmtdr" column="f_amtdr"/>
+        <result property="fAmtcr" column="f_amtcr"/>
+        <result property="fBilltype" column="f_billtype"/>
+        <result property="fBillstatus" column="f_billstatus"/>
+        <result property="fRemarks" column="f_remarks"/>
+        <result property="fAccbilldate" column="f_accbilldate"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="fDeptid" column="f_deptid"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectTFeeVo">
+        select f_id, f_billno, f_ctrlcorpid, f_corpid, t_mblno, f_amtdr, f_amtcr, f_billtype, f_billstatus, f_remarks, f_accbilldate, del_flag, create_by, f_deptid, create_time, update_by, update_time from t_fee
+    </sql>
+
+    <select id="selectTFeeList" parameterType="TFee" resultMap="TFeeResult">
+        <include refid="selectTFeeVo"/>
+        <where>
+            <if test="fBillno != null  and fBillno != ''">and f_billno = #{fBillno}</if>
+            <if test="fCtrlcorpid != null ">and f_ctrlcorpid = #{fCtrlcorpid}</if>
+            <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
+            <if test="tMblno != null  and tMblno != ''">and t_mblno = #{tMblno}</if>
+            <if test="fAmtdr != null ">and f_amtdr = #{fAmtdr}</if>
+            <if test="fAmtcr != null ">and f_amtcr = #{fAmtcr}</if>
+            <if test="fBilltype != null  and fBilltype != ''">and f_billtype = #{fBilltype}</if>
+            <if test="fBillstatus != null  and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
+            <if test="fRemarks != null  and fRemarks != ''">and f_remarks = #{fRemarks}</if>
+            <if test="fAccbilldate != null ">and f_accbilldate = #{fAccbilldate}</if>
+            <if test="fDeptid != null ">and f_deptid = #{fDeptid}</if>
+        </where>
+    </select>
+
+    <select id="selectTFeeById" parameterType="Long" resultMap="TFeeResult">
+        <include refid="selectTFeeVo"/>
+        where f_id = #{fId}
+    </select>
+
+    <insert id="insertTFee" parameterType="TFee">
+        insert into t_fee
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fId != null">f_id,</if>
+            <if test="fBillno != null">f_billno,</if>
+            <if test="fCtrlcorpid != null">f_ctrlcorpid,</if>
+            <if test="fCorpid != null">f_corpid,</if>
+            <if test="tMblno != null">t_mblno,</if>
+            <if test="fAmtdr != null">f_amtdr,</if>
+            <if test="fAmtcr != null">f_amtcr,</if>
+            <if test="fBilltype != null and fBilltype != ''">f_billtype,</if>
+            <if test="fBillstatus != null and fBillstatus != ''">f_billstatus,</if>
+            <if test="fRemarks != null">f_remarks,</if>
+            <if test="fAccbilldate != null">f_accbilldate,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="fDeptid != null">f_deptid,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fId != null">#{fId},</if>
+            <if test="fBillno != null">#{fBillno},</if>
+            <if test="fCtrlcorpid != null">#{fCtrlcorpid},</if>
+            <if test="fCorpid != null">#{fCorpid},</if>
+            <if test="tMblno != null">#{tMblno},</if>
+            <if test="fAmtdr != null">#{fAmtdr},</if>
+            <if test="fAmtcr != null">#{fAmtcr},</if>
+            <if test="fBilltype != null and fBilltype != ''">#{fBilltype},</if>
+            <if test="fBillstatus != null and fBillstatus != ''">#{fBillstatus},</if>
+            <if test="fRemarks != null">#{fRemarks},</if>
+            <if test="fAccbilldate != null">#{fAccbilldate},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="fDeptid != null">#{fDeptid},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTFee" parameterType="TFee">
+        update t_fee
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fBillno != null">f_billno = #{fBillno},</if>
+            <if test="fCtrlcorpid != null">f_ctrlcorpid = #{fCtrlcorpid},</if>
+            <if test="fCorpid != null">f_corpid = #{fCorpid},</if>
+            <if test="tMblno != null">t_mblno = #{tMblno},</if>
+            <if test="fAmtdr != null">f_amtdr = #{fAmtdr},</if>
+            <if test="fAmtcr != null">f_amtcr = #{fAmtcr},</if>
+            <if test="fBilltype != null and fBilltype != ''">f_billtype = #{fBilltype},</if>
+            <if test="fBillstatus != null and fBillstatus != ''">f_billstatus = #{fBillstatus},</if>
+            <if test="fRemarks != null">f_remarks = #{fRemarks},</if>
+            <if test="fAccbilldate != null">f_accbilldate = #{fAccbilldate},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="fDeptid != null">f_deptid = #{fDeptid},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTFeeById" parameterType="Long">
+        delete from t_fee where f_id = #{fId}
+    </delete>
+
+    <delete id="deleteTFeeByIds" parameterType="String">
+        delete from t_fee where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+
+</mapper>