diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java new file mode 100644 index 00000000..4b37c6ef --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java @@ -0,0 +1,151 @@ +package com.ruoyi.financial.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.financial.domain.FinacialExpense; +import com.ruoyi.financial.service.IFinacialExpenseService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 报销管理Controller + * + * @author zhang + * @date 2024-05-31 + */ +@Controller +@RequestMapping("/financial/expense") +public class FinacialExpenseController extends BaseController +{ + private String prefix = "financial/expense"; + + @Autowired + private IFinacialExpenseService finacialExpenseService; + + @RequiresPermissions("financial:expense:view") + @GetMapping() + public String expense() + { + return prefix + "/expense"; + } + + /** + * 查询报销管理列表 + */ + @RequiresPermissions("financial:expense:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(FinacialExpense finacialExpense) + { + startPage(); + List list = finacialExpenseService.selectFinacialExpenseList(finacialExpense); + return getDataTable(list); + } + + /** + * 导出报销管理列表 + */ + @RequiresPermissions("financial:expense:export") + @Log(title = "报销管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(FinacialExpense finacialExpense) + { + List list = finacialExpenseService.selectFinacialExpenseList(finacialExpense); + ExcelUtil util = new ExcelUtil(FinacialExpense.class); + return util.exportExcel(list, "报销管理数据"); + } + + /** + * 新增报销管理 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存报销管理 + */ + @RequiresPermissions("financial:expense:add") + @Log(title = "报销管理", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(FinacialExpense finacialExpense) + { + return toAjax(finacialExpenseService.insertFinacialExpense(finacialExpense)); + } + + /** + * 修改报销管理 + */ + @GetMapping("/edit/{expenseId}") + public String edit(@PathVariable("expenseId") Long expenseId, ModelMap mmap) + { + FinacialExpense finacialExpense = finacialExpenseService.selectFinacialExpenseById(expenseId); + mmap.put("finacialExpense", finacialExpense); + return prefix + "/edit"; + } + + /** + * 修改保存报销管理 + */ + @RequiresPermissions("financial:expense:edit") + @Log(title = "报销管理", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(FinacialExpense finacialExpense) + { + return toAjax(finacialExpenseService.updateFinacialExpense(finacialExpense)); + } + + /** + * 删除报销管理 + */ + @RequiresPermissions("financial:expense:remove") + @Log(title = "报销管理", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(finacialExpenseService.deleteFinacialExpenseByIds(ids)); + } + + /** + * 作废报销管理 + */ + @RequiresPermissions("financial:expense:cancel") + @Log(title = "报销管理", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(finacialExpenseService.cancelFinacialExpenseById(id)); + } + + /** + * 恢复报销管理 + */ + @RequiresPermissions("financial:expense:restore") + @Log(title = "报销管理", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(finacialExpenseService.restoreFinacialExpenseById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinacialExpense.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinacialExpense.java new file mode 100644 index 00000000..105f366d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinacialExpense.java @@ -0,0 +1,265 @@ +package com.ruoyi.financial.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 报销管理对象 finacial_expense + * + * @author zhang + * @date 2024-05-31 + */ +public class FinacialExpense extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 报销单索引id */ + private Long expenseId; + + /** 上级审核状态 */ + @Excel(name = "上级审核状态") + private String auditStatus; + + /** 总经理审核状态 */ + @Excel(name = "总经理审核状态") + private String managerAuditStatus; + + /** 财务审核状态 */ + @Excel(name = "财务审核状态") + private String financeAuditStatus; + + /** 报销单编号 */ + @Excel(name = "报销单编号") + private String expenseCode; + + /** 部门 */ + @Excel(name = "部门") + private String deptName; + + /** 岗位 */ + @Excel(name = "岗位") + private String postName; + + /** 姓名 */ + @Excel(name = "姓名") + private String fullName; + + /** 报销方式 */ + @Excel(name = "报销方式") + private String expenseMethod; + + /** 是否是委外/采购采销 */ + @Excel(name = "是否是委外/采购采销") + private String isPurchaseOutsource; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private String supplierCode; + + /** 对公收款方 */ + @Excel(name = "对公收款方") + private String corporatePayee; + + /** 对公收款账户 */ + @Excel(name = "对公收款账户") + private String corporateReceivingAccount; + + /** 对公开户行 */ + @Excel(name = "对公开户行") + private String publicAccountBanks; + + /** 申请人 */ + @Excel(name = "申请人") + private String applyUser; + + /** 使用状态 */ + @Excel(name = "使用状态") + private String useStatus; + + /** 删除标志 */ + private String delFlag; + + public void setExpenseId(Long expenseId) + { + this.expenseId = expenseId; + } + + public Long getExpenseId() + { + return expenseId; + } + public void setAuditStatus(String auditStatus) + { + this.auditStatus = auditStatus; + } + + public String getAuditStatus() + { + return auditStatus; + } + public void setManagerAuditStatus(String managerAuditStatus) + { + this.managerAuditStatus = managerAuditStatus; + } + + public String getManagerAuditStatus() + { + return managerAuditStatus; + } + public void setFinanceAuditStatus(String financeAuditStatus) + { + this.financeAuditStatus = financeAuditStatus; + } + + public String getFinanceAuditStatus() + { + return financeAuditStatus; + } + public void setExpenseCode(String expenseCode) + { + this.expenseCode = expenseCode; + } + + public String getExpenseCode() + { + return expenseCode; + } + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getDeptName() + { + return deptName; + } + public void setPostName(String postName) + { + this.postName = postName; + } + + public String getPostName() + { + return postName; + } + public void setFullName(String fullName) + { + this.fullName = fullName; + } + + public String getFullName() + { + return fullName; + } + public void setExpenseMethod(String expenseMethod) + { + this.expenseMethod = expenseMethod; + } + + public String getExpenseMethod() + { + return expenseMethod; + } + public void setIsPurchaseOutsource(String isPurchaseOutsource) + { + this.isPurchaseOutsource = isPurchaseOutsource; + } + + public String getIsPurchaseOutsource() + { + return isPurchaseOutsource; + } + public void setSupplierCode(String supplierCode) + { + this.supplierCode = supplierCode; + } + + public String getSupplierCode() + { + return supplierCode; + } + public void setCorporatePayee(String corporatePayee) + { + this.corporatePayee = corporatePayee; + } + + public String getCorporatePayee() + { + return corporatePayee; + } + public void setCorporateReceivingAccount(String corporateReceivingAccount) + { + this.corporateReceivingAccount = corporateReceivingAccount; + } + + public String getCorporateReceivingAccount() + { + return corporateReceivingAccount; + } + public void setPublicAccountBanks(String publicAccountBanks) + { + this.publicAccountBanks = publicAccountBanks; + } + + public String getPublicAccountBanks() + { + return publicAccountBanks; + } + public void setApplyUser(String applyUser) + { + this.applyUser = applyUser; + } + + public String getApplyUser() + { + return applyUser; + } + public void setUseStatus(String useStatus) + { + this.useStatus = useStatus; + } + + public String getUseStatus() + { + return useStatus; + } + 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("expenseId", getExpenseId()) + .append("auditStatus", getAuditStatus()) + .append("managerAuditStatus", getManagerAuditStatus()) + .append("financeAuditStatus", getFinanceAuditStatus()) + .append("expenseCode", getExpenseCode()) + .append("deptName", getDeptName()) + .append("postName", getPostName()) + .append("fullName", getFullName()) + .append("expenseMethod", getExpenseMethod()) + .append("isPurchaseOutsource", getIsPurchaseOutsource()) + .append("supplierCode", getSupplierCode()) + .append("corporatePayee", getCorporatePayee()) + .append("corporateReceivingAccount", getCorporateReceivingAccount()) + .append("publicAccountBanks", getPublicAccountBanks()) + .append("applyUser", getApplyUser()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("useStatus", getUseStatus()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinacialExpenseMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinacialExpenseMapper.java new file mode 100644 index 00000000..143db6ce --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinacialExpenseMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.financial.mapper; + +import java.util.List; +import com.ruoyi.financial.domain.FinacialExpense; + +/** + * 报销管理Mapper接口 + * + * @author zhang + * @date 2024-05-31 + */ +public interface FinacialExpenseMapper +{ + /** + * 查询报销管理 + * + * @param expenseId 报销管理ID + * @return 报销管理 + */ + public FinacialExpense selectFinacialExpenseById(Long expenseId); + + /** + * 查询报销管理列表 + * + * @param finacialExpense 报销管理 + * @return 报销管理集合 + */ + public List selectFinacialExpenseList(FinacialExpense finacialExpense); + + /** + * 新增报销管理 + * + * @param finacialExpense 报销管理 + * @return 结果 + */ + public int insertFinacialExpense(FinacialExpense finacialExpense); + + /** + * 修改报销管理 + * + * @param finacialExpense 报销管理 + * @return 结果 + */ + public int updateFinacialExpense(FinacialExpense finacialExpense); + + /** + * 删除报销管理 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + public int deleteFinacialExpenseById(Long expenseId); + + /** + * 批量删除报销管理 + * + * @param expenseIds 需要删除的数据ID + * @return 结果 + */ + public int deleteFinacialExpenseByIds(String[] expenseIds); + + /** + * 作废报销管理 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + public int cancelFinacialExpenseById(Long expenseId); + + /** + * 恢复报销管理 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + public int restoreFinacialExpenseById(Long expenseId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinacialExpenseService.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinacialExpenseService.java new file mode 100644 index 00000000..df18914d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinacialExpenseService.java @@ -0,0 +1,75 @@ +package com.ruoyi.financial.service; + +import java.util.List; +import com.ruoyi.financial.domain.FinacialExpense; + +/** + * 报销管理Service接口 + * + * @author zhang + * @date 2024-05-31 + */ +public interface IFinacialExpenseService +{ + /** + * 查询报销管理 + * + * @param expenseId 报销管理ID + * @return 报销管理 + */ + public FinacialExpense selectFinacialExpenseById(Long expenseId); + + /** + * 查询报销管理列表 + * + * @param finacialExpense 报销管理 + * @return 报销管理集合 + */ + public List selectFinacialExpenseList(FinacialExpense finacialExpense); + + /** + * 新增报销管理 + * + * @param finacialExpense 报销管理 + * @return 结果 + */ + public int insertFinacialExpense(FinacialExpense finacialExpense); + + /** + * 修改报销管理 + * + * @param finacialExpense 报销管理 + * @return 结果 + */ + public int updateFinacialExpense(FinacialExpense finacialExpense); + + /** + * 批量删除报销管理 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteFinacialExpenseByIds(String ids); + + /** + * 删除报销管理信息 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + public int deleteFinacialExpenseById(Long expenseId); + + /** + * 作废报销管理 + * @param expenseId 报销管理ID + * @return + */ + int cancelFinacialExpenseById(Long expenseId); + + /** + * 恢复报销管理 + * @param expenseId 报销管理ID + * @return + */ + int restoreFinacialExpenseById(Long expenseId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinacialExpenseServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinacialExpenseServiceImpl.java new file mode 100644 index 00000000..13746c9d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinacialExpenseServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.financial.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.financial.mapper.FinacialExpenseMapper; +import com.ruoyi.financial.domain.FinacialExpense; +import com.ruoyi.financial.service.IFinacialExpenseService; +import com.ruoyi.common.core.text.Convert; + +/** + * 报销管理Service业务层处理 + * + * @author zhang + * @date 2024-05-31 + */ +@Service +public class FinacialExpenseServiceImpl implements IFinacialExpenseService +{ + @Autowired + private FinacialExpenseMapper finacialExpenseMapper; + + /** + * 查询报销管理 + * + * @param expenseId 报销管理ID + * @return 报销管理 + */ + @Override + public FinacialExpense selectFinacialExpenseById(Long expenseId) + { + return finacialExpenseMapper.selectFinacialExpenseById(expenseId); + } + + /** + * 查询报销管理列表 + * + * @param finacialExpense 报销管理 + * @return 报销管理 + */ + @Override + public List selectFinacialExpenseList(FinacialExpense finacialExpense) + { + return finacialExpenseMapper.selectFinacialExpenseList(finacialExpense); + } + + /** + * 新增报销管理 + * + * @param finacialExpense 报销管理 + * @return 结果 + */ + @Override + public int insertFinacialExpense(FinacialExpense finacialExpense) + { + String loginName = ShiroUtils.getLoginName(); + finacialExpense.setCreateBy(loginName); + finacialExpense.setCreateTime(DateUtils.getNowDate()); + return finacialExpenseMapper.insertFinacialExpense(finacialExpense); + } + + /** + * 修改报销管理 + * + * @param finacialExpense 报销管理 + * @return 结果 + */ + @Override + public int updateFinacialExpense(FinacialExpense finacialExpense) + { + String loginName = ShiroUtils.getLoginName(); + finacialExpense.setUpdateBy(loginName); + finacialExpense.setUpdateTime(DateUtils.getNowDate()); + return finacialExpenseMapper.updateFinacialExpense(finacialExpense); + } + + /** + * 删除报销管理对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteFinacialExpenseByIds(String ids) + { + return finacialExpenseMapper.deleteFinacialExpenseByIds(Convert.toStrArray(ids)); + } + + /** + * 删除报销管理信息 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + @Override + public int deleteFinacialExpenseById(Long expenseId) + { + return finacialExpenseMapper.deleteFinacialExpenseById(expenseId); + } + + /** + * 作废报销管理 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + @Override + public int cancelFinacialExpenseById(Long expenseId) + { + return finacialExpenseMapper.cancelFinacialExpenseById(expenseId); + } + + /** + * 恢复报销管理信息 + * + * @param expenseId 报销管理ID + * @return 结果 + */ + @Override + public int restoreFinacialExpenseById(Long expenseId) + { + return finacialExpenseMapper.restoreFinacialExpenseById(expenseId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/financial/FinacialExpenseMapper.xml b/ruoyi-admin/src/main/resources/mapper/financial/FinacialExpenseMapper.xml new file mode 100644 index 00000000..1ce92011 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/financial/FinacialExpenseMapper.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select expense_id, audit_status, manager_audit_status, finance_audit_status, expense_code, deptName, postName, fullName, expense_method, is_purchase_outsource, supplier_code, corporate_payee, corporate_receiving_account, public_account_banks, apply_user, create_by, create_time, update_by, update_time, remark, use_status, del_flag from finacial_expense + + + + + + + + insert into finacial_expense + + audit_status, + manager_audit_status, + finance_audit_status, + expense_code, + deptName, + postName, + fullName, + expense_method, + is_purchase_outsource, + supplier_code, + corporate_payee, + corporate_receiving_account, + public_account_banks, + apply_user, + create_by, + create_time, + update_by, + update_time, + remark, + use_status, + del_flag, + + + #{auditStatus}, + #{managerAuditStatus}, + #{financeAuditStatus}, + #{expenseCode}, + #{deptName}, + #{postName}, + #{fullName}, + #{expenseMethod}, + #{isPurchaseOutsource}, + #{supplierCode}, + #{corporatePayee}, + #{corporateReceivingAccount}, + #{publicAccountBanks}, + #{applyUser}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{useStatus}, + #{delFlag}, + + + + + update finacial_expense + + audit_status = #{auditStatus}, + manager_audit_status = #{managerAuditStatus}, + finance_audit_status = #{financeAuditStatus}, + expense_code = #{expenseCode}, + deptName = #{deptName}, + postName = #{postName}, + fullName = #{fullName}, + expense_method = #{expenseMethod}, + is_purchase_outsource = #{isPurchaseOutsource}, + supplier_code = #{supplierCode}, + corporate_payee = #{corporatePayee}, + corporate_receiving_account = #{corporateReceivingAccount}, + public_account_banks = #{publicAccountBanks}, + apply_user = #{applyUser}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + use_status = #{useStatus}, + del_flag = #{delFlag}, + + where expense_id = #{expenseId} + + + + delete from finacial_expense where expense_id = #{expenseId} + + + + delete from finacial_expense where expense_id in + + #{expenseId} + + + + + update finacial_expense set del_flag = '1' where expense_id = #{expenseId} + + + + update finacial_expense set del_flag = '0' where expense_id = #{expenseId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/expense/add.html b/ruoyi-admin/src/main/resources/templates/financial/expense/add.html new file mode 100644 index 00000000..63077c0c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/expense/add.html @@ -0,0 +1,310 @@ + + + + + + + + + +
+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ 报销分类信息 + + 添加报销 + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/expense/edit.html b/ruoyi-admin/src/main/resources/templates/financial/expense/edit.html new file mode 100644 index 00000000..6b32183c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/expense/edit.html @@ -0,0 +1,270 @@ + + + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ 报销分类信息 + + 添加报销 + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/expense/expense.html b/ruoyi-admin/src/main/resources/templates/financial/expense/expense.html new file mode 100644 index 00000000..6352c32c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/expense/expense.html @@ -0,0 +1,160 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/add.html index 8518276d..ea9fb8fd 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteChild/add.html @@ -32,15 +32,17 @@
-
- - 代码生成请选择字典属性 -
+
- +