diff --git a/snow-admin/src/main/java/com/snow/system/controller/SysFnAccountController.java b/snow-admin/src/main/java/com/snow/system/controller/SysFnAccountController.java index 2d2c120..3403831 100644 --- a/snow-admin/src/main/java/com/snow/system/controller/SysFnAccountController.java +++ b/snow-admin/src/main/java/com/snow/system/controller/SysFnAccountController.java @@ -36,8 +36,12 @@ public class SysFnAccountController extends BaseController @RequiresPermissions("system:account:view") @GetMapping() - public String account() + public String account(ModelMap mmap) { + SysFnAccount sysFnAccount=new SysFnAccount(); + sysFnAccount.setIsDelete(0); + List sysFnAccounts = sysFnAccountService.selectSysFnAccountList(sysFnAccount); + mmap.put("sysFnAccounts", sysFnAccounts); return prefix + "/account"; } @@ -129,6 +133,19 @@ public class SysFnAccountController extends BaseController return AjaxResult.success(sysFnAccountService.getSysFnAccountByNo(accountNo)); } + /** + * 跳转充值页面 + * @param id + * @param mmap + * @return + */ + @GetMapping("/rechargeAccount/{id}") + public String toRechargeAccount(@PathVariable("id") Long id, ModelMap mmap) + { + SysFnAccount sysFnAccount = sysFnAccountService.selectSysFnAccountById(id); + mmap.put("sysFnAccount", sysFnAccount); + return prefix + "/rechargeAccount"; + } /** * 账户充值 * @param rechargeAccountRequest diff --git a/snow-admin/src/main/java/com/snow/system/controller/SysFnPaymentController.java b/snow-admin/src/main/java/com/snow/system/controller/SysFnPaymentController.java new file mode 100644 index 0000000..bc6372b --- /dev/null +++ b/snow-admin/src/main/java/com/snow/system/controller/SysFnPaymentController.java @@ -0,0 +1,126 @@ +package com.snow.system.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +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.snow.common.annotation.Log; +import com.snow.common.enums.BusinessType; +import org.springframework.stereotype.Controller; +import com.snow.system.domain.SysFnPayment; +import com.snow.system.service.ISysFnPaymentService; +import com.snow.common.core.controller.BaseController; +import com.snow.common.core.domain.AjaxResult; +import com.snow.common.utils.poi.ExcelUtil; +import com.snow.common.core.page.TableDataInfo; + +/** + * 支付申请Controller + * + * @author Agee + * @date 2022-02-19 + */ +@Controller +@RequestMapping("/system/payment") +public class SysFnPaymentController extends BaseController +{ + private String prefix = "system/payment"; + + @Autowired + private ISysFnPaymentService sysFnPaymentService; + + @RequiresPermissions("system:payment:view") + @GetMapping() + public String payment() + { + return prefix + "/payment"; + } + + /** + * 查询支付申请列表 + */ + @RequiresPermissions("system:payment:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysFnPayment sysFnPayment) + { + startPage(); + List list = sysFnPaymentService.selectSysFnPaymentList(sysFnPayment); + return getDataTable(list); + } + + /** + * 导出支付申请列表 + */ + @RequiresPermissions("system:payment:export") + @Log(title = "支付申请", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysFnPayment sysFnPayment) + { + List list = sysFnPaymentService.selectSysFnPaymentList(sysFnPayment); + ExcelUtil util = new ExcelUtil(SysFnPayment.class); + return util.exportExcel(list, "payment"); + } + + /** + * 新增支付申请 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存支付申请 + */ + @RequiresPermissions("system:payment:add") + @Log(title = "支付申请", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysFnPayment sysFnPayment) + { + return toAjax(sysFnPaymentService.insertSysFnPayment(sysFnPayment)); + } + + /** + * 修改支付申请 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + SysFnPayment sysFnPayment = sysFnPaymentService.selectSysFnPaymentById(id); + mmap.put("sysFnPayment", sysFnPayment); + return prefix + "/edit"; + } + + /** + * 修改保存支付申请 + */ + @RequiresPermissions("system:payment:edit") + @Log(title = "支付申请", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysFnPayment sysFnPayment) + { + return toAjax(sysFnPaymentService.updateSysFnPayment(sysFnPayment)); + } + + /** + * 删除支付申请 + */ + @RequiresPermissions("system:payment:remove") + @Log(title = "支付申请", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysFnPaymentService.deleteSysFnPaymentByIds(ids)); + } +} diff --git a/snow-admin/src/main/java/com/snow/web/controller/system/PurchaseOrderController.java b/snow-admin/src/main/java/com/snow/web/controller/system/PurchaseOrderController.java index 73cd78a..6df49d4 100644 --- a/snow-admin/src/main/java/com/snow/web/controller/system/PurchaseOrderController.java +++ b/snow-admin/src/main/java/com/snow/web/controller/system/PurchaseOrderController.java @@ -11,6 +11,7 @@ import com.google.common.collect.Lists; import com.snow.common.annotation.RepeatSubmit; import com.snow.common.constant.SequenceConstants; import com.snow.common.utils.poi.EasyExcelUtil; +import com.snow.flowable.domain.purchaseOrder.PurchaseCashierTask; import com.snow.flowable.domain.purchaseOrder.PurchaseOrderForm; import com.snow.flowable.domain.purchaseOrder.PurchaseOrderMainTask; import com.snow.flowable.service.FlowableService; @@ -270,4 +271,23 @@ public class PurchaseOrderController extends BaseController return toAjax(i); } + + + /** + * 出纳审核 + */ + @PostMapping("/cashierTask") + @ResponseBody + @Transactional + @RepeatSubmit + public AjaxResult cashierTask(PurchaseCashierTask purchaseCashierTask) + { + SysUser sysUser = ShiroUtils.getSysUser(); + //完成任务 + purchaseCashierTask.setUserId(String.valueOf(sysUser.getUserId())); + purchaseCashierTask.setIsUpdateBus(true); + purchaseCashierTask.setIsStart(purchaseCashierTask.getIsPass()); + flowableTaskService.submitTask(purchaseCashierTask); + return AjaxResult.success(); + } } diff --git a/snow-admin/src/main/resources/static/css/style.css b/snow-admin/src/main/resources/static/css/style.css index 7dad868..b55e4c4 100644 --- a/snow-admin/src/main/resources/static/css/style.css +++ b/snow-admin/src/main/resources/static/css/style.css @@ -7680,3 +7680,31 @@ body.landing-page { z-index: 9998; margin: 0; } + +/* Payments */ +.payment-card { + background: #ffffff; + padding: 40px; + margin-bottom: 25px; + border: 1px solid #e7eaec; +} +.payment-icon-big { + font-size: 60px; + color: #f8ac59; +} +.payments-method.panel-group .panel + .panel { + margin-top: -1px; +} +.payments-method .panel-heading { + padding: 15px; +} +.payments-method .panel { + border-radius: 0; +} +.payments-method .panel-heading h5 { + margin-bottom: 5px; +} +.payments-method .panel-heading i { + font-size: 26px; +} + diff --git a/snow-admin/src/main/resources/static/modeler/styles/common/style.css b/snow-admin/src/main/resources/static/modeler/styles/common/style.css index 64209fd..6f84406 100644 --- a/snow-admin/src/main/resources/static/modeler/styles/common/style.css +++ b/snow-admin/src/main/resources/static/modeler/styles/common/style.css @@ -3279,4 +3279,3 @@ ul#strength > li:last-child { .noHeight { height:auto; } - diff --git a/snow-admin/src/main/resources/templates/system/account/account.html b/snow-admin/src/main/resources/templates/system/account/account.html index 30bfe52..0d9e5e4 100644 --- a/snow-admin/src/main/resources/templates/system/account/account.html +++ b/snow-admin/src/main/resources/templates/system/account/account.html @@ -3,241 +3,70 @@ - INSPINIA | E-commerce - - - - - - - - + - - -
- - -
- - + +
- - -
-
+
+
- -

- **** **** **** 1060 -

+

+ [[${accounts.accountName}]] +

+
+
+ + +
+
+ ¥[[${accounts.totalAmount}]] +
+
+ + +
+
+

+ 账户号 [[${accounts.accountNo}]] +

+
+
+

+ 充值 +

+
+
- Expiry date: 10/16 +
- Name: David Williams +
-
-
- -

- **** **** **** 7002 -

-
-
- - Expiry date: 10/16 - -
-
- - Name: Anna Smith - -
-
-
-
-
-
- -

- **** **** **** 3466 -

-
-
- - Expiry date: 10/16 - -
-
- - Name: Morgan Stanch - -
-
-
-
-
-
- -
- -
-
- Payment method -
-
- -
-
-
-
- -
-
- PayPal -
-
-
-
- -
-
-

Summary

- Product:: Name of product
- Price:: $452.90 - -

- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. - -

- - - Purchase via PayPal - - -
- -
- - -
-
-
-
-
-
- - - -
-
- Credit Card -
-
-
-
- -
-
-

Summary

- Product:: Name of product
- Price:: $452.90 - -

- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. - -

-

- Duis aute irure dolor - in reprehenderit in voluptate velit esse cillum dolore eu fugiat - nulla pariatur. Excepteur sint occaecat cupidatat. -

-
-
- -
-
-
-
- -
- - -
-
-
-
-
-
-
- - -
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
-
- -
-
-
- -
- -
- - - - - - -
-
-
-
- -
- -
- -
- -
- -
- - +
+ +
+
@@ -246,5 +75,61 @@ + diff --git a/snow-admin/src/main/resources/templates/system/account/account1.html b/snow-admin/src/main/resources/templates/system/account/account1.html deleted file mode 100644 index 80e3066..0000000 --- a/snow-admin/src/main/resources/templates/system/account/account1.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - -
- -
-
-
-
- -

- **** **** **** 1060 -

-
-
- - 到期日: 10/16 - -
-
- - 姓名: 小明 - -
-
-
-
-
-
- -

- **** **** **** 7002 -

-
-
- - 到期日: 10/16 - -
-
- - 姓名: 小明 - -
-
-
-
-
-
- -

- **** **** **** 3466 -

-
-
- - 到期日: 10/16 - -
-
- - 姓名: 小明 - -
-
-
-
-
- -
-
-
- -
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/snow-admin/src/main/resources/templates/system/account/add.html b/snow-admin/src/main/resources/templates/system/account/add.html index 128cee9..46cd11d 100644 --- a/snow-admin/src/main/resources/templates/system/account/add.html +++ b/snow-admin/src/main/resources/templates/system/account/add.html @@ -12,18 +12,6 @@
-
- -
- -
-
-
- -
- -
-
diff --git a/snow-admin/src/main/resources/templates/system/account/edit.html b/snow-admin/src/main/resources/templates/system/account/edit.html index 0820e1e..12e7384 100644 --- a/snow-admin/src/main/resources/templates/system/account/edit.html +++ b/snow-admin/src/main/resources/templates/system/account/edit.html @@ -10,7 +10,7 @@
- +
@@ -19,7 +19,7 @@
-
+
diff --git a/snow-admin/src/main/resources/templates/system/account/rechargeAccount.html b/snow-admin/src/main/resources/templates/system/account/rechargeAccount.html new file mode 100644 index 0000000..6c4dc3f --- /dev/null +++ b/snow-admin/src/main/resources/templates/system/account/rechargeAccount.html @@ -0,0 +1,91 @@ + + + + + + +
+
+ +
+
+
+
+
+ +
+
+
+
+

[[${sysFnAccount.accountName}]]

+ 总金额:: ¥[[${sysFnAccount.totalAmount}]]
+ 冻结金额:: ¥[[${sysFnAccount.freezeAmount}]] +

+ (1)DingFlow为您提供在线充值充值方式,充值为虚拟账户充值,充值成功后请及时核对账务流水; +

+

+ (2)每个公司可创建多个账户进行公司账务管理,DingFlow建议您只使用一个账户,多账户后续功能完善中; +

+

+ (3)账户只做账务管理,并未发生实际交易金额,请提前须知; +

+
+
+ +
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+
+
+ +
+ +
+ +
+ +
+
+ + + + \ No newline at end of file diff --git a/snow-admin/src/main/resources/templates/system/bill/bill.html b/snow-admin/src/main/resources/templates/system/bill/bill.html index a368937..1e36048 100644 --- a/snow-admin/src/main/resources/templates/system/bill/bill.html +++ b/snow-admin/src/main/resources/templates/system/bill/bill.html @@ -11,7 +11,7 @@
  • - +
  • @@ -78,7 +78,7 @@ }, { field: 'billNo', - title: '账户流水号' + title: '流水号' }, { field: 'accountNo', @@ -96,7 +96,7 @@ title: '流水金额' }, { - field: 'remark', + field: 'billRemark', title: '备注' }, { diff --git a/snow-admin/src/main/resources/templates/system/purchaseOrder/cashierCheckDetail.html b/snow-admin/src/main/resources/templates/system/purchaseOrder/cashierCheckDetail.html new file mode 100644 index 0000000..6bb3ec4 --- /dev/null +++ b/snow-admin/src/main/resources/templates/system/purchaseOrder/cashierCheckDetail.html @@ -0,0 +1,203 @@ + + + + + + + + + + + + + +
    + + + + +
    +

    采购单信息

    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +

    采购单明细

    +
    +
    +
    +
    +
    +
    +
    +
    +

    付款单信息

    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + + + + + + + \ No newline at end of file diff --git a/snow-common/src/main/java/com/snow/common/constant/SequenceConstants.java b/snow-common/src/main/java/com/snow/common/constant/SequenceConstants.java index 5a18cbc..36e5b0e 100644 --- a/snow-common/src/main/java/com/snow/common/constant/SequenceConstants.java +++ b/snow-common/src/main/java/com/snow/common/constant/SequenceConstants.java @@ -66,4 +66,9 @@ public class SequenceConstants { * 账户流水单 */ public static final String FN_ACCOUNT_BILL_NO="FN_LS"; + + /** + * 支付单号 + */ + public static final String FN_PAYMENT_NO="FN_ZF"; } diff --git a/snow-flowable/src/main/java/com/snow/flowable/domain/purchaseOrder/PurchaseCashierTask.java b/snow-flowable/src/main/java/com/snow/flowable/domain/purchaseOrder/PurchaseCashierTask.java new file mode 100644 index 0000000..3af9aed --- /dev/null +++ b/snow-flowable/src/main/java/com/snow/flowable/domain/purchaseOrder/PurchaseCashierTask.java @@ -0,0 +1,29 @@ +package com.snow.flowable.domain.purchaseOrder; + +import com.snow.flowable.domain.FinishTaskDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class PurchaseCashierTask extends FinishTaskDTO implements Serializable { + private static final long serialVersionUID = 8984271252520753970L; + + + /** + * 支付金额 + */ + private BigDecimal paymentPrice; + + /** 支付标题 */ + private String paymentTitle; + + + /** + * 备注 + */ + private String paymentRemark; + + +} diff --git a/snow-flowable/src/main/java/com/snow/flowable/listener/AbstractTaskListener.java b/snow-flowable/src/main/java/com/snow/flowable/listener/AbstractTaskListener.java index 262e179..2ea0ac4 100644 --- a/snow-flowable/src/main/java/com/snow/flowable/listener/AbstractTaskListener.java +++ b/snow-flowable/src/main/java/com/snow/flowable/listener/AbstractTaskListener.java @@ -1,7 +1,10 @@ package com.snow.flowable.listener; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.map.MapUtil; import com.snow.flowable.common.constants.FlowConstants; -import com.snow.flowable.domain.CompleteTaskDTO; +import com.snow.flowable.domain.FinishTaskDTO; import com.snow.flowable.service.FlowableService; import lombok.extern.slf4j.Slf4j; import org.flowable.engine.delegate.TaskListener; @@ -9,6 +12,8 @@ import org.flowable.engine.runtime.ProcessInstance; import org.flowable.task.service.delegate.DelegateTask; import org.springframework.beans.factory.annotation.Autowired; +import java.util.Map; + /** * @author qimingjin * @Title: @@ -16,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; * @date 2020/12/7 16:39 */ @Slf4j -public abstract class AbstractTaskListener implements TaskListener { +public abstract class AbstractTaskListener implements TaskListener { @Autowired private FlowableService flowableService; @@ -128,4 +133,8 @@ public abstract class AbstractTaskListener implements protected String getTaskName() { return getDelegateTask().getName(); } + + protected Map getTaskLocalParms(){ + return getDelegateTask().getVariablesLocal(); + } } diff --git a/snow-flowable/src/main/java/com/snow/flowable/listener/purchaseOrder/PurchaseCashierTaskListener.java b/snow-flowable/src/main/java/com/snow/flowable/listener/purchaseOrder/PurchaseCashierTaskListener.java new file mode 100644 index 0000000..671ec87 --- /dev/null +++ b/snow-flowable/src/main/java/com/snow/flowable/listener/purchaseOrder/PurchaseCashierTaskListener.java @@ -0,0 +1,48 @@ +package com.snow.flowable.listener.purchaseOrder; + +import cn.hutool.core.bean.BeanUtil; +import com.snow.flowable.domain.purchaseOrder.PurchaseCashierTask; +import com.snow.flowable.domain.purchaseOrder.PurchaseOrderForm; +import com.snow.flowable.listener.AbstractTaskListener; +import com.snow.flowable.service.AppFormService; +import com.snow.system.domain.SysFnPayment; +import com.snow.system.service.impl.SysFnPaymentServiceImpl; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.flowable.task.service.delegate.DelegateTask; +import org.springframework.stereotype.Service; + +/** + * 出纳制单节点 + */ +@Service("purchaseCashierTask") +@Slf4j +@RequiredArgsConstructor +public class PurchaseCashierTaskListener extends AbstractTaskListener { + private static final long serialVersionUID = -2370764741837973836L; + + private final SysFnPaymentServiceImpl sysFnPaymentService; + + private final AppFormService appFormService; + + @Override + protected void processTask() { + DelegateTask delegateTask = getDelegateTask(); + PurchaseOrderForm appForms=appFormService.getAppFromByExecutionId(delegateTask.getExecutionId()); + PurchaseCashierTask purchaseCashierTask = new PurchaseCashierTask(); + purchaseCashierTask= BeanUtil.fillBeanWithMap(getTaskLocalParms(),purchaseCashierTask, true); + //如果成功则生成支付单 + if(getApprovalResult()){ + String assignee = delegateTask.getAssignee(); + SysFnPayment sysFnPayment=new SysFnPayment(); + sysFnPayment.setOrderPrice(appForms.getTotalPrice()); + sysFnPayment.setPaymentTitle(purchaseCashierTask.getPaymentTitle()); + sysFnPayment.setPaymentPrice(purchaseCashierTask.getPaymentPrice()); + sysFnPayment.setPaymentRemark(purchaseCashierTask.getPaymentRemark()); + sysFnPayment.setRelateNo(appForms.getOrderNo()); + sysFnPayment.setRelateNoType(1L); + sysFnPayment.setPaymentUser(assignee); + sysFnPaymentService.insertSysFnPayment(sysFnPayment); + } + } +} diff --git a/snow-system/src/main/java/com/snow/system/domain/SysFnAccountBill.java b/snow-system/src/main/java/com/snow/system/domain/SysFnAccountBill.java index e9d1a17..c3bb11a 100644 --- a/snow-system/src/main/java/com/snow/system/domain/SysFnAccountBill.java +++ b/snow-system/src/main/java/com/snow/system/domain/SysFnAccountBill.java @@ -39,6 +39,9 @@ public class SysFnAccountBill extends BaseEntity @Excel(name = "流水金额") private BigDecimal billAmount; + @Excel(name = "备注") + private String billRemark; + /** 删除标识 */ private Integer isDelete; diff --git a/snow-system/src/main/java/com/snow/system/domain/SysFnPayment.java b/snow-system/src/main/java/com/snow/system/domain/SysFnPayment.java new file mode 100644 index 0000000..8922661 --- /dev/null +++ b/snow-system/src/main/java/com/snow/system/domain/SysFnPayment.java @@ -0,0 +1,76 @@ +package com.snow.system.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.snow.common.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.snow.common.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.IdType; +import lombok.Data; + +/** + * 支付申请对象 sys_fn_payment + * + * @author Agee + * @date 2022-02-19 + */ +@Data +public class SysFnPayment extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** 支付单号 */ + @Excel(name = "支付单号") + private String paymentNo; + + /** 订单金额 */ + @Excel(name = "订单金额") + private BigDecimal orderPrice; + + /** 支付金额 */ + @Excel(name = "支付金额") + private BigDecimal paymentPrice; + + /** 支付标题 */ + @Excel(name = "支付标题") + private String paymentTitle; + + /** 关联单号 */ + @Excel(name = "关联单号") + private String relateNo; + + /** 关联单号类型(1--采购单) */ + @Excel(name = "关联单号类型", readConverterExp = "1=--采购单") + private Long relateNoType; + + /** 支付时间 */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date paymentTime; + + /** 支付状态(0--待支付,1-已支付,2--作废) */ + @Excel(name = "支付状态", readConverterExp = "0=--待支付,1-已支付,2--作废") + private Long paymentStatus; + + /** 流程状态(0--待发起,1-审批中,2--审批通过,3--已驳回,4--作废) */ + @Excel(name = "流程状态", readConverterExp = "0=--待发起,1-审批中,2--审批通过,3--已驳回,4--作废") + private Long processStatus; + + /** 申请人 */ + private String paymentUser; + + /** null */ + private Long isDelete; + + /** 备注 */ + @Excel(name = "备注") + private String paymentRemark; + + + +} diff --git a/snow-system/src/main/java/com/snow/system/service/impl/SysFnAccountServiceImpl.java b/snow-system/src/main/java/com/snow/system/service/impl/SysFnAccountServiceImpl.java index f5d0ff4..6a0b3b6 100644 --- a/snow-system/src/main/java/com/snow/system/service/impl/SysFnAccountServiceImpl.java +++ b/snow-system/src/main/java/com/snow/system/service/impl/SysFnAccountServiceImpl.java @@ -134,8 +134,8 @@ public class SysFnAccountServiceImpl extends ServiceImpl implements ISysFnPaymentService { + @Resource + private SysFnPaymentMapper sysFnPaymentMapper; + + @Resource + private SysSequenceServiceImpl sysSequenceService; + /** + * 查询支付申请 + * + * @param id 支付申请ID + * @return 支付申请 + */ + @Override + public SysFnPayment selectSysFnPaymentById(Long id) { + return sysFnPaymentMapper.selectById(id); + } + + /** + * 查询支付申请列表 + * + * @param sysFnPayment 支付申请 + * @return 支付申请 + */ + @Override + public List selectSysFnPaymentList(SysFnPayment sysFnPayment) { + LambdaQueryWrapper lambda = new QueryWrapper().lambda(); + lambda.like(ObjectUtil.isNotEmpty(sysFnPayment.getPaymentNo()),SysFnPayment::getPaymentNo,sysFnPayment.getPaymentNo()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getPaymentTitle()),SysFnPayment::getPaymentTitle,sysFnPayment.getPaymentTitle()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getRelateNo()),SysFnPayment::getRelateNo,sysFnPayment.getRelateNo()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getRelateNoType()),SysFnPayment::getRelateNoType,sysFnPayment.getRelateNoType()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getPaymentTime()),SysFnPayment::getPaymentTime,sysFnPayment.getPaymentTime()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getPaymentStatus()),SysFnPayment::getPaymentStatus,sysFnPayment.getPaymentStatus()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getProcessStatus()),SysFnPayment::getProcessStatus,sysFnPayment.getProcessStatus()); + lambda.eq(ObjectUtil.isNotEmpty(sysFnPayment.getPaymentRemark()),SysFnPayment::getPaymentRemark,sysFnPayment.getPaymentRemark()); + return sysFnPaymentMapper.selectList(lambda); + } + + /** + * 新增支付申请 + * + * @param sysFnPayment 支付申请 + * @return 结果 + */ + @Override + public int insertSysFnPayment(SysFnPayment sysFnPayment) { + sysFnPayment.setCreateTime(DateUtils.getNowDate()); + String paymentNo = sysSequenceService.getNewSequenceNo(SequenceConstants.FN_PAYMENT_NO); + sysFnPayment.setPaymentNo(paymentNo); + return sysFnPaymentMapper.insert(sysFnPayment); + } + + /** + * 修改支付申请 + * + * @param sysFnPayment 支付申请 + * @return 结果 + */ + @Override + public int updateSysFnPayment(SysFnPayment sysFnPayment) { + sysFnPayment.setUpdateTime(DateUtils.getNowDate()); + + return sysFnPaymentMapper.updateById(sysFnPayment); + } + + /** + * 删除支付申请对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysFnPaymentByIds(String ids) { + return sysFnPaymentMapper.deleteBatchIds(Convert.toStrList(ids)); + } + + /** + * 删除支付申请信息 + * + * @param id 支付申请ID + * @return 结果 + */ + @Override + public int deleteSysFnPaymentById(Long id) { + return sysFnPaymentMapper.deleteById(id); + } +} diff --git a/snow-system/src/main/resources/mapper/system/SysFnAccountBillMapper.xml b/snow-system/src/main/resources/mapper/system/SysFnAccountBillMapper.xml index d555340..763261f 100644 --- a/snow-system/src/main/resources/mapper/system/SysFnAccountBillMapper.xml +++ b/snow-system/src/main/resources/mapper/system/SysFnAccountBillMapper.xml @@ -10,7 +10,7 @@ - + @@ -19,7 +19,7 @@ - select id, bill_no, account_no, bill_type, bill_amount, remark, create_by, update_by, create_time, update_time, is_delete from sys_fn_account_bill + select id, bill_no, account_no, bill_type, bill_amount, bill_remark, create_by, update_by, create_time, update_time, is_delete from sys_fn_account_bill