first commit
This commit is contained in:
+97
@@ -0,0 +1,97 @@
|
||||
package com.linke.finance.domain.accountManage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 银行卡管理对象 account_bank_card
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
@Data
|
||||
public class AccountBankCard extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 银行卡管理表id */
|
||||
@ApiModelProperty(name = "银行卡管理表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long accountBankCardId;
|
||||
|
||||
/** 账户类型(1-对私账户,2-对公账户) */
|
||||
@ApiModelProperty(name = "账户类型(1-对私账户,2-对公账户)")
|
||||
private Integer accountBankType;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 用户姓名 */
|
||||
@ApiModelProperty(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
/** 用户手机号 */
|
||||
@ApiModelProperty(name = "用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 银行卡号 */
|
||||
@ApiModelProperty(name = "银行卡号")
|
||||
private String bankCardNumber;
|
||||
|
||||
/** 开户银行code */
|
||||
@ApiModelProperty(name = "开户银行code")
|
||||
private String bankNameCode;
|
||||
|
||||
/** 开户银行名称 */
|
||||
@ApiModelProperty(name = "开户银行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(name = "开户银行图标地址")
|
||||
private String bankImg;
|
||||
|
||||
/** 银行卡预留电话 */
|
||||
@ApiModelProperty(name = "银行卡预留电话")
|
||||
private String bankBindingPhone;
|
||||
|
||||
/** 银行卡预留姓名 */
|
||||
@ApiModelProperty(name = "银行卡预留姓名")
|
||||
private String bankBindingName;
|
||||
|
||||
/** 用户身份证号 */
|
||||
@ApiModelProperty(name = "用户身份证号")
|
||||
private String bankBindingIdNum;
|
||||
|
||||
/** 持卡人地址 */
|
||||
@ApiModelProperty(name = "持卡人地址")
|
||||
private String bankUserAddress;
|
||||
|
||||
@ApiModelProperty(name = "开户行支行名称")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(name = "联行号")
|
||||
private String bankNo;
|
||||
|
||||
@ApiModelProperty(name = "银行卡正面图片地址")
|
||||
private String bankImgUrl;
|
||||
|
||||
@ApiModelProperty(name = "默认地址状态(1-是,2-否)")
|
||||
private Integer defaultStatus;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.linke.finance.domain.accountManage.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户钱包账户对象 account_cash_wallet
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountCashWallet extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long accountCashWalletId;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 姓名 */
|
||||
@ApiModelProperty(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
/** 账号 */
|
||||
@ApiModelProperty(name = "账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 组织id */
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
/** 组织名称 */
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
/** 钱包余额 */
|
||||
@ApiModelProperty(name = "钱包余额")
|
||||
private BigDecimal walletBalance;
|
||||
|
||||
/** 可用金额 */
|
||||
@ApiModelProperty(name = "可用金额")
|
||||
private BigDecimal walletAvailableBalance;
|
||||
|
||||
/** 冻结金额 */
|
||||
@ApiModelProperty(name = "冻结金额")
|
||||
private BigDecimal walletFreezeBalance;
|
||||
|
||||
/** 账户状态(1-正常,2-锁定) */
|
||||
@ApiModelProperty(name = "账户状态(1-正常,2-锁定)")
|
||||
private Integer accountWalletStatus;
|
||||
|
||||
@ApiModelProperty(name = "账户类型(1-个人,2-组织)")
|
||||
private Integer accountType;
|
||||
|
||||
@ApiModelProperty(name = "授信额度")
|
||||
private BigDecimal creditLimit;
|
||||
@ApiModelProperty(name = "总授信额度")
|
||||
private BigDecimal totalLimit;
|
||||
@ApiModelProperty(name = "支付宝账户")
|
||||
private String alipayAccount;
|
||||
@ApiModelProperty(name = "支付宝账户名称")
|
||||
private String alipayAccountName;
|
||||
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.linke.finance.domain.accountManage.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 账户消费记录对象 account_expend_records
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountExpendRecords extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消费记录表id */
|
||||
@ApiModelProperty(name = "消费记录表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long accountExpendRecordsId;
|
||||
|
||||
/** 内部流水号 */
|
||||
@ApiModelProperty(name = "内部流水号")
|
||||
private String accountSerialNumber;
|
||||
|
||||
/** 一级账户code */
|
||||
@ApiModelProperty(name = "一级账户code")
|
||||
private String accountFirstCode;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户code */
|
||||
@ApiModelProperty(name = "二级账户code")
|
||||
private String accountSecondCode;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 一级科目code */
|
||||
@ApiModelProperty(name = "一级科目code")
|
||||
private String subjectFirstCode;
|
||||
|
||||
/** 一级科目value */
|
||||
@ApiModelProperty(name = "一级科目value")
|
||||
private String subjectFirstValue;
|
||||
|
||||
/** 二级科目code */
|
||||
@ApiModelProperty(name = "二级科目code")
|
||||
private String subjectSecondCode;
|
||||
|
||||
/** 二级科目value */
|
||||
@ApiModelProperty(name = "二级科目value")
|
||||
private String subjectSecondValue;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
/** 经办人 */
|
||||
@ApiModelProperty(name = "经办人")
|
||||
private String accountExpendOperator;
|
||||
|
||||
/** 关联运单/订单号 */
|
||||
@ApiModelProperty(name = "关联运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
/** 银企直联流水号 */
|
||||
@ApiModelProperty(name = "银企直联流水号")
|
||||
private String bankSerialNumber;
|
||||
|
||||
/** 订单来源code */
|
||||
@ApiModelProperty(name = "订单来源code")
|
||||
private String orderSourceCode;
|
||||
|
||||
/** 订单来源value */
|
||||
@ApiModelProperty(name = "订单来源value")
|
||||
private String orderSourceValue;
|
||||
|
||||
/** 消费备注 */
|
||||
@ApiModelProperty(name = "消费备注")
|
||||
private String accountRecordsRemark;
|
||||
|
||||
/** 上笔余额 */
|
||||
@ApiModelProperty(name = "上笔余额")
|
||||
private BigDecimal accountLastBalance;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date transactionTime;
|
||||
|
||||
/** 用户名 */
|
||||
@ApiModelProperty(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 入账类型(1-系统入账,2-手工入账) */
|
||||
@ApiModelProperty(name = "入账类型")
|
||||
private Integer accountEnterType;
|
||||
|
||||
/** 流水状态(1-正常,2-作废) */
|
||||
@ApiModelProperty(name = "流水状态")
|
||||
private Integer capitalFlowStatus;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
private Long accountCashWalletId;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId;
|
||||
|
||||
@ApiModelProperty(name = "银行卡管理表id")
|
||||
private Long accountBankCardId;
|
||||
|
||||
@ApiModelProperty(name = "银行卡预留姓名")
|
||||
private String bankBindingName;
|
||||
|
||||
@ApiModelProperty(name = "开户银行code")
|
||||
private String bankNameCode;
|
||||
|
||||
@ApiModelProperty(name = "开户银行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(name = "银行卡号")
|
||||
private String bankCardNumber;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "支付凭证")
|
||||
private String paymentVoucher;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "获取凭证时间")
|
||||
private Date voucherTime;
|
||||
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package com.linke.finance.domain.accountManage.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 会员转账充值对象 account_transfer_recharge
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
@Data
|
||||
public class AccountTransferRecharge extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 会员转账充值表id */
|
||||
@ApiModelProperty(name = "会员转账充值表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long accountTransferRechargeId;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 用户姓名 */
|
||||
@ApiModelProperty(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
/** 用户手机号 */
|
||||
@ApiModelProperty(name = "用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 充值状态(1-待处理,2-已同意,3-已拒绝) */
|
||||
@ApiModelProperty(name = "充值状态")
|
||||
private Integer accountTransferStatus;
|
||||
|
||||
/** 一级账户code */
|
||||
@ApiModelProperty(name = "一级账户code")
|
||||
private String accountFirstCode;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户code */
|
||||
@ApiModelProperty(name = "二级账户code")
|
||||
private String accountSecondCode;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 交易流水 */
|
||||
@ApiModelProperty(name = "交易流水")
|
||||
private String accountTransferNumber;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal accountTransferAmount;
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易方式code */
|
||||
@ApiModelProperty(name = "交易方式code")
|
||||
private String transferTypeCode;
|
||||
|
||||
/** 交易方式value */
|
||||
@ApiModelProperty(name = "交易方式value")
|
||||
private String transferTypeValue;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date accountTransferTime;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型(1-收入,2-支出)")
|
||||
private Integer accountTransferType;
|
||||
|
||||
/** 经办人 */
|
||||
@ApiModelProperty(name = "经办人")
|
||||
private String accountTransferOperator;
|
||||
|
||||
/** 交易凭证图片地址 */
|
||||
@ApiModelProperty(name = "交易凭证图片地址")
|
||||
private String accountTransferVoucherUrl;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String accountTransferRemark;
|
||||
|
||||
/** 审核人id */
|
||||
@ApiModelProperty(name = "审核人id")
|
||||
private Long transferReviewerId;
|
||||
|
||||
/** 审核人 */
|
||||
@ApiModelProperty(name = "审核人")
|
||||
private String accountTransferReviewer;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "审核时间")
|
||||
private Date transferReviewerTime;
|
||||
|
||||
/** 驳回理由 */
|
||||
@ApiModelProperty(name = "驳回理由")
|
||||
private String accountTransferReject;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.linke.finance.domain.accountManage.repository.facade;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountBankCard;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountBankCardPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountBankCardDo;
|
||||
|
||||
/**
|
||||
* 银行卡管理Service接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
public interface AccountBankCardInterface extends IService<AccountBankCard>
|
||||
{
|
||||
/**
|
||||
* 查询银行卡管理
|
||||
*
|
||||
* @param accountBankCardId 银行卡管理主键
|
||||
* @return 银行卡管理
|
||||
*/
|
||||
public AccountBankCardPo selectAccountBankCardByAccountBankCardId(Long accountBankCardId);
|
||||
|
||||
/**
|
||||
* 查询银行卡管理列表
|
||||
*
|
||||
* @param accountBankCardDo 银行卡管理
|
||||
* @return 银行卡管理集合
|
||||
*/
|
||||
public List<AccountBankCardPo> selectAccountBankCardList(AccountBankCardDo accountBankCardDo);
|
||||
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.linke.finance.domain.accountManage.repository.facade;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountCashWallet;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountCashWalletDo;
|
||||
|
||||
/**
|
||||
* 用户钱包账户Service接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
public interface AccountCashWalletInterface extends IService<AccountCashWallet>
|
||||
{
|
||||
/**
|
||||
* 查询用户钱包账户
|
||||
*
|
||||
* @param accountCashWalletId 用户钱包账户主键
|
||||
* @return 用户钱包账户
|
||||
*/
|
||||
public AccountCashWalletPo selectAccountCashWalletByAccountCashWalletId(Long accountCashWalletId);
|
||||
|
||||
/**
|
||||
* 查询用户钱包账户列表
|
||||
*
|
||||
* @param accountCashWalletDo 用户钱包账户
|
||||
* @return 用户钱包账户集合
|
||||
*/
|
||||
public List<AccountCashWalletPo> selectAccountCashWalletList(AccountCashWalletDo accountCashWalletDo);
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
AccountCashWalletAppPo selectUserWalletInfo(Long userId);
|
||||
|
||||
int updateAccountCashWallet(BigDecimal payAmount,Long userId);
|
||||
|
||||
void updateCreditLimit(AccountCashWallet accountCashWallet);
|
||||
|
||||
void updateTotalLimit(AccountCashWallet accountCashWallet);
|
||||
|
||||
AccountCashWallet getLimitByUserId(Long userId);
|
||||
|
||||
int updateAccountCashWalletAdd(BigDecimal payAmount, Long userId);
|
||||
|
||||
int updateFreezeCashWalletSub(BigDecimal payAmount, Long userId);
|
||||
|
||||
int updateFreezeCashWalletAdd(BigDecimal payAmount, Long userId);
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.linke.finance.domain.accountManage.repository.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountExpendRecords;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountExpendRecordsDo;
|
||||
|
||||
/**
|
||||
* 账户消费记录Service接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
public interface AccountExpendRecordsInterface extends IService<AccountExpendRecords>
|
||||
{
|
||||
/**
|
||||
* 查询账户消费记录
|
||||
*
|
||||
* @param accountExpendRecordsId 账户消费记录主键
|
||||
* @return 账户消费记录
|
||||
*/
|
||||
public AccountExpendRecordsPo selectAccountExpendRecordsByAccountExpendRecordsId(Long accountExpendRecordsId);
|
||||
|
||||
/**
|
||||
* 查询账户消费记录列表
|
||||
*
|
||||
* @param accountExpendRecordsDo 账户消费记录
|
||||
* @return 账户消费记录集合
|
||||
*/
|
||||
public List<AccountExpendRecordsPo> selectAccountExpendRecordsList(AccountExpendRecordsDo accountExpendRecordsDo);
|
||||
|
||||
/**
|
||||
* APP收支明细列表查询
|
||||
* @param accountExpendRecordsDo
|
||||
* @return
|
||||
*/
|
||||
List<AccountExpendRecordsAppPo> selectAccountExpendRecordsAppList(AccountExpendRecordsDo accountExpendRecordsDo);
|
||||
|
||||
/**
|
||||
* 根据用户id查询钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
AccountCashWalletPo getWalletByUserId(Long userId);
|
||||
/**
|
||||
* 根据用户id查询钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
String queryAccountExpendRecordsByUserId(Long userId);
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.linke.finance.domain.accountManage.repository.facade;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountTransferRecharge;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountTransferRechargePo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountTransferRechargeDo;
|
||||
|
||||
/**
|
||||
* 会员转账充值Service接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
public interface AccountTransferRechargeInterface extends IService<AccountTransferRecharge>
|
||||
{
|
||||
/**
|
||||
* 查询会员转账充值
|
||||
*
|
||||
* @param accountTransferRechargeId 会员转账充值主键
|
||||
* @return 会员转账充值
|
||||
*/
|
||||
public AccountTransferRechargePo selectAccountTransferRechargeById(Long accountTransferRechargeId);
|
||||
|
||||
/**
|
||||
* 查询会员转账充值列表
|
||||
*
|
||||
* @param accountTransferRechargeDo 会员转账充值
|
||||
* @return 会员转账充值集合
|
||||
*/
|
||||
public List<AccountTransferRechargePo> selectAccountTransferRechargeList(AccountTransferRechargeDo accountTransferRechargeDo);
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.linke.finance.domain.accountManage.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountBankCard;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountBankCardPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountBankCardDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 银行卡管理Mapper接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
public interface AccountBankCardMapper extends BaseMapper<AccountBankCard>
|
||||
{
|
||||
/**
|
||||
* 查询银行卡管理
|
||||
*
|
||||
* @param accountBankCardId 银行卡管理主键
|
||||
* @return 银行卡管理
|
||||
*/
|
||||
public AccountBankCardPo selectAccountBankCardByAccountBankCardId(@Param("accountBankCardId") Long accountBankCardId);
|
||||
|
||||
/**
|
||||
* 查询银行卡管理列表
|
||||
*
|
||||
* @param accountBankCardDo 银行卡管理
|
||||
* @return 银行卡管理集合
|
||||
*/
|
||||
public List<AccountBankCardPo> selectAccountBankCardList(@Param("accountBankCardDo") AccountBankCardDo accountBankCardDo);
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.linke.finance.domain.accountManage.repository.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountCashWallet;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountCashWalletDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
* 用户钱包账户Mapper接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
public interface AccountCashWalletMapper extends BaseMapper<AccountCashWallet>
|
||||
{
|
||||
/**
|
||||
* 查询用户钱包账户
|
||||
*
|
||||
* @param accountCashWalletId 用户钱包账户主键
|
||||
* @return 用户钱包账户
|
||||
*/
|
||||
public AccountCashWalletPo selectAccountCashWalletByAccountCashWalletId(Long accountCashWalletId);
|
||||
|
||||
/**
|
||||
* 查询用户钱包账户列表
|
||||
*
|
||||
* @param accountCashWalletDo 用户钱包账户
|
||||
* @return 用户钱包账户集合
|
||||
*/
|
||||
public List<AccountCashWalletPo> selectAccountCashWalletList(@Param("accountCashWalletDo") AccountCashWalletDo accountCashWalletDo);
|
||||
|
||||
/**
|
||||
* 根据用户id查询现金钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
AccountCashWalletAppPo selectUserWalletInfo(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 更新钱包余额(减)
|
||||
* @param payAmount 金额
|
||||
* @param userId 用户id
|
||||
* @return
|
||||
*/
|
||||
@Update("UPDATE account_cash_wallet SET wallet_balance = wallet_balance - #{payAmount},wallet_available_balance = wallet_available_balance - #{payAmount} WHERE user_id = #{userId} AND del_flag = 1 AND account_wallet_status = 1")
|
||||
int updateAccountCashWallet(@Param("payAmount") BigDecimal payAmount,@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 使用/回充使用额度
|
||||
* @param accountCashWallet
|
||||
*/
|
||||
@Select("UPDATE account_cash_wallet SET credit_limit = credit_limit - #{creditLimit} WHERE user_id = #{userId}")
|
||||
void updateCreditLimit(AccountCashWallet accountCashWallet);
|
||||
|
||||
/**
|
||||
* 修改总金额
|
||||
* @param accountCashWallet
|
||||
*/
|
||||
@Select("UPDATE account_cash_wallet SET total_limit = #{totalLimit} WHERE user_id = #{userId}")
|
||||
void updateTotalLimit(AccountCashWallet accountCashWallet);
|
||||
|
||||
|
||||
/**
|
||||
* 更新钱包余额(加)
|
||||
* @param payAmount
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Update("UPDATE account_cash_wallet SET wallet_balance = wallet_balance + #{payAmount},wallet_available_balance = wallet_available_balance + #{payAmount} WHERE user_id = #{userId} AND del_flag = 1 AND account_wallet_status = 1")
|
||||
int updateAccountCashWalletAdd(@Param("payAmount") BigDecimal payAmount, @Param("userId") Long userId);
|
||||
|
||||
|
||||
/**
|
||||
* 更新钱包余额(冻结金额减)
|
||||
*/
|
||||
@Update("UPDATE account_cash_wallet SET wallet_balance = wallet_balance - #{payAmount},wallet_freeze_balance = wallet_freeze_balance - #{payAmount} WHERE user_id = #{userId} AND del_flag = 1 AND account_wallet_status = 1")
|
||||
int updateFreezeCashWalletSub(@Param("payAmount") BigDecimal payAmount, @Param("userId") Long userId);
|
||||
|
||||
|
||||
/**
|
||||
* 更新钱包余额(冻结金额加)
|
||||
*/
|
||||
@Update("UPDATE account_cash_wallet SET wallet_balance = wallet_balance + #{payAmount},wallet_freeze_balance = wallet_freeze_balance + #{payAmount} WHERE user_id = #{userId} AND del_flag = 1 AND account_wallet_status = 1")
|
||||
int updateFreezeCashWalletAdd(@Param("payAmount")BigDecimal payAmount,@Param("userId") Long userId);
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.linke.finance.domain.accountManage.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountExpendRecords;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountExpendRecordsDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 账户消费记录Mapper接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
public interface AccountExpendRecordsMapper extends BaseMapper<AccountExpendRecords>
|
||||
{
|
||||
/**
|
||||
* 查询账户消费记录
|
||||
*
|
||||
* @param accountExpendRecordsId 账户消费记录主键
|
||||
* @return 账户消费记录
|
||||
*/
|
||||
public AccountExpendRecordsPo selectAccountExpendRecordsByAccountExpendRecordsId(@Param("accountExpendRecordsId") Long accountExpendRecordsId);
|
||||
|
||||
/**
|
||||
* 查询账户消费记录列表
|
||||
*
|
||||
* @param accountExpendRecordsDo 账户消费记录
|
||||
* @return 账户消费记录集合
|
||||
*/
|
||||
public List<AccountExpendRecordsPo> selectAccountExpendRecordsList(@Param("accountExpendRecordsDo") AccountExpendRecordsDo accountExpendRecordsDo);
|
||||
|
||||
/**
|
||||
* APP收支明细分页列表查询
|
||||
* @param accountExpendRecordsDo
|
||||
* @return
|
||||
*/
|
||||
List<AccountExpendRecordsAppPo> selectAccountExpendRecordsAppList(@Param("accountExpendRecordsDo") AccountExpendRecordsDo accountExpendRecordsDo);
|
||||
|
||||
/**
|
||||
* 根据用户id查询钱包信息
|
||||
*/
|
||||
AccountCashWalletPo getWalletByUserId(@Param("userId") Long userId);
|
||||
/**
|
||||
* 根据用户id查询钱包信息
|
||||
*/
|
||||
String queryAccountExpendRecordsByUserId(@Param("userId") Long userId);
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.linke.finance.domain.accountManage.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountTransferRecharge;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountTransferRechargePo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountTransferRechargeDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 会员转账充值Mapper接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
public interface AccountTransferRechargeMapper extends BaseMapper<AccountTransferRecharge>
|
||||
{
|
||||
/**
|
||||
* 查询会员转账充值
|
||||
*
|
||||
* @param accountTransferRechargeId 会员转账充值主键
|
||||
* @return 会员转账充值
|
||||
*/
|
||||
public AccountTransferRechargePo selectAccountTransferRechargeById(@Param("accountTransferRechargeId") Long accountTransferRechargeId);
|
||||
|
||||
/**
|
||||
* 查询会员转账充值列表
|
||||
*
|
||||
* @param accountTransferRechargeDo 会员转账充值
|
||||
* @return 会员转账充值集合
|
||||
*/
|
||||
public List<AccountTransferRechargePo> selectAccountTransferRechargeList(@Param("accountTransferRechargeDo") AccountTransferRechargeDo accountTransferRechargeDo);
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.linke.finance.domain.accountManage.repository.persistence;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountBankCard;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountBankCardInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.mapper.AccountBankCardMapper;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountBankCardPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountBankCardDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 银行卡管理Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
@Service
|
||||
public class AccountBankCardImpl extends ServiceImpl<AccountBankCardMapper, AccountBankCard> implements AccountBankCardInterface
|
||||
{
|
||||
@Autowired
|
||||
private AccountBankCardMapper accountBankCardMapper;
|
||||
|
||||
/**
|
||||
* 查询银行卡管理
|
||||
*
|
||||
* @param accountBankCardId 银行卡管理主键
|
||||
* @return 银行卡管理
|
||||
*/
|
||||
@Override
|
||||
public AccountBankCardPo selectAccountBankCardByAccountBankCardId(Long accountBankCardId)
|
||||
{
|
||||
AccountBankCardPo accountBankCardPo = accountBankCardMapper.selectAccountBankCardByAccountBankCardId(accountBankCardId);
|
||||
return accountBankCardPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询银行卡管理列表
|
||||
*
|
||||
* @param accountBankCardDo 银行卡管理
|
||||
* @return 银行卡管理
|
||||
*/
|
||||
@Override
|
||||
public List<AccountBankCardPo> selectAccountBankCardList(AccountBankCardDo accountBankCardDo)
|
||||
{
|
||||
return accountBankCardMapper.selectAccountBankCardList(accountBankCardDo);
|
||||
}
|
||||
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
package com.linke.finance.domain.accountManage.repository.persistence;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountCashWallet;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountCashWalletInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.mapper.AccountCashWalletMapper;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountCashWalletDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 用户钱包账户Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Service
|
||||
public class AccountCashWalletImpl extends ServiceImpl<AccountCashWalletMapper,AccountCashWallet> implements AccountCashWalletInterface
|
||||
{
|
||||
@Autowired
|
||||
private AccountCashWalletMapper accountCashWalletMapper;
|
||||
|
||||
/**
|
||||
* 查询用户钱包账户
|
||||
*
|
||||
* @param accountCashWalletId 用户钱包账户主键
|
||||
* @return 用户钱包账户
|
||||
*/
|
||||
@Override
|
||||
public AccountCashWalletPo selectAccountCashWalletByAccountCashWalletId(Long accountCashWalletId)
|
||||
{
|
||||
return accountCashWalletMapper.selectAccountCashWalletByAccountCashWalletId(accountCashWalletId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户钱包账户列表
|
||||
*
|
||||
* @param accountCashWalletDo 用户钱包账户
|
||||
* @return 用户钱包账户
|
||||
*/
|
||||
@Override
|
||||
public List<AccountCashWalletPo> selectAccountCashWalletList(AccountCashWalletDo accountCashWalletDo)
|
||||
{
|
||||
return accountCashWalletMapper.selectAccountCashWalletList(accountCashWalletDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AccountCashWalletAppPo selectUserWalletInfo(Long userId) {
|
||||
return accountCashWalletMapper.selectUserWalletInfo(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新钱包余额(减)
|
||||
* @param payAmount 金额
|
||||
* @param userId 用户id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateAccountCashWallet(BigDecimal payAmount, Long userId) {
|
||||
return accountCashWalletMapper.updateAccountCashWallet(payAmount,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCreditLimit(AccountCashWallet accountCashWallet) {
|
||||
accountCashWalletMapper.updateCreditLimit(accountCashWallet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTotalLimit(AccountCashWallet accountCashWallet) {
|
||||
accountCashWalletMapper.updateTotalLimit(accountCashWallet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountCashWallet getLimitByUserId(Long userId) {
|
||||
return accountCashWalletMapper.selectOne(new LambdaQueryWrapper<AccountCashWallet>()
|
||||
.eq(AccountCashWallet::getUserId, userId)
|
||||
.eq(AccountCashWallet::getDelFlag, 1)
|
||||
.last("limit 1"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新钱包余额(加)
|
||||
* @param payAmount 金额
|
||||
* @param userId 用户id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateAccountCashWalletAdd(BigDecimal payAmount, Long userId) {
|
||||
return accountCashWalletMapper.updateAccountCashWalletAdd(payAmount,userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新钱包余额(冻结金额减)
|
||||
*/
|
||||
@Override
|
||||
public int updateFreezeCashWalletSub(BigDecimal payAmount, Long userId) {
|
||||
return accountCashWalletMapper.updateFreezeCashWalletSub(payAmount,userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新钱包余额(冻结金额加)
|
||||
*/
|
||||
@Override
|
||||
public int updateFreezeCashWalletAdd(BigDecimal payAmount, Long userId) {
|
||||
return accountCashWalletMapper.updateFreezeCashWalletAdd(payAmount,userId);
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.linke.finance.domain.accountManage.repository.persistence;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountExpendRecords;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountExpendRecordsInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.mapper.AccountExpendRecordsMapper;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountExpendRecordsDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 账户消费记录Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Service
|
||||
public class AccountExpendRecordsImpl extends ServiceImpl<AccountExpendRecordsMapper, AccountExpendRecords> implements AccountExpendRecordsInterface
|
||||
{
|
||||
@Autowired
|
||||
private AccountExpendRecordsMapper accountExpendRecordsMapper;
|
||||
|
||||
/**
|
||||
* 查询账户消费记录
|
||||
*
|
||||
* @param accountExpendRecordsId 账户消费记录主键
|
||||
* @return 账户消费记录
|
||||
*/
|
||||
@Override
|
||||
public AccountExpendRecordsPo selectAccountExpendRecordsByAccountExpendRecordsId(Long accountExpendRecordsId)
|
||||
{
|
||||
return accountExpendRecordsMapper.selectAccountExpendRecordsByAccountExpendRecordsId(accountExpendRecordsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户消费记录列表
|
||||
*
|
||||
* @param accountExpendRecordsDo 账户消费记录
|
||||
* @return 账户消费记录
|
||||
*/
|
||||
@Override
|
||||
public List<AccountExpendRecordsPo> selectAccountExpendRecordsList(AccountExpendRecordsDo accountExpendRecordsDo)
|
||||
{
|
||||
return accountExpendRecordsMapper.selectAccountExpendRecordsList(accountExpendRecordsDo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* APP收支明细分页列表查询
|
||||
* @param accountExpendRecordsDo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AccountExpendRecordsAppPo> selectAccountExpendRecordsAppList(AccountExpendRecordsDo accountExpendRecordsDo) {
|
||||
return accountExpendRecordsMapper.selectAccountExpendRecordsAppList(accountExpendRecordsDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id查询钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AccountCashWalletPo getWalletByUserId(Long userId) {
|
||||
return accountExpendRecordsMapper.getWalletByUserId(userId);
|
||||
}
|
||||
@Override
|
||||
public String queryAccountExpendRecordsByUserId(Long userId) {
|
||||
return accountExpendRecordsMapper.queryAccountExpendRecordsByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.linke.finance.domain.accountManage.repository.persistence;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountTransferRecharge;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountTransferRechargeInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.mapper.AccountTransferRechargeMapper;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountTransferRechargePo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountTransferRechargeDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员转账充值Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
@Service
|
||||
public class AccountTransferRechargeImpl extends ServiceImpl<AccountTransferRechargeMapper, AccountTransferRecharge> implements AccountTransferRechargeInterface
|
||||
{
|
||||
@Autowired
|
||||
private AccountTransferRechargeMapper accountTransferRechargeMapper;
|
||||
|
||||
/**
|
||||
* 查询会员转账充值
|
||||
*
|
||||
* @param accountTransferRechargeId 会员转账充值主键
|
||||
* @return 会员转账充值
|
||||
*/
|
||||
@Override
|
||||
public AccountTransferRechargePo selectAccountTransferRechargeById(Long accountTransferRechargeId)
|
||||
{
|
||||
return accountTransferRechargeMapper.selectAccountTransferRechargeById(accountTransferRechargeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员转账充值列表
|
||||
*
|
||||
* @param accountTransferRechargeDo 会员转账充值
|
||||
* @return 会员转账充值
|
||||
*/
|
||||
@Override
|
||||
public List<AccountTransferRechargePo> selectAccountTransferRechargeList(AccountTransferRechargeDo accountTransferRechargeDo)
|
||||
{
|
||||
return accountTransferRechargeMapper.selectAccountTransferRechargeList(accountTransferRechargeDo);
|
||||
}
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 银行卡管理对象 account_bank_card
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
@Data
|
||||
public class AccountBankCardPo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 银行卡管理表id */
|
||||
@ApiModelProperty(name = "银行卡管理表id")
|
||||
private Long accountBankCardId;
|
||||
|
||||
/** 账户类型(1-对私账户,2-对公账户) */
|
||||
@ApiModelProperty(name = "账户类型(1-对私账户,2-对公账户)")
|
||||
private Integer accountBankType;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount ="";
|
||||
|
||||
/** 用户姓名 */
|
||||
@ApiModelProperty(name = "用户姓名")
|
||||
private String userName ="";
|
||||
|
||||
/** 用户手机号 */
|
||||
@ApiModelProperty(name = "用户手机号")
|
||||
private String userPhone ="";
|
||||
|
||||
/** 银行卡号 */
|
||||
@ApiModelProperty(name = "银行卡号")
|
||||
private String bankCardNumber ="";
|
||||
|
||||
/** 开户银行code */
|
||||
@ApiModelProperty(name = "开户银行code")
|
||||
private String bankNameCode ="";
|
||||
|
||||
/** 开户银行名称 */
|
||||
@ApiModelProperty(name = "开户银行名称")
|
||||
private String bankName ="";
|
||||
|
||||
@ApiModelProperty(name = "开户银行图标地址")
|
||||
private String bankImg ="";
|
||||
|
||||
/** 银行卡预留电话 */
|
||||
@ApiModelProperty(name = "银行卡预留电话")
|
||||
private String bankBindingPhone ="";
|
||||
|
||||
/** 银行卡预留姓名 */
|
||||
@ApiModelProperty(name = "银行卡预留姓名")
|
||||
private String bankBindingName ="";
|
||||
|
||||
/** 用户身份证号 */
|
||||
@ApiModelProperty(name = "用户身份证号")
|
||||
private String bankBindingIdNum ="";
|
||||
|
||||
/** 持卡人地址 */
|
||||
@ApiModelProperty(name = "持卡人地址")
|
||||
private String bankUserAddress ="";
|
||||
|
||||
@ApiModelProperty(name = "开户行支行名称")
|
||||
private String bankBranchName ="";
|
||||
|
||||
@ApiModelProperty(name = "联行号")
|
||||
private String bankNo ="";
|
||||
|
||||
@ApiModelProperty(name = "银行卡正面图片地址")
|
||||
private String bankImgUrl ="";
|
||||
|
||||
@ApiModelProperty(name = "默认地址状态(1-是,2-否)")
|
||||
private Integer defaultStatus;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber ="";
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户钱包账户对象 account_cash_wallet
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountCashWalletAppPo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
private Long accountCashWalletId = 0L;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId = 0L;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId = 0L;
|
||||
|
||||
/** 姓名 */
|
||||
@ApiModelProperty(name = "姓名")
|
||||
private String userName = "";
|
||||
|
||||
/** 账号 */
|
||||
@ApiModelProperty(name = "账号")
|
||||
private String userAccount = "";
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber = "";
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String userPhone = "";
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName = "";
|
||||
|
||||
/** 组织id */
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId = 0L;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId = 0L;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表Name")
|
||||
private String topOrganizationName = "";
|
||||
|
||||
/** 组织名称 */
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName = "";
|
||||
|
||||
/** 钱包余额 */
|
||||
@ApiModelProperty(name = "钱包余额")
|
||||
private BigDecimal walletBalance = BigDecimal.ZERO;
|
||||
|
||||
/** 可用金额 */
|
||||
@ApiModelProperty(name = "可用金额")
|
||||
private BigDecimal walletAvailableBalance = BigDecimal.ZERO;
|
||||
|
||||
/** 冻结金额 */
|
||||
@ApiModelProperty(name = "冻结金额")
|
||||
private BigDecimal walletFreezeBalance = BigDecimal.ZERO;
|
||||
|
||||
/** 账户状态(1-正常,2-锁定) */
|
||||
@ApiModelProperty(name = "账户状态(1-正常,2-锁定)")
|
||||
private Integer accountWalletStatus = 0;
|
||||
|
||||
@ApiModelProperty(name = "账户类型(1-个人,2-组织)")
|
||||
private Integer accountType;
|
||||
|
||||
@ApiModelProperty(name = "授信额度")
|
||||
private BigDecimal creditLimit;
|
||||
@ApiModelProperty(name = "总授信额度")
|
||||
private BigDecimal totalLimit;
|
||||
@ApiModelProperty(name = "支付宝账户")
|
||||
private String alipayAccount;
|
||||
@ApiModelProperty(name = "支付宝账户名称")
|
||||
private String alipayAccountName;
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户钱包账户对象 account_cash_wallet
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountCashWalletPo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
private Long accountCashWalletId;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 姓名 */
|
||||
@ApiModelProperty(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
/** 账号 */
|
||||
@ApiModelProperty(name = "账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 组织id */
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表Name")
|
||||
private String topOrganizationName;
|
||||
|
||||
/** 组织名称 */
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
/** 钱包余额 */
|
||||
@ApiModelProperty(name = "钱包余额")
|
||||
private BigDecimal walletBalance;
|
||||
|
||||
/** 可用金额 */
|
||||
@ApiModelProperty(name = "可用金额")
|
||||
private BigDecimal walletAvailableBalance;
|
||||
|
||||
/** 冻结金额 */
|
||||
@ApiModelProperty(name = "冻结金额")
|
||||
private BigDecimal walletFreezeBalance;
|
||||
|
||||
/** 账户状态(1-正常,2-锁定) */
|
||||
@ApiModelProperty(name = "账户状态(1-正常,2-锁定)")
|
||||
private Integer accountWalletStatus;
|
||||
|
||||
@ApiModelProperty(name = "账户类型(1-个人,2-组织)")
|
||||
private Integer accountType;
|
||||
|
||||
@ApiModelProperty(name = "授信额度")
|
||||
private BigDecimal creditLimit;
|
||||
@ApiModelProperty(name = "总授信额度")
|
||||
private BigDecimal totalLimit;
|
||||
@ApiModelProperty(name = "支付宝账户")
|
||||
private String alipayAccount;
|
||||
@ApiModelProperty(name = "支付宝账户名称")
|
||||
private String alipayAccountName;
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* APP收支明细详情
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountExpendRecordsAppDetailPo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消费记录表id */
|
||||
@ApiModelProperty(name = "消费记录表id")
|
||||
private Long accountExpendRecordsId;
|
||||
|
||||
/** 内部流水号 */
|
||||
@ApiModelProperty(name = "内部流水号")
|
||||
private String accountSerialNumber;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 一级科目value */
|
||||
@ApiModelProperty(name = "一级科目value")
|
||||
private String subjectFirstValue;
|
||||
|
||||
/** 二级科目value */
|
||||
@ApiModelProperty(name = "二级科目value")
|
||||
private String subjectSecondValue;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
/** 关联运单/订单号 */
|
||||
@ApiModelProperty(name = "关联运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
/** 消费备注 */
|
||||
@ApiModelProperty(name = "消费备注")
|
||||
private String accountRecordsRemark;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date transactionTime;
|
||||
|
||||
/** 用户名 */
|
||||
@ApiModelProperty(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 流水状态(1-正常,2-作废) */
|
||||
@ApiModelProperty(name = "流水状态")
|
||||
private Integer capitalFlowStatus;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "支付状态")
|
||||
private String payStatus;
|
||||
|
||||
@ApiModelProperty(name = "支付方式")
|
||||
private String payType;
|
||||
|
||||
/** 订单来源code */
|
||||
@ApiModelProperty(name = "订单来源code")
|
||||
private String orderSourceCode = "";
|
||||
|
||||
/** 关联运单id */
|
||||
@ApiModelProperty(name = "关联运单id")
|
||||
private String waybillId = "";
|
||||
|
||||
/** 跳转页面 */
|
||||
@ApiModelProperty(name = "跳转页面:1-网货运单详情,2-零担运单详情,3-零担调度单详情")
|
||||
private Integer jumpPage = 0;
|
||||
|
||||
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* APP收支明细列表
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountExpendRecordsAppPo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消费记录表id */
|
||||
@ApiModelProperty(name = "消费记录表id")
|
||||
private Long accountExpendRecordsId;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 一级科目value */
|
||||
@ApiModelProperty(name = "一级科目value")
|
||||
private String subjectFirstValue;
|
||||
|
||||
/** 二级科目value */
|
||||
@ApiModelProperty(name = "二级科目value")
|
||||
private String subjectSecondValue;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date transactionTime;
|
||||
|
||||
/** 用户名 */
|
||||
@ApiModelProperty(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 消费备注 */
|
||||
@ApiModelProperty(name = "消费备注")
|
||||
private String accountRecordsRemark;
|
||||
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户消费记录对象 account_expend_records
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountExpendRecordsPo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消费记录表id */
|
||||
@ApiModelProperty(name = "消费记录表id")
|
||||
private Long accountExpendRecordsId;
|
||||
|
||||
/** 内部流水号 */
|
||||
@ApiModelProperty(name = "内部流水号")
|
||||
private String accountSerialNumber;
|
||||
|
||||
/** 一级账户code */
|
||||
@ApiModelProperty(name = "一级账户code")
|
||||
private String accountFirstCode;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户code */
|
||||
@ApiModelProperty(name = "二级账户code")
|
||||
private String accountSecondCode;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 一级科目code */
|
||||
@ApiModelProperty(name = "一级科目code")
|
||||
private String subjectFirstCode;
|
||||
|
||||
/** 一级科目value */
|
||||
@ApiModelProperty(name = "一级科目value")
|
||||
private String subjectFirstValue;
|
||||
|
||||
/** 二级科目code */
|
||||
@ApiModelProperty(name = "二级科目code")
|
||||
private String subjectSecondCode;
|
||||
|
||||
/** 二级科目value */
|
||||
@ApiModelProperty(name = "二级科目value")
|
||||
private String subjectSecondValue;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
/** 经办人 */
|
||||
@ApiModelProperty(name = "经办人")
|
||||
private String accountExpendOperator;
|
||||
|
||||
/** 关联运单/订单号 */
|
||||
@ApiModelProperty(name = "关联运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
/** 银企直联流水号 */
|
||||
@ApiModelProperty(name = "银企直联流水号")
|
||||
private String bankSerialNumber;
|
||||
|
||||
/** 订单来源code */
|
||||
@ApiModelProperty(name = "订单来源code")
|
||||
private String orderSourceCode;
|
||||
|
||||
/** 订单来源value */
|
||||
@ApiModelProperty(name = "订单来源value")
|
||||
private String orderSourceValue;
|
||||
|
||||
/** 消费备注 */
|
||||
@ApiModelProperty(name = "消费备注")
|
||||
private String accountRecordsRemark;
|
||||
|
||||
/** 上笔余额 */
|
||||
@ApiModelProperty(name = "上笔余额")
|
||||
private BigDecimal accountLastBalance;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date transactionTime;
|
||||
|
||||
/** 用户名 */
|
||||
@ApiModelProperty(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 入账类型(1-系统入账,2-手工入账) */
|
||||
@ApiModelProperty(name = "入账类型")
|
||||
private Integer accountEnterType;
|
||||
|
||||
/** 流水状态(1-正常,2-作废) */
|
||||
@ApiModelProperty(name = "流水状态")
|
||||
private Integer capitalFlowStatus;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
private Long accountCashWalletId;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "银行卡管理表id")
|
||||
private Long accountBankCardId;
|
||||
|
||||
@ApiModelProperty(name = "银行卡预留姓名")
|
||||
private String bankBindingName;
|
||||
|
||||
@ApiModelProperty(name = "开户银行code")
|
||||
private String bankNameCode;
|
||||
|
||||
@ApiModelProperty(name = "开户银行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(name = "银行卡号")
|
||||
private String bankCardNumber;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "支付凭证")
|
||||
private String paymentVoucher;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "获取凭证时间")
|
||||
private Date voucherTime;
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.linke.finance.domain.accountManage.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 会员转账充值对象 account_transfer_recharge
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
@Data
|
||||
public class AccountTransferRechargePo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 会员转账充值表id */
|
||||
@ApiModelProperty(name = "会员转账充值表id")
|
||||
private Long accountTransferRechargeId;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 用户姓名 */
|
||||
@ApiModelProperty(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
/** 用户手机号 */
|
||||
@ApiModelProperty(name = "用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 充值状态(1-待处理,2-已同意,3-已拒绝) */
|
||||
@ApiModelProperty(name = "充值状态")
|
||||
private Integer accountTransferStatus;
|
||||
|
||||
/** 一级账户code */
|
||||
@ApiModelProperty(name = "一级账户code")
|
||||
private String accountFirstCode;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户code */
|
||||
@ApiModelProperty(name = "二级账户code")
|
||||
private String accountSecondCode;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 交易流水 */
|
||||
@ApiModelProperty(name = "交易流水")
|
||||
private String accountTransferNumber;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal accountTransferAmount;
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易方式code */
|
||||
@ApiModelProperty(name = "交易方式code")
|
||||
private String transferTypeCode;
|
||||
|
||||
/** 交易方式value */
|
||||
@ApiModelProperty(name = "交易方式value")
|
||||
private String transferTypeValue;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private String accountTransferTime;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型(1-收入,2-支出)")
|
||||
private Integer accountTransferType;
|
||||
|
||||
/** 经办人 */
|
||||
@ApiModelProperty(name = "经办人")
|
||||
private String accountTransferOperator;
|
||||
|
||||
/** 交易凭证图片地址 */
|
||||
@ApiModelProperty(name = "交易凭证图片地址")
|
||||
private String accountTransferVoucherUrl;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String accountTransferRemark;
|
||||
|
||||
/** 审核人id */
|
||||
@ApiModelProperty(name = "审核人id")
|
||||
private Long transferReviewerId;
|
||||
|
||||
/** 审核人 */
|
||||
@ApiModelProperty(name = "审核人")
|
||||
private String accountTransferReviewer;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "审核时间")
|
||||
private String transferReviewerTime;
|
||||
|
||||
/** 驳回理由 */
|
||||
@ApiModelProperty(name = "驳回理由")
|
||||
private String accountTransferReject;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.linke.finance.domain.accountManage.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 银行卡管理对象 account_bank_card
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
@Data
|
||||
public class AccountBankCardDo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 银行卡管理表id */
|
||||
@ApiModelProperty(name = "银行卡管理表id")
|
||||
private Long accountBankCardId;
|
||||
|
||||
@ApiModelProperty(name = "银行卡管理表ids")
|
||||
private Long[] accountBankCardIds;
|
||||
|
||||
/** 账户类型(1-对私账户,2-对公账户) */
|
||||
@ApiModelProperty(name = "账户类型(1-对私账户,2-对公账户)")
|
||||
private Integer accountBankType;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 用户姓名 */
|
||||
@ApiModelProperty(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
/** 用户手机号 */
|
||||
@ApiModelProperty(name = "用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 银行卡号 */
|
||||
@ApiModelProperty(name = "银行卡号")
|
||||
private String bankCardNumber;
|
||||
|
||||
/** 开户银行code */
|
||||
@ApiModelProperty(name = "开户银行code")
|
||||
private String bankNameCode;
|
||||
|
||||
/** 开户银行名称 */
|
||||
@ApiModelProperty(name = "开户银行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(name = "开户银行图标地址")
|
||||
private String bankImg;
|
||||
|
||||
/** 银行卡预留电话 */
|
||||
@ApiModelProperty(name = "银行卡预留电话")
|
||||
private String bankBindingPhone;
|
||||
|
||||
/** 银行卡预留姓名 */
|
||||
@ApiModelProperty(name = "银行卡预留姓名")
|
||||
private String bankBindingName;
|
||||
|
||||
/** 用户身份证号 */
|
||||
@ApiModelProperty(name = "用户身份证号")
|
||||
private String bankBindingIdNum;
|
||||
|
||||
/** 持卡人地址 */
|
||||
@ApiModelProperty(name = "持卡人地址")
|
||||
private String bankUserAddress;
|
||||
|
||||
@ApiModelProperty(name = "开户行支行名称")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(name = "联行号")
|
||||
private String bankNo;
|
||||
|
||||
@ApiModelProperty(name = "银行卡正面图片地址")
|
||||
private String bankImgUrl;
|
||||
|
||||
@ApiModelProperty(name = "默认地址状态(1-是,2-否)")
|
||||
private Integer defaultStatus;
|
||||
|
||||
@ApiModelProperty(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty(name = "用户信息")
|
||||
private String userInfo;
|
||||
|
||||
@ApiModelProperty(name = "银行卡信息")
|
||||
private String cardInfo;
|
||||
|
||||
@ApiModelProperty(name = "开户信息")
|
||||
private String accountInfo;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "创建结束日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createEndTime;
|
||||
@ApiModelProperty(value = "创建开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createStartTime;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.linke.finance.domain.accountManage.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点支付实体
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountBranchPayDo
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "支付用户id")
|
||||
private Long payUserId;
|
||||
|
||||
@ApiModelProperty(name = "接收用户id")
|
||||
private Long receiveUserId;
|
||||
|
||||
@ApiModelProperty(name = "支付金额")
|
||||
private BigDecimal payBalance;
|
||||
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String payPassword;
|
||||
|
||||
@ApiModelProperty(name = "收款渠道code")
|
||||
private String payWay;
|
||||
|
||||
@ApiModelProperty(name = "平台类型:1-支付人,2-接收人")
|
||||
private Integer plateType;
|
||||
|
||||
@ApiModelProperty(name = "核销流水号")
|
||||
private String innerNumber;
|
||||
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.linke.finance.domain.accountManage.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户钱包账户对象 account_cash_wallet
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountCashWalletDo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
private Long accountCashWalletId;
|
||||
|
||||
@ApiModelProperty(name = "用户钱包账户ids")
|
||||
private Long[] accountCashWalletIds;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 姓名 */
|
||||
@ApiModelProperty(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
/** 账号 */
|
||||
@ApiModelProperty(name = "账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 身份证号 */
|
||||
@ApiModelProperty(name = "身份证号")
|
||||
private String userIdcardNumber;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 组织id */
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
/** 组织名称 */
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
/** 钱包余额 */
|
||||
@ApiModelProperty(name = "钱包余额")
|
||||
private BigDecimal walletBalance;
|
||||
|
||||
/** 可用金额 */
|
||||
@ApiModelProperty(name = "可用金额")
|
||||
private BigDecimal walletAvailableBalance;
|
||||
|
||||
/** 冻结金额 */
|
||||
@ApiModelProperty(name = "冻结金额")
|
||||
private BigDecimal walletFreezeBalance;
|
||||
|
||||
/** 账户状态(1-正常,2-锁定) */
|
||||
@ApiModelProperty(name = "账户状态(1-正常,2-锁定)")
|
||||
private Integer accountWalletStatus;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "变动日期查询条件开始日期")
|
||||
private String updateTimeStart;
|
||||
@ApiModelProperty(name = "变动日期查询条件结束日期")
|
||||
private String updateTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "钱包余额开始")
|
||||
private BigDecimal walletBalanceBegin;
|
||||
@ApiModelProperty(name = "钱包余额结束")
|
||||
private BigDecimal walletBalanceEnd;
|
||||
|
||||
@ApiModelProperty(name = "可用金额开始")
|
||||
private BigDecimal walletAvailableBalanceBegin;
|
||||
@ApiModelProperty(name = "可用金额结束")
|
||||
private BigDecimal walletAvailableBalanceEnd;
|
||||
|
||||
@ApiModelProperty(name = "冻结金额开始")
|
||||
private BigDecimal walletFreezeBalanceBegin;
|
||||
@ApiModelProperty(name = "冻结金额结束")
|
||||
private BigDecimal walletFreezeBalanceEnd;
|
||||
|
||||
@ApiModelProperty(name = "操作类型(1-充值,2-回收,3-退回,4-冻结,5-解冻)")
|
||||
private Integer operationType;
|
||||
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String payPassword;
|
||||
|
||||
@ApiModelProperty(name = "消费备注")
|
||||
private String accountRecordsRemark;
|
||||
@ApiModelProperty(name = "菜单表ID")
|
||||
public Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "账户类型(1-个人,2-组织)")
|
||||
private Integer accountType;
|
||||
|
||||
@ApiModelProperty(name = "授信额度")
|
||||
private BigDecimal creditLimit;
|
||||
@ApiModelProperty(name = "总授信额度")
|
||||
private BigDecimal totalLimit;
|
||||
@ApiModelProperty(name = "支付宝账户")
|
||||
private String alipayAccount;
|
||||
@ApiModelProperty(name = "支付宝账户名称")
|
||||
private String alipayAccountName;
|
||||
}
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
package com.linke.finance.domain.accountManage.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户消费记录对象 account_expend_records
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Data
|
||||
public class AccountExpendRecordsDo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消费记录表id */
|
||||
@ApiModelProperty(name = "消费记录表id")
|
||||
private Long accountExpendRecordsId;
|
||||
|
||||
@ApiModelProperty(name = "消费记录表ids")
|
||||
private Long[] accountExpendRecordsIds;
|
||||
|
||||
/** 内部流水号 */
|
||||
@ApiModelProperty(name = "内部流水号")
|
||||
private String accountSerialNumber;
|
||||
|
||||
/** 一级账户code */
|
||||
@ApiModelProperty(name = "一级账户code")
|
||||
private String accountFirstCode;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户code */
|
||||
@ApiModelProperty(name = "二级账户code")
|
||||
private String accountSecondCode;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 一级科目code */
|
||||
@ApiModelProperty(name = "一级科目code")
|
||||
private String subjectFirstCode;
|
||||
|
||||
/** 一级科目value */
|
||||
@ApiModelProperty(name = "一级科目value")
|
||||
private String subjectFirstValue;
|
||||
|
||||
/** 二级科目code */
|
||||
@ApiModelProperty(name = "二级科目code")
|
||||
private String subjectSecondCode;
|
||||
|
||||
/** 二级科目value */
|
||||
@ApiModelProperty(name = "二级科目value")
|
||||
private String subjectSecondValue;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型")
|
||||
private Integer accountExpenseType;
|
||||
|
||||
/** 经办人 */
|
||||
@ApiModelProperty(name = "经办人")
|
||||
private String accountExpendOperator;
|
||||
|
||||
/** 关联运单/订单号 */
|
||||
@ApiModelProperty(name = "关联运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
/** 银企直联流水号 */
|
||||
@ApiModelProperty(name = "银企直联流水号")
|
||||
private String bankSerialNumber;
|
||||
|
||||
/** 订单来源code */
|
||||
@ApiModelProperty(name = "订单来源code")
|
||||
private String orderSourceCode;
|
||||
|
||||
/** 订单来源value */
|
||||
@ApiModelProperty(name = "订单来源value")
|
||||
private String orderSourceValue;
|
||||
|
||||
/** 消费备注 */
|
||||
@ApiModelProperty(name = "消费备注")
|
||||
private String accountRecordsRemark;
|
||||
|
||||
/** 上笔余额 */
|
||||
@ApiModelProperty(name = "上笔余额")
|
||||
private BigDecimal accountLastBalance;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date transactionTime;
|
||||
|
||||
/** 用户名 */
|
||||
@ApiModelProperty(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty(name = "公司名称")
|
||||
private String enterpriseName;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 入账类型(1-系统入账,2-手工入账) */
|
||||
@ApiModelProperty(name = "入账类型")
|
||||
private Integer accountEnterType;
|
||||
|
||||
/** 流水状态(1-正常,2-作废) */
|
||||
@ApiModelProperty(name = "流水状态")
|
||||
private Integer capitalFlowStatus;
|
||||
|
||||
/** 用户钱包账户id */
|
||||
@ApiModelProperty(name = "用户钱包账户id")
|
||||
private Long accountCashWalletId;
|
||||
|
||||
/** 钱包id */
|
||||
@ApiModelProperty(name = "钱包id")
|
||||
private Long accountWalletId;
|
||||
|
||||
@ApiModelProperty(name = "交易日期查询条件开始日期")
|
||||
private String transactionTimeStart;
|
||||
@ApiModelProperty(name = "交易日期查询条件结束日期")
|
||||
private String transactionTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "用户信息(用户名/账号/公司名称)")
|
||||
private String accountUserInfo;
|
||||
|
||||
@ApiModelProperty(name = "交易金额开始")
|
||||
private BigDecimal transactionAmountBegin;
|
||||
@ApiModelProperty(name = "交易金额结束")
|
||||
private BigDecimal transactionAmountEnd;
|
||||
|
||||
@ApiModelProperty(name = "银行卡管理表id")
|
||||
private Long accountBankCardId;
|
||||
|
||||
@ApiModelProperty(name = "银行卡预留姓名")
|
||||
private String bankBindingName;
|
||||
|
||||
@ApiModelProperty(name = "开户银行code")
|
||||
private String bankNameCode;
|
||||
|
||||
@ApiModelProperty(name = "开户银行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(name = "银行卡号")
|
||||
private String bankCardNumber;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "APP收支明细查询条件(1-今天,2-本周,3-本月,4-最近半年,5-自定义)")
|
||||
private Integer queryDateFlag;
|
||||
|
||||
@ApiModelProperty(name = "支付凭证")
|
||||
private String paymentVoucher;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "获取凭证时间")
|
||||
private Date voucherTime;
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
package com.linke.finance.domain.accountManage.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员转账充值对象 account_transfer_recharge
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
@Data
|
||||
public class AccountTransferRechargeDo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 会员转账充值表id */
|
||||
@ApiModelProperty(name = "会员转账充值表id")
|
||||
private Long accountTransferRechargeId;
|
||||
|
||||
@ApiModelProperty(name = "会员转账充值表ids")
|
||||
private Long[] accountTransferRechargeIds;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 用户账号 */
|
||||
@ApiModelProperty(name = "用户账号")
|
||||
private String userAccount;
|
||||
|
||||
/** 用户姓名 */
|
||||
@ApiModelProperty(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
/** 用户手机号 */
|
||||
@ApiModelProperty(name = "用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 充值状态(1-待处理,2-已同意,3-已拒绝) */
|
||||
@ApiModelProperty(name = "充值状态")
|
||||
private Integer accountTransferStatus;
|
||||
|
||||
/** 一级账户code */
|
||||
@ApiModelProperty(name = "一级账户code")
|
||||
private String accountFirstCode;
|
||||
|
||||
/** 一级账户value */
|
||||
@ApiModelProperty(name = "一级账户value")
|
||||
private String accountFirstValue;
|
||||
|
||||
/** 二级账户code */
|
||||
@ApiModelProperty(name = "二级账户code")
|
||||
private String accountSecondCode;
|
||||
|
||||
/** 二级账户value */
|
||||
@ApiModelProperty(name = "二级账户value")
|
||||
private String accountSecondValue;
|
||||
|
||||
/** 交易流水 */
|
||||
@ApiModelProperty(name = "交易流水")
|
||||
private String accountTransferNumber;
|
||||
|
||||
/** 交易金额 */
|
||||
@ApiModelProperty(name = "交易金额")
|
||||
private BigDecimal accountTransferAmount;
|
||||
|
||||
/** 账户余额 */
|
||||
@ApiModelProperty(name = "账户余额")
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/** 交易方式code */
|
||||
@ApiModelProperty(name = "交易方式code")
|
||||
private String transferTypeCode;
|
||||
|
||||
/** 交易方式value */
|
||||
@ApiModelProperty(name = "交易方式value")
|
||||
private String transferTypeValue;
|
||||
|
||||
/** 交易时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "交易时间")
|
||||
private Date accountTransferTime;
|
||||
|
||||
/** 收支类型(1-收入,2-支出) */
|
||||
@ApiModelProperty(name = "收支类型(1-收入,2-支出)")
|
||||
private Integer accountTransferType;
|
||||
|
||||
/** 经办人 */
|
||||
@ApiModelProperty(name = "经办人")
|
||||
private String accountTransferOperator;
|
||||
|
||||
/** 交易凭证图片地址 */
|
||||
@ApiModelProperty(name = "交易凭证图片地址")
|
||||
private String accountTransferVoucherUrl;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String accountTransferRemark;
|
||||
|
||||
/** 审核人id */
|
||||
@ApiModelProperty(name = "审核人id")
|
||||
private Long transferReviewerId;
|
||||
|
||||
/** 审核人 */
|
||||
@ApiModelProperty(name = "审核人")
|
||||
private String accountTransferReviewer;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(name = "审核时间")
|
||||
private Date transferReviewerTime;
|
||||
|
||||
/** 驳回理由 */
|
||||
@ApiModelProperty(name = "驳回理由")
|
||||
private String accountTransferReject;
|
||||
|
||||
@ApiModelProperty(name = "用户信息")
|
||||
private String userInfo;
|
||||
|
||||
@ApiModelProperty(name = "交易时间查询条件开始日期")
|
||||
private String accountTransferTimeStart;
|
||||
@ApiModelProperty(name = "交易时间查询条件结束日期")
|
||||
private String accountTransferTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "交易金额开始")
|
||||
private BigDecimal accountTransferAmountBegin;
|
||||
@ApiModelProperty(name = "交易金额结束")
|
||||
private BigDecimal accountTransferAmountEnd;
|
||||
|
||||
@ApiModelProperty(name = "提交时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
@ApiModelProperty(name = "提交时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "审核时间查询条件开始日期")
|
||||
private String transferReviewerTimeStart;
|
||||
@ApiModelProperty(name = "审核时间查询条件结束日期")
|
||||
private String transferReviewerTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "操作类型(1-同意,2-拒绝)")
|
||||
private Integer operateType;
|
||||
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String payPassword;
|
||||
|
||||
@ApiModelProperty(name = "组织id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "支付方式(1-微信,2-对公转账)")
|
||||
private Integer paymentMethod;
|
||||
}
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
package com.linke.finance.domain.accountManage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountBankCard;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountBankCardInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountBankCardPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountBankCardDo;
|
||||
import com.linke.finance.interfaces.dto.AccountBankCardDto;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 银行卡管理Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-21
|
||||
*/
|
||||
@Service
|
||||
public class AccountBankCardDomainService {
|
||||
@Autowired
|
||||
private AccountBankCardInterface accountBankCardInterface;
|
||||
@Resource
|
||||
private AccountWlhyDomainService accountWlhyDomainService;
|
||||
|
||||
/**
|
||||
* 查询银行卡管理
|
||||
*
|
||||
* @param accountBankCardId 银行卡管理主键
|
||||
* @return 银行卡管理
|
||||
*/
|
||||
public AccountBankCardPo selectAccountBankCardByAccountBankCardId(Long accountBankCardId)
|
||||
{
|
||||
return accountBankCardInterface.selectAccountBankCardByAccountBankCardId(accountBankCardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询银行卡管理列表
|
||||
*
|
||||
* @param accountBankCardDo 银行卡管理
|
||||
* @return 银行卡管理
|
||||
*/
|
||||
public List<AccountBankCardPo> selectAccountBankCardList(AccountBankCardDo accountBankCardDo)
|
||||
{
|
||||
return accountBankCardInterface.selectAccountBankCardList(accountBankCardDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增银行卡信息
|
||||
* @param accountBankCard
|
||||
* @return
|
||||
*/
|
||||
public boolean insertAccountBankCard(AccountBankCard accountBankCard) {
|
||||
return accountBankCardInterface.save(accountBankCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑银行卡信息
|
||||
* @param accountBankCard
|
||||
* @return
|
||||
*/
|
||||
public boolean updateAccountBankCard(AccountBankCard accountBankCard) {
|
||||
return accountBankCardInterface.updateById(accountBankCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据银行卡id查询详情
|
||||
* @param accountBankCardId
|
||||
* @return
|
||||
*/
|
||||
public AccountBankCardPo getAccountBankCard(Long accountBankCardId) {
|
||||
return accountBankCardInterface.selectAccountBankCardByAccountBankCardId(accountBankCardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除银行卡信息
|
||||
* @param accountBankCardDo
|
||||
* @return
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean deleteAccountBankCardById(AccountBankCardDo accountBankCardDo) {
|
||||
if(accountBankCardDo.getAccountBankCardIds()==null || accountBankCardDo.getAccountBankCardIds().length==0){
|
||||
throw new ServiceException("操作银行卡信息id不能为空");
|
||||
}
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
Date now = new Date();
|
||||
Set<AccountBankCard> accountBankCardList = new HashSet<>();
|
||||
for (Long accountBankCardId : accountBankCardDo.getAccountBankCardIds()) {
|
||||
AccountBankCard accountBankCard = new AccountBankCard();
|
||||
accountBankCard.setAccountBankCardId(accountBankCardId);
|
||||
accountBankCard.setUpdateBy(userId);
|
||||
accountBankCard.setUpdateByName(userName);
|
||||
accountBankCard.setUpdateTime(now);
|
||||
accountBankCard.setDelFlag(2);
|
||||
accountBankCardList.add(accountBankCard);
|
||||
}
|
||||
boolean flag = accountBankCardInterface.updateBatchById(accountBankCardList);
|
||||
//同步删除网货银行卡
|
||||
accountWlhyDomainService.deleteBankCardByIds(accountBankCardDo.getAccountBankCardIds());
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置银行卡为非默认银行卡
|
||||
* @param userId
|
||||
*/
|
||||
public boolean setDefaultStatus(Long userId) {
|
||||
return accountBankCardInterface.update(new UpdateWrapper<AccountBankCard>().lambda()
|
||||
.set(AccountBankCard::getDefaultStatus,2).set(AccountBankCard::getUpdateBy,SecurityUtils.getUserId())
|
||||
.set(AccountBankCard::getUpdateTime,new Date()).set(AccountBankCard::getUpdateByName,SecurityUtils.getUsername())
|
||||
.eq(AccountBankCard::getUserId,userId).eq(AccountBankCard::getDelFlag,1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前银行卡信息为默认
|
||||
* @param accountBankCardDto
|
||||
* @return
|
||||
*/
|
||||
public boolean changeDefaultStatus(AccountBankCardDto accountBankCardDto) {
|
||||
/*
|
||||
如果是租户管理员操作银行卡默认,则需要先查询出当前银行卡信息,查询出银行卡信息对应的用户,然后对该用户进行操作
|
||||
*/
|
||||
if(accountBankCardDto.getAccountBankCardId()==null){
|
||||
throw new ServiceException("银行卡id不能为空");
|
||||
}
|
||||
AccountBankCardPo accountBankCardPo = accountBankCardInterface.selectAccountBankCardByAccountBankCardId(accountBankCardDto.getAccountBankCardId());
|
||||
if(null == accountBankCardPo){
|
||||
throw new ServiceException("银行卡信息未找到");
|
||||
}
|
||||
boolean istrue = setDefaultStatus(accountBankCardPo.getUserId());
|
||||
if(!istrue){
|
||||
throw new ServiceException("操作其他银行卡信息失败");
|
||||
}
|
||||
|
||||
boolean flag = accountBankCardInterface.update(new UpdateWrapper<AccountBankCard>().lambda().set(AccountBankCard::getDefaultStatus,1)
|
||||
.eq(AccountBankCard::getAccountBankCardId,accountBankCardDto.getAccountBankCardId()).eq(AccountBankCard::getDelFlag,1));
|
||||
//调用同步网货银行卡信息
|
||||
AccountBankCard accountBankCard = new AccountBankCard();
|
||||
BeanUtils.copyProperties(accountBankCardPo,accountBankCard);
|
||||
accountWlhyDomainService.syncBankCardInfo(accountBankCard);
|
||||
return flag;
|
||||
}
|
||||
|
||||
public AccountBankCard getAccountBankCardByNum(String bankCardNumber,Long userId) {
|
||||
LambdaQueryWrapper<AccountBankCard> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AccountBankCard::getBankCardNumber,bankCardNumber);
|
||||
queryWrapper.eq(AccountBankCard::getUserId,userId);
|
||||
queryWrapper.eq(AccountBankCard::getDelFlag,1);
|
||||
return accountBankCardInterface.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
public List<AccountBankCard> getAccountBankCardByUser(Long userId) {
|
||||
LambdaQueryWrapper<AccountBankCard> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AccountBankCard::getUserId,userId);
|
||||
queryWrapper.eq(AccountBankCard::getDelFlag,1);
|
||||
return accountBankCardInterface.list(queryWrapper);
|
||||
}
|
||||
}
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
package com.linke.finance.domain.accountManage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountCashWallet;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountCashWalletInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountCashWalletDo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户钱包账户Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Service
|
||||
public class AccountCashWalletDomainService
|
||||
{
|
||||
@Autowired
|
||||
private AccountCashWalletInterface accountCashWalletInterface;
|
||||
|
||||
/**
|
||||
* 查询用户钱包账户
|
||||
*
|
||||
* @param accountCashWalletId 用户钱包账户主键
|
||||
* @return 用户钱包账户
|
||||
*/
|
||||
public AccountCashWalletPo selectAccountCashWalletByAccountCashWalletId(Long accountCashWalletId)
|
||||
{
|
||||
//TODO 根据一级组织id 返回组织姓名
|
||||
return accountCashWalletInterface.selectAccountCashWalletByAccountCashWalletId(accountCashWalletId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户钱包账户列表
|
||||
*
|
||||
* @param accountCashWalletDo 用户钱包账户
|
||||
* @return 用户钱包账户
|
||||
*/
|
||||
public List<AccountCashWalletPo> selectAccountCashWalletList(AccountCashWalletDo accountCashWalletDo)
|
||||
{
|
||||
return accountCashWalletInterface.selectAccountCashWalletList(accountCashWalletDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员钱包开户
|
||||
* @param accountCashWallet
|
||||
* @return
|
||||
*/
|
||||
public boolean insertAccountCashWallet(AccountCashWallet accountCashWallet) {
|
||||
return accountCashWalletInterface.save(accountCashWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户账户信息 返回实体类
|
||||
* @param accountCashWalletId
|
||||
* @return
|
||||
*/
|
||||
public AccountCashWallet selectByAccountCashWalletId(Long accountCashWalletId) {
|
||||
return accountCashWalletInterface.getBaseMapper().selectOne(new QueryWrapper<AccountCashWallet>().lambda()
|
||||
.eq(AccountCashWallet::getAccountCashWalletId,accountCashWalletId).eq(AccountCashWallet::getDelFlag,1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新账户余额
|
||||
* @param accountCashWalletList
|
||||
* @return
|
||||
*/
|
||||
public boolean updateAccountCashWallets(List<AccountCashWallet> accountCashWalletList) {
|
||||
return accountCashWalletInterface.updateBatchById(accountCashWalletList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 锁定、解锁操作 可批量
|
||||
* @param accountCashWalletDo
|
||||
* @return
|
||||
*/
|
||||
public boolean changeLock(AccountCashWalletDo accountCashWalletDo) {
|
||||
if(accountCashWalletDo.getAccountCashWalletIds() == null || accountCashWalletDo.getAccountCashWalletIds().length==0){
|
||||
throw new ServiceException("操作用户账号id不能为空");
|
||||
}
|
||||
if(accountCashWalletDo.getAccountWalletStatus()==null || (accountCashWalletDo.getAccountWalletStatus()!=1 && accountCashWalletDo.getAccountWalletStatus()!=2)){
|
||||
throw new ServiceException("账户状态类型错误");
|
||||
}
|
||||
Set<AccountCashWallet> accountCashWalletList = new HashSet<>();
|
||||
for (Long accountCashWalletId : accountCashWalletDo.getAccountCashWalletIds()) {
|
||||
AccountCashWallet accountCashWallet = new AccountCashWallet();
|
||||
accountCashWallet.setAccountCashWalletId(accountCashWalletId);
|
||||
accountCashWallet.setUpdateBy(SecurityUtils.getUserId());
|
||||
accountCashWallet.setUpdateByName(SecurityUtils.getUsername());
|
||||
accountCashWallet.setUpdateTime(new Date());
|
||||
accountCashWallet.setAccountWalletStatus(accountCashWalletDo.getAccountWalletStatus());
|
||||
accountCashWalletList.add(accountCashWallet);
|
||||
}
|
||||
return accountCashWalletInterface.updateBatchById(accountCashWalletList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户钱包
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public AccountCashWallet selectByUserId(Long userId) {
|
||||
return accountCashWalletInterface.getBaseMapper().selectOne(new QueryWrapper<AccountCashWallet>().lambda()
|
||||
.eq(AccountCashWallet::getUserId,userId).eq(AccountCashWallet::getDelFlag,1));
|
||||
}
|
||||
|
||||
public boolean updateAccountCashWalletById(AccountCashWallet accountCashWallet) {
|
||||
return accountCashWalletInterface.updateById(accountCashWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public AccountCashWalletAppPo selectUserWalletInfo(Long userId) {
|
||||
return accountCashWalletInterface.selectUserWalletInfo(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新钱包余额(可用金额减)
|
||||
* @param payAmount
|
||||
* @return
|
||||
*/
|
||||
public int updateAccountCashWalletSub(BigDecimal payAmount,Long userId) {
|
||||
return accountCashWalletInterface.updateAccountCashWallet(payAmount,userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新钱包余额(可用金额加)
|
||||
* @param payAmount
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public int updateAccountCashWalletAdd(BigDecimal payAmount,Long userId) {
|
||||
return accountCashWalletInterface.updateAccountCashWalletAdd(payAmount,userId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新钱包余额(冻结金额减)
|
||||
* @param payAmount
|
||||
* @return
|
||||
*/
|
||||
public int updateFreezeCashWalletSub(BigDecimal payAmount,Long userId) {
|
||||
return accountCashWalletInterface.updateFreezeCashWalletSub(payAmount,userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新钱包余额(冻结金额加)
|
||||
* @param payAmount
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public int updateFreezeCashWalletAdd(BigDecimal payAmount,Long userId) {
|
||||
return accountCashWalletInterface.updateFreezeCashWalletAdd(payAmount,userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新授信额度
|
||||
*/
|
||||
public void updateCreditLimit(AccountCashWallet accountCashWallet){
|
||||
accountCashWalletInterface.updateCreditLimit(accountCashWallet);
|
||||
}
|
||||
|
||||
public void updateTotalLimit(AccountCashWallet accountCashWallet) {
|
||||
accountCashWalletInterface.updateTotalLimit(accountCashWallet);
|
||||
}
|
||||
|
||||
public AccountCashWalletPo getLimitByUserId(Long userId) {
|
||||
AccountCashWalletPo accountCashWalletPo = new AccountCashWalletPo();
|
||||
AccountCashWallet accountCashWallet = accountCashWalletInterface.getLimitByUserId(userId);
|
||||
if (accountCashWallet != null){
|
||||
BeanUtils.copyProperties(accountCashWallet, accountCashWalletPo);
|
||||
}else {
|
||||
accountCashWalletPo.setCreditLimit(BigDecimal.valueOf(0.00));
|
||||
accountCashWalletPo.setTotalLimit(BigDecimal.valueOf(0.00));
|
||||
}
|
||||
return accountCashWalletPo;
|
||||
}
|
||||
|
||||
public boolean deleteCashWalletById(Long id) {
|
||||
AccountCashWallet accountCashWallet = new AccountCashWallet();
|
||||
accountCashWallet.setDelFlag(2);
|
||||
accountCashWallet.setAccountCashWalletId(id);
|
||||
return accountCashWalletInterface.updateById(accountCashWallet);
|
||||
}
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package com.linke.finance.domain.accountManage.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountExpendRecords;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountExpendRecordsInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountCashWalletPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsAppDetailPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsAppPo;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountExpendRecordsPo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountExpendRecordsDo;
|
||||
import com.linke.finance.interfaces.dto.AccountExpendRecordsDto;
|
||||
import com.mhd.common.core.enums.DictCode;
|
||||
import com.mhd.common.core.enums.RoleEnum;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 账户消费记录Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-18
|
||||
*/
|
||||
@Service
|
||||
public class AccountExpendRecordsDomainService{
|
||||
@Autowired
|
||||
private AccountExpendRecordsInterface accountExpendRecordsInterface;
|
||||
|
||||
/**
|
||||
* 查询账户消费记录
|
||||
*
|
||||
* @param accountExpendRecordsId 账户消费记录主键
|
||||
* @return 账户消费记录
|
||||
*/
|
||||
public AccountExpendRecordsPo selectAccountExpendRecordsByAccountExpendRecordsId(Long accountExpendRecordsId)
|
||||
{
|
||||
return accountExpendRecordsInterface.selectAccountExpendRecordsByAccountExpendRecordsId(accountExpendRecordsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户消费记录列表
|
||||
*
|
||||
* @param accountExpendRecordsDo 账户消费记录
|
||||
* @return 账户消费记录
|
||||
*/
|
||||
public List<AccountExpendRecordsPo> selectAccountExpendRecordsList(AccountExpendRecordsDo accountExpendRecordsDo)
|
||||
{
|
||||
return accountExpendRecordsInterface.selectAccountExpendRecordsList(accountExpendRecordsDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量消费记录保存
|
||||
* @param accountExpendRecordsList
|
||||
*/
|
||||
public boolean insertAccountExpendRecordsBatch(List<AccountExpendRecords> accountExpendRecordsList) {
|
||||
return accountExpendRecordsInterface.saveBatch(accountExpendRecordsList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 作废/恢复 可批量
|
||||
* @param accountExpendRecordsDo
|
||||
* @return
|
||||
*/
|
||||
public boolean changeFlowStatus(AccountExpendRecordsDo accountExpendRecordsDo) {
|
||||
if(accountExpendRecordsDo.getAccountExpendRecordsIds()==null || accountExpendRecordsDo.getAccountExpendRecordsIds().length==0){
|
||||
throw new ServiceException("操作消费记录id不能为空");
|
||||
}
|
||||
if(accountExpendRecordsDo.getCapitalFlowStatus()==null || (accountExpendRecordsDo.getCapitalFlowStatus() !=1 && accountExpendRecordsDo.getCapitalFlowStatus() !=2)){
|
||||
throw new ServiceException("流水状态类型错误");
|
||||
}
|
||||
Set<AccountExpendRecords> accountExpendRecordList = new HashSet<>();
|
||||
for (Long accountCashWalletId : accountExpendRecordsDo.getAccountExpendRecordsIds()) {
|
||||
AccountExpendRecords accountExpendRecords = new AccountExpendRecords();
|
||||
accountExpendRecords.setAccountExpendRecordsId(accountCashWalletId);
|
||||
accountExpendRecords.setUpdateBy(SecurityUtils.getUserId());
|
||||
accountExpendRecords.setUpdateByName(SecurityUtils.getUsername());
|
||||
accountExpendRecords.setUpdateTime(new Date());
|
||||
accountExpendRecords.setCapitalFlowStatus(accountExpendRecordsDo.getCapitalFlowStatus());
|
||||
accountExpendRecordList.add(accountExpendRecords);
|
||||
}
|
||||
return accountExpendRecordsInterface.updateBatchById(accountExpendRecordList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对应消费记录
|
||||
* @param accountExpendRecordsDo
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteAccountExpendRecordsById(AccountExpendRecordsDo accountExpendRecordsDo) {
|
||||
if(accountExpendRecordsDo.getAccountExpendRecordsIds()==null || accountExpendRecordsDo.getAccountExpendRecordsIds().length==0){
|
||||
throw new ServiceException("操作消费记录id不能为空");
|
||||
}
|
||||
Set<AccountExpendRecords> accountExpendRecordList = new HashSet<>();
|
||||
for (Long accountCashWalletId : accountExpendRecordsDo.getAccountExpendRecordsIds()) {
|
||||
AccountExpendRecords accountExpendRecords = new AccountExpendRecords();
|
||||
accountExpendRecords.setAccountExpendRecordsId(accountCashWalletId);
|
||||
accountExpendRecords.setUpdateBy(SecurityUtils.getUserId());
|
||||
accountExpendRecords.setUpdateByName(SecurityUtils.getUsername());
|
||||
accountExpendRecords.setUpdateTime(new Date());
|
||||
accountExpendRecords.setDelFlag(2);
|
||||
accountExpendRecordList.add(accountExpendRecords);
|
||||
}
|
||||
return accountExpendRecordsInterface.updateBatchById(accountExpendRecordList);
|
||||
}
|
||||
|
||||
public String queryAccountExpendRecordsByUserId(Long userId) {
|
||||
return accountExpendRecordsInterface.queryAccountExpendRecordsByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消费记录
|
||||
* @param accountExpendRecords
|
||||
* @return
|
||||
*/
|
||||
public boolean insertAccountExpendRecords(AccountExpendRecords accountExpendRecords) {
|
||||
return accountExpendRecordsInterface.save(accountExpendRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* APP查询收支明细列表
|
||||
* @param accountExpendRecordsDo
|
||||
* @return
|
||||
*/
|
||||
public List<AccountExpendRecordsAppPo> selectAccountExpendRecordsAppList(AccountExpendRecordsDo accountExpendRecordsDo) {
|
||||
return accountExpendRecordsInterface.selectAccountExpendRecordsAppList(accountExpendRecordsDo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* APP 获取账单详情
|
||||
* @param accountExpendRecordsDto
|
||||
* @return
|
||||
*/
|
||||
public AccountExpendRecordsAppDetailPo getAppAccountExpendRecordsById(AccountExpendRecordsDto accountExpendRecordsDto) {
|
||||
AccountExpendRecordsAppDetailPo accountExpendRecordsAppDetailPo = new AccountExpendRecordsAppDetailPo();
|
||||
AccountExpendRecords accountExpendRecords = accountExpendRecordsInterface.getById(accountExpendRecordsDto.getAccountExpendRecordsId());
|
||||
BeanUtils.copyProperties(accountExpendRecords,accountExpendRecordsAppDetailPo);
|
||||
accountExpendRecordsAppDetailPo.setPayStatus("支付成功");
|
||||
accountExpendRecordsAppDetailPo.setPayType(DictCode.PC_WALLET_PAY.getInfo());
|
||||
return accountExpendRecordsAppDetailPo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户id查询钱包信息
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public AccountCashWalletPo getWalletByUserId(Long userId) {
|
||||
return accountExpendRecordsInterface.getWalletByUserId(userId);
|
||||
}
|
||||
|
||||
public boolean batchAddAccountExpendRecords(List<AccountExpendRecords> accountExpendRecordsList) {
|
||||
return accountExpendRecordsInterface.saveBatch(accountExpendRecordsList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流水号,批量修改记录状态为正常
|
||||
* @param accountExpendRecordsList
|
||||
* @return
|
||||
*/
|
||||
public boolean batchUpdateAccountRecordsByNum(List<String> accountExpendRecordsList) {
|
||||
LambdaUpdateWrapper<AccountExpendRecords> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.set(AccountExpendRecords::getCapitalFlowStatus,1);
|
||||
|
||||
updateWrapper.eq(AccountExpendRecords::getDelFlag,1);
|
||||
updateWrapper.in(AccountExpendRecords::getAccountSerialNumber,accountExpendRecordsList);
|
||||
|
||||
return accountExpendRecordsInterface.update(updateWrapper);
|
||||
}
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.linke.finance.domain.accountManage.service;
|
||||
|
||||
import com.linke.finance.domain.accountManage.entity.AccountTransferRecharge;
|
||||
import com.linke.finance.domain.accountManage.repository.facade.AccountTransferRechargeInterface;
|
||||
import com.linke.finance.domain.accountManage.repository.po.AccountTransferRechargePo;
|
||||
import com.linke.finance.domain.accountManage.repository.todo.AccountTransferRechargeDo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 会员转账充值Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-23
|
||||
*/
|
||||
@Service
|
||||
public class AccountTransferRechargeDomainService
|
||||
{
|
||||
@Autowired
|
||||
private AccountTransferRechargeInterface accountTransferRechargeInterface;
|
||||
|
||||
/**
|
||||
* 查询会员转账充值
|
||||
*
|
||||
* @param accountTransferRechargeId 会员转账充值主键
|
||||
* @return 会员转账充值
|
||||
*/
|
||||
public AccountTransferRechargePo selectAccountTransferRechargeById(Long accountTransferRechargeId)
|
||||
{
|
||||
return accountTransferRechargeInterface.selectAccountTransferRechargeById(accountTransferRechargeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员转账充值列表
|
||||
*
|
||||
* @param accountTransferRechargeDo 会员转账充值
|
||||
* @return 会员转账充值
|
||||
*/
|
||||
public List<AccountTransferRechargePo> selectAccountTransferRechargeList(AccountTransferRechargeDo accountTransferRechargeDo)
|
||||
{
|
||||
return accountTransferRechargeInterface.selectAccountTransferRechargeList(accountTransferRechargeDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员充值转账
|
||||
* @param accountTransferRecharge
|
||||
* @return
|
||||
*/
|
||||
public boolean insertAccountTransferRecharge(AccountTransferRecharge accountTransferRecharge) {
|
||||
return accountTransferRechargeInterface.save(accountTransferRecharge);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除
|
||||
* @param accountTransferRechargeDo
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteAccountTransferRecharge(AccountTransferRechargeDo accountTransferRechargeDo) {
|
||||
if(accountTransferRechargeDo.getAccountTransferRechargeIds()==null || accountTransferRechargeDo.getAccountTransferRechargeIds().length==0){
|
||||
throw new ServiceException("删除id不能为空");
|
||||
}
|
||||
Set<AccountTransferRecharge> accountTransferRecharges = new HashSet<>();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Date now = new Date();
|
||||
for (Long accountTransferRechargeId : accountTransferRechargeDo.getAccountTransferRechargeIds()) {
|
||||
AccountTransferRecharge accountTransferRecharge = new AccountTransferRecharge();
|
||||
accountTransferRecharge.setAccountTransferRechargeId(accountTransferRechargeId);
|
||||
accountTransferRecharge.setUpdateTime(now);
|
||||
accountTransferRecharge.setUpdateBy(userId);
|
||||
accountTransferRecharge.setUpdateByName(userName);
|
||||
accountTransferRecharge.setDelFlag(2);
|
||||
accountTransferRecharges.add(accountTransferRecharge);
|
||||
}
|
||||
return accountTransferRechargeInterface.updateBatchById(accountTransferRecharges);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝用户充值转账记录
|
||||
* @param accountTransferRechargeDo
|
||||
* @return
|
||||
*/
|
||||
public boolean refuseAccountTransferRecharge(AccountTransferRechargeDo accountTransferRechargeDo) {
|
||||
if(accountTransferRechargeDo.getAccountTransferRechargeIds()==null || accountTransferRechargeDo.getAccountTransferRechargeIds().length==0){
|
||||
return false;
|
||||
}
|
||||
Set<AccountTransferRecharge> accountTransferRecharges = new HashSet<>();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Date now = new Date();
|
||||
for (Long accountTransferRechargeId : accountTransferRechargeDo.getAccountTransferRechargeIds()) {
|
||||
AccountTransferRecharge accountTransferRecharge = new AccountTransferRecharge();
|
||||
accountTransferRecharge.setAccountTransferRechargeId(accountTransferRechargeId);
|
||||
accountTransferRecharge.setUpdateTime(now);
|
||||
accountTransferRecharge.setUpdateBy(userId);
|
||||
accountTransferRecharge.setUpdateByName(userName);
|
||||
accountTransferRecharge.setAccountTransferStatus(3);
|
||||
accountTransferRecharge.setAccountTransferReviewer(userName);
|
||||
accountTransferRecharge.setTransferReviewerId(userId);
|
||||
accountTransferRecharge.setAccountTransferReject(accountTransferRechargeDo.getAccountTransferReject());
|
||||
accountTransferRecharge.setTransferReviewerTime(now);
|
||||
accountTransferRecharges.add(accountTransferRecharge);
|
||||
}
|
||||
return accountTransferRechargeInterface.updateBatchById(accountTransferRecharges);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意用户充值转账记录
|
||||
* @param accountTransferRechargeId
|
||||
* @return
|
||||
*/
|
||||
public boolean agreeAccountTransferRecharge(Long accountTransferRechargeId) {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Date now = new Date();
|
||||
AccountTransferRecharge accountTransferRecharge = new AccountTransferRecharge();
|
||||
accountTransferRecharge.setAccountTransferRechargeId(accountTransferRechargeId);
|
||||
accountTransferRecharge.setUpdateTime(now);
|
||||
accountTransferRecharge.setUpdateBy(userId);
|
||||
accountTransferRecharge.setUpdateByName(userName);
|
||||
accountTransferRecharge.setAccountTransferStatus(2);
|
||||
accountTransferRecharge.setAccountTransferReviewer(userName);
|
||||
accountTransferRecharge.setTransferReviewerId(userId);
|
||||
accountTransferRecharge.setTransferReviewerTime(now);
|
||||
return accountTransferRechargeInterface.updateById(accountTransferRecharge);
|
||||
}
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
package com.linke.finance.domain.accountManage.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.linke.finance.domain.accountManage.entity.AccountBankCard;
|
||||
import com.mhd.common.core.constant.CacheConstants;
|
||||
import com.mhd.common.core.domain.dto.wlhy.TmsBankCardDTO;
|
||||
import com.mhd.common.core.domain.entity.OrgProductConfig;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.redis.service.RedisService;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.WlhyServiceFeign;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
@Service
|
||||
public class AccountWlhyDomainService {
|
||||
|
||||
@Resource
|
||||
private RedisService redisService;
|
||||
@Resource
|
||||
private WlhyServiceFeign wlhyServiceFeign;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 校验是否配置网货产品
|
||||
* @return true-开启,false-关闭
|
||||
*/
|
||||
private boolean checkSwitch() {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String key = CacheConstants.ORG_PRODUCT_KEY + loginUser.getUserPo().getTopOrganizationId();
|
||||
OrgProductConfig orgProductConfig = redisService.getCacheObject(key);
|
||||
if(null == orgProductConfig) {
|
||||
return false;
|
||||
}
|
||||
//配置网货
|
||||
return orgProductConfig.getWlhyFlag() == 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 同步银行卡信息
|
||||
* @param accountBankCard
|
||||
*/
|
||||
public boolean syncBankCardInfo(AccountBankCard accountBankCard) {
|
||||
if(null == accountBankCard){
|
||||
throw new ServiceException("同步数据不能为空");
|
||||
}
|
||||
//检查是否开启网货
|
||||
boolean flag = checkSwitch();
|
||||
if(!flag){
|
||||
//如果未配置网货产品,返回跳过
|
||||
return true;
|
||||
}
|
||||
TmsBankCardDTO tmsBankCardDTO = bankCardConvert(accountBankCard);
|
||||
|
||||
AjaxResult ajaxResult = wlhyServiceFeign.szwlSyncBankCard(tmsBankCardDTO);
|
||||
if(null != ajaxResult && "200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
return true;
|
||||
}else if(null != ajaxResult && !"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("同步网货信息失败:" + ajaxResult.get("msg"));
|
||||
}else {
|
||||
throw new ServiceException("同步网货信息失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行卡实体转换
|
||||
* @param accountBankCard
|
||||
* @return
|
||||
*/
|
||||
private TmsBankCardDTO bankCardConvert(AccountBankCard accountBankCard) {
|
||||
TmsBankCardDTO tmsBankCardDTO = new TmsBankCardDTO();
|
||||
tmsBankCardDTO.setBankId(accountBankCard.getBankNameCode());
|
||||
tmsBankCardDTO.setBankName(accountBankCard.getBankName());
|
||||
tmsBankCardDTO.setSzwlBankCardId(accountBankCard.getAccountBankCardId());
|
||||
tmsBankCardDTO.setBankCardUserName(accountBankCard.getUserName());
|
||||
tmsBankCardDTO.setBankCardUserPhone(accountBankCard.getUserPhone());
|
||||
tmsBankCardDTO.setAccountOwnerName(accountBankCard.getUserName());
|
||||
tmsBankCardDTO.setBankCardNumber(accountBankCard.getBankCardNumber());
|
||||
tmsBankCardDTO.setBindingPhone(accountBankCard.getBankBindingPhone());
|
||||
tmsBankCardDTO.setBankCardUserId(String.valueOf(accountBankCard.getUserId()));
|
||||
if(accountBankCard.getDefaultStatus()==1){
|
||||
tmsBankCardDTO.setIsDefault(1);
|
||||
}else {
|
||||
tmsBankCardDTO.setIsDefault(0);
|
||||
}
|
||||
if(accountBankCard.getDelFlag()==1){
|
||||
tmsBankCardDTO.setIsDelete(0);
|
||||
}else {
|
||||
tmsBankCardDTO.setIsDelete(1);
|
||||
}
|
||||
tmsBankCardDTO.setAddress(accountBankCard.getBankUserAddress());
|
||||
tmsBankCardDTO.setFromWhere(0);
|
||||
tmsBankCardDTO.setIsMine(1);
|
||||
return tmsBankCardDTO;
|
||||
}
|
||||
|
||||
public boolean deleteBankCardByIds(Long[] accountBankCardIds) {
|
||||
if(null == accountBankCardIds || accountBankCardIds.length==0){
|
||||
throw new ServiceException("同步数据不能为空");
|
||||
}
|
||||
//检查是否开启网货
|
||||
boolean flag = checkSwitch();
|
||||
if(!flag){
|
||||
//如果未配置网货产品,返回跳过
|
||||
return true;
|
||||
}
|
||||
TmsBankCardDTO tmsBankCardDTO = new TmsBankCardDTO();
|
||||
tmsBankCardDTO.setAccountBankCardIds(accountBankCardIds);
|
||||
|
||||
AjaxResult ajaxResult = wlhyServiceFeign.szwlDeleteBankCard(tmsBankCardDTO);
|
||||
if(null != ajaxResult && "200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
return true;
|
||||
}else if(null != ajaxResult && !"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("同步网货信息失败:" + ajaxResult.get("msg"));
|
||||
}else {
|
||||
throw new ServiceException("同步网货信息失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.linke.finance.domain.address.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 receiving_address_manage
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@Data
|
||||
public class ReceivingAddressManage extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 收件地址信息id */
|
||||
@ApiModelProperty(name = "收件地址信息id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long receivingAddressId;
|
||||
|
||||
/** 收件人姓名 */
|
||||
@ApiModelProperty(name = "收件人姓名")
|
||||
private String receivingName;
|
||||
|
||||
/** 所在地区编码 */
|
||||
@ApiModelProperty(name = "所在地区编码")
|
||||
private Long countyCode;
|
||||
|
||||
/** 所在地区 */
|
||||
@ApiModelProperty(name = "所在地区")
|
||||
private String countyName;
|
||||
|
||||
/** 街道地址 */
|
||||
@ApiModelProperty(name = "街道地址")
|
||||
private String address;
|
||||
|
||||
/** 邮政编码 */
|
||||
@ApiModelProperty(name = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 默认地址状态(1-是,2-否) */
|
||||
@ApiModelProperty(name = "默认地址状态")
|
||||
private Integer defaultStatus;
|
||||
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.linke.finance.domain.address.repository.facade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.address.entity.ReceivingAddressManage;
|
||||
import com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo;
|
||||
import com.linke.finance.domain.address.repository.todo.ReceivingAddressManageDo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
public interface ReceivingAddressManageInterface extends IService<ReceivingAddressManage>
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public ReceivingAddressManagePo selectByReceivingAddressId(Long receivingAddressId);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param receivingAddressManageDo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<ReceivingAddressManagePo> selectReceivingAddressManageList(ReceivingAddressManageDo receivingAddressManageDo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressManage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertReceivingAddressManage(ReceivingAddressManage receivingAddressManage);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressManage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateReceivingAddressManage(ReceivingAddressManage receivingAddressManage);
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.linke.finance.domain.address.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.address.entity.ReceivingAddressManage;
|
||||
import com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo;
|
||||
import com.linke.finance.domain.address.repository.todo.ReceivingAddressManageDo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
public interface ReceivingAddressManageMapper extends BaseMapper<ReceivingAddressManage>
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public ReceivingAddressManagePo selectByReceivingAddressId(@Param("receivingAddressId") Long receivingAddressId);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param receivingAddressManageDo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<ReceivingAddressManagePo> selectReceivingAddressManageList(ReceivingAddressManageDo receivingAddressManageDo);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByReceivingAddressId(@Param("receivingAddressId") Long receivingAddressId);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByReceivingAddressIds(@Param("receivingAddressIds") Long[] receivingAddressIds);
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.linke.finance.domain.address.repository.persistence;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.address.entity.ReceivingAddressManage;
|
||||
import com.linke.finance.domain.address.repository.facade.ReceivingAddressManageInterface;
|
||||
import com.linke.finance.domain.address.repository.mapper.ReceivingAddressManageMapper;
|
||||
import com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo;
|
||||
import com.linke.finance.domain.address.repository.todo.ReceivingAddressManageDo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@Service
|
||||
public class ReceivingAddressManageImpl extends ServiceImpl<ReceivingAddressManageMapper, ReceivingAddressManage> implements ReceivingAddressManageInterface
|
||||
{
|
||||
@Autowired
|
||||
private ReceivingAddressManageMapper receivingAddressManageMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public ReceivingAddressManagePo selectByReceivingAddressId(Long receivingAddressId)
|
||||
{
|
||||
return receivingAddressManageMapper.selectByReceivingAddressId(receivingAddressId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param receivingAddressManageDo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<ReceivingAddressManagePo> selectReceivingAddressManageList(ReceivingAddressManageDo receivingAddressManageDo)
|
||||
{
|
||||
return receivingAddressManageMapper.selectReceivingAddressManageList(receivingAddressManageDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressManage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertReceivingAddressManage(ReceivingAddressManage receivingAddressManage)
|
||||
{
|
||||
return receivingAddressManageMapper.insert(receivingAddressManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressManage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateReceivingAddressManage(ReceivingAddressManage receivingAddressManage)
|
||||
{
|
||||
return receivingAddressManageMapper.updateById(receivingAddressManage);
|
||||
}
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.linke.finance.domain.address.repository.po;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 receiving_address_manage
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@Data
|
||||
public class ReceivingAddressManagePo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 收件地址信息id */
|
||||
@ApiModelProperty(name = "收件地址信息id")
|
||||
private Long receivingAddressId;
|
||||
|
||||
/** 收件人姓名 */
|
||||
@ApiModelProperty(name = "收件人姓名")
|
||||
private String receivingName;
|
||||
|
||||
/** 所在地区编码 */
|
||||
@ApiModelProperty(name = "所在地区编码")
|
||||
private Long countyCode;
|
||||
|
||||
/** 所在地区 */
|
||||
@ApiModelProperty(name = "所在地区")
|
||||
private String countyName;
|
||||
|
||||
/** 街道地址 */
|
||||
@ApiModelProperty(name = "街道地址")
|
||||
private String address;
|
||||
|
||||
/** 邮政编码 */
|
||||
@ApiModelProperty(name = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 默认地址状态(1-是,2-否) */
|
||||
@ApiModelProperty(name = "默认地址状态")
|
||||
private Integer defaultStatus;
|
||||
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.linke.finance.domain.address.repository.todo;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 receiving_address_manage
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@Data
|
||||
public class ReceivingAddressManageDo extends BaseVOEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 收件地址信息id */
|
||||
@ApiModelProperty(name = "收件地址信息id")
|
||||
private Long receivingAddressId;
|
||||
|
||||
/** 收件人姓名 */
|
||||
@ApiModelProperty(name = "收件人姓名")
|
||||
private String receivingName;
|
||||
|
||||
/** 所在地区编码 */
|
||||
@ApiModelProperty(name = "所在地区编码")
|
||||
private Long countyCode;
|
||||
|
||||
/** 所在地区 */
|
||||
@ApiModelProperty(name = "所在地区")
|
||||
private String countyName;
|
||||
|
||||
/** 街道地址 */
|
||||
@ApiModelProperty(name = "街道地址")
|
||||
private String address;
|
||||
|
||||
/** 邮政编码 */
|
||||
@ApiModelProperty(name = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
/** 用户id */
|
||||
@ApiModelProperty(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 默认地址状态(1-是,2-否) */
|
||||
@ApiModelProperty(name = "默认地址状态")
|
||||
private Integer defaultStatus;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
package com.linke.finance.domain.address.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.address.entity.ReceivingAddressManage;
|
||||
import com.linke.finance.domain.address.repository.facade.ReceivingAddressManageInterface;
|
||||
import com.linke.finance.domain.address.repository.mapper.ReceivingAddressManageMapper;
|
||||
import com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo;
|
||||
import com.linke.finance.domain.address.repository.todo.ReceivingAddressManageDo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author mhd
|
||||
* @date 2023-03-14
|
||||
*/
|
||||
@Service
|
||||
public class ReceivingAddressManageDomainService extends ServiceImpl<ReceivingAddressManageMapper, ReceivingAddressManage> implements ReceivingAddressManageInterface
|
||||
{
|
||||
@Autowired
|
||||
private ReceivingAddressManageInterface receivingAddressManageInterface;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public ReceivingAddressManagePo selectByReceivingAddressId(Long receivingAddressId)
|
||||
{
|
||||
return receivingAddressManageInterface.selectByReceivingAddressId(receivingAddressId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param receivingAddressManageDo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public List<ReceivingAddressManagePo> selectReceivingAddressManageList(ReceivingAddressManageDo receivingAddressManageDo)
|
||||
{
|
||||
return receivingAddressManageInterface.selectReceivingAddressManageList(receivingAddressManageDo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressManage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertReceivingAddressManage(ReceivingAddressManage receivingAddressManage)
|
||||
{
|
||||
receivingAddressManage.setCreateBy(SecurityUtils.getUserId());
|
||||
receivingAddressManage.setCreateByName(SecurityUtils.getUsername());
|
||||
receivingAddressManage.setCreateTime(new Date());
|
||||
if(receivingAddressManage.getDefaultStatus()==1){
|
||||
//查询当前用户默认收件地址
|
||||
ReceivingAddressManage receivingAddressManageOld = receivingAddressManageInterface.getBaseMapper().selectOne(
|
||||
new QueryWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getCreateBy,SecurityUtils.getUserId()).eq(ReceivingAddressManage::getDefaultStatus,1).eq(ReceivingAddressManage::getDelFlag,1));
|
||||
if(null != receivingAddressManageOld){
|
||||
receivingAddressManageInterface.update(new ReceivingAddressManage(),
|
||||
new UpdateWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getReceivingAddressId,receivingAddressManageOld.getReceivingAddressId())
|
||||
.set(ReceivingAddressManage::getDefaultStatus,2).set(ReceivingAddressManage::getUpdateBy,SecurityUtils.getUserId())
|
||||
.set(ReceivingAddressManage::getUpdateTime,new Date()).set(ReceivingAddressManage::getUpdateByName,SecurityUtils.getUsername()));
|
||||
}
|
||||
}
|
||||
return receivingAddressManageInterface.insertReceivingAddressManage(receivingAddressManage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param receivingAddressManage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateReceivingAddressManage(ReceivingAddressManage receivingAddressManage)
|
||||
{
|
||||
receivingAddressManage.setUpdateBy(SecurityUtils.getUserId());
|
||||
receivingAddressManage.setUpdateByName(SecurityUtils.getUsername());
|
||||
receivingAddressManage.setUpdateTime(new Date());
|
||||
//如果修改后的为默认收件地址
|
||||
if(receivingAddressManage.getDefaultStatus()==1){
|
||||
//查询当前用户默认收件地址
|
||||
ReceivingAddressManage receivingAddressManageOld = receivingAddressManageInterface.getBaseMapper().selectOne(
|
||||
new QueryWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getCreateBy,SecurityUtils.getUserId()).eq(ReceivingAddressManage::getDefaultStatus,1).eq(ReceivingAddressManage::getDelFlag,1));
|
||||
if(null != receivingAddressManageOld){
|
||||
receivingAddressManageInterface.update(new ReceivingAddressManage(),
|
||||
new UpdateWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getReceivingAddressId,receivingAddressManageOld.getReceivingAddressId())
|
||||
.set(ReceivingAddressManage::getDefaultStatus,2).set(ReceivingAddressManage::getUpdateBy,SecurityUtils.getUserId())
|
||||
.set(ReceivingAddressManage::getUpdateTime,new Date()).set(ReceivingAddressManage::getUpdateByName,SecurityUtils.getUsername()));
|
||||
}
|
||||
}
|
||||
return receivingAddressManageInterface.updateReceivingAddressManage(receivingAddressManage);
|
||||
}
|
||||
|
||||
public boolean deleteByIds(Long[] receivingAddressIds) {
|
||||
Set<ReceivingAddressManage> receivingAddressManages = new HashSet<>();
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
Date now = new Date();
|
||||
for (Long receivingAddressId : receivingAddressIds) {
|
||||
ReceivingAddressManage receivingAddressManage = new ReceivingAddressManage();
|
||||
receivingAddressManage.setReceivingAddressId(receivingAddressId);
|
||||
receivingAddressManage.setUpdateBy(userId);
|
||||
receivingAddressManage.setUpdateTime(now);
|
||||
receivingAddressManage.setUpdateByName(userName);
|
||||
receivingAddressManage.setDelFlag(2);
|
||||
receivingAddressManages.add(receivingAddressManage);
|
||||
}
|
||||
return receivingAddressManageInterface.updateBatchById(receivingAddressManages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标记默认收货地址
|
||||
* @param receivingAddressManageDo
|
||||
* @return
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean markDefault(ReceivingAddressManageDo receivingAddressManageDo) {
|
||||
/**
|
||||
* 根据当前登录用户,查询改用户下的默认收件地址,然后取消默认,给传来的收件地址设为默认
|
||||
*/
|
||||
if(receivingAddressManageDo.getReceivingAddressId() ==null){
|
||||
throw new ServiceException("收件地址id不能为空");
|
||||
}
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
//查询当前用户默认收件地址
|
||||
ReceivingAddressManage receivingAddressManage = receivingAddressManageInterface.getBaseMapper().selectOne(
|
||||
new QueryWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getCreateBy,userId).eq(ReceivingAddressManage::getDefaultStatus,1).eq(ReceivingAddressManage::getDelFlag,1));
|
||||
if(null != receivingAddressManage){
|
||||
receivingAddressManageInterface.update(new ReceivingAddressManage(),
|
||||
new UpdateWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getReceivingAddressId,receivingAddressManage.getReceivingAddressId())
|
||||
.set(ReceivingAddressManage::getDefaultStatus,2).set(ReceivingAddressManage::getUpdateBy,SecurityUtils.getUserId())
|
||||
.set(ReceivingAddressManage::getUpdateTime,new Date()).set(ReceivingAddressManage::getUpdateByName,SecurityUtils.getUsername()));
|
||||
}
|
||||
//将传来的收件地址设为默认
|
||||
return receivingAddressManageInterface.update(new ReceivingAddressManage(),
|
||||
new UpdateWrapper<ReceivingAddressManage>().lambda().eq(ReceivingAddressManage::getReceivingAddressId,receivingAddressManageDo.getReceivingAddressId())
|
||||
.set(ReceivingAddressManage::getDefaultStatus,1).set(ReceivingAddressManage::getUpdateBy,SecurityUtils.getUserId())
|
||||
.set(ReceivingAddressManage::getUpdateTime,new Date()).set(ReceivingAddressManage::getUpdateByName,SecurityUtils.getUsername()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前登录用户默认收件地址
|
||||
* @return
|
||||
*/
|
||||
public ReceivingAddressManage selectReceivingAddressMine() {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
return receivingAddressManageInterface.getBaseMapper().selectOne(new QueryWrapper<ReceivingAddressManage>()
|
||||
.lambda().eq(ReceivingAddressManage::getDelFlag,1).eq(ReceivingAddressManage::getDefaultStatus,1).eq(ReceivingAddressManage::getCreateBy,userId));
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.linke.finance.domain.approvalDocument.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 审批单据对象 approval_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ApprovalDocument extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审批单号")
|
||||
@Excel(name = "审批单号")
|
||||
private String approvalOrderNumber;
|
||||
|
||||
@ApiModelProperty("钉钉审批单号")
|
||||
@Excel(name = "钉钉审批单号")
|
||||
private String approvalNumber;
|
||||
|
||||
@ApiModelProperty("审批类型")
|
||||
@Excel(name = "审批类型")
|
||||
private String approvalType;
|
||||
|
||||
@ApiModelProperty("审批标题")
|
||||
@Excel(name = "审批标题")
|
||||
private String approvalTitle;
|
||||
|
||||
@ApiModelProperty("审批状态 0-未审批 1-审批中 2-审批通过 3-审批拒绝 4-已撤销")
|
||||
@Excel(name = "审批状态 0-未审批 1-审批中 2-审批通过 3-审批拒绝 4-已撤销")
|
||||
private Long approvalStatus;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
private String finishTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String approvalOpinion;
|
||||
|
||||
@ApiModelProperty("审批单来源")
|
||||
@Excel(name = "审批单来源")
|
||||
private String approvalFormSource;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("单据数量")
|
||||
@Excel(name = "单据数量")
|
||||
private Integer documentsNumber;
|
||||
@ApiModelProperty("当前审批人id")
|
||||
@Excel(name = "当前审批人id")
|
||||
private String currentApprover;
|
||||
@ApiModelProperty("当前审批人名称")
|
||||
@Excel(name = "当前审批人名称")
|
||||
private String currentApproverName;
|
||||
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.facade;
|
||||
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.approvalDocument.entity.ApprovalDocument;
|
||||
import com.linke.finance.domain.approvalDocument.repository.po.ApprovalDocumentPO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.ApprovalDocumentDO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.WorkflowProcessInstancesByIdDO;
|
||||
import com.linke.finance.interfaces.vo.ApprovalStatsVO;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批单据Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface IApprovalDocumentService extends IService<ApprovalDocument>
|
||||
{
|
||||
/**
|
||||
* 分页查询审批单据列表
|
||||
*/
|
||||
public List<ApprovalDocumentPO> queryList(ApprovalDocumentDO approvalDocumentDO);
|
||||
|
||||
/**
|
||||
* 新增审批单据
|
||||
*/
|
||||
public Boolean insert(ApprovalDocumentDO approvalDocumentDO);
|
||||
|
||||
/**
|
||||
* 修改审批单据
|
||||
*/
|
||||
public Boolean update(ApprovalDocumentDO approvalDocumentDO);
|
||||
|
||||
/**
|
||||
* 批量删除审批单据
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询审批单据
|
||||
*/
|
||||
public ApprovalDocumentPO getInfo(Long id);
|
||||
|
||||
public ApprovalDocument getByProcessInstanceId(String processInstanceId);
|
||||
|
||||
public WorkflowProcessInstancesByIdDO workflowProcessInstancesById(Long businessDocumentDetaliId);
|
||||
|
||||
public void workflowProcessInstancesMore(String ids);
|
||||
|
||||
public ApprovalStatsVO getApprovalStatistics(Long orgId);
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.mapper;
|
||||
|
||||
import com.linke.finance.interfaces.vo.ApprovalStatsVO;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import com.linke.finance.domain.approvalDocument.entity.ApprovalDocument;
|
||||
import com.linke.finance.domain.approvalDocument.repository.po.ApprovalDocumentPO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.ApprovalDocumentDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 审批单据Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface ApprovalDocumentMapper extends BaseMapper<ApprovalDocument>
|
||||
{
|
||||
/**
|
||||
* 查询审批单据列表
|
||||
*/
|
||||
public List<ApprovalDocumentPO> queryList(ApprovalDocumentDO approvalDocumentDO);
|
||||
|
||||
|
||||
/**
|
||||
* 统计审批单据总数及各状态数量
|
||||
* @return 统计结果封装对象
|
||||
*/
|
||||
|
||||
ApprovalStatsVO countByStatus(@Param("orgId") Long orgId);
|
||||
|
||||
@Select("select * from approval_document where del_flag=1 and approval_order_number=#{processInstanceId}")
|
||||
ApprovalDocument getByProcessInstanceId(@Param("processInstanceId") String processInstanceId);
|
||||
|
||||
}
|
||||
+697
@@ -0,0 +1,697 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.persistence;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dingtalk.api.response.OapiV2UserGetResponse;
|
||||
import com.linke.finance.domain.approvalDocument.entity.ApprovalDocument;
|
||||
import com.linke.finance.domain.approvalDocument.repository.facade.IApprovalDocumentService;
|
||||
import com.linke.finance.domain.approvalDocument.repository.mapper.ApprovalDocumentMapper;
|
||||
import com.linke.finance.domain.approvalDocument.repository.po.ApprovalDocumentPO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.ApprovalDocumentDO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.OperationRecordsDO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.TasksDO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.WorkflowProcessInstancesByIdDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.entity.BusinessDocumentDetali;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.mapper.BusinessDocumentDetaliMapper;
|
||||
import com.linke.finance.domain.businessDocumentDetali.service.BusinessDocumentDetaliDomainService;
|
||||
import com.linke.finance.domain.reconciliation.entity.Reconciliation;
|
||||
import com.linke.finance.domain.reconciliation.repository.mapper.ReconciliationMapper;
|
||||
import com.linke.finance.domain.verification.service.VerificationDomainService;
|
||||
import com.linke.finance.interfaces.vo.ApprovalStatsVO;
|
||||
import com.mhd.common.core.domain.dto.BusinessDocumentDTO;
|
||||
import com.mhd.common.core.domain.dto.BusinessDocumentDetaliDTO;
|
||||
import com.mhd.common.core.domain.dto.wlhy.EditPaymentStatusDTO;
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.domain.entity.Verification;
|
||||
import com.mhd.common.core.enums.ApproveStatusEnum;
|
||||
import com.mhd.common.core.enums.SubjectCodeEnum;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.feign.ThirdPartyServiceFeign;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.redis.enums.RedisLockTypeEnum;
|
||||
import com.mhd.common.redis.service.RedisLock;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import com.mhd.system.api.WlhyServiceFeign;
|
||||
import com.mhd.system.api.domain.SecondSubjectPO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.redisson.api.RLock;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 审批单据Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Service
|
||||
public class ApprovalDocumentImpl extends ServiceImpl<ApprovalDocumentMapper, ApprovalDocument> implements IApprovalDocumentService {
|
||||
@Autowired
|
||||
private ApprovalDocumentMapper approvalDocumentMapper;
|
||||
@Autowired
|
||||
private ThirdPartyServiceFeign thirdPartyServiceFeign;
|
||||
|
||||
@Autowired
|
||||
private BusinessDocumentDetaliMapper businessDocumentDetaliMapper;
|
||||
@Autowired
|
||||
private ReconciliationMapper reconciliationMapper;
|
||||
|
||||
@Autowired
|
||||
private UserServiceFeign userServiceFeign;
|
||||
@Autowired
|
||||
private WlhyServiceFeign wlhyServiceFeign;
|
||||
@Autowired
|
||||
private BusinessDocumentDetaliDomainService businessDocumentDetaliDomainService;
|
||||
@Autowired
|
||||
private VerificationDomainService verificationDomainService;
|
||||
@Autowired
|
||||
private RedisLock redisLock;
|
||||
/**
|
||||
* 查询审批单据列表
|
||||
*/
|
||||
@Override
|
||||
public List<ApprovalDocumentPO> queryList(ApprovalDocumentDO approvalDocumentDO)
|
||||
{
|
||||
return approvalDocumentMapper.queryList(approvalDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增审批单据
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ApprovalDocumentDO approvalDocumentDO) {
|
||||
ApprovalDocument approvalDocument = new ApprovalDocument();
|
||||
BeanUtils.copyProperties(approvalDocumentDO,approvalDocument);
|
||||
return this.save(approvalDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审批单据
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ApprovalDocumentDO approvalDocumentDO) {
|
||||
ApprovalDocument approvalDocument = new ApprovalDocument();
|
||||
BeanUtils.copyProperties(approvalDocumentDO,approvalDocument);
|
||||
return this.updateById(approvalDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除审批单据
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] ids ) {
|
||||
List<ApprovalDocument> list = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
ApprovalDocument approvalDocument = new ApprovalDocument();
|
||||
approvalDocument.setId(id);
|
||||
approvalDocument.setDelFlag(2);
|
||||
list.add(approvalDocument);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审批单据
|
||||
*/
|
||||
@Override
|
||||
public ApprovalDocumentPO getInfo(Long id) {
|
||||
ApprovalDocument approvalDocument = this.getById(id);
|
||||
ApprovalDocumentPO approvalDocumentPO = new ApprovalDocumentPO();
|
||||
BeanUtils.copyProperties(approvalDocument,approvalDocumentPO);
|
||||
return approvalDocumentPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApprovalDocument getByProcessInstanceId(String processInstanceId) {
|
||||
return approvalDocumentMapper.getByProcessInstanceId(processInstanceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@GlobalTransactional(rollbackFor = Exception.class)
|
||||
public WorkflowProcessInstancesByIdDO workflowProcessInstancesById(Long businessDocumentDetaliId) {
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
ApprovalDocument approvalDocument=approvalDocumentMapper.selectById(businessDocumentDetaliId);
|
||||
log.error(new Date()+"钉钉订阅消息通知:businessDocumentDetaliId====="+businessDocumentDetaliId);
|
||||
if(ObjectUtil.isNotNull(approvalDocument)){
|
||||
if(StringUtils.isNotBlank(approvalDocument.getApprovalOrderNumber())){
|
||||
AjaxResult ajaxResult1=thirdPartyServiceFeign.processInstancesById(approvalDocument.getApprovalOrderNumber());
|
||||
if("200".equals(String.valueOf(ajaxResult1.get("code")))){
|
||||
Map<String,Object> map = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult1.get("data")), Map.class);
|
||||
GetProcessInstanceResponse startProcessInstanceResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map), GetProcessInstanceResponse.class);
|
||||
WorkflowProcessInstancesByIdDO workflowProcessInstancesByIdDO=new WorkflowProcessInstancesByIdDO();
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
throw new ServiceException("获取单个审批实例详情失败");
|
||||
}else{
|
||||
if(approvalDocument.getApprovalFormSource().equals("应付单据")){
|
||||
List<BusinessDocumentDetali> businessDocumentDetaliList=businessDocumentDetaliMapper.selectList(new QueryWrapper<BusinessDocumentDetali>()
|
||||
.lambda().eq(BusinessDocumentDetali::getInstanceId,approvalDocument.getApprovalOrderNumber())
|
||||
.eq(BusinessDocumentDetali::getDelFlag,1));
|
||||
for (BusinessDocumentDetali businessDocumentDetali1:businessDocumentDetaliList){
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("RUNNING")){
|
||||
businessDocumentDetali1.setApprovalStatus(2);
|
||||
businessDocumentDetali1.setAuditStatus(1);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
businessDocumentDetali1.setApprovalStatus(3);
|
||||
businessDocumentDetali1.setAuditStatus(4);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")){
|
||||
businessDocumentDetali1.setApprovalStatus(4);
|
||||
// if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
// businessDocumentDetali1.setAuditStatus(2);
|
||||
// }else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
// businessDocumentDetali1.setAuditStatus(3);
|
||||
// }
|
||||
}
|
||||
// businessDocumentDetali1.setApprovalResult(startProcessInstanceResponse.getBody().getResult().getResult());
|
||||
// businessDocumentDetaliMapper.updateById(businessDocumentDetali1);
|
||||
}
|
||||
//lyh 2025-09-15应付单据逻辑修改:不是简单的修改状态,业务单据来源相关状态都需要改
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")||startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
Integer auditStatus = -1;
|
||||
if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
auditStatus = 2;
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
auditStatus = 3;
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
auditStatus = 4;
|
||||
}
|
||||
if(auditStatus>0){
|
||||
RedisLockTypeEnum redisLockTypeEnum = RedisLockTypeEnum.FINANCE;
|
||||
String key = redisLockTypeEnum.getUniqueKey(String.valueOf(approvalDocument.getApprovalNumber()));
|
||||
RLock lock = null;
|
||||
try {
|
||||
lock = redisLock.getRLock(key);
|
||||
//尝试获取锁 不等待 持有锁5分钟
|
||||
if(!lock.tryLock(-1,5, TimeUnit.MINUTES)){
|
||||
lock = null;
|
||||
log.error(approvalDocument.getApprovalNumber()+"审批单结束,业务逻辑处理中");
|
||||
}else{
|
||||
log.error(approvalDocument.getApprovalNumber()+"审批单加锁成功");
|
||||
boolean resultAudit= yfdjAudit(businessDocumentDetaliList,auditStatus,"",loginUser);
|
||||
if(!resultAudit){
|
||||
throw new ServiceException("审批结束:同步业务数据失败");
|
||||
}
|
||||
}
|
||||
} catch (Exception e){
|
||||
log.error(approvalDocument.getApprovalNumber()+"审批单结束时,业务逻辑处理异常!");
|
||||
throw new ServiceException("审批结束:同步业务数据异常");
|
||||
} finally {
|
||||
if (lock != null && lock.isHeldByCurrentThread()){
|
||||
lock.unlock();
|
||||
log.error(approvalDocument.getApprovalNumber()+"审批单释放了锁!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(approvalDocument.getApprovalFormSource().equals("应收单据")){
|
||||
List<Reconciliation> reconciliationList=reconciliationMapper.selectList(new QueryWrapper<Reconciliation>()
|
||||
.lambda().eq(Reconciliation::getInstanceId,approvalDocument.getApprovalOrderNumber())
|
||||
.eq(Reconciliation::getDelFlag,1));
|
||||
for (Reconciliation reconciliation:reconciliationList){
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("RUNNING")){
|
||||
reconciliation.setApprovalStatus(2);
|
||||
reconciliation.setAuditStatus(1);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
reconciliation.setApprovalStatus(3);
|
||||
reconciliation.setAuditStatus(4);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")){
|
||||
reconciliation.setApprovalStatus(4);
|
||||
if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
reconciliation.setAuditStatus(2);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
reconciliation.setAuditStatus(3);
|
||||
}
|
||||
}
|
||||
reconciliation.setApprovalResult(startProcessInstanceResponse.getBody().getResult().getResult());
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
}
|
||||
}
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("RUNNING")){
|
||||
approvalDocument.setApprovalStatus(1L);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
approvalDocument.setApprovalStatus(4L);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")){
|
||||
if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
approvalDocument.setApprovalStatus(2L);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
approvalDocument.setApprovalStatus(3L);
|
||||
}
|
||||
}
|
||||
approvalDocument.setApprovalTitle(startProcessInstanceResponse.getBody().getResult().getTitle());
|
||||
approvalDocument.setApprovalNumber(startProcessInstanceResponse.getBody().getResult().getBusinessId());
|
||||
if(StringUtils.isNotBlank(startProcessInstanceResponse.getBody().getResult().getFinishTime())){
|
||||
String finishTime=startProcessInstanceResponse.getBody().getResult().getFinishTime().replace("T"," ").replace("Z",":00");;
|
||||
approvalDocument.setFinishTime(finishTime);
|
||||
}
|
||||
if(ObjectUtil.isNotNull(loginUser)){
|
||||
approvalDocument.setUpdateBy(loginUser.getUserid());
|
||||
approvalDocument.setUpdateByName(loginUser.getUsername());
|
||||
}
|
||||
approvalDocument.setUpdateTime(new Date());
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultTasks> tasks=startProcessInstanceResponse.getBody().getResult().getTasks();
|
||||
if(ObjectUtil.isNotNull(tasks)&&tasks.size()>0){
|
||||
String userId=tasks.get(tasks.size()-1).getUserId();
|
||||
approvalDocument.setCurrentApprover(userId);
|
||||
AjaxResult ajaxResult2=thirdPartyServiceFeign.userGet(userId);
|
||||
if("200".equals(String.valueOf(ajaxResult2.get("code")))){
|
||||
Map<String,Object> map1 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult2.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map1), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
throw new ServiceException("获取单个审批实例详情失败");
|
||||
}else{
|
||||
approvalDocument.setCurrentApproverName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
approvalDocumentMapper.updateById(approvalDocument);
|
||||
GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult getProcessInstanceResponseBodyResult=startProcessInstanceResponse.getBody().getResult();
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords> operationRecordsList=getProcessInstanceResponseBodyResult.getOperationRecords();
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultTasks> tasksList=getProcessInstanceResponseBodyResult.getTasks();
|
||||
BeanUtils.copyProperties(getProcessInstanceResponseBodyResult,workflowProcessInstancesByIdDO);
|
||||
AjaxResult ajaxResult4=thirdPartyServiceFeign.userGet(getProcessInstanceResponseBodyResult.getOriginatorUserId());
|
||||
if("200".equals(String.valueOf(ajaxResult4.get("code")))){
|
||||
Map<String,Object> map2 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult4.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map2), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
|
||||
}else{
|
||||
workflowProcessInstancesByIdDO.setOriginatorUserName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
String createTime2=getProcessInstanceResponseBodyResult.getCreateTime().replace("T"," ").replace("Z",":00");;
|
||||
workflowProcessInstancesByIdDO.setCreateTime(createTime2);
|
||||
if(StringUtils.isNotBlank(getProcessInstanceResponseBodyResult.getFinishTime())){
|
||||
String finishTime1=getProcessInstanceResponseBodyResult.getFinishTime().replace("T"," ").replace("Z",":00");;
|
||||
workflowProcessInstancesByIdDO.setFinishTime(finishTime1);
|
||||
}
|
||||
List<OperationRecordsDO> operationRecordsDOList=new ArrayList<OperationRecordsDO>();
|
||||
List<TasksDO> tasksDOList=new ArrayList<TasksDO>();
|
||||
if(ObjectUtil.isNotNull(operationRecordsList)&&operationRecordsList.size()>0){
|
||||
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords getProcessInstanceResponseBodyResultOperationRecords:operationRecordsList){
|
||||
OperationRecordsDO operationRecordsDO=new OperationRecordsDO();
|
||||
BeanUtils.copyProperties(getProcessInstanceResponseBodyResultOperationRecords,operationRecordsDO);
|
||||
String date=getProcessInstanceResponseBodyResultOperationRecords.getDate().replace("T"," ").replace("Z",":00");;
|
||||
operationRecordsDO.setDate(date);
|
||||
AjaxResult ajaxResult3=thirdPartyServiceFeign.userGet(getProcessInstanceResponseBodyResultOperationRecords.getUserId());
|
||||
if("200".equals(String.valueOf(ajaxResult3.get("code")))){
|
||||
Map<String,Object> map2 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult3.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map2), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
|
||||
}else{
|
||||
operationRecordsDO.setUserName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
operationRecordsDOList.add(operationRecordsDO);
|
||||
}
|
||||
}
|
||||
if(ObjectUtil.isNotNull(tasksList)&&tasksList.size()>0){
|
||||
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultTasks getProcessInstanceResponseBodyResultTasks:tasksList){
|
||||
TasksDO tasksDO=new TasksDO();
|
||||
BeanUtils.copyProperties(getProcessInstanceResponseBodyResultTasks,tasksDO);
|
||||
String createTime=getProcessInstanceResponseBodyResultTasks.getCreateTime().replace("T"," ").replace("Z",":00");;
|
||||
tasksDO.setCreateTime(createTime);
|
||||
if(StringUtils.isNotBlank(getProcessInstanceResponseBodyResultTasks.getFinishTime())){
|
||||
String finishTime1=getProcessInstanceResponseBodyResultTasks.getFinishTime().replace("T"," ").replace("Z",":00");;
|
||||
tasksDO.setFinishTime(finishTime1);
|
||||
}
|
||||
AjaxResult ajaxResult3=thirdPartyServiceFeign.userGet(getProcessInstanceResponseBodyResultTasks.getUserId());
|
||||
if("200".equals(String.valueOf(ajaxResult3.get("code")))){
|
||||
Map<String,Object> map2 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult3.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map2), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
|
||||
}else{
|
||||
tasksDO.setUserName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
tasksDOList.add(tasksDO);
|
||||
}
|
||||
}
|
||||
workflowProcessInstancesByIdDO.setOperationRecords(operationRecordsDOList);
|
||||
workflowProcessInstancesByIdDO.setTasks(tasksDOList);
|
||||
}
|
||||
return workflowProcessInstancesByIdDO;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核结果出现后,业务数据同步更新
|
||||
* @return
|
||||
*/
|
||||
private boolean yfdjAudit(List<BusinessDocumentDetali> detailList,Integer auditStatus,String auditRemark,LoginUser loginUser){
|
||||
Date now = new Date();
|
||||
List<Verification> verificationList = new ArrayList<>();
|
||||
List<BusinessDocumentDetali> businessDocumentDetaliUpdateList = new ArrayList<>();
|
||||
List<BusinessDocumentDetaliDTO> businessDocumentDetailDtoList = new ArrayList<>();
|
||||
//将已经
|
||||
for (BusinessDocumentDetali detail:detailList) {
|
||||
log.error(detail.getBusinessDocumentDetaliNumber()+"应付单据号查询的审核状态为==="+detail.getAuditStatus()+",本次审核状态为:"+auditStatus);
|
||||
/* if(detail.getAuditStatus()==2||detail.getAuditStatus()==3||detail.getAuditStatus()==4){
|
||||
continue;
|
||||
}*/
|
||||
log.error("应付单据号:"+detail.getBusinessDocumentDetaliNumber()+",审核通过或拒绝");
|
||||
//只有同意的才生成应付账单
|
||||
if(auditStatus== ApproveStatusEnum.AGREE.getKey()){
|
||||
if(SubjectCodeEnum.first_zycl_clhs.getCode().equals(detail.getFirstSubject())){//车辆核算的单独处理
|
||||
//查询要自有车辆费用明细
|
||||
R<List<SecondSubjectPO>> secondSubjectList = wlhyServiceFeign.getZyclClhsSecondSubjectList(detail.getBusinessCocumentId());
|
||||
if (secondSubjectList.getCode() == R.SUCCESS&&secondSubjectList.getData().size()>0){
|
||||
for (SecondSubjectPO secondSubjectPO:secondSubjectList.getData()) {
|
||||
Verification verification = packVerication(detail);
|
||||
SimpleDateFormat sd = new SimpleDateFormat("yyMMddHHmm");
|
||||
int randomFour = (int) (Math.random() * 9000 + 1000);
|
||||
String format = sd.format(now);
|
||||
String innerNumber = "YF" + format + randomFour;//应付单据号
|
||||
verification.setSecondSubject(secondSubjectPO.getSecondSubject());
|
||||
verification.setSecondSubjectName(secondSubjectPO.getSecondSubjectName());
|
||||
verification.setVerificationMoney(secondSubjectPO.getAmount());
|
||||
verification.setInnerNumber(innerNumber);
|
||||
verification.setAuditRemark(auditRemark);
|
||||
verification.setBillRemarks(detail.getRemark());
|
||||
verification.setPaymentMethod(detail.getPaymentMethod());
|
||||
verification.setFuelCardNumber(detail.getFuelCardNumber());
|
||||
if(ObjectUtil.isNotNull(loginUser)){
|
||||
verification.setCreateBy(loginUser.getUserid());
|
||||
verification.setCreateByName(loginUser.getUsername());
|
||||
}
|
||||
verification.setPayType(secondSubjectPO.getPayType());
|
||||
//司机工资收款人单独处理
|
||||
if(com.mhd.common.core.utils.StringUtils.isNotBlank(secondSubjectPO.getPayName())){
|
||||
verification.setPayId("");//传递的收款人姓名没有对应id
|
||||
verification.setPayName(secondSubjectPO.getPayName());
|
||||
}
|
||||
verificationList.add(verification);
|
||||
}
|
||||
}else{
|
||||
throw new ServiceException("查询车辆核算二级科目异常!");
|
||||
}
|
||||
}else{
|
||||
Verification verification = packVerication(detail);
|
||||
SimpleDateFormat sd = new SimpleDateFormat("yyMMddHHmm");
|
||||
int randomFour = (int) (Math.random() * 9000 + 1000);
|
||||
String format = sd.format(now);
|
||||
String innerNumber = "YF" + format + randomFour;//应付单据号
|
||||
verification.setInnerNumber(innerNumber);
|
||||
verification.setAuditRemark(auditRemark);
|
||||
log.error("用户登录信息loginUser==="+loginUser);
|
||||
if(ObjectUtil.isNotNull(loginUser)){
|
||||
log.error("用户登录信息loginUser.userName==="+loginUser.getUsername());
|
||||
verification.setCreateBy(loginUser.getUserid());
|
||||
verification.setCreateByName(loginUser.getUsername());
|
||||
}
|
||||
verification.setPayType(detail.getSecondSubjectName());//付款方式:油卡借款/现金借款=>与二级科目保持一致
|
||||
verificationList.add(verification);
|
||||
}
|
||||
}
|
||||
|
||||
detail.setAuditStatus(auditStatus);//审批结果
|
||||
detail.setAuditRemark(auditRemark);
|
||||
detail.setPaymentStatus(1);//未支付
|
||||
detail.setAuditType(2);//人工审批
|
||||
if(ObjectUtil.isNotNull(loginUser)){
|
||||
detail.setUpdateBy(loginUser.getUserid());
|
||||
detail.setUpdateByName(loginUser.getUsername());
|
||||
}
|
||||
detail.setUpdateTime(now);
|
||||
businessDocumentDetaliUpdateList.add(detail);
|
||||
|
||||
BusinessDocumentDetaliDTO detailDto = new BusinessDocumentDetaliDTO();
|
||||
BeanUtils.copyProperties(detail,detailDto);
|
||||
detailDto.setAuditRemark(auditRemark);
|
||||
businessDocumentDetailDtoList.add(detailDto);
|
||||
//车辆维修单同步工时费申请状态
|
||||
if(auditStatus==2||auditStatus==3||auditStatus==4){
|
||||
if(detail.getFirstSubject().equals("zycl_clwx")){
|
||||
EditPaymentStatusDTO editPaymentStatusDTO=new EditPaymentStatusDTO();
|
||||
editPaymentStatusDTO.setId(detail.getBusinessCocumentId());
|
||||
if(auditStatus==2){
|
||||
editPaymentStatusDTO.setPaymentStatus(3);
|
||||
}else if(auditStatus==3||auditStatus==4){
|
||||
editPaymentStatusDTO.setPaymentStatus(2);
|
||||
}else if(auditStatus==4){
|
||||
editPaymentStatusDTO.setPaymentStatus(5);
|
||||
}
|
||||
AjaxResult ajaxResult = wlhyServiceFeign.editPaymentStatus(editPaymentStatusDTO);
|
||||
if (null != ajaxResult && !"200".equals(String.valueOf(ajaxResult.get("code")))) {
|
||||
log.error("同步车辆维修工时费支付状态信息失败:" + ajaxResult.get("msg"));
|
||||
throw new ServiceException("同步车辆维修工时费支付状态信息失败:" + ajaxResult.get("msg"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//更新详情数据
|
||||
if (!businessDocumentDetaliUpdateList.isEmpty()){
|
||||
boolean saveFlag = businessDocumentDetaliDomainService.updateBatch(businessDocumentDetaliUpdateList);
|
||||
if(!saveFlag){
|
||||
throw new ServiceException("更新应付单据审核信息失败!");
|
||||
}
|
||||
}
|
||||
//应付账单
|
||||
if (!verificationList.isEmpty()){
|
||||
boolean saveFlag = verificationDomainService.batchAddVerification(verificationList);
|
||||
if(!saveFlag){
|
||||
throw new ServiceException("保存应付账单失败!");
|
||||
}
|
||||
}
|
||||
//推送数据到tms:审核通过修改单据状态为【待付款】,审核拒绝修改状态为【已拒绝】并处理相关逻辑
|
||||
if(businessDocumentDetailDtoList.size()>0){
|
||||
AjaxResult ajaxResult = wlhyServiceFeign.syncBusinessDocumentInfo(businessDocumentDetailDtoList);
|
||||
if (null != ajaxResult && !"200".equals(String.valueOf(ajaxResult.get("code")))) {
|
||||
log.error("同步TMS业务单据信息失败:" + ajaxResult.get("msg"));
|
||||
throw new ServiceException("同步TMS业务单据信息失败:" + ajaxResult.get("msg"));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public Verification packVerication(BusinessDocumentDetali businessDocumentDetaliDTO){
|
||||
Date date = new Date();
|
||||
Verification verification = new Verification();
|
||||
verification.setOrganizationId(businessDocumentDetaliDTO.getOrganizationId());
|
||||
verification.setTopOrganizationId(businessDocumentDetaliDTO.getTopOrganizationId());
|
||||
verification.setVerificationStatus(1);//未支付
|
||||
verification.setBusinessDocumentDetaliId(businessDocumentDetaliDTO.getBusinessDocumentDetaliId());
|
||||
verification.setBusinessDocumentDetaliNumber(businessDocumentDetaliDTO.getBusinessDocumentDetaliNumber());
|
||||
verification.setBusinessDocumentId(businessDocumentDetaliDTO.getBusinessCocumentId());
|
||||
verification.setBusinessDocumentNumber(businessDocumentDetaliDTO.getWaybillNumber());
|
||||
verification.setBusinessType(businessDocumentDetaliDTO.getBusinessType());
|
||||
verification.setEnterAccountTime(date);
|
||||
verification.setExpenseItem(businessDocumentDetaliDTO.getExpenseItem());
|
||||
verification.setFirstSubject(businessDocumentDetaliDTO.getFirstSubject());
|
||||
verification.setFirstSubjectName(businessDocumentDetaliDTO.getFirstSubjectName());
|
||||
verification.setSecondSubject(businessDocumentDetaliDTO.getSecondSubject());
|
||||
verification.setSecondSubjectName(businessDocumentDetaliDTO.getSecondSubjectName());
|
||||
verification.setVerificationMoney(businessDocumentDetaliDTO.getAmount());
|
||||
verification.setAuditRemark(businessDocumentDetaliDTO.getAuditRemark());
|
||||
verification.setPayee(businessDocumentDetaliDTO.getPayee());
|
||||
verification.setPayId(businessDocumentDetaliDTO.getPayId());
|
||||
verification.setPayName(businessDocumentDetaliDTO.getPayName());
|
||||
verification.setLicenseNumber(businessDocumentDetaliDTO.getLicenseNumber());
|
||||
verification.setDepartmentId(businessDocumentDetaliDTO.getDepartmentId());
|
||||
verification.setDepartmentName(businessDocumentDetaliDTO.getDepartmentName());
|
||||
verification.setAccountHolderBank("");
|
||||
verification.setCreateTime(date);
|
||||
verification.setBillRemarks(businessDocumentDetaliDTO.getRemark());
|
||||
verification.setPaymentMethod(businessDocumentDetaliDTO.getPaymentMethod());
|
||||
verification.setFuelCardNumber(businessDocumentDetaliDTO.getFuelCardNumber());
|
||||
return verification;
|
||||
}
|
||||
@Override
|
||||
public void workflowProcessInstancesMore(String ids) {
|
||||
String [] idList=ids.split(",");
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
for (String id:idList) {
|
||||
ApprovalDocument approvalDocument=approvalDocumentMapper.selectById(id);
|
||||
if(ObjectUtil.isNotNull(approvalDocument)){
|
||||
if(StringUtils.isNotBlank(approvalDocument.getApprovalOrderNumber())){
|
||||
AjaxResult ajaxResult1=thirdPartyServiceFeign.processInstancesById(approvalDocument.getApprovalOrderNumber());
|
||||
if(ObjectUtil.isNotNull(ajaxResult1)&&"200".equals(String.valueOf(ajaxResult1.get("code")))){
|
||||
if(null==ajaxResult1.get("data")){
|
||||
throw new ServiceException("更新状态失败");
|
||||
}
|
||||
Map<String,Object> map = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult1.get("data")), Map.class);
|
||||
|
||||
GetProcessInstanceResponse startProcessInstanceResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map), GetProcessInstanceResponse.class);
|
||||
WorkflowProcessInstancesByIdDO workflowProcessInstancesByIdDO=new WorkflowProcessInstancesByIdDO();
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
throw new ServiceException("获取单个审批实例详情失败");
|
||||
}else{
|
||||
if(approvalDocument.getApprovalFormSource().equals("应付单据")){
|
||||
List<BusinessDocumentDetali> businessDocumentDetaliList=businessDocumentDetaliMapper.selectList(new QueryWrapper<BusinessDocumentDetali>()
|
||||
.lambda().eq(BusinessDocumentDetali::getInstanceId,approvalDocument.getApprovalOrderNumber())
|
||||
.eq(BusinessDocumentDetali::getDelFlag,1));
|
||||
for (BusinessDocumentDetali businessDocumentDetali1:businessDocumentDetaliList){
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("RUNNING")){
|
||||
businessDocumentDetali1.setApprovalStatus(2);
|
||||
businessDocumentDetali1.setAuditStatus(1);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
businessDocumentDetali1.setApprovalStatus(3);
|
||||
businessDocumentDetali1.setAuditStatus(4);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")){
|
||||
businessDocumentDetali1.setApprovalStatus(4);
|
||||
if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
businessDocumentDetali1.setAuditStatus(2);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
businessDocumentDetali1.setAuditStatus(3);
|
||||
}
|
||||
}
|
||||
businessDocumentDetali1.setApprovalResult(startProcessInstanceResponse.getBody().getResult().getResult());
|
||||
businessDocumentDetaliMapper.updateById(businessDocumentDetali1);
|
||||
}
|
||||
}else if(approvalDocument.getApprovalFormSource().equals("应收单据")){
|
||||
List<Reconciliation> reconciliationList=reconciliationMapper.selectList(new QueryWrapper<Reconciliation>()
|
||||
.lambda().eq(Reconciliation::getInstanceId,approvalDocument.getApprovalOrderNumber())
|
||||
.eq(Reconciliation::getDelFlag,1));
|
||||
for (Reconciliation reconciliation:reconciliationList){
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("RUNNING")){
|
||||
reconciliation.setApprovalStatus(2);
|
||||
reconciliation.setAuditStatus(1);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
reconciliation.setApprovalStatus(3);
|
||||
reconciliation.setAuditStatus(4);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")){
|
||||
reconciliation.setApprovalStatus(4);
|
||||
if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
reconciliation.setAuditStatus(2);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
reconciliation.setAuditStatus(3);
|
||||
}
|
||||
}
|
||||
reconciliation.setApprovalResult(startProcessInstanceResponse.getBody().getResult().getResult());
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
}
|
||||
}
|
||||
if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("RUNNING")){
|
||||
approvalDocument.setApprovalStatus(1L);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("TERMINATED")){
|
||||
approvalDocument.setApprovalStatus(4L);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getStatus().equals("COMPLETED")){
|
||||
if(startProcessInstanceResponse.getBody().getResult().getResult().equals("agree")){
|
||||
approvalDocument.setApprovalStatus(2L);
|
||||
}else if(startProcessInstanceResponse.getBody().getResult().getResult().equals("refuse")){
|
||||
approvalDocument.setApprovalStatus(3L);
|
||||
}
|
||||
}
|
||||
approvalDocument.setApprovalTitle(startProcessInstanceResponse.getBody().getResult().getTitle());
|
||||
approvalDocument.setApprovalNumber(startProcessInstanceResponse.getBody().getResult().getBusinessId());
|
||||
if(StringUtils.isNotBlank(startProcessInstanceResponse.getBody().getResult().getFinishTime())){
|
||||
String finishTime=startProcessInstanceResponse.getBody().getResult().getFinishTime().replace("T"," ").replace("Z",":00");;
|
||||
approvalDocument.setFinishTime(finishTime);
|
||||
}
|
||||
approvalDocument.setUpdateBy(loginUser.getUserid());
|
||||
approvalDocument.setUpdateByName(loginUser.getUsername());
|
||||
approvalDocument.setUpdateTime(new Date());
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultTasks> tasks=startProcessInstanceResponse.getBody().getResult().getTasks();
|
||||
if(ObjectUtil.isNotNull(tasks)&&tasks.size()>0){
|
||||
String userId=tasks.get(tasks.size()-1).getUserId();
|
||||
approvalDocument.setCurrentApprover(userId);
|
||||
AjaxResult ajaxResult2=thirdPartyServiceFeign.userGet(userId);
|
||||
if("200".equals(String.valueOf(ajaxResult2.get("code")))){
|
||||
Map<String,Object> map1 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult2.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map1), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
throw new ServiceException("获取单个审批实例详情失败");
|
||||
}else{
|
||||
approvalDocument.setCurrentApproverName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
approvalDocumentMapper.updateById(approvalDocument);
|
||||
}
|
||||
|
||||
GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult getProcessInstanceResponseBodyResult=startProcessInstanceResponse.getBody().getResult();
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords> operationRecordsList=getProcessInstanceResponseBodyResult.getOperationRecords();
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultTasks> tasksList=getProcessInstanceResponseBodyResult.getTasks();
|
||||
BeanUtils.copyProperties(getProcessInstanceResponseBodyResult,workflowProcessInstancesByIdDO);
|
||||
AjaxResult ajaxResult4=thirdPartyServiceFeign.userGet(getProcessInstanceResponseBodyResult.getOriginatorUserId());
|
||||
if("200".equals(String.valueOf(ajaxResult4.get("code")))){
|
||||
Map<String,Object> map2 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult4.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map2), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
|
||||
}else{
|
||||
workflowProcessInstancesByIdDO.setOriginatorUserName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
String createTime2=getProcessInstanceResponseBodyResult.getCreateTime().replace("T"," ").replace("Z",":00");;
|
||||
workflowProcessInstancesByIdDO.setCreateTime(createTime2);
|
||||
if(StringUtils.isNotBlank(getProcessInstanceResponseBodyResult.getFinishTime())){
|
||||
String finishTime1=getProcessInstanceResponseBodyResult.getFinishTime().replace("T"," ").replace("Z",":00");;
|
||||
workflowProcessInstancesByIdDO.setFinishTime(finishTime1);
|
||||
}
|
||||
List<OperationRecordsDO> operationRecordsDOList=new ArrayList<OperationRecordsDO>();
|
||||
List<TasksDO> tasksDOList=new ArrayList<TasksDO>();
|
||||
if(ObjectUtil.isNotNull(operationRecordsList)&&operationRecordsList.size()>0){
|
||||
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords getProcessInstanceResponseBodyResultOperationRecords:operationRecordsList){
|
||||
OperationRecordsDO operationRecordsDO=new OperationRecordsDO();
|
||||
BeanUtils.copyProperties(getProcessInstanceResponseBodyResultOperationRecords,operationRecordsDO);
|
||||
String date=getProcessInstanceResponseBodyResultOperationRecords.getDate().replace("T"," ").replace("Z",":00");;
|
||||
operationRecordsDO.setDate(date);
|
||||
AjaxResult ajaxResult3=thirdPartyServiceFeign.userGet(getProcessInstanceResponseBodyResultOperationRecords.getUserId());
|
||||
if("200".equals(String.valueOf(ajaxResult3.get("code")))){
|
||||
Map<String,Object> map2 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult3.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map2), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
|
||||
}else{
|
||||
operationRecordsDO.setUserName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
operationRecordsDOList.add(operationRecordsDO);
|
||||
}
|
||||
}
|
||||
if(ObjectUtil.isNotNull(tasksList)&&tasksList.size()>0){
|
||||
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultTasks getProcessInstanceResponseBodyResultTasks:tasksList){
|
||||
TasksDO tasksDO=new TasksDO();
|
||||
BeanUtils.copyProperties(getProcessInstanceResponseBodyResultTasks,tasksDO);
|
||||
String createTime=getProcessInstanceResponseBodyResultTasks.getCreateTime().replace("T"," ").replace("Z",":00");;
|
||||
tasksDO.setCreateTime(createTime);
|
||||
if(StringUtils.isNotBlank(getProcessInstanceResponseBodyResultTasks.getFinishTime())){
|
||||
String finishTime1=getProcessInstanceResponseBodyResultTasks.getFinishTime().replace("T"," ").replace("Z",":00");;
|
||||
tasksDO.setFinishTime(finishTime1);
|
||||
}
|
||||
AjaxResult ajaxResult3=thirdPartyServiceFeign.userGet(getProcessInstanceResponseBodyResultTasks.getUserId());
|
||||
if("200".equals(String.valueOf(ajaxResult3.get("code")))){
|
||||
Map<String,Object> map2 = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult3.get("data")), Map.class);
|
||||
OapiV2UserGetResponse oapiV2UserGetResponse = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(map2), OapiV2UserGetResponse.class);
|
||||
if(ObjectUtil.isNull(startProcessInstanceResponse)){
|
||||
|
||||
}else{
|
||||
tasksDO.setUserName(oapiV2UserGetResponse.getResult().getName());
|
||||
}
|
||||
}
|
||||
tasksDOList.add(tasksDO);
|
||||
}
|
||||
}
|
||||
workflowProcessInstancesByIdDO.setOperationRecords(operationRecordsDOList);
|
||||
workflowProcessInstancesByIdDO.setTasks(tasksDOList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApprovalStatsVO getApprovalStatistics(Long orgId) {
|
||||
return approvalDocumentMapper.countByStatus(orgId);
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 审批单据对象 approval_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "审批单据对象", description = "审批单据响应对象")
|
||||
public class ApprovalDocumentPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审批单号")
|
||||
@Excel(name = "审批单号")
|
||||
private String approvalOrderNumber;
|
||||
|
||||
@ApiModelProperty("审批类型")
|
||||
@Excel(name = "审批类型")
|
||||
private String approvalType;
|
||||
|
||||
@ApiModelProperty("审批标题")
|
||||
@Excel(name = "审批标题")
|
||||
private String approvalTitle;
|
||||
|
||||
@ApiModelProperty("审批状态 0-未审批 1-审批中 2-审批通过 3-审批拒绝 4-已撤销 5-全部")
|
||||
@Excel(name = "审批状态 0-未审批 1-审批中 2-审批通过 3-审批拒绝 4-已撤销 5-全部")
|
||||
private Long approvalStatus;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
private String finishTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String approvalOpinion;
|
||||
|
||||
@ApiModelProperty("审批单来源")
|
||||
@Excel(name = "审批单来源")
|
||||
private String approvalFormSource;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("全部数量")
|
||||
@Excel(name = "全部数量")
|
||||
private Integer allNumber;
|
||||
|
||||
@ApiModelProperty("审批中数量")
|
||||
@Excel(name = "审批中数量")
|
||||
private Integer underApprovalNumber;
|
||||
|
||||
@ApiModelProperty("通过数量")
|
||||
@Excel(name = "通过数量")
|
||||
private Integer passNumber;
|
||||
|
||||
@ApiModelProperty("撤销数量")
|
||||
@Excel(name = "撤销数量")
|
||||
private Integer revocationsNumber;
|
||||
|
||||
@ApiModelProperty("单据数量")
|
||||
@Excel(name = "单据数量")
|
||||
private Integer documentsNumber;
|
||||
@ApiModelProperty("当前审批人id")
|
||||
@Excel(name = "当前审批人id")
|
||||
private String currentApprover;
|
||||
@ApiModelProperty("当前审批人名称")
|
||||
@Excel(name = "当前审批人名称")
|
||||
private String currentApproverName;
|
||||
|
||||
@ApiModelProperty("钉钉审批单号")
|
||||
@Excel(name = "钉钉审批单号")
|
||||
private String approvalNumber;
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 审批单据对象 approval_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ApprovalDocumentDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审批单号")
|
||||
@Excel(name = "审批单号")
|
||||
private String approvalOrderNumber;
|
||||
|
||||
@ApiModelProperty("审批类型")
|
||||
@Excel(name = "审批类型")
|
||||
private String approvalType;
|
||||
|
||||
@ApiModelProperty("审批标题")
|
||||
@Excel(name = "审批标题")
|
||||
private String approvalTitle;
|
||||
|
||||
@ApiModelProperty("审批状态 0-未审批 1-审批中 2-审批通过 3-审批拒绝 4-已撤销")
|
||||
@Excel(name = "审批状态 0-未审批 1-审批中 2-审批通过 3-审批拒绝 4-已撤销")
|
||||
private Long approvalStatus;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
private String finishTime;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String approvalOpinion;
|
||||
|
||||
@ApiModelProperty("审批单来源")
|
||||
@Excel(name = "审批单来源")
|
||||
private String approvalFormSource;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("钉钉审批单号")
|
||||
@Excel(name = "钉钉审批单号")
|
||||
private String approvalNumber;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApprovalDocumentSumDO {
|
||||
|
||||
@ApiModelProperty("全部数量")
|
||||
@Excel(name = "全部数量")
|
||||
private Integer allNumber;
|
||||
|
||||
@ApiModelProperty("审批中数量")
|
||||
@Excel(name = "审批中数量")
|
||||
private Integer underApprovalNumber;
|
||||
|
||||
@ApiModelProperty("通过数量")
|
||||
@Excel(name = "通过数量")
|
||||
private Integer passNumber;
|
||||
|
||||
@ApiModelProperty("撤销数量")
|
||||
@Excel(name = "撤销数量")
|
||||
private Integer revocationsNumber;
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.todo;
|
||||
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
|
||||
import com.aliyun.tea.NameInMap;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OperationRecordsDO {
|
||||
/**
|
||||
* 操作人userId
|
||||
*/
|
||||
@ApiModelProperty("操作人userId")
|
||||
public String userId;
|
||||
|
||||
/**
|
||||
* 操作人userName
|
||||
*/
|
||||
@ApiModelProperty("操作人userName")
|
||||
public String userName;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@ApiModelProperty("操作时间")
|
||||
public String date;
|
||||
|
||||
/**
|
||||
* 操作类型:
|
||||
*
|
||||
* EXECUTE_TASK_NORMAL:正常执行任务
|
||||
*
|
||||
* EXECUTE_TASK_AGENT:代理人执行任务
|
||||
*
|
||||
* APPEND_TASK_BEFORE:前加签任务
|
||||
*
|
||||
* APPEND_TASK_AFTER:后加签任务
|
||||
*
|
||||
* REDIRECT_TASK:转交任务
|
||||
*
|
||||
* START_PROCESS_INSTANCE:发起流程实例
|
||||
*
|
||||
* TERMINATE_PROCESS_INSTANCE:终止(撤销)流程实例
|
||||
*
|
||||
* FINISH_PROCESS_INSTANCE:结束流程实例
|
||||
*
|
||||
* ADD_REMARK:添加评论
|
||||
*
|
||||
* REDIRECT_PROCESS:审批退回
|
||||
*
|
||||
* PROCESS_CC:抄送
|
||||
*/
|
||||
@ApiModelProperty("操作类型")
|
||||
public String type;
|
||||
|
||||
/**
|
||||
* 操作结果:
|
||||
*
|
||||
* AGREE:同意
|
||||
*
|
||||
* REFUSE:拒绝
|
||||
*
|
||||
* NONE:未处理
|
||||
*/
|
||||
@ApiModelProperty("操作结果")
|
||||
public String result;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
@ApiModelProperty("评论内容")
|
||||
public String remark;
|
||||
/**
|
||||
* 评论附件列表
|
||||
*/
|
||||
@ApiModelProperty("评论附件列表")
|
||||
public java.util.List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecordsAttachments> attachments;
|
||||
|
||||
/**
|
||||
* 任务节点ID
|
||||
*/
|
||||
@ApiModelProperty("任务节点ID")
|
||||
public String activityId;
|
||||
|
||||
/**
|
||||
* 任务节点名称
|
||||
*/
|
||||
@ApiModelProperty("任务节点名称")
|
||||
public String showName;
|
||||
|
||||
/**
|
||||
* 抄送人userIds列表
|
||||
*/
|
||||
@ApiModelProperty("抄送人userIds列表")
|
||||
public java.util.List<String> ccUserIds;
|
||||
|
||||
|
||||
/**
|
||||
* 单个图片链接
|
||||
*/
|
||||
@ApiModelProperty("单个图片链接")
|
||||
public java.util.List<String> images;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.todo;
|
||||
|
||||
import com.aliyun.tea.NameInMap;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TasksDO {
|
||||
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
@ApiModelProperty("任务ID")
|
||||
public Long taskId;
|
||||
|
||||
/**
|
||||
* 任务处理人
|
||||
*/
|
||||
@ApiModelProperty("任务处理人")
|
||||
public String userId;
|
||||
|
||||
/**
|
||||
* 任务处理人名称
|
||||
*/
|
||||
@ApiModelProperty("任务处理人名称")
|
||||
public String userName;
|
||||
|
||||
/**
|
||||
* 任务状态:
|
||||
*
|
||||
* NEW:未启动
|
||||
*
|
||||
* RUNNING:处理中
|
||||
*
|
||||
* PAUSED:暂停
|
||||
*
|
||||
* CANCELED:取消
|
||||
*
|
||||
* COMPLETED:完成
|
||||
*
|
||||
* TERMINATED:终止
|
||||
*/
|
||||
@ApiModelProperty("任务状态")
|
||||
public String status;
|
||||
|
||||
/**
|
||||
* 结果:
|
||||
*
|
||||
* AGREE:同意
|
||||
*
|
||||
* REFUSE:拒绝
|
||||
*
|
||||
* REDIRECTED:转交
|
||||
*/
|
||||
@ApiModelProperty("结果")
|
||||
public String result;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty("开始时间")
|
||||
public String createTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty("结束时间")
|
||||
public String finishTime;
|
||||
|
||||
/**
|
||||
* 移动端任务URL
|
||||
*/
|
||||
@ApiModelProperty("移动端任务URL")
|
||||
public String mobileUrl;
|
||||
|
||||
/**
|
||||
* PC端任务URL
|
||||
*/
|
||||
@ApiModelProperty("PC端任务URL")
|
||||
public String pcUrl;
|
||||
|
||||
/**
|
||||
* 任务节点ID
|
||||
*/
|
||||
@ApiModelProperty("任务节点ID")
|
||||
public String activityId;
|
||||
|
||||
/**
|
||||
* 实例ID
|
||||
*/
|
||||
@ApiModelProperty("实例ID")
|
||||
public String processInstanceId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
package com.linke.finance.domain.approvalDocument.repository.todo;
|
||||
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
|
||||
import com.aliyun.tea.NameInMap;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorkflowProcessInstancesByIdDO {
|
||||
|
||||
/**
|
||||
* 审批实例标题
|
||||
*/
|
||||
@ApiModelProperty("审批实例标题")
|
||||
public String title;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty("结束时间")
|
||||
public String finishTime;
|
||||
|
||||
/**
|
||||
* 发起人的userId
|
||||
*/
|
||||
@ApiModelProperty("发起人的userId")
|
||||
public String originatorUserId;
|
||||
|
||||
/**
|
||||
* 发起人的userId
|
||||
*/
|
||||
@ApiModelProperty("发起人的名称")
|
||||
public String originatorUserName;
|
||||
|
||||
/**
|
||||
* 发起人的部门,-1表示根部门
|
||||
*/
|
||||
@ApiModelProperty("发起人的部门,-1表示根部门")
|
||||
public String originatorDeptId;
|
||||
|
||||
/**
|
||||
* 发起人的部门名称>
|
||||
*/
|
||||
@ApiModelProperty("发起人的部门名称")
|
||||
public String originatorDeptName;
|
||||
|
||||
/**
|
||||
* 审批状态:
|
||||
*
|
||||
* RUNNING:审批中
|
||||
* TERMINATED:已撤销
|
||||
* COMPLETED:审批完成
|
||||
*/
|
||||
@ApiModelProperty("审批状态")
|
||||
public String status;
|
||||
|
||||
/**
|
||||
* 审批人userId
|
||||
*/
|
||||
@ApiModelProperty("审批人userId")
|
||||
public java.util.List<String> approverUserIds;
|
||||
/**
|
||||
* 抄送人userId
|
||||
*/
|
||||
@ApiModelProperty("抄送人userId")
|
||||
public java.util.List<String> ccUserIds;
|
||||
|
||||
/**
|
||||
* 审批结果:
|
||||
*
|
||||
* agree:同意
|
||||
*
|
||||
* refuse:拒绝
|
||||
*/
|
||||
@ApiModelProperty("审批结果")
|
||||
public String result;
|
||||
|
||||
/**
|
||||
* 审批实例业务编号
|
||||
*/
|
||||
@ApiModelProperty("审批实例业务编号")
|
||||
public String businessId;
|
||||
|
||||
|
||||
/**
|
||||
* 操作记录列表
|
||||
*/
|
||||
@ApiModelProperty("操作记录列表")
|
||||
public java.util.List<OperationRecordsDO> operationRecords;
|
||||
|
||||
/**
|
||||
* 任务列表
|
||||
*/
|
||||
@ApiModelProperty("任务列表")
|
||||
public java.util.List<TasksDO> tasks;
|
||||
|
||||
|
||||
/**
|
||||
* 审批实例业务动作:
|
||||
*
|
||||
* MODIFY:表示该审批实例是基于原来的实例修改而来
|
||||
* REVOKE:表示该审批实例是由原来的实例撤销后重新发起的
|
||||
* NONE:表示正常发起
|
||||
*/
|
||||
@ApiModelProperty("审批实例业务动作")
|
||||
public String bizAction;
|
||||
|
||||
|
||||
/**
|
||||
* 审批附属实例
|
||||
*/
|
||||
@ApiModelProperty("审批实例业务动作")
|
||||
public java.util.List<String> attachedProcessInstanceIds;
|
||||
|
||||
/**
|
||||
* 主流程实例标识
|
||||
*/
|
||||
@ApiModelProperty("主流程实例标识")
|
||||
public String mainProcessInstanceId;
|
||||
/**
|
||||
* 表单组件详情列表
|
||||
*/
|
||||
@ApiModelProperty("表单组件详情列表")
|
||||
public java.util.List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues> formComponentValues;
|
||||
|
||||
/**
|
||||
* 用户自定义业务参数透出
|
||||
*/
|
||||
@ApiModelProperty("用户自定义业务参数透出")
|
||||
public String bizData;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
public String createTime;
|
||||
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.linke.finance.domain.approvalDocument.service;
|
||||
|
||||
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse;
|
||||
import com.linke.finance.domain.approvalDocument.entity.ApprovalDocument;
|
||||
import com.linke.finance.domain.approvalDocument.repository.facade.IApprovalDocumentService;
|
||||
import com.linke.finance.domain.approvalDocument.repository.po.ApprovalDocumentPO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.ApprovalDocumentDO;
|
||||
import com.linke.finance.interfaces.vo.ApprovalStatsVO;
|
||||
import com.linke.finance.domain.approvalDocument.repository.todo.WorkflowProcessInstancesByIdDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 审批单据
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ApprovalDocumentDomainService {
|
||||
|
||||
@Autowired
|
||||
private IApprovalDocumentService approvalDocumentService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询审批单据列表
|
||||
*/
|
||||
public List<ApprovalDocumentPO> queryList(ApprovalDocumentDO approvalDocumentDO) {
|
||||
return approvalDocumentService.queryList(approvalDocumentDO);
|
||||
}
|
||||
|
||||
public ApprovalStatsVO getApprovalStatistics(Long orgId){
|
||||
return approvalDocumentService.getApprovalStatistics(orgId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增审批单据
|
||||
*/
|
||||
public Boolean insert(ApprovalDocumentDO approvalDocumentDO) {
|
||||
|
||||
return approvalDocumentService.insert(approvalDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审批单据
|
||||
*/
|
||||
public Boolean update(ApprovalDocumentDO approvalDocumentDO) {
|
||||
return approvalDocumentService.update(approvalDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除审批单据
|
||||
*/
|
||||
public Boolean delete(Long[] ids) {
|
||||
return approvalDocumentService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审批单据详细信息
|
||||
*/
|
||||
public ApprovalDocumentPO getInfo(Long id)
|
||||
{
|
||||
return approvalDocumentService.getInfo(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据钉钉审批id获取审批单据详细信息
|
||||
*/
|
||||
public ApprovalDocument getByProcessInstanceId(String processInstanceId)
|
||||
{
|
||||
return approvalDocumentService.getByProcessInstanceId(processInstanceId);
|
||||
}
|
||||
/**
|
||||
* 获取单个审批实例详情
|
||||
*/
|
||||
public WorkflowProcessInstancesByIdDO workflowProcessInstancesById(Long businessDocumentDetaliId)
|
||||
{
|
||||
return approvalDocumentService.workflowProcessInstancesById(businessDocumentDetaliId);
|
||||
}
|
||||
public void workflowProcessInstancesMore(String ids)
|
||||
{
|
||||
approvalDocumentService.workflowProcessInstancesMore(ids);
|
||||
}
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 审批单据明细对象 approval_document_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ApprovalDocumentDetail extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审批单id")
|
||||
@Excel(name = "审批单id")
|
||||
private Long approvalDocumentId;
|
||||
|
||||
@ApiModelProperty("业务单据号")
|
||||
@Excel(name = "业务单据号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款人姓名")
|
||||
@Excel(name = "收款人姓名")
|
||||
private String payName;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licenseNumber;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.entity.ApprovalDocumentDetail;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.po.ApprovalDocumentDetailPO;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.todo.ApprovalDocumentDetailDO;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批单据明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface IApprovalDocumentDetailService extends IService<ApprovalDocumentDetail>
|
||||
{
|
||||
/**
|
||||
* 分页查询审批单据明细列表
|
||||
*/
|
||||
public List<ApprovalDocumentDetailPO> queryList(ApprovalDocumentDetailDO approvalDocumentDetailDO);
|
||||
|
||||
/**
|
||||
* 新增审批单据明细
|
||||
*/
|
||||
public Boolean insert(ApprovalDocumentDetailDO approvalDocumentDetailDO);
|
||||
|
||||
/**
|
||||
* 修改审批单据明细
|
||||
*/
|
||||
public Boolean update(ApprovalDocumentDetailDO approvalDocumentDetailDO);
|
||||
|
||||
/**
|
||||
* 批量删除审批单据明细
|
||||
*/
|
||||
public Boolean delete(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询审批单据明细
|
||||
*/
|
||||
public ApprovalDocumentDetailPO getInfo(Long id);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import com.linke.finance.domain.approvalDocumentDetail.entity.ApprovalDocumentDetail;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.po.ApprovalDocumentDetailPO;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.todo.ApprovalDocumentDetailDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 审批单据明细Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface ApprovalDocumentDetailMapper extends BaseMapper<ApprovalDocumentDetail>
|
||||
{
|
||||
/**
|
||||
* 查询审批单据明细列表
|
||||
*/
|
||||
public List<ApprovalDocumentDetailPO> queryList(ApprovalDocumentDetailDO approvalDocumentDetailDO);
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import com.linke.finance.domain.approvalDocumentDetail.entity.ApprovalDocumentDetail;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.facade.IApprovalDocumentDetailService;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.mapper.ApprovalDocumentDetailMapper;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.po.ApprovalDocumentDetailPO;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.todo.ApprovalDocumentDetailDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批单据明细Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Service
|
||||
public class ApprovalDocumentDetailImpl extends ServiceImpl<ApprovalDocumentDetailMapper, ApprovalDocumentDetail> implements IApprovalDocumentDetailService {
|
||||
@Autowired
|
||||
private ApprovalDocumentDetailMapper approvalDocumentDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询审批单据明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ApprovalDocumentDetailPO> queryList(ApprovalDocumentDetailDO approvalDocumentDetailDO)
|
||||
{
|
||||
return approvalDocumentDetailMapper.queryList(approvalDocumentDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增审批单据明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ApprovalDocumentDetailDO approvalDocumentDetailDO) {
|
||||
ApprovalDocumentDetail approvalDocumentDetail = new ApprovalDocumentDetail();
|
||||
BeanUtils.copyProperties(approvalDocumentDetailDO,approvalDocumentDetail);
|
||||
return this.save(approvalDocumentDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审批单据明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ApprovalDocumentDetailDO approvalDocumentDetailDO) {
|
||||
ApprovalDocumentDetail approvalDocumentDetail = new ApprovalDocumentDetail();
|
||||
BeanUtils.copyProperties(approvalDocumentDetailDO,approvalDocumentDetail);
|
||||
return this.updateById(approvalDocumentDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除审批单据明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] ids ) {
|
||||
List<ApprovalDocumentDetail> list = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
ApprovalDocumentDetail approvalDocumentDetail = new ApprovalDocumentDetail();
|
||||
approvalDocumentDetail.setId(id);
|
||||
approvalDocumentDetail.setDelFlag(2);
|
||||
list.add(approvalDocumentDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审批单据明细
|
||||
*/
|
||||
@Override
|
||||
public ApprovalDocumentDetailPO getInfo(Long id) {
|
||||
ApprovalDocumentDetail approvalDocumentDetail = this.getById(id);
|
||||
ApprovalDocumentDetailPO approvalDocumentDetailPO = new ApprovalDocumentDetailPO();
|
||||
BeanUtils.copyProperties(approvalDocumentDetail,approvalDocumentDetailPO);
|
||||
return approvalDocumentDetailPO;
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 审批单据明细对象 approval_document_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "审批单据明细对象", description = "审批单据明细响应对象")
|
||||
public class ApprovalDocumentDetailPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审批单id")
|
||||
@Excel(name = "审批单id")
|
||||
private Long approvalDocumentId;
|
||||
|
||||
@ApiModelProperty("业务单据号")
|
||||
@Excel(name = "业务单据号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款人姓名")
|
||||
@Excel(name = "收款人姓名")
|
||||
private String payName;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licenseNumber;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 审批单据明细对象 approval_document_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ApprovalDocumentDetailDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("$column.columnComment")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("审批单id")
|
||||
@Excel(name = "审批单id")
|
||||
private Long approvalDocumentId;
|
||||
|
||||
@ApiModelProperty("业务单据号")
|
||||
@Excel(name = "业务单据号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款人姓名")
|
||||
@Excel(name = "收款人姓名")
|
||||
private String payName;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String licenseNumber;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.linke.finance.domain.approvalDocumentDetail.service;
|
||||
|
||||
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.facade.IApprovalDocumentDetailService;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.po.ApprovalDocumentDetailPO;
|
||||
import com.linke.finance.domain.approvalDocumentDetail.repository.todo.ApprovalDocumentDetailDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 审批单据明细
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ApprovalDocumentDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IApprovalDocumentDetailService approvalDocumentDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询审批单据明细列表
|
||||
*/
|
||||
public List<ApprovalDocumentDetailPO> queryList(ApprovalDocumentDetailDO approvalDocumentDetailDO) {
|
||||
return approvalDocumentDetailService.queryList(approvalDocumentDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增审批单据明细
|
||||
*/
|
||||
public Boolean insert(ApprovalDocumentDetailDO approvalDocumentDetailDO) {
|
||||
|
||||
return approvalDocumentDetailService.insert(approvalDocumentDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审批单据明细
|
||||
*/
|
||||
public Boolean update(ApprovalDocumentDetailDO approvalDocumentDetailDO) {
|
||||
return approvalDocumentDetailService.update(approvalDocumentDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除审批单据明细
|
||||
*/
|
||||
public Boolean delete(Long[] ids) {
|
||||
return approvalDocumentDetailService.delete(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审批单据明细详细信息
|
||||
*/
|
||||
public ApprovalDocumentDetailPO getInfo(Long id)
|
||||
{
|
||||
return approvalDocumentDetailService.getInfo(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.linke.finance.domain.auditConfiguration.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 审核配置对象 audit_configuration
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AuditConfiguration extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("审核配置id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long auditConfigurationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织表id")
|
||||
@Excel(name = "一级组织表id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("角色表id")
|
||||
@Excel(name = "角色表id")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty("角色编码")
|
||||
@Excel(name = "角色编码")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty("角色名称")
|
||||
@Excel(name = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@Excel(name = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("是否开启:1-开启,2-关闭")
|
||||
private Integer isEnabled;
|
||||
|
||||
@ApiModelProperty("审核类型:1-回单审核,2-支付审核,3-结算审核")
|
||||
@Excel(name = "审核类型:1-回单审核,2-支付审核,3-结算审核")
|
||||
private Integer auditType;
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.linke.finance.domain.auditConfiguration.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.auditConfiguration.entity.AuditConfiguration;
|
||||
import com.mhd.common.core.domain.po.AuditConfigurationPO;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.todo.AuditConfigurationDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核配置Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
public interface IAuditConfigurationService extends IService<AuditConfiguration>
|
||||
{
|
||||
/**
|
||||
* 分页查询审核配置列表
|
||||
*/
|
||||
public List<AuditConfigurationPO> queryList(AuditConfigurationDO auditConfigurationDO);
|
||||
|
||||
/**
|
||||
* 新增审核配置
|
||||
*/
|
||||
public Boolean insert(AuditConfigurationDO auditConfigurationDO);
|
||||
|
||||
/**
|
||||
* 修改审核配置
|
||||
*/
|
||||
public Boolean update(AuditConfigurationDO auditConfigurationDO);
|
||||
|
||||
/**
|
||||
* 批量删除审核配置
|
||||
*/
|
||||
public Boolean delete(Long[] auditConfigurationIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询审核配置
|
||||
*/
|
||||
public AuditConfigurationPO getInfo(Long auditConfigurationId);
|
||||
|
||||
void deleteByAuditConfiguration(AuditConfigurationDO auditConfigurationDO);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.linke.finance.domain.auditConfiguration.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.auditConfiguration.entity.AuditConfiguration;
|
||||
import com.mhd.common.core.domain.po.AuditConfigurationPO;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.todo.AuditConfigurationDO;
|
||||
|
||||
/**
|
||||
* 审核配置Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
public interface AuditConfigurationMapper extends BaseMapper<AuditConfiguration>
|
||||
{
|
||||
/**
|
||||
* 查询审核配置列表
|
||||
*/
|
||||
public List<AuditConfigurationPO> queryList(AuditConfigurationDO auditConfigurationDO);
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.linke.finance.domain.auditConfiguration.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.auditConfiguration.entity.AuditConfiguration;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.facade.IAuditConfigurationService;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.mapper.AuditConfigurationMapper;
|
||||
import com.mhd.common.core.domain.po.AuditConfigurationPO;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.todo.AuditConfigurationDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核配置Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
@Service
|
||||
public class AuditConfigurationImpl extends ServiceImpl<AuditConfigurationMapper, AuditConfiguration> implements IAuditConfigurationService{
|
||||
@Autowired
|
||||
private AuditConfigurationMapper auditConfigurationMapper;
|
||||
|
||||
/**
|
||||
* 查询审核配置列表
|
||||
*/
|
||||
@Override
|
||||
public List<AuditConfigurationPO> queryList(AuditConfigurationDO auditConfigurationDO)
|
||||
{
|
||||
return auditConfigurationMapper.queryList(auditConfigurationDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增审核配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(AuditConfigurationDO auditConfigurationDO) {
|
||||
AuditConfiguration auditConfiguration = new AuditConfiguration();
|
||||
BeanUtils.copyProperties(auditConfigurationDO,auditConfiguration);
|
||||
return this.save(auditConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审核配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(AuditConfigurationDO auditConfigurationDO) {
|
||||
AuditConfiguration auditConfiguration = new AuditConfiguration();
|
||||
BeanUtils.copyProperties(auditConfigurationDO,auditConfiguration);
|
||||
return this.updateById(auditConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除审核配置
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] auditConfigurationIds ) {
|
||||
List<AuditConfiguration> list = new ArrayList<>();
|
||||
for (Long id : auditConfigurationIds) {
|
||||
AuditConfiguration auditConfiguration = new AuditConfiguration();
|
||||
auditConfiguration.setAuditConfigurationId(id);
|
||||
auditConfiguration.setDelFlag(2);
|
||||
list.add(auditConfiguration);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审核配置
|
||||
*/
|
||||
@Override
|
||||
public AuditConfigurationPO getInfo(Long auditConfigurationId) {
|
||||
AuditConfiguration auditConfiguration = this.getById(auditConfigurationId);
|
||||
AuditConfigurationPO auditConfigurationPO = new AuditConfigurationPO();
|
||||
BeanUtils.copyProperties(auditConfiguration,auditConfigurationPO);
|
||||
return auditConfigurationPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByAuditConfiguration(AuditConfigurationDO auditConfigurationDO) {
|
||||
auditConfigurationMapper.delete(new LambdaQueryWrapper<AuditConfiguration>()
|
||||
.eq(AuditConfiguration::getAuditType, auditConfigurationDO.getAuditType())
|
||||
.eq(AuditConfiguration::getOrganizationId, auditConfigurationDO.getOrganizationId()));
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.linke.finance.domain.auditConfiguration.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 审核配置对象 audit_configuration
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AuditConfigurationDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("审核配置id")
|
||||
private Long auditConfigurationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织表id")
|
||||
@Excel(name = "一级组织表id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("角色表id")
|
||||
@Excel(name = "角色表id")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty("角色编码")
|
||||
@Excel(name = "角色编码")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty("角色名称")
|
||||
@Excel(name = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@Excel(name = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("是否开启:1-开启,2-关闭")
|
||||
private Integer isEnabled;
|
||||
|
||||
@ApiModelProperty("审核类型:1-回单审核,2-支付审核,3-结算审核")
|
||||
@Excel(name = "审核类型:1-回单审核,2-支付审核,3-结算审核")
|
||||
private Integer auditType;
|
||||
|
||||
@ApiModelProperty("审核配置明细")
|
||||
private List<AuditConfigurationDO> auditConfigurations;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.linke.finance.domain.auditConfiguration.service;
|
||||
|
||||
import com.linke.finance.domain.auditConfiguration.entity.AuditConfiguration;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.facade.IAuditConfigurationService;
|
||||
import com.mhd.common.core.domain.po.AuditConfigurationPO;
|
||||
import com.linke.finance.domain.auditConfiguration.repository.todo.AuditConfigurationDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 审核配置
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AuditConfigurationDomainService {
|
||||
|
||||
@Autowired
|
||||
private IAuditConfigurationService auditConfigurationService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询审核配置列表
|
||||
*/
|
||||
public List<AuditConfigurationPO> queryList(AuditConfigurationDO auditConfigurationDO) {
|
||||
return auditConfigurationService.queryList(auditConfigurationDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增审核配置
|
||||
*/
|
||||
public Boolean insert(AuditConfigurationDO auditConfigurationDO) {
|
||||
|
||||
return auditConfigurationService.insert(auditConfigurationDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改审核配置
|
||||
*/
|
||||
public Boolean update(AuditConfigurationDO auditConfigurationDO) {
|
||||
return auditConfigurationService.update(auditConfigurationDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除审核配置
|
||||
*/
|
||||
public Boolean delete(Long[] auditConfigurationIds) {
|
||||
return auditConfigurationService.delete(auditConfigurationIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核配置详细信息
|
||||
*/
|
||||
public AuditConfigurationPO getInfo(Long auditConfigurationId)
|
||||
{
|
||||
return auditConfigurationService.getInfo(auditConfigurationId);
|
||||
}
|
||||
|
||||
|
||||
public void deleteByAuditConfiguration(AuditConfigurationDO auditConfigurationDO) {
|
||||
auditConfigurationService.deleteByAuditConfiguration(auditConfigurationDO);
|
||||
}
|
||||
|
||||
public void saveBatch(List<AuditConfiguration> list) {
|
||||
auditConfigurationService.saveBatch(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.linke.finance.domain.branchBill.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 网点账单对象 branch_bill
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BranchBill extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long branchBillId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchInId;
|
||||
|
||||
@ApiModelProperty("收账网点名称")
|
||||
@Excel(name = "收账网点名称")
|
||||
private String branchInName;
|
||||
|
||||
@ApiModelProperty("交账网点id")
|
||||
@Excel(name = "交账网点id")
|
||||
private Long branchOutId;
|
||||
|
||||
@ApiModelProperty("交账网点名称")
|
||||
@Excel(name = "交账网点名称")
|
||||
private String branchOutName;
|
||||
|
||||
@ApiModelProperty("交账记录号")
|
||||
@Excel(name = "交账记录号")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("交账状态:1-未确认 2-驳回 3-确认")
|
||||
@Excel(name = "交账状态:1-未确认 2-驳回 3-确认")
|
||||
private Integer billStatus;
|
||||
|
||||
@ApiModelProperty("交账周期开始")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交账周期开始", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date billTimeStart;
|
||||
|
||||
@ApiModelProperty("交账周期结束")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交账周期结束", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date billTimeEnd;
|
||||
|
||||
@ApiModelProperty("应交金额 单位:元")
|
||||
@Excel(name = "应交金额 单位:元")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty("上交金额 单位:元")
|
||||
@Excel(name = "上交金额 单位:元")
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
@ApiModelProperty("合计收入 单位:元")
|
||||
@Excel(name = "合计收入 单位:元")
|
||||
private BigDecimal totalIncome;
|
||||
|
||||
@ApiModelProperty("合计支出 单位:元")
|
||||
@Excel(name = "合计支出 单位:元")
|
||||
private BigDecimal totalExpense;
|
||||
|
||||
@ApiModelProperty("上交笔数")
|
||||
@Excel(name = "上交笔数")
|
||||
private Long number;
|
||||
|
||||
@ApiModelProperty("上期结余 单位:元")
|
||||
@Excel(name = "上期结余 单位:元")
|
||||
private BigDecimal lastRemainingAmount;
|
||||
|
||||
@ApiModelProperty("当期结余:应交金额+上期结余-上交金额 单位:元")
|
||||
@Excel(name = "当期结余:应交金额+上期结余-上交金额 单位:元")
|
||||
private BigDecimal remainingAmount;
|
||||
|
||||
@ApiModelProperty(name = "截止时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deadlineTime;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date authTime;
|
||||
|
||||
@ApiModelProperty("审核网点id")
|
||||
@Excel(name = "审核网点id")
|
||||
private Integer authBranchId;
|
||||
|
||||
@ApiModelProperty("审核网点名称")
|
||||
@Excel(name = "审核网点名称")
|
||||
private String authBranchName;
|
||||
|
||||
@ApiModelProperty("审核用户id")
|
||||
@Excel(name = "审核用户id")
|
||||
private Integer authUserId;
|
||||
|
||||
@ApiModelProperty("审核用户名称")
|
||||
@Excel(name = "审核用户名称")
|
||||
private String authUserName;
|
||||
|
||||
@ApiModelProperty("上交方式(1-线下转账,2-钱包转账)")
|
||||
@Excel(name = "上交方式(1-线下转账,2-钱包转账)")
|
||||
private Integer payMethod;
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.linke.finance.domain.branchBill.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.branchBill.entity.BranchBill;
|
||||
import com.linke.finance.domain.branchBill.repository.po.BranchBillPO;
|
||||
import com.linke.finance.domain.branchBill.repository.todo.BranchBillDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点账单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
public interface IBranchBillService extends IService<BranchBill>
|
||||
{
|
||||
/**
|
||||
* 分页查询网点账单列表
|
||||
*/
|
||||
public List<BranchBillPO> queryList(BranchBillDO branchBillDO);
|
||||
|
||||
/**
|
||||
* @description 统计收账、交账记录数
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 16:35
|
||||
* @param branchBillDO
|
||||
* @return BranchBillPO
|
||||
*/
|
||||
public BranchBillPO countTabTotal(BranchBillDO branchBillDO);
|
||||
|
||||
/**
|
||||
* 新增网点账单
|
||||
*/
|
||||
public Boolean insert(BranchBillDO branchBillDO);
|
||||
|
||||
/**
|
||||
* 修改网点账单
|
||||
*/
|
||||
public Boolean update(BranchBillDO branchBillDO);
|
||||
|
||||
/**
|
||||
* 批量删除网点账单
|
||||
*/
|
||||
public Boolean delete(Long[] branchBillIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询网点账单
|
||||
*/
|
||||
public BranchBillPO getInfo(Long branchBillId);
|
||||
|
||||
/**
|
||||
* @description 确认收款
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 17:18
|
||||
* @param branchBillDO
|
||||
*/
|
||||
public void confirmBranchBillAmount(BranchBillDO branchBillDO);
|
||||
|
||||
/**
|
||||
* @description 修改账单支付方式
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/24 14:46
|
||||
* @param branchBillDO
|
||||
*/
|
||||
public void updateBranchBillPayMethod(BranchBillDO branchBillDO);
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.linke.finance.domain.branchBill.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.branchBill.entity.BranchBill;
|
||||
import com.linke.finance.domain.branchBill.repository.po.BranchBillPO;
|
||||
import com.linke.finance.domain.branchBill.repository.todo.BranchBillDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 网点账单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
public interface BranchBillMapper extends BaseMapper<BranchBill>
|
||||
{
|
||||
/**
|
||||
* 查询网点账单列表
|
||||
*/
|
||||
public List<BranchBillPO> queryList(BranchBillDO branchBillDO);
|
||||
|
||||
|
||||
/**
|
||||
* @description 统计收账、交账记录数
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 16:35
|
||||
* @param branchBillDO
|
||||
* @return BranchBillPO
|
||||
*/
|
||||
public BranchBillPO countTabTotal(BranchBillDO branchBillDO);
|
||||
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
package com.linke.finance.domain.branchBill.repository.persistence;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.branchBill.entity.BranchBill;
|
||||
import com.linke.finance.domain.branchBill.repository.facade.IBranchBillService;
|
||||
import com.linke.finance.domain.branchBill.repository.mapper.BranchBillMapper;
|
||||
import com.linke.finance.domain.branchBill.repository.po.BranchBillPO;
|
||||
import com.linke.finance.domain.branchBill.repository.todo.BranchBillDO;
|
||||
import com.linke.finance.domain.revenueExpensesRecord.entity.RevenueExpensesRecord;
|
||||
import com.linke.finance.domain.revenueExpensesRecord.repository.mapper.RevenueExpensesRecordMapper;
|
||||
import com.linke.finance.domain.serviceBill.entity.ServiceBill;
|
||||
import com.linke.finance.domain.serviceBill.repository.mapper.ServiceBillMapper;
|
||||
import com.mhd.common.core.constant.SourceConstants;
|
||||
import com.mhd.common.core.constant.SubjectConstants;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点账单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class IBranchBillImpl extends ServiceImpl<BranchBillMapper, BranchBill> implements IBranchBillService {
|
||||
@Autowired
|
||||
private BranchBillMapper branchBillMapper;
|
||||
@Autowired
|
||||
private RevenueExpensesRecordMapper revenueExpensesRecordMapper;
|
||||
@Autowired
|
||||
private ServiceBillMapper serviceBillMapper;
|
||||
|
||||
/**
|
||||
* 查询网点账单列表
|
||||
*/
|
||||
@Override
|
||||
public List<BranchBillPO> queryList(BranchBillDO branchBillDO)
|
||||
{
|
||||
return branchBillMapper.queryList(branchBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 统计收账、交账记录数
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 16:35
|
||||
* @param branchBillDO
|
||||
* @return BranchBillPO
|
||||
*/
|
||||
@Override
|
||||
public BranchBillPO countTabTotal(BranchBillDO branchBillDO)
|
||||
{
|
||||
return branchBillMapper.countTabTotal(branchBillDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增网点账单
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(BranchBillDO branchBillDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
int count = revenueExpensesRecordMapper.update(null, new UpdateWrapper<RevenueExpensesRecord>().lambda()
|
||||
// .set(RevenueExpensesRecord::getBillCode, branchBillDO.getBillCode())
|
||||
// .set(RevenueExpensesRecord::getBillStatus, 2)
|
||||
.set(RevenueExpensesRecord::getUpdateBy, loginUser.getUserid())
|
||||
.set(RevenueExpensesRecord::getUpdateByName, loginUser.getUsername())
|
||||
.set(RevenueExpensesRecord::getUpdateTime, new Date())
|
||||
// .eq(RevenueExpensesRecord::getBillStatus, 1)
|
||||
.eq(RevenueExpensesRecord::getDelFlag, 1)
|
||||
.in(RevenueExpensesRecord::getRevenueExpensesRecordId, branchBillDO.getRevenueExpensesRecordIdList()));
|
||||
if (count <= 0){
|
||||
log.error("标记收支流水交账状态失败:{}", JSONUtil.toJsonStr(branchBillDO.getRevenueExpensesRecordIdList()));
|
||||
throw new ServiceException("标记收支流水交账状态失败");
|
||||
}
|
||||
|
||||
if (branchBillDO.getServiceBillIdList() != null && !branchBillDO.getServiceBillIdList().isEmpty()){
|
||||
count = serviceBillMapper.update(null, new UpdateWrapper<ServiceBill>().lambda()
|
||||
.set(ServiceBill::getBillCode, branchBillDO.getBillCode())
|
||||
.set(ServiceBill::getBillStatus, 2)
|
||||
.set(ServiceBill::getReportTime, branchBillDO.getDeadlineTime())
|
||||
.set(ServiceBill::getUpdateBy, loginUser.getUserid())
|
||||
.set(ServiceBill::getUpdateByName, loginUser.getUsername())
|
||||
.set(ServiceBill::getUpdateTime, new Date())
|
||||
.eq(ServiceBill::getBillStatus, 1)
|
||||
.eq(ServiceBill::getDelFlag, 1)
|
||||
.in(ServiceBill::getServiceBillId, branchBillDO.getServiceBillIdList()));
|
||||
if (count <= 0){
|
||||
log.error("标记服务费账单交账状态失败:{}", JSONUtil.toJsonStr(branchBillDO.getServiceBillIdList()));
|
||||
throw new ServiceException("标记服务费账单交账状态失败");
|
||||
}
|
||||
}
|
||||
BranchBill branchBill = new BranchBill();
|
||||
BeanUtils.copyProperties(branchBillDO,branchBill);
|
||||
branchBill.setCreateBy(loginUser.getUserid());
|
||||
branchBill.setCreateTime(new Date());
|
||||
branchBill.setCreateByName(loginUser.getUsername());
|
||||
return save(branchBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点账单
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(BranchBillDO branchBillDO) {
|
||||
BranchBill branchBill = new BranchBill();
|
||||
BeanUtils.copyProperties(branchBillDO,branchBill);
|
||||
return updateById(branchBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网点账单
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(Long[] branchBillIds ) {
|
||||
List<BranchBill> list = new ArrayList<>();
|
||||
for (Long id : branchBillIds) {
|
||||
BranchBill branchBill = new BranchBill();
|
||||
branchBill.setBranchBillId(id);
|
||||
branchBill.setDelFlag(2);
|
||||
list.add(branchBill);
|
||||
}
|
||||
return updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点账单
|
||||
*/
|
||||
@Override
|
||||
public BranchBillPO getInfo(Long branchBillId) {
|
||||
LambdaQueryWrapper<BranchBill> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BranchBill::getDelFlag,1);
|
||||
queryWrapper.eq(BranchBill::getBranchBillId,branchBillId);
|
||||
BranchBill branchBill = getOne(queryWrapper);
|
||||
BranchBillPO branchBillPO = new BranchBillPO();
|
||||
BeanUtils.copyProperties(branchBill,branchBillPO);
|
||||
return branchBillPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 确认收款
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 17:18
|
||||
* @param branchBillDO
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void confirmBranchBillAmount(BranchBillDO branchBillDO){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
int count = baseMapper.update(null, new UpdateWrapper<BranchBill>().lambda()
|
||||
.set(BranchBill::getBillStatus, 3)
|
||||
.set(BranchBill::getAuthBranchId, branchBillDO.getBranchInId())
|
||||
.set(BranchBill::getAuthBranchName, branchBillDO.getBranchInName())
|
||||
.set(BranchBill::getAuthUserId, loginUser.getUserid())
|
||||
.set(BranchBill::getAuthUserName, loginUser.getUsername())
|
||||
.set(BranchBill::getUpdateBy, loginUser.getUserid())
|
||||
.set(BranchBill::getUpdateByName, loginUser.getUsername())
|
||||
.set(BranchBill::getUpdateTime, new Date())
|
||||
.eq(BranchBill::getBranchBillId, branchBillDO.getBranchBillId()));
|
||||
if (count <= 0){
|
||||
throw new ServiceException("确认收款失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改账单支付方式
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/24 14:46
|
||||
* @param branchBillDO
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateBranchBillPayMethod(BranchBillDO branchBillDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
int count = baseMapper.update(null, new UpdateWrapper<BranchBill>().lambda()
|
||||
.set(BranchBill::getPayMethod, branchBillDO.getPayMethod())
|
||||
.set(ObjUtil.isNotNull(branchBillDO.getBillStatus()), BranchBill::getBillStatus, branchBillDO.getBillStatus())
|
||||
.set(BranchBill::getUpdateBy, loginUser.getUserid())
|
||||
.set(BranchBill::getUpdateByName, loginUser.getUsername())
|
||||
.set(BranchBill::getUpdateTime, new Date())
|
||||
.eq(BranchBill::getBranchBillId, branchBillDO.getBranchBillId()));
|
||||
if (count <= 0){
|
||||
throw new ServiceException("确认收款失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.linke.finance.domain.branchBill.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 网点账单对象 branch_bill
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "网点账单对象", description = "网点账单响应对象")
|
||||
public class BranchBillPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单id")
|
||||
private Long branchBillId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchInId;
|
||||
|
||||
@ApiModelProperty("收账网点名称")
|
||||
@Excel(name = "收账网点名称")
|
||||
private String branchInName;
|
||||
|
||||
@ApiModelProperty("交账网点id")
|
||||
@Excel(name = "交账网点id")
|
||||
private Long branchOutId;
|
||||
|
||||
@ApiModelProperty("交账网点名称")
|
||||
@Excel(name = "交账网点名称")
|
||||
private String branchOutName;
|
||||
|
||||
@ApiModelProperty("交账记录号")
|
||||
@Excel(name = "交账记录号")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("交账状态:1-未确认 2-驳回 3-确认")
|
||||
@Excel(name = "交账状态:1-未确认 2-驳回 3-确认")
|
||||
private Integer billStatus;
|
||||
|
||||
@ApiModelProperty("交账周期开始")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billTimeStart;
|
||||
|
||||
@ApiModelProperty("交账周期结束")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billTimeEnd;
|
||||
|
||||
@ApiModelProperty("应交金额 单位:元")
|
||||
@Excel(name = "应交金额 单位:元")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty("上交金额 单位:元")
|
||||
@Excel(name = "上交金额 单位:元")
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
@ApiModelProperty("合计收入 单位:元")
|
||||
@Excel(name = "合计收入 单位:元")
|
||||
private BigDecimal totalIncome;
|
||||
|
||||
@ApiModelProperty("合计支出 单位:元")
|
||||
@Excel(name = "合计支出 单位:元")
|
||||
private BigDecimal totalExpense;
|
||||
|
||||
@ApiModelProperty("上交笔数")
|
||||
@Excel(name = "上交笔数")
|
||||
private Long number;
|
||||
|
||||
@ApiModelProperty("上期结余 单位:元")
|
||||
@Excel(name = "上期结余 单位:元")
|
||||
private BigDecimal lastRemainingAmount;
|
||||
|
||||
@ApiModelProperty("当期结余:应交金额+上期结余-上交金额 单位:元")
|
||||
@Excel(name = "当期结余:应交金额+上期结余-上交金额 单位:元")
|
||||
private BigDecimal remainingAmount;
|
||||
|
||||
@ApiModelProperty(name = "截止时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deadlineTime;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date authTime;
|
||||
|
||||
@ApiModelProperty("审核网点id")
|
||||
@Excel(name = "审核网点id")
|
||||
private Integer authBranchId;
|
||||
|
||||
@ApiModelProperty("审核网点名称")
|
||||
@Excel(name = "审核网点名称")
|
||||
private String authBranchName;
|
||||
|
||||
@ApiModelProperty("审核用户id")
|
||||
@Excel(name = "审核用户id")
|
||||
private Integer authUserId;
|
||||
|
||||
@ApiModelProperty("审核用户名称")
|
||||
@Excel(name = "审核用户名称")
|
||||
private String authUserName;
|
||||
|
||||
@ApiModelProperty("收账记录数")
|
||||
@Excel(name = "收账记录数")
|
||||
private Integer branchInNum;
|
||||
|
||||
@ApiModelProperty("交账记录数")
|
||||
@Excel(name = "交账记录数")
|
||||
private Integer branchOutNum;
|
||||
|
||||
@ApiModelProperty("上交方式(1-线下转账,2-钱包转账)")
|
||||
@Excel(name = "上交方式(1-线下转账,2-钱包转账)")
|
||||
private Integer payMethod;
|
||||
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.linke.finance.domain.branchBill.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title BranchBillPo
|
||||
* @description: 客户账单上报信息统计
|
||||
* @date 2023/11/4 10:15
|
||||
**/
|
||||
@Data
|
||||
public class BranchBillStatisticsRecordPo implements Serializable
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "流水费用信息统计")
|
||||
private Freight freight;
|
||||
|
||||
@ApiModelProperty(name = "缴纳费用信息统计")
|
||||
private PayAmount payAmount;
|
||||
|
||||
@ApiModelProperty(name = "收入支出记录id集合")
|
||||
private List<Long> revenueExpensesRecordIdList;
|
||||
|
||||
@ApiModelProperty(name = "服务费id集合")
|
||||
private List<Long> serviceBillIdList;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title Income
|
||||
* @description: 流水费用信息统计
|
||||
* @date 2023/11/4 10:15
|
||||
**/
|
||||
@Data
|
||||
public static class Freight{
|
||||
@ApiModelProperty(name = "科目")
|
||||
private List<FirstSubject> firstSubject;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title Income
|
||||
* @description: 缴纳费用信息统计
|
||||
* @date 2023/11/4 10:15
|
||||
**/
|
||||
@Data
|
||||
public static class PayAmount{
|
||||
@ApiModelProperty(name = "上交笔数")
|
||||
private Long number;
|
||||
|
||||
@ApiModelProperty(name = "合计收入")
|
||||
private BigDecimal totalIncome;
|
||||
|
||||
@ApiModelProperty(name = "合计支出")
|
||||
private BigDecimal totalExpense;
|
||||
|
||||
@ApiModelProperty("上交金额 单位:元")
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
@ApiModelProperty(name = "应交金额:全部流水数据汇总金额,应交金额=合计收入+合计支出+服务费")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty(name = "上期结余:当前交账网点产生的结余情况")
|
||||
private BigDecimal lastRemainingAmount;
|
||||
|
||||
@ApiModelProperty(name = "截止时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deadlineTime;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title Income
|
||||
* @description: 首级科目
|
||||
* @date 2023/11/4 10:15
|
||||
**/
|
||||
@Data
|
||||
public static class FirstSubject{
|
||||
|
||||
@ApiModelProperty(name = "科目code")
|
||||
private String subjectCode;
|
||||
|
||||
@ApiModelProperty(name = "科目名称")
|
||||
private String subjectName;
|
||||
|
||||
@ApiModelProperty(name = "下级科目")
|
||||
private List<Children> children;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title Income
|
||||
* @description: 下级科目
|
||||
* @date 2023/11/4 10:15
|
||||
**/
|
||||
@Data
|
||||
public static class Children{
|
||||
|
||||
@ApiModelProperty(name = "科目code")
|
||||
private String subjectCode;
|
||||
|
||||
@ApiModelProperty(name = "科目名称")
|
||||
private String subjectName;
|
||||
|
||||
@ApiModelProperty(name = "费用金额")
|
||||
private BigDecimal fee;
|
||||
|
||||
@ApiModelProperty(name = "下级科目")
|
||||
private List<Children> children;
|
||||
}
|
||||
|
||||
}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package com.linke.finance.domain.branchBill.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 网点账单对象 branch_bill
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BranchBillDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单id")
|
||||
private Long branchBillId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("网点id")
|
||||
@Excel(name = "网点id")
|
||||
private Long branchId;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchInId;
|
||||
|
||||
@ApiModelProperty("收账网点名称")
|
||||
@Excel(name = "收账网点名称")
|
||||
private String branchInName;
|
||||
|
||||
@ApiModelProperty("交账网点id")
|
||||
@Excel(name = "交账网点id")
|
||||
private Long branchOutId;
|
||||
|
||||
@ApiModelProperty("交账网点名称")
|
||||
@Excel(name = "交账网点名称")
|
||||
private String branchOutName;
|
||||
|
||||
@ApiModelProperty("交账记录号")
|
||||
@Excel(name = "交账记录号")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("交账状态:1-未确认 2-驳回 3-确认")
|
||||
@Excel(name = "交账状态:1-未确认 2-驳回 3-确认")
|
||||
private Integer billStatus;
|
||||
|
||||
@ApiModelProperty("交账周期开始")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billTimeStart;
|
||||
|
||||
@ApiModelProperty("交账周期结束")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billTimeEnd;
|
||||
|
||||
@ApiModelProperty("应交金额 单位:元")
|
||||
@Excel(name = "应交金额 单位:元")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty("上交金额 单位:元")
|
||||
@Excel(name = "上交金额 单位:元")
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
@ApiModelProperty("合计收入 单位:元")
|
||||
@Excel(name = "合计收入 单位:元")
|
||||
private BigDecimal totalIncome;
|
||||
|
||||
@ApiModelProperty("合计支出 单位:元")
|
||||
@Excel(name = "合计支出 单位:元")
|
||||
private BigDecimal totalExpense;
|
||||
|
||||
@ApiModelProperty("上交笔数")
|
||||
@Excel(name = "上交笔数")
|
||||
private Long number;
|
||||
|
||||
@ApiModelProperty("上期结余 单位:元")
|
||||
@Excel(name = "上期结余 单位:元")
|
||||
private BigDecimal lastRemainingAmount;
|
||||
|
||||
@ApiModelProperty("当期结余:应交金额+上期结余-上交金额 单位:元")
|
||||
@Excel(name = "当期结余:应交金额+上期结余-上交金额 单位:元")
|
||||
private BigDecimal remainingAmount;
|
||||
|
||||
@ApiModelProperty(name = "截止时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deadlineTime;
|
||||
|
||||
@ApiModelProperty("审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date authTime;
|
||||
|
||||
@ApiModelProperty("审核网点id")
|
||||
@Excel(name = "审核网点id")
|
||||
private Integer authBranchId;
|
||||
|
||||
@ApiModelProperty("审核网点名称")
|
||||
@Excel(name = "审核网点名称")
|
||||
private String authBranchName;
|
||||
|
||||
@ApiModelProperty("审核用户id")
|
||||
@Excel(name = "审核用户id")
|
||||
private Integer authUserId;
|
||||
|
||||
@ApiModelProperty("审核用户名称")
|
||||
@Excel(name = "审核用户名称")
|
||||
private String authUserName;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "收入支出记录id集合")
|
||||
private List<Long> revenueExpensesRecordIdList;
|
||||
|
||||
@ApiModelProperty(name = "服务费id集合")
|
||||
private List<Long> serviceBillIdList;
|
||||
|
||||
@ApiModelProperty(name = "记录类型:1-收账记录 2-交账记录")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(name = "交账时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "交账时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "支付密码")
|
||||
private String payPassword;
|
||||
|
||||
@ApiModelProperty("上交方式(1-线下转账,2-钱包转账)")
|
||||
@Excel(name = "上交方式(1-线下转账,2-钱包转账)")
|
||||
private Integer payMethod;
|
||||
}
|
||||
+356
@@ -0,0 +1,356 @@
|
||||
package com.linke.finance.domain.branchBill.service;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.linke.finance.domain.branchBill.entity.BranchBill;
|
||||
import com.linke.finance.domain.branchBill.repository.facade.IBranchBillService;
|
||||
import com.linke.finance.domain.branchBill.repository.po.BranchBillPO;
|
||||
import com.linke.finance.domain.branchBill.repository.po.BranchBillStatisticsRecordPo;
|
||||
import com.linke.finance.domain.branchBill.repository.po.BranchBillStatisticsRecordPo.*;
|
||||
import com.linke.finance.domain.branchBill.repository.todo.BranchBillDO;
|
||||
import com.linke.finance.domain.revenueExpensesRecord.repository.facade.RevenueExpensesRecordRepositoryInterface;
|
||||
import com.linke.finance.domain.revenueExpensesRecord.repository.po.RevenueExpensesRecordPo;
|
||||
import com.linke.finance.domain.serviceBill.entity.ServiceBill;
|
||||
import com.linke.finance.domain.serviceBill.repository.facade.IServiceBillService;
|
||||
import com.mhd.common.core.enums.DictCode;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.DateUtils;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.redis.enums.RedisLockTypeEnum;
|
||||
import com.mhd.common.redis.service.RedisLock;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.redisson.RedissonMultiLock;
|
||||
import org.redisson.api.RLock;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 网点账单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-04
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BranchBillDomainService {
|
||||
|
||||
@Autowired
|
||||
private IBranchBillService branchBillService;
|
||||
@Autowired
|
||||
private RevenueExpensesRecordRepositoryInterface revenueExpensesRecordRepositoryInterface;
|
||||
@Autowired
|
||||
private IServiceBillService serviceBillService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询网点账单列表
|
||||
*/
|
||||
public List<BranchBillPO> queryList(BranchBillDO branchBillDO) {
|
||||
return branchBillService.queryList(branchBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 统计收账、交账记录数
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 16:35
|
||||
* @param branchBillDO
|
||||
* @return BranchBillPO
|
||||
*/
|
||||
public BranchBillPO countTabTotal(BranchBillDO branchBillDO) {
|
||||
return branchBillService.countTabTotal(branchBillDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增网点账单
|
||||
*/
|
||||
public Boolean insert(BranchBillDO branchBillDO) {
|
||||
|
||||
return branchBillService.insert(branchBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点账单
|
||||
*/
|
||||
public Boolean update(BranchBillDO branchBillDO) {
|
||||
return branchBillService.update(branchBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网点账单
|
||||
*/
|
||||
public Boolean delete(Long[] branchBillIds) {
|
||||
return branchBillService.delete(branchBillIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网点账单详细信息
|
||||
*/
|
||||
public BranchBillPO getInfo(Long branchBillId)
|
||||
{
|
||||
return branchBillService.getInfo(branchBillId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 获取网点交账数据
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 10:36
|
||||
* @param branchBillDO
|
||||
* @return BranchBillStatisticsRecordPo
|
||||
*/
|
||||
public BranchBillStatisticsRecordPo branchBillStatistics(BranchBillDO branchBillDO){
|
||||
//查询未对账的交易流水数据
|
||||
RevenueExpensesRecordPo revenueExpensesRecordPo = new RevenueExpensesRecordPo();
|
||||
// revenueExpensesRecordPo.setBranchId(branchBillDO.getBranchOutId());
|
||||
// revenueExpensesRecordPo.setBillStatus(1);
|
||||
// revenueExpensesRecordPo.setSettleAccountsStatus(1);
|
||||
revenueExpensesRecordPo.setOrderBy("first_subject_sort");
|
||||
revenueExpensesRecordPo.setSortOrder("ASC");
|
||||
revenueExpensesRecordPo.setDeadlineTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, branchBillDO.getDeadlineTime()));
|
||||
List<RevenueExpensesRecordPo> revenueExpensesRecordPoList = revenueExpensesRecordRepositoryInterface.queryList(revenueExpensesRecordPo);
|
||||
return calculateBranchBillAmount(revenueExpensesRecordPoList, branchBillDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 网点交账
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 14:22
|
||||
* @param branchBillDO
|
||||
*/
|
||||
public void branchPayment(BranchBillDO branchBillDO){
|
||||
if (branchBillDO.getRevenueExpensesRecordIdList() == null || branchBillDO.getRevenueExpensesRecordIdList().isEmpty()){
|
||||
throw new ServiceException("待交账收支流水不能为空");
|
||||
}
|
||||
BranchBill branchBill = branchBillService.getOne(new QueryWrapper<BranchBill>().lambda()
|
||||
.eq(BranchBill::getBranchOutId, branchBillDO.getBranchOutId())
|
||||
.orderByDesc(BranchBill::getDeadlineTime)
|
||||
.orderByDesc(BranchBill::getBranchBillId)
|
||||
.last("Limit 1"));
|
||||
if (branchBill != null){
|
||||
branchBillDO.setBillTimeStart(branchBill.getBillTimeEnd());
|
||||
}
|
||||
branchBillDO.setBillCode(OrderSequence.getOrderCode());
|
||||
Date date = new Date();
|
||||
branchBillDO.setBillTimeEnd(date);
|
||||
RevenueExpensesRecordPo revenueExpensesRecordPo = new RevenueExpensesRecordPo();
|
||||
revenueExpensesRecordPo.setRevenueExpensesRecordIdList(branchBillDO.getRevenueExpensesRecordIdList());
|
||||
// revenueExpensesRecordPo.setBillStatus(1);
|
||||
// revenueExpensesRecordPo.setSettleAccountsStatus(1);
|
||||
revenueExpensesRecordPo.setDeadlineTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, branchBillDO.getDeadlineTime()));
|
||||
List<RevenueExpensesRecordPo> revenueExpensesRecordPoList = revenueExpensesRecordRepositoryInterface.queryList(revenueExpensesRecordPo);
|
||||
if (revenueExpensesRecordPoList.size() != branchBillDO.getRevenueExpensesRecordIdList().size()){
|
||||
throw new ServiceException("存在已交账完成的收支流水,请重新进行网点交账!");
|
||||
}
|
||||
//重新计算应交金额
|
||||
BranchBillStatisticsRecordPo branchBillStatisticsRecordPo = calculateBranchBillAmount(revenueExpensesRecordPoList, branchBillDO);
|
||||
PayAmount payAmount = branchBillStatisticsRecordPo.getPayAmount();
|
||||
branchBillDO.setPayableAmount(payAmount.getPayableAmount());
|
||||
branchBillDO.setTotalIncome(payAmount.getTotalIncome());
|
||||
branchBillDO.setTotalExpense(payAmount.getTotalExpense());
|
||||
branchBillDO.setNumber(payAmount.getNumber());
|
||||
branchBillDO.setLastRemainingAmount(payAmount.getLastRemainingAmount());
|
||||
BigDecimal remainingAmount = payAmount.getPayableAmount().add(payAmount.getLastRemainingAmount()).subtract(branchBillDO.getActualAmount());
|
||||
branchBillDO.setRemainingAmount(remainingAmount);
|
||||
branchBillService.insert(branchBillDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 计算收支流水的金额
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 14:02
|
||||
* @param revenueExpensesRecordPoList
|
||||
* @param branchBillDO
|
||||
* @return BranchBillStatisticsRecordPo
|
||||
*/
|
||||
private BranchBillStatisticsRecordPo calculateBranchBillAmount(List<RevenueExpensesRecordPo> revenueExpensesRecordPoList, BranchBillDO branchBillDO){
|
||||
/**
|
||||
* 收入信息统计
|
||||
*/
|
||||
Map<String, List<RevenueExpensesRecordPo>> revenueExpensesRecordPoListMap = revenueExpensesRecordPoList.stream().collect(Collectors.groupingBy(RevenueExpensesRecordPo::getFirstSubject));
|
||||
List<FirstSubject> firstSubjectIncomeList = new ArrayList<>();
|
||||
//合计收入
|
||||
BigDecimal totalIncome = BigDecimal.ZERO;
|
||||
//合计支出
|
||||
BigDecimal totalExpense = BigDecimal.ZERO;
|
||||
//钱包支付金额
|
||||
BigDecimal walletPay = BigDecimal.ZERO;
|
||||
for (Map.Entry<String, List<RevenueExpensesRecordPo>> entry : revenueExpensesRecordPoListMap.entrySet()){
|
||||
// 按照二级科目排序,从小到大排序
|
||||
List<RevenueExpensesRecordPo> revenueExpensesRecordPos = entry.getValue().stream().collect(Collectors.toList());
|
||||
//一级科目
|
||||
FirstSubject firstSubject = new FirstSubject();
|
||||
firstSubject.setSubjectCode(revenueExpensesRecordPos.get(0).getFirstSubject());
|
||||
firstSubject.setSubjectName(revenueExpensesRecordPos.get(0).getFirstSubjectName());
|
||||
Map<String, Children> childrenMap = new HashMap<>();
|
||||
for (RevenueExpensesRecordPo revenueExpensesRecord : revenueExpensesRecordPos) {
|
||||
Children children = childrenMap.get(revenueExpensesRecord.getSecondSubject());
|
||||
if (children == null) {
|
||||
children = new Children();
|
||||
children.setSubjectCode(revenueExpensesRecord.getSecondSubject());
|
||||
children.setSubjectName(revenueExpensesRecord.getSecondSubjectName());
|
||||
children.setFee(BigDecimal.ZERO);
|
||||
}
|
||||
BigDecimal fee = BigDecimal.ZERO;
|
||||
if (revenueExpensesRecord.getRevenueExpensesType() == 1){
|
||||
//合计收入
|
||||
totalIncome = totalIncome.add(revenueExpensesRecord.getMoney());
|
||||
fee = children.getFee().add(revenueExpensesRecord.getMoney());
|
||||
}else if (revenueExpensesRecord.getRevenueExpensesType() == 2) {
|
||||
//合计支出
|
||||
totalExpense = totalExpense.add(revenueExpensesRecord.getMoney());
|
||||
fee = children.getFee().subtract(revenueExpensesRecord.getMoney());
|
||||
}
|
||||
if (DictCode.PC_WALLET_PAY.getCode().equals(revenueExpensesRecord.getPayChannel())){
|
||||
//钱包支付
|
||||
if (revenueExpensesRecord.getRevenueExpensesType() == 1){
|
||||
//钱包支付 收入
|
||||
walletPay = walletPay.add(revenueExpensesRecord.getMoney());
|
||||
}else if (revenueExpensesRecord.getRevenueExpensesType() == 2) {
|
||||
//钱包支付 支出
|
||||
walletPay = walletPay.subtract(revenueExpensesRecord.getMoney());
|
||||
}
|
||||
fee = children.getFee().subtract(revenueExpensesRecord.getMoney());
|
||||
}
|
||||
children.setFee(fee);
|
||||
childrenMap.put(revenueExpensesRecord.getSecondSubject(), children);
|
||||
childrenMap.put(revenueExpensesRecord.getSecondSubject(), children);
|
||||
}
|
||||
List<Children> childrenList = new ArrayList<>(childrenMap.values());
|
||||
firstSubject.setChildren(childrenList);
|
||||
firstSubjectIncomeList.add(firstSubject);
|
||||
}
|
||||
Freight freight = new Freight();
|
||||
freight.setFirstSubject(firstSubjectIncomeList);
|
||||
PayAmount payAmount = new PayAmount();
|
||||
payAmount.setDeadlineTime(branchBillDO.getDeadlineTime());
|
||||
payAmount.setNumber(Long.valueOf(String.valueOf(revenueExpensesRecordPoList.size())));
|
||||
payAmount.setTotalIncome(totalIncome);
|
||||
payAmount.setTotalExpense(totalExpense);
|
||||
payAmount.setPayableAmount(totalIncome.subtract(totalExpense).subtract(walletPay));
|
||||
BranchBill branchBill = branchBillService.getOne(new QueryWrapper<BranchBill>().lambda()
|
||||
.eq(BranchBill::getBranchOutId, branchBillDO.getBranchOutId())
|
||||
.orderByDesc(BranchBill::getDeadlineTime)
|
||||
.orderByDesc(BranchBill::getBranchBillId)
|
||||
.last("Limit 1"));
|
||||
if (branchBill != null){
|
||||
payAmount.setLastRemainingAmount(branchBill.getRemainingAmount());
|
||||
}else {
|
||||
payAmount.setLastRemainingAmount(BigDecimal.ZERO);
|
||||
}
|
||||
BranchBillStatisticsRecordPo branchBillStatisticsRecordPo = new BranchBillStatisticsRecordPo();
|
||||
branchBillStatisticsRecordPo.setFreight(freight);
|
||||
branchBillStatisticsRecordPo.setPayAmount(payAmount);
|
||||
List<Long> revenueExpensesRecordIdList = revenueExpensesRecordPoList.stream().map(RevenueExpensesRecordPo::getRevenueExpensesRecordId).collect(Collectors.toList());
|
||||
branchBillStatisticsRecordPo.setRevenueExpensesRecordIdList(revenueExpensesRecordIdList);
|
||||
return branchBillStatisticsRecordPo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 确认收款
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 17:18
|
||||
* @param branchBillDO
|
||||
*/
|
||||
public void confirmBranchBillAmount(BranchBillDO branchBillDO){
|
||||
branchBillService.confirmBranchBillAmount(branchBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取网点交账详情
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/6 14:22
|
||||
* @param branchBillId
|
||||
*/
|
||||
public BranchBillStatisticsRecordPo getBranchPaymentDetail(Long branchBillId){
|
||||
BranchBillPO branchBillPO = branchBillService.getInfo(branchBillId);
|
||||
if (branchBillPO == null){
|
||||
throw new ServiceException("网点交账信息不存在");
|
||||
}
|
||||
RevenueExpensesRecordPo revenueExpensesRecordPo = new RevenueExpensesRecordPo();
|
||||
// revenueExpensesRecordPo.setBillCode(branchBillPO.getBillCode());
|
||||
List<RevenueExpensesRecordPo> revenueExpensesRecordPoList = revenueExpensesRecordRepositoryInterface.queryList(revenueExpensesRecordPo);
|
||||
/**
|
||||
* 收入信息统计
|
||||
*/
|
||||
Map<String, List<RevenueExpensesRecordPo>> revenueExpensesRecordPoListMap = revenueExpensesRecordPoList.stream().collect(Collectors.groupingBy(RevenueExpensesRecordPo::getFirstSubject));
|
||||
List<FirstSubject> firstSubjectIncomeList = new ArrayList<>();
|
||||
//合计收入
|
||||
BigDecimal totalIncome = BigDecimal.ZERO;
|
||||
//合计支出
|
||||
BigDecimal totalExpense = BigDecimal.ZERO;
|
||||
for (Map.Entry<String, List<RevenueExpensesRecordPo>> entry : revenueExpensesRecordPoListMap.entrySet()){
|
||||
// 按照二级科目排序,从小到大排序
|
||||
List<RevenueExpensesRecordPo> revenueExpensesRecordPos = entry.getValue().stream().collect(Collectors.toList());
|
||||
//一级科目
|
||||
FirstSubject firstSubject = new FirstSubject();
|
||||
firstSubject.setSubjectCode(revenueExpensesRecordPos.get(0).getFirstSubject());
|
||||
firstSubject.setSubjectName(revenueExpensesRecordPos.get(0).getFirstSubjectName());
|
||||
Map<String, Children> childrenMap = new HashMap<>();
|
||||
for (RevenueExpensesRecordPo revenueExpensesRecord : revenueExpensesRecordPos) {
|
||||
Children children = childrenMap.get(revenueExpensesRecord.getSecondSubject());
|
||||
if (children == null) {
|
||||
children = new Children();
|
||||
children.setSubjectCode(revenueExpensesRecord.getSecondSubject());
|
||||
children.setSubjectName(revenueExpensesRecord.getSecondSubjectName());
|
||||
children.setFee(BigDecimal.ZERO);
|
||||
}
|
||||
BigDecimal fee = BigDecimal.ZERO;
|
||||
if (revenueExpensesRecord.getRevenueExpensesType() == 1){
|
||||
//合计收入
|
||||
totalIncome = totalIncome.add(revenueExpensesRecord.getMoney());
|
||||
fee = children.getFee().add(revenueExpensesRecord.getMoney());
|
||||
}else if (revenueExpensesRecord.getRevenueExpensesType() == 2) {
|
||||
//合计支出
|
||||
totalExpense = totalExpense.add(revenueExpensesRecord.getMoney());
|
||||
fee = children.getFee().subtract(revenueExpensesRecord.getMoney());
|
||||
}
|
||||
children.setFee(fee);
|
||||
childrenMap.put(revenueExpensesRecord.getSecondSubject(), children);
|
||||
childrenMap.put(revenueExpensesRecord.getSecondSubject(), children);
|
||||
}
|
||||
List<Children> childrenList = new ArrayList<>(childrenMap.values());
|
||||
firstSubject.setChildren(childrenList);
|
||||
firstSubjectIncomeList.add(firstSubject);
|
||||
}
|
||||
Freight freight = new Freight();
|
||||
freight.setFirstSubject(firstSubjectIncomeList);
|
||||
PayAmount payAmount = new PayAmount();
|
||||
payAmount.setDeadlineTime(branchBillPO.getDeadlineTime());
|
||||
payAmount.setNumber(Long.valueOf(String.valueOf(revenueExpensesRecordPoList.size())));
|
||||
payAmount.setTotalIncome(totalIncome);
|
||||
payAmount.setTotalExpense(totalExpense);
|
||||
payAmount.setPayableAmount(totalIncome.subtract(totalExpense));
|
||||
payAmount.setLastRemainingAmount(branchBillPO.getRemainingAmount());
|
||||
payAmount.setActualAmount(branchBillPO.getActualAmount());
|
||||
BranchBillStatisticsRecordPo branchBillStatisticsRecordPo = new BranchBillStatisticsRecordPo();
|
||||
branchBillStatisticsRecordPo.setFreight(freight);
|
||||
branchBillStatisticsRecordPo.setPayAmount(payAmount);
|
||||
return branchBillStatisticsRecordPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改账单支付方式
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/24 14:57
|
||||
* @param branchBillDO
|
||||
*/
|
||||
public void updateBranchBillPayMethod(BranchBillDO branchBillDO){
|
||||
branchBillService.updateBranchBillPayMethod(branchBillDO);
|
||||
}
|
||||
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 网点账单其他费用对象 branch_bill_other_fee
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BranchBillOtherFee extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单其他费用id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long branchBillOtherFeeId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("网点费用账单编码")
|
||||
@Excel(name = "网点费用账单编码")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("关联订单id")
|
||||
@Excel(name = "关联订单id")
|
||||
private Long associationOrderId;
|
||||
|
||||
@ApiModelProperty("关联订单编码")
|
||||
@Excel(name = "关联订单编码")
|
||||
private String associationOrderCode;
|
||||
|
||||
@ApiModelProperty("一级科目code")
|
||||
@Excel(name = "一级科目code")
|
||||
private String firstSubject;
|
||||
|
||||
@ApiModelProperty("一级科目名称")
|
||||
@Excel(name = "一级科目名称")
|
||||
private String firstSubjectName;
|
||||
|
||||
@ApiModelProperty("二级科目code")
|
||||
@Excel(name = "二级科目code")
|
||||
private String secondSubject;
|
||||
|
||||
@ApiModelProperty("二级科目名称")
|
||||
@Excel(name = "二级科目名称")
|
||||
private String secondSubjectName;
|
||||
|
||||
@ApiModelProperty("收入支出类型1.收入2.支出")
|
||||
@Excel(name = "收入支出类型1.收入2.支出")
|
||||
private Integer revenueExpensesType;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal money;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.branchBillOtherFee.entity.BranchBillOtherFee;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点账单其他费用Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
public interface IBranchBillOtherFeeService extends IService<BranchBillOtherFee>
|
||||
{
|
||||
/**
|
||||
* 分页查询网点账单其他费用列表
|
||||
*/
|
||||
public List<BranchBillOtherFeePO> queryList(BranchBillOtherFeeDO branchBillOtherFeeDO);
|
||||
|
||||
/**
|
||||
* 新增网点账单其他费用
|
||||
*/
|
||||
public Boolean insert(BranchBillOtherFeeDO branchBillOtherFeeDO);
|
||||
|
||||
/**
|
||||
* 修改网点账单其他费用
|
||||
*/
|
||||
public Boolean update(BranchBillOtherFeeDO branchBillOtherFeeDO);
|
||||
|
||||
/**
|
||||
* 批量删除网点账单其他费用
|
||||
*/
|
||||
public Boolean delete(Long[] branchBillOtherFeeIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询网点账单其他费用
|
||||
*/
|
||||
public BranchBillOtherFeePO getInfo(Long branchBillOtherFeeId);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.branchBillOtherFee.entity.BranchBillOtherFee;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 网点账单其他费用Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
public interface BranchBillOtherFeeMapper extends BaseMapper<BranchBillOtherFee>
|
||||
{
|
||||
/**
|
||||
* 查询网点账单其他费用列表
|
||||
*/
|
||||
public List<BranchBillOtherFeePO> queryList(BranchBillOtherFeeDO branchBillOtherFeeDO);
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.branchBillOtherFee.entity.BranchBillOtherFee;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.facade.IBranchBillOtherFeeService;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.mapper.BranchBillOtherFeeMapper;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点账单其他费用Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
@Service
|
||||
public class BranchBillOtherFeeImpl extends ServiceImpl<BranchBillOtherFeeMapper, BranchBillOtherFee> implements IBranchBillOtherFeeService{
|
||||
@Autowired
|
||||
private BranchBillOtherFeeMapper branchBillOtherFeeMapper;
|
||||
|
||||
/**
|
||||
* 查询网点账单其他费用列表
|
||||
*/
|
||||
@Override
|
||||
public List<BranchBillOtherFeePO> queryList(BranchBillOtherFeeDO branchBillOtherFeeDO)
|
||||
{
|
||||
return branchBillOtherFeeMapper.queryList(branchBillOtherFeeDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网点账单其他费用
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(BranchBillOtherFeeDO branchBillOtherFeeDO) {
|
||||
BranchBillOtherFee branchBillOtherFee = new BranchBillOtherFee();
|
||||
BeanUtils.copyProperties(branchBillOtherFeeDO,branchBillOtherFee);
|
||||
return this.save(branchBillOtherFee);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点账单其他费用
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(BranchBillOtherFeeDO branchBillOtherFeeDO) {
|
||||
BranchBillOtherFee branchBillOtherFee = new BranchBillOtherFee();
|
||||
BeanUtils.copyProperties(branchBillOtherFeeDO,branchBillOtherFee);
|
||||
return this.updateById(branchBillOtherFee);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网点账单其他费用
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] branchBillOtherFeeIds ) {
|
||||
List<BranchBillOtherFee> list = new ArrayList<>();
|
||||
for (Long id : branchBillOtherFeeIds) {
|
||||
BranchBillOtherFee branchBillOtherFee = new BranchBillOtherFee();
|
||||
branchBillOtherFee.setBranchBillOtherFeeId(id);
|
||||
branchBillOtherFee.setDelFlag(2);
|
||||
list.add(branchBillOtherFee);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点账单其他费用
|
||||
*/
|
||||
@Override
|
||||
public BranchBillOtherFeePO getInfo(Long branchBillOtherFeeId) {
|
||||
BranchBillOtherFee branchBillOtherFee = this.getById(branchBillOtherFeeId);
|
||||
BranchBillOtherFeePO branchBillOtherFeePO = new BranchBillOtherFeePO();
|
||||
BeanUtils.copyProperties(branchBillOtherFee,branchBillOtherFeePO);
|
||||
return branchBillOtherFeePO;
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 网点账单其他费用对象 branch_bill_other_fee
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "网点账单其他费用对象", description = "网点账单其他费用响应对象")
|
||||
public class BranchBillOtherFeePO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单其他费用id")
|
||||
private Long branchBillOtherFeeId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("网点费用账单编码")
|
||||
@Excel(name = "网点费用账单编码")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("关联订单id")
|
||||
@Excel(name = "关联订单id")
|
||||
private Long associationOrderId;
|
||||
|
||||
@ApiModelProperty("关联订单编码")
|
||||
@Excel(name = "关联订单编码")
|
||||
private String associationOrderCode;
|
||||
|
||||
@ApiModelProperty("一级科目code")
|
||||
@Excel(name = "一级科目code")
|
||||
private String firstSubject;
|
||||
|
||||
@ApiModelProperty("一级科目名称")
|
||||
@Excel(name = "一级科目名称")
|
||||
private String firstSubjectName;
|
||||
|
||||
@ApiModelProperty("二级科目code")
|
||||
@Excel(name = "二级科目code")
|
||||
private String secondSubject;
|
||||
|
||||
@ApiModelProperty("二级科目名称")
|
||||
@Excel(name = "二级科目名称")
|
||||
private String secondSubjectName;
|
||||
|
||||
@ApiModelProperty("收入支出类型1.收入2.支出")
|
||||
@Excel(name = "收入支出类型1.收入2.支出")
|
||||
private Integer revenueExpensesType;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal money;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 网点账单其他费用对象 branch_bill_other_fee
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BranchBillOtherFeeDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单其他费用id")
|
||||
private Long branchBillOtherFeeId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("网点费用账单编码")
|
||||
@Excel(name = "网点费用账单编码")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("关联订单id")
|
||||
@Excel(name = "关联订单id")
|
||||
private Long associationOrderId;
|
||||
|
||||
@ApiModelProperty("关联订单编码")
|
||||
@Excel(name = "关联订单编码")
|
||||
private String associationOrderCode;
|
||||
|
||||
@ApiModelProperty("一级科目code")
|
||||
@Excel(name = "一级科目code")
|
||||
private String firstSubject;
|
||||
|
||||
@ApiModelProperty("一级科目名称")
|
||||
@Excel(name = "一级科目名称")
|
||||
private String firstSubjectName;
|
||||
|
||||
@ApiModelProperty("二级科目code")
|
||||
@Excel(name = "二级科目code")
|
||||
private String secondSubject;
|
||||
|
||||
@ApiModelProperty("二级科目名称")
|
||||
@Excel(name = "二级科目名称")
|
||||
private String secondSubjectName;
|
||||
|
||||
@ApiModelProperty("收入支出类型1.收入2.支出")
|
||||
@Excel(name = "收入支出类型1.收入2.支出")
|
||||
private Integer revenueExpensesType;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal money;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.linke.finance.domain.branchBillOtherFee.service;
|
||||
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.facade.IBranchBillOtherFeeService;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 网点账单其他费用
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-09
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BranchBillOtherFeeDomainService {
|
||||
|
||||
@Autowired
|
||||
private IBranchBillOtherFeeService branchBillOtherFeeService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询网点账单其他费用列表
|
||||
*/
|
||||
public List<BranchBillOtherFeePO> queryList(BranchBillOtherFeeDO branchBillOtherFeeDO) {
|
||||
return branchBillOtherFeeService.queryList(branchBillOtherFeeDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增网点账单其他费用
|
||||
*/
|
||||
public Boolean insert(BranchBillOtherFeeDO branchBillOtherFeeDO) {
|
||||
|
||||
return branchBillOtherFeeService.insert(branchBillOtherFeeDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点账单其他费用
|
||||
*/
|
||||
public Boolean update(BranchBillOtherFeeDO branchBillOtherFeeDO) {
|
||||
return branchBillOtherFeeService.update(branchBillOtherFeeDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网点账单其他费用
|
||||
*/
|
||||
public Boolean delete(Long[] branchBillOtherFeeIds) {
|
||||
return branchBillOtherFeeService.delete(branchBillOtherFeeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网点账单其他费用详细信息
|
||||
*/
|
||||
public BranchBillOtherFeePO getInfo(Long branchBillOtherFeeId)
|
||||
{
|
||||
return branchBillOtherFeeService.getInfo(branchBillOtherFeeId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.linke.finance.domain.branchFreightBill.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 网点费用账单对象 branch_freight_bill
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BranchFreightBill extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long branchFreightId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchInId;
|
||||
|
||||
@ApiModelProperty("收账网点名称")
|
||||
@Excel(name = "收账网点名称")
|
||||
private String branchInName;
|
||||
|
||||
@ApiModelProperty("交账网点id")
|
||||
@Excel(name = "交账网点id")
|
||||
private Long branchOutId;
|
||||
|
||||
@ApiModelProperty("交账网点名称")
|
||||
@Excel(name = "交账网点名称")
|
||||
private String branchOutName;
|
||||
|
||||
@ApiModelProperty("网点费用账单编码")
|
||||
@Excel(name = "网点费用账单编码")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("确认状态:1-未确认 2-已确认")
|
||||
@Excel(name = "确认状态:1-未确认 2-已确认")
|
||||
private Integer authStatus;
|
||||
|
||||
@ApiModelProperty("关联订单id")
|
||||
@Excel(name = "关联订单id")
|
||||
private Long associationOrderId;
|
||||
|
||||
@ApiModelProperty("关联订单编码")
|
||||
@Excel(name = "关联订单编码")
|
||||
private String associationOrderCode;
|
||||
|
||||
@ApiModelProperty("运单状态:1-未签收 2-已签收 3-已作废")
|
||||
@Excel(name = "运单状态:1-未签收 2-已签收 3-已作废")
|
||||
private Integer associationOrderStatus;
|
||||
|
||||
@ApiModelProperty("客户总运费:取运单中合计运费")
|
||||
@Excel(name = "客户总运费:取运单中合计运费")
|
||||
private BigDecimal customFreight;
|
||||
|
||||
@ApiModelProperty("运费:通过计价体系算出来的运费")
|
||||
@Excel(name = "运费:通过计价体系算出来的运费")
|
||||
private BigDecimal freight;
|
||||
|
||||
@ApiModelProperty("送货费:通过计价体系算出来的送货费")
|
||||
@Excel(name = "送货费:通过计价体系算出来的送货费")
|
||||
private BigDecimal deliveryExpense;
|
||||
|
||||
@ApiModelProperty("网点总运费:运费+送货费")
|
||||
@Excel(name = "网点总运费:运费+送货费")
|
||||
private BigDecimal totalFreight;
|
||||
|
||||
@ApiModelProperty("其他费用")
|
||||
@Excel(name = "其他费用")
|
||||
private BigDecimal otherExpenses;
|
||||
|
||||
@ApiModelProperty("留存金额:客户总运费-网点总运费")
|
||||
@Excel(name = "留存金额:客户总运费-网点总运费")
|
||||
private BigDecimal retainedAmount;
|
||||
|
||||
@ApiModelProperty("开单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billingTime;
|
||||
|
||||
@ApiModelProperty("签收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("确认时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date authTime;
|
||||
|
||||
@ApiModelProperty("确认人id")
|
||||
@Excel(name = "确认人id")
|
||||
private String authId;
|
||||
|
||||
@ApiModelProperty("确认人姓名")
|
||||
@Excel(name = "确认人姓名")
|
||||
private String authName;
|
||||
|
||||
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.linke.finance.domain.branchFreightBill.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.branchFreightBill.entity.BranchFreightBill;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.po.BranchFreightBillPO;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.todo.BranchFreightBillDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点费用账单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
public interface IBranchFreightBillService extends IService<BranchFreightBill>
|
||||
{
|
||||
/**
|
||||
* 分页查询网点费用账单列表
|
||||
*/
|
||||
public List<BranchFreightBillPO> queryList(BranchFreightBillDO branchFreightBillDO);
|
||||
|
||||
/**
|
||||
* 新增网点费用账单
|
||||
*/
|
||||
public Boolean insert(BranchFreightBillDO branchFreightBillDO);
|
||||
|
||||
/**
|
||||
* 修改网点费用账单
|
||||
*/
|
||||
public Boolean update(BranchFreightBillDO branchFreightBillDO);
|
||||
|
||||
/**
|
||||
* 批量删除网点费用账单
|
||||
*/
|
||||
public Boolean delete(Long[] branchFreightIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询网点费用账单
|
||||
*/
|
||||
public BranchFreightBillPO getInfo(Long branchFreightId);
|
||||
|
||||
/**
|
||||
* @description 确认网点运费账单
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/9 8:19
|
||||
* @param branchFreightIds
|
||||
* @return int
|
||||
*/
|
||||
public int confirmBranchFreightBill(List<Long> branchFreightIds);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.linke.finance.domain.branchFreightBill.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.branchFreightBill.entity.BranchFreightBill;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.po.BranchFreightBillPO;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.todo.BranchFreightBillDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 网点费用账单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
public interface BranchFreightBillMapper extends BaseMapper<BranchFreightBill>
|
||||
{
|
||||
/**
|
||||
* 查询网点费用账单列表
|
||||
*/
|
||||
public List<BranchFreightBillPO> queryList(BranchFreightBillDO branchFreightBillDO);
|
||||
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package com.linke.finance.domain.branchFreightBill.repository.persistence;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.branchFreightBill.entity.BranchFreightBill;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.facade.IBranchFreightBillService;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.mapper.BranchFreightBillMapper;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.po.BranchFreightBillPO;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.todo.BranchFreightBillDO;
|
||||
import com.linke.finance.domain.verification.repository.mapper.VerificationMapper;
|
||||
import com.linke.finance.infrastructure.feign.SpecialLogisticsServiceFeign;
|
||||
import com.mhd.common.core.constant.SubjectConstants;
|
||||
import com.mhd.common.core.domain.entity.Verification;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网点费用账单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
@Service
|
||||
public class BranchFreightBillImpl extends ServiceImpl<BranchFreightBillMapper, BranchFreightBill> implements IBranchFreightBillService{
|
||||
@Autowired
|
||||
private BranchFreightBillMapper branchFreightBillMapper;
|
||||
@Autowired
|
||||
private VerificationMapper verificationMapper;
|
||||
@Autowired
|
||||
private SpecialLogisticsServiceFeign specialLogisticsServiceFeign;
|
||||
|
||||
/**
|
||||
* 查询网点费用账单列表
|
||||
*/
|
||||
@Override
|
||||
public List<BranchFreightBillPO> queryList(BranchFreightBillDO branchFreightBillDO)
|
||||
{
|
||||
return branchFreightBillMapper.queryList(branchFreightBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网点费用账单
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(BranchFreightBillDO branchFreightBillDO) {
|
||||
BranchFreightBill branchFreightBill = new BranchFreightBill();
|
||||
BeanUtils.copyProperties(branchFreightBillDO,branchFreightBill);
|
||||
return this.save(branchFreightBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点费用账单
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(BranchFreightBillDO branchFreightBillDO) {
|
||||
BranchFreightBill branchFreightBill = new BranchFreightBill();
|
||||
BeanUtils.copyProperties(branchFreightBillDO,branchFreightBill);
|
||||
return this.updateById(branchFreightBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网点费用账单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] branchFreightIds ) {
|
||||
List<BranchFreightBill> list = new ArrayList<>();
|
||||
for (Long id : branchFreightIds) {
|
||||
BranchFreightBill branchFreightBill = new BranchFreightBill();
|
||||
branchFreightBill.setBranchFreightId(id);
|
||||
branchFreightBill.setDelFlag(2);
|
||||
list.add(branchFreightBill);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网点费用账单
|
||||
*/
|
||||
@Override
|
||||
public BranchFreightBillPO getInfo(Long branchFreightId) {
|
||||
BranchFreightBill branchFreightBill = this.getById(branchFreightId);
|
||||
BranchFreightBillPO branchFreightBillPO = new BranchFreightBillPO();
|
||||
BeanUtils.copyProperties(branchFreightBill,branchFreightBillPO);
|
||||
return branchFreightBillPO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 确认网点运费账单
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/9 8:20
|
||||
* @param branchFreightIds
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int confirmBranchFreightBill(List<Long> branchFreightIds){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<BranchFreightBill> branchFreightBillList = branchFreightBillMapper.selectList(new QueryWrapper<BranchFreightBill>().lambda()
|
||||
.in(BranchFreightBill::getBranchFreightId, branchFreightIds));
|
||||
if (branchFreightBillList.isEmpty()){
|
||||
throw new ServiceException("网点运费账单不存在");
|
||||
}
|
||||
if (branchFreightBillList.size() != branchFreightIds.size()){
|
||||
throw new ServiceException("存在已确认的网点运费账单,请刷新后重新操作");
|
||||
}
|
||||
List<Verification> verificationList = new ArrayList<>();
|
||||
for (BranchFreightBill branchFreightBill : branchFreightBillList){
|
||||
if (branchFreightBill.getTotalFreight().compareTo(BigDecimal.ZERO) <= 0){
|
||||
throw new ServiceException("网点运费账单总运费必须大于0");
|
||||
}
|
||||
//支出网点 支出核销
|
||||
Verification verification = new Verification();
|
||||
// verification.setVerificationType(2);
|
||||
// verification.setBranchId(branchFreightBill.getBranchOutId());
|
||||
// verification.setMailBranch(branchFreightBill.getBranchOutId());
|
||||
// verification.setArriveBranch(branchFreightBill.getBranchInId());
|
||||
verification.setVerificationStatus(5);
|
||||
verification.setInnerNumber(OrderSequence.getOrderCode());
|
||||
verification.setFirstSubject(SubjectConstants.FIRST_SUBJECT_ONE.getCode());
|
||||
verification.setSecondSubject(SubjectConstants.BRANCH_FREIGHT_ONE_SIX.getCode());
|
||||
verification.setFirstSubjectName(SubjectConstants.FIRST_SUBJECT_ONE.getName());
|
||||
verification.setSecondSubjectName(SubjectConstants.BRANCH_FREIGHT_ONE_SIX.getName());
|
||||
verification.setVerificationMoney(branchFreightBill.getTotalFreight());
|
||||
//网点运费确认时生成的网点运费支出核销记录需要默认记录收款人为运单到站网点
|
||||
//获取负责人id
|
||||
AjaxResult ajaxResult = specialLogisticsServiceFeign.getOrganizationHead(branchFreightBill.getBranchInId());
|
||||
if ("200".equals(String.valueOf(ajaxResult.get("code")))) {
|
||||
Long id = Long.valueOf(JSONObject.toJSONString(ajaxResult.get("data")));
|
||||
// verification.setEnterAccountId(id);
|
||||
} else {
|
||||
throw new ServiceException("获取收款人信息失败");
|
||||
}
|
||||
AjaxResult outResult = specialLogisticsServiceFeign.getOrganizationHead(branchFreightBill.getBranchOutId());
|
||||
if ("200".equals(String.valueOf(outResult.get("code")))) {
|
||||
Long id = Long.valueOf(JSONObject.toJSONString(outResult.get("data")));
|
||||
verification.setPayPersonId(id);
|
||||
} else {
|
||||
throw new ServiceException("获取收款人信息失败");
|
||||
}
|
||||
// verification.setEnterAccountName(branchFreightBill.getBranchInName());
|
||||
verification.setPayPerson(branchFreightBill.getBranchOutName());
|
||||
// verification.setWaybillSource("caiwuzhongtai");
|
||||
// verification.setWaybillSourceName("财务中台");
|
||||
// verification.setWaybillId(branchFreightBill.getAssociationOrderId());
|
||||
// verification.setWaybillNumber(branchFreightBill.getAssociationOrderCode());
|
||||
verification.setDelFlag(1);
|
||||
verification.setCreateBy(loginUser.getUserid());
|
||||
verification.setCreateByName(loginUser.getUsername());
|
||||
verification.setCreateTime(new Date());
|
||||
verificationList.add(verification);
|
||||
}
|
||||
verificationMapper.batchAddVerification(verificationList);
|
||||
return branchFreightBillMapper.update(null, new UpdateWrapper<BranchFreightBill>().lambda()
|
||||
.set(BranchFreightBill::getAuthStatus, 2)
|
||||
.set(BranchFreightBill::getAuthId,loginUser.getUserid())
|
||||
.set(BranchFreightBill::getAuthName, loginUser.getUsername())
|
||||
.set(BranchFreightBill::getAuthTime, new Date())
|
||||
.set(BranchFreightBill::getUpdateBy, loginUser.getUserid())
|
||||
.set(BranchFreightBill::getUpdateByName, loginUser.getUsername())
|
||||
.set(BranchFreightBill::getUpdateTime, new Date())
|
||||
.in(BranchFreightBill::getBranchFreightId, branchFreightIds));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
package com.linke.finance.domain.branchFreightBill.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 网点费用账单对象 branch_freight_bill
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "网点费用账单对象", description = "网点费用账单响应对象")
|
||||
public class BranchFreightBillPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单id")
|
||||
private Long branchFreightId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchInId;
|
||||
|
||||
@ApiModelProperty("收账网点名称")
|
||||
@Excel(name = "收账网点名称")
|
||||
private String branchInName;
|
||||
|
||||
@ApiModelProperty("交账网点id")
|
||||
@Excel(name = "交账网点id")
|
||||
private Long branchOutId;
|
||||
|
||||
@ApiModelProperty("交账网点名称")
|
||||
@Excel(name = "交账网点名称")
|
||||
private String branchOutName;
|
||||
|
||||
@ApiModelProperty("网点费用账单编码")
|
||||
@Excel(name = "网点费用账单编码")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("确认状态:1-未确认 2-已确认")
|
||||
@Excel(name = "确认状态:1-未确认 2-已确认")
|
||||
private Integer authStatus;
|
||||
|
||||
@ApiModelProperty("关联订单id")
|
||||
@Excel(name = "关联订单id")
|
||||
private Long associationOrderId;
|
||||
|
||||
@ApiModelProperty("关联订单编码")
|
||||
@Excel(name = "关联订单编码")
|
||||
private String associationOrderCode;
|
||||
|
||||
@ApiModelProperty("运单状态:1-未签收 2-已签收 3-已作废")
|
||||
@Excel(name = "运单状态:1-未签收 2-已签收 3-已作废")
|
||||
private Integer associationOrderStatus;
|
||||
|
||||
@ApiModelProperty("客户总运费:取运单中合计运费")
|
||||
@Excel(name = "客户总运费:取运单中合计运费")
|
||||
private BigDecimal customFreight;
|
||||
|
||||
@ApiModelProperty("运费:通过计价体系算出来的运费")
|
||||
@Excel(name = "运费:通过计价体系算出来的运费")
|
||||
private BigDecimal freight;
|
||||
|
||||
@ApiModelProperty("送货费:通过计价体系算出来的送货费")
|
||||
@Excel(name = "送货费:通过计价体系算出来的送货费")
|
||||
private BigDecimal deliveryExpense;
|
||||
|
||||
@ApiModelProperty("网点总运费:运费+送货费")
|
||||
@Excel(name = "网点总运费:运费+送货费")
|
||||
private BigDecimal totalFreight;
|
||||
|
||||
@ApiModelProperty("其他费用")
|
||||
@Excel(name = "其他费用")
|
||||
private BigDecimal otherExpenses;
|
||||
|
||||
@ApiModelProperty("留存金额:客户总运费-网点总运费")
|
||||
@Excel(name = "留存金额:客户总运费-网点总运费")
|
||||
private BigDecimal retainedAmount;
|
||||
|
||||
@ApiModelProperty("开单时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billingTime;
|
||||
|
||||
@ApiModelProperty("签收时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("确认时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date authTime;
|
||||
|
||||
@ApiModelProperty("确认人id")
|
||||
@Excel(name = "确认人id")
|
||||
private String authId;
|
||||
|
||||
@ApiModelProperty("确认人姓名")
|
||||
@Excel(name = "确认人姓名")
|
||||
private String authName;
|
||||
|
||||
@ApiModelProperty(name = "其他费用")
|
||||
private List<BranchBillOtherFeePO> branchBillOtherFeeDOList;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
package com.linke.finance.domain.branchFreightBill.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 网点费用账单对象 branch_freight_bill
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BranchFreightBillDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("网点账单id")
|
||||
private Long branchFreightId;
|
||||
|
||||
@ApiModelProperty("最高组织id")
|
||||
@Excel(name = "最高组织id")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织表id")
|
||||
@Excel(name = "组织表id")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchId;
|
||||
|
||||
@ApiModelProperty("收账网点id")
|
||||
@Excel(name = "收账网点id")
|
||||
private Long branchInId;
|
||||
|
||||
@ApiModelProperty("收账网点名称")
|
||||
@Excel(name = "收账网点名称")
|
||||
private String branchInName;
|
||||
|
||||
@ApiModelProperty("交账网点id")
|
||||
@Excel(name = "交账网点id")
|
||||
private Long branchOutId;
|
||||
|
||||
@ApiModelProperty("交账网点名称")
|
||||
@Excel(name = "交账网点名称")
|
||||
private String branchOutName;
|
||||
|
||||
@ApiModelProperty("网点费用账单编码")
|
||||
@Excel(name = "网点费用账单编码")
|
||||
private String billCode;
|
||||
|
||||
@ApiModelProperty("确认状态:1-未确认 2-已确认")
|
||||
@Excel(name = "确认状态:1-未确认 2-已确认")
|
||||
private Integer authStatus;
|
||||
|
||||
@ApiModelProperty("关联订单id")
|
||||
@Excel(name = "关联订单id")
|
||||
private Long associationOrderId;
|
||||
|
||||
@ApiModelProperty("关联订单编码")
|
||||
@Excel(name = "关联订单编码")
|
||||
private String associationOrderCode;
|
||||
|
||||
@ApiModelProperty("运单状态:1-未签收 2-已签收 3-已作废")
|
||||
@Excel(name = "运单状态:1-未签收 2-已签收 3-已作废")
|
||||
private Integer associationOrderStatus;
|
||||
|
||||
@ApiModelProperty("客户总运费:取运单中合计运费")
|
||||
@Excel(name = "客户总运费:取运单中合计运费")
|
||||
private BigDecimal customFreight;
|
||||
|
||||
@ApiModelProperty("运费:通过计价体系算出来的运费")
|
||||
@Excel(name = "运费:通过计价体系算出来的运费")
|
||||
private BigDecimal freight;
|
||||
|
||||
@ApiModelProperty("送货费:通过计价体系算出来的送货费")
|
||||
@Excel(name = "送货费:通过计价体系算出来的送货费")
|
||||
private BigDecimal deliveryExpense;
|
||||
|
||||
@ApiModelProperty("网点总运费:运费+送货费")
|
||||
@Excel(name = "网点总运费:运费+送货费")
|
||||
private BigDecimal totalFreight;
|
||||
|
||||
@ApiModelProperty("其他费用")
|
||||
@Excel(name = "其他费用")
|
||||
private BigDecimal otherExpenses;
|
||||
|
||||
@ApiModelProperty("留存金额:客户总运费-网点总运费")
|
||||
@Excel(name = "留存金额:客户总运费-网点总运费")
|
||||
private BigDecimal retainedAmount;
|
||||
|
||||
@ApiModelProperty("开单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date billingTime;
|
||||
|
||||
@ApiModelProperty("签收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("确认时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date authTime;
|
||||
|
||||
@ApiModelProperty("确认人id")
|
||||
@Excel(name = "确认人id")
|
||||
private String authId;
|
||||
|
||||
@ApiModelProperty("确认人姓名")
|
||||
@Excel(name = "确认人姓名")
|
||||
private String authName;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty(name = "记录类型:1-收账记录 2-交账记录")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(name = "其他费用")
|
||||
private List<BranchBillOtherFeeDO> branchBillOtherFeeDOList;
|
||||
|
||||
@ApiModelProperty("开单时间-开始")
|
||||
private String billingTimeStart;
|
||||
|
||||
@ApiModelProperty("开单时间-结束")
|
||||
private String billingTimeEnd;
|
||||
|
||||
@ApiModelProperty("签收时间-开始")
|
||||
private String signTimeStart;
|
||||
|
||||
@ApiModelProperty("签收时间-开始")
|
||||
private String signTimeEnd;
|
||||
|
||||
@ApiModelProperty("确认时间-开始")
|
||||
private String authTimeStart;
|
||||
|
||||
@ApiModelProperty("确认时间-结束")
|
||||
private String authTimeEnd;
|
||||
|
||||
@ApiModelProperty(value = "更新时间-开始")
|
||||
private String updateTimeStart;
|
||||
|
||||
@ApiModelProperty(value = "更新时间-结束")
|
||||
private String updateTimeEnd;
|
||||
}
|
||||
+280
@@ -0,0 +1,280 @@
|
||||
package com.linke.finance.domain.branchFreightBill.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.linke.finance.domain.branchBillOtherFee.entity.BranchBillOtherFee;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.facade.IBranchBillOtherFeeService;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.po.BranchBillOtherFeePO;
|
||||
import com.linke.finance.domain.branchBillOtherFee.repository.todo.BranchBillOtherFeeDO;
|
||||
import com.linke.finance.domain.branchFreightBill.entity.BranchFreightBill;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.facade.IBranchFreightBillService;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.po.BranchFreightBillPO;
|
||||
import com.linke.finance.domain.branchFreightBill.repository.todo.BranchFreightBillDO;
|
||||
import com.linke.finance.domain.serviceBill.repository.facade.IServiceBillService;
|
||||
import com.linke.finance.domain.serviceBill.repository.todo.ServiceBillDO;
|
||||
import com.linke.finance.domain.verification.service.VerificationDomainService;
|
||||
import com.linke.finance.infrastructure.feign.SystemServiceFeign;
|
||||
import com.mhd.common.core.constant.SubjectConstants;
|
||||
import com.mhd.common.core.domain.dto.VerificationDto;
|
||||
import com.mhd.common.core.domain.dto.WaybillSignFinanceDTO;
|
||||
import com.mhd.common.core.domain.entity.Verification;
|
||||
import com.mhd.common.core.domain.po.SysMultistageDictPo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 网点费用账单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2023-11-08
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BranchFreightBillDomainService {
|
||||
|
||||
@Autowired
|
||||
private IBranchFreightBillService branchFreightBillService;
|
||||
|
||||
@Autowired
|
||||
private IBranchBillOtherFeeService branchBillOtherFeeService;
|
||||
|
||||
@Autowired
|
||||
private IServiceBillService serviceBillService;
|
||||
|
||||
@Autowired
|
||||
private VerificationDomainService verificationDomainService;
|
||||
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询网点费用账单列表
|
||||
*/
|
||||
public List<BranchFreightBillPO> queryList(BranchFreightBillDO branchFreightBillDO) {
|
||||
return branchFreightBillService.queryList(branchFreightBillDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增网点费用账单
|
||||
*/
|
||||
public Boolean insert(BranchFreightBillDO branchFreightBillDO) {
|
||||
|
||||
return branchFreightBillService.insert(branchFreightBillDO);
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertBranchFreightBill(BranchFreightBillDO branchFreightBillDO) {
|
||||
return branchFreightBillService.insert(branchFreightBillDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改网点费用账单
|
||||
*/
|
||||
public Boolean update(BranchFreightBillDO branchFreightBillDO) {
|
||||
return branchFreightBillService.update(branchFreightBillDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网点费用账单
|
||||
*/
|
||||
public Boolean delete(Long[] branchFreightIds) {
|
||||
return branchFreightBillService.delete(branchFreightIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网点费用账单详细信息
|
||||
*/
|
||||
public BranchFreightBillPO getInfo(Long branchFreightId)
|
||||
{
|
||||
BranchFreightBillPO branchFreightBillPO = branchFreightBillService.getInfo(branchFreightId);
|
||||
BranchBillOtherFeeDO branchBillOtherFeeDO = new BranchBillOtherFeeDO();
|
||||
branchBillOtherFeeDO.setBillCode(branchFreightBillPO.getBillCode());
|
||||
branchBillOtherFeeDO.setTopOrganizationId(branchFreightBillPO.getTopOrganizationId());
|
||||
branchBillOtherFeeDO.setOrganizationId(branchFreightBillPO.getOrganizationId());
|
||||
List<BranchBillOtherFeePO> branchBillOtherFeePOList = branchBillOtherFeeService.queryList(branchBillOtherFeeDO);
|
||||
branchFreightBillPO.setBranchBillOtherFeeDOList(branchBillOtherFeePOList);
|
||||
return branchFreightBillPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 确认网点运费账单
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/9 8:20
|
||||
* @param branchFreightIds
|
||||
* @return int
|
||||
*/
|
||||
public int confirmBranchFreightBill(List<Long> branchFreightIds){
|
||||
return branchFreightBillService.confirmBranchFreightBill(branchFreightIds);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 修改运费
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/9 9:29
|
||||
* @param branchFreightBillDO
|
||||
* @return boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updateBranchFreightBill(BranchFreightBillDO branchFreightBillDO){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
BranchFreightBill branchFreightBill = branchFreightBillService.getOne(new QueryWrapper<BranchFreightBill>().lambda()
|
||||
.eq(BranchFreightBill::getBranchFreightId, branchFreightBillDO.getBranchFreightId()));
|
||||
if (branchFreightBill == null){
|
||||
throw new ServiceException("网点运费账单不存在");
|
||||
}
|
||||
if (branchFreightBill.getAuthStatus() == 2){
|
||||
throw new ServiceException("网点运费账单已确认,不可修改运费");
|
||||
}
|
||||
branchBillOtherFeeService.update(null, new UpdateWrapper<BranchBillOtherFee>().lambda()
|
||||
.set(BranchBillOtherFee::getDelFlag, 2)
|
||||
.set(BranchBillOtherFee::getUpdateBy, loginUser.getUserid())
|
||||
.set(BranchBillOtherFee::getUpdateByName, loginUser.getUsername())
|
||||
.set(BranchBillOtherFee::getUpdateTime, new Date())
|
||||
.eq(BranchBillOtherFee::getBillCode, branchFreightBill.getBillCode()));
|
||||
List<BranchBillOtherFee> branchBillOtherFeeList = new ArrayList<>();
|
||||
BigDecimal totalMoney = BigDecimal.ZERO;
|
||||
for (BranchBillOtherFeeDO branchBillOtherFeeDO : branchFreightBillDO.getBranchBillOtherFeeDOList()){
|
||||
BranchBillOtherFee branchBillOtherFee = new BranchBillOtherFee();
|
||||
branchBillOtherFee.setTopOrganizationId(branchFreightBill.getTopOrganizationId());
|
||||
branchBillOtherFee.setOrganizationId(branchFreightBill.getOrganizationId());
|
||||
branchBillOtherFee.setOrganizationName(branchFreightBill.getOrganizationName());
|
||||
branchBillOtherFee.setBillCode(branchFreightBill.getBillCode());
|
||||
branchBillOtherFee.setAssociationOrderId(branchBillOtherFeeDO.getAssociationOrderId());
|
||||
branchBillOtherFee.setAssociationOrderCode(branchBillOtherFeeDO.getAssociationOrderCode());
|
||||
branchBillOtherFee.setFirstSubject(branchBillOtherFeeDO.getFirstSubject());
|
||||
branchBillOtherFee.setFirstSubjectName(branchBillOtherFeeDO.getFirstSubjectName());
|
||||
branchBillOtherFee.setSecondSubject(branchBillOtherFeeDO.getSecondSubject());
|
||||
branchBillOtherFee.setSecondSubjectName(branchBillOtherFeeDO.getSecondSubjectName());
|
||||
branchBillOtherFee.setRevenueExpensesType(branchBillOtherFeeDO.getRevenueExpensesType());
|
||||
branchBillOtherFee.setMoney(branchBillOtherFeeDO.getMoney());
|
||||
branchBillOtherFee.setCreateBy(loginUser.getUserid());
|
||||
branchBillOtherFee.setCreateByName(loginUser.getUsername());
|
||||
branchBillOtherFee.setCreateTime(new Date());
|
||||
branchBillOtherFeeList.add(branchBillOtherFee);
|
||||
if (branchBillOtherFee.getRevenueExpensesType() == 1){
|
||||
totalMoney = totalMoney.add(branchBillOtherFee.getMoney());
|
||||
}else if (branchBillOtherFee.getRevenueExpensesType() == 2){
|
||||
totalMoney = totalMoney.subtract(branchBillOtherFee.getMoney());
|
||||
}
|
||||
}
|
||||
BigDecimal totalFreight = branchFreightBillDO.getFreight().add(branchFreightBillDO.getDeliveryExpense()).add(totalMoney);
|
||||
//保存其他费用
|
||||
batchSaveBranchBillOtherFee(branchBillOtherFeeList);
|
||||
return branchFreightBillService.update(null, new UpdateWrapper<BranchFreightBill>().lambda()
|
||||
.set(BranchFreightBill::getFreight, branchFreightBillDO.getFreight())
|
||||
.set(BranchFreightBill::getDeliveryExpense, branchFreightBillDO.getDeliveryExpense())
|
||||
.set(BranchFreightBill::getTotalFreight, totalFreight)
|
||||
.set(BranchFreightBill::getUpdateBy, loginUser.getUserid())
|
||||
.set(BranchFreightBill::getUpdateByName, loginUser.getUsername())
|
||||
.set(BranchFreightBill::getUpdateTime, new Date())
|
||||
.eq(BranchFreightBill::getBranchFreightId, branchFreightBillDO.getBranchFreightId()));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 保存其他费用
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/9 9:29
|
||||
* @param branchBillOtherFeeList
|
||||
*/
|
||||
public void batchSaveBranchBillOtherFee(List<BranchBillOtherFee> branchBillOtherFeeList){
|
||||
for (BranchBillOtherFee branchBillOtherFee : branchBillOtherFeeList){
|
||||
//查询一级科目
|
||||
if(StringUtils.isNotEmpty(branchBillOtherFee.getFirstSubject())){
|
||||
AjaxResult ajaxResult = systemServiceFeign.getSysMultistageDictList(branchBillOtherFee.getFirstSubject());
|
||||
if("200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
List<SysMultistageDictPo> sysMultistageDictPo = JSON.parseArray(JSONObject.toJSONString(ajaxResult.get("data")), SysMultistageDictPo.class);
|
||||
if(sysMultistageDictPo != null && sysMultistageDictPo.size() > 0){
|
||||
SysMultistageDictPo multistageDictPo = sysMultistageDictPo.stream().filter(item-> ObjectUtil.equal(item.getMultistageDictCode(),branchBillOtherFee.getFirstSubject())).findAny().orElse(null);
|
||||
if(null != multistageDictPo){
|
||||
branchBillOtherFee.setFirstSubjectName(multistageDictPo.getMultistageDictName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//查询二级科目
|
||||
if(StringUtils.isNotEmpty(branchBillOtherFee.getSecondSubject())){
|
||||
AjaxResult ajaxResult = systemServiceFeign.getSysMultistageDictList(branchBillOtherFee.getSecondSubject());
|
||||
if("200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
List<SysMultistageDictPo> sysMultistageDictPo = JSON.parseArray(JSONObject.toJSONString(ajaxResult.get("data")), SysMultistageDictPo.class);
|
||||
if(sysMultistageDictPo != null && sysMultistageDictPo.size() > 0){
|
||||
SysMultistageDictPo multistageDictPo = sysMultistageDictPo.stream().filter(item-> ObjectUtil.equal(item.getMultistageDictCode(),branchBillOtherFee.getSecondSubject())).findAny().orElse(null);
|
||||
if(null != multistageDictPo){
|
||||
branchBillOtherFee.setSecondSubjectName(multistageDictPo.getMultistageDictName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
branchBillOtherFeeService.saveBatch(branchBillOtherFeeList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 新增网点费用账单和标记服务费状态
|
||||
* @author ZhouGY
|
||||
* @date 2023/11/9 13:35
|
||||
* @param waybillSignFinanceDTO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional
|
||||
public Boolean insertOrUpdateWaybillSignFinance(WaybillSignFinanceDTO waybillSignFinanceDTO) {
|
||||
if (waybillSignFinanceDTO.getBranchFreightBillDO() != null){
|
||||
BranchFreightBillDO branchFreightBillDO = new BranchFreightBillDO();
|
||||
BeanUtils.copyProperties(waybillSignFinanceDTO.getBranchFreightBillDO(), branchFreightBillDO);
|
||||
insertBranchFreightBill(branchFreightBillDO);
|
||||
}
|
||||
if (waybillSignFinanceDTO.getServiceBillDO() != null){
|
||||
ServiceBillDO serviceBillDO = new ServiceBillDO();
|
||||
BeanUtils.copyProperties(waybillSignFinanceDTO.getServiceBillDO(), serviceBillDO);
|
||||
serviceBillService.updateStatus(serviceBillDO);
|
||||
}
|
||||
//收入核销
|
||||
if (CollUtil.isNotEmpty(waybillSignFinanceDTO.getVerificationList())) {
|
||||
for (VerificationDto verification : waybillSignFinanceDTO.getVerificationList()) {
|
||||
Verification verificationSave = new Verification();
|
||||
com.mhd.common.core.utils.bean.BeanUtils.copyProperties(verification,verificationSave);
|
||||
if (ObjectUtil.isNotEmpty(verification.getVerificationId())){
|
||||
verificationDomainService.updateVerificationById(verificationSave);
|
||||
}else {
|
||||
verificationDomainService.insertVerification(verificationSave);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关联运单删除网点运费账单
|
||||
*
|
||||
* @param verifications
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteByWaybillNumbers(List<String> verifications) {
|
||||
return branchFreightBillService
|
||||
.lambdaUpdate()
|
||||
.set(BranchFreightBill::getDelFlag, 2)
|
||||
.in(BranchFreightBill::getAssociationOrderCode, verifications)
|
||||
.update();
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
package com.linke.finance.domain.businessDocument.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 业务单据对象 business_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BusinessDocument extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long businessDocumentId;
|
||||
|
||||
@ApiModelProperty("对账单表id")
|
||||
@Excel(name = "对账单表id")
|
||||
private Long reconciliationId;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal verificationMoney;
|
||||
|
||||
@ApiModelProperty("托运人id")
|
||||
@Excel(name = "托运人id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("运单/订单号")
|
||||
@Excel(name = "运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("运单/订单来源")
|
||||
@Excel(name = "运单/订单来源")
|
||||
private String waybillSource;
|
||||
|
||||
@ApiModelProperty("运单/订单来源name")
|
||||
@Excel(name = "运单/订单来源name")
|
||||
private String waybillSourceName;
|
||||
|
||||
@ApiModelProperty("应收结算类型:1-月结,2-现结")
|
||||
@Excel(name = "应收结算类型:1-月结,2-现结")
|
||||
private Integer receivableType;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String loadingAdress;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String unloadAdress;
|
||||
|
||||
@ApiModelProperty("应付金额")
|
||||
@Excel(name = "应付金额")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty("应收金额")
|
||||
@Excel(name = "应收金额")
|
||||
private BigDecimal receivableAmount;
|
||||
|
||||
@ApiModelProperty("承运人ID")
|
||||
@Excel(name = "承运人ID")
|
||||
private Long carrierId;
|
||||
|
||||
@ApiModelProperty("承运人姓名")
|
||||
@Excel(name = "承运人姓名")
|
||||
private String carrierName;
|
||||
|
||||
@ApiModelProperty("司机ID")
|
||||
@Excel(name = "司机ID")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty("司机姓名")
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName;
|
||||
|
||||
@ApiModelProperty("托运人姓名")
|
||||
@Excel(name = "托运人姓名")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty("接收时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "接收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date receptionTime;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatus;
|
||||
|
||||
@ApiModelProperty("付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty(name = "订单核实状态(1-未核实,2-已核实)")
|
||||
private Integer waybillVerifyFlag;
|
||||
|
||||
@ApiModelProperty("标记核实时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "标记核实时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date waybillVerifyTime;
|
||||
|
||||
@ApiModelProperty("已开票金额")
|
||||
@Excel(name = "已开票金额")
|
||||
private BigDecimal invoiceCostHas;
|
||||
|
||||
@ApiModelProperty(name = "订单申请发票状态(1-已申请,2-未申请)")
|
||||
private Integer invoiceApplyStatus;
|
||||
|
||||
/** 开票记录表id */
|
||||
@ApiModelProperty(name = "开票记录表id")
|
||||
private Long invoiceInfoId;
|
||||
|
||||
/** 货物类型 */
|
||||
@ApiModelProperty(name = "货物类型")
|
||||
private String freightName;
|
||||
|
||||
@ApiModelProperty("审核状态(1-审核中,2-审核通过,3-审核拒绝)")
|
||||
@Excel(name = "审核状态(1-审核中,2-审核通过,3-审核拒绝)")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty(name = "运单id")
|
||||
private String waybillId;
|
||||
|
||||
@ApiModelProperty(name = "收货市区名称简写")
|
||||
private String addresseeAreaName;
|
||||
|
||||
@ApiModelProperty(name = "发货市区名称简写")
|
||||
private String mailAreaName;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatusShipper;
|
||||
|
||||
@ApiModelProperty(name = "司机提成费率")
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
@ApiModelProperty("货主付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTimeShipper;
|
||||
|
||||
@ApiModelProperty(name = "单据类型(1-普通单,2-合单(网货))")
|
||||
private Integer waybillType;
|
||||
|
||||
@ApiModelProperty(value = "合单主单单号(单据类型为2 不能为空)")
|
||||
private String mainOrderNumber;
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.businessDocument.entity.BusinessDocument;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.AccountsReceivableAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO;
|
||||
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务单据Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
public interface IBusinessDocumentService extends IService<BusinessDocument>
|
||||
{
|
||||
/**
|
||||
* 分页查询业务单据列表
|
||||
*/
|
||||
public List<BusinessDocumentPO> queryList(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
/**
|
||||
* 新增业务单据
|
||||
*/
|
||||
public Boolean insert(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
public Boolean update(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
/**
|
||||
* 批量删除业务单据
|
||||
*/
|
||||
public Boolean delete(Long[] businessDocumentIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务单据
|
||||
*/
|
||||
public BusinessDocumentPO getInfo(Long businessDocumentId);
|
||||
|
||||
List<BusinessDocumentPO> queryInvoiceList(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentPO> initiateReconciliation(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentAppPO> queryListByInvoiceId(Long invoiceInfoId);
|
||||
|
||||
List<BusinessDocument> selectBatchIds(List<Long> businessDocumentIdList);
|
||||
|
||||
List<AccountsReceivableAppPO> businessDocumentList(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentPO> queryListByReconciliation(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentDetaliPO> querySettlementList(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
BusinessDocument getByWaybillNo(String waybillNo);
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.businessDocument.entity.BusinessDocument;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.AccountsReceivableAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO;
|
||||
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 业务单据Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
public interface BusinessDocumentMapper extends BaseMapper<BusinessDocument>
|
||||
{
|
||||
/**
|
||||
* 查询业务单据列表
|
||||
* 只允许查询允许对账的业务单据
|
||||
*/
|
||||
public List<BusinessDocumentPO> queryList(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
/**
|
||||
* 查询申请开票业务单据列表
|
||||
*/
|
||||
List<BusinessDocumentPO> queryInvoiceList(@Param("businessDocumentDO") BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentPO> initiateReconciliation(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentAppPO> queryListByInvoiceId(@Param("invoiceInfoId") Long invoiceInfoId);
|
||||
|
||||
List<AccountsReceivableAppPO> businessDocumentList(@Param("businessDocumentDO") BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentPO> queryListByReconciliation(BusinessDocumentDO businessDocumentDO);
|
||||
|
||||
List<BusinessDocumentDetaliPO> querySettlementList(@Param("businessDocumentDO") BusinessDocumentDO businessDocumentDO);
|
||||
}
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.linke.finance.domain.businessDocument.entity.BusinessDocument;
|
||||
import com.linke.finance.domain.businessDocument.repository.facade.IBusinessDocumentService;
|
||||
import com.linke.finance.domain.businessDocument.repository.mapper.BusinessDocumentMapper;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.AccountsReceivableAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO;
|
||||
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务单据Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
@Service
|
||||
public class BusinessDocumentImpl extends ServiceImpl<BusinessDocumentMapper, BusinessDocument> implements IBusinessDocumentService{
|
||||
@Autowired
|
||||
private BusinessDocumentMapper businessDocumentMapper;
|
||||
|
||||
/**
|
||||
* 查询业务单据列表
|
||||
* 只允许查询允许对账的业务单据
|
||||
*/
|
||||
@Override
|
||||
public List<BusinessDocumentPO> queryList(BusinessDocumentDO businessDocumentDO)
|
||||
{
|
||||
return businessDocumentMapper.queryList(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务单据
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(BusinessDocumentDO businessDocumentDO) {
|
||||
BusinessDocument businessDocument = new BusinessDocument();
|
||||
BeanUtils.copyProperties(businessDocumentDO,businessDocument);
|
||||
return this.save(businessDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(BusinessDocumentDO businessDocumentDO) {
|
||||
BusinessDocument businessDocument = new BusinessDocument();
|
||||
BeanUtils.copyProperties(businessDocumentDO,businessDocument);
|
||||
return this.updateById(businessDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务单据
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] businessDocumentIds ) {
|
||||
List<BusinessDocument> list = new ArrayList<>();
|
||||
for (Long id : businessDocumentIds) {
|
||||
BusinessDocument businessDocument = new BusinessDocument();
|
||||
businessDocument.setBusinessDocumentId(id);
|
||||
businessDocument.setDelFlag(2);
|
||||
list.add(businessDocument);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
@Override
|
||||
public BusinessDocumentPO getInfo(Long businessDocumentId) {
|
||||
BusinessDocument businessDocument = this.getById(businessDocumentId);
|
||||
BusinessDocumentPO businessDocumentPO = new BusinessDocumentPO();
|
||||
BeanUtils.copyProperties(businessDocument,businessDocumentPO);
|
||||
return businessDocumentPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询申请开票业务单据列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusinessDocumentPO> queryInvoiceList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentMapper.queryInvoiceList(businessDocumentDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessDocumentPO> initiateReconciliation(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentMapper.initiateReconciliation(businessDocumentDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessDocumentAppPO> queryListByInvoiceId(Long invoiceInfoId) {
|
||||
return businessDocumentMapper.queryListByInvoiceId(invoiceInfoId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessDocument> selectBatchIds(List<Long> businessDocumentIdList) {
|
||||
return businessDocumentMapper.selectBatchIds(businessDocumentIdList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountsReceivableAppPO> businessDocumentList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentMapper.businessDocumentList(businessDocumentDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessDocumentPO> queryListByReconciliation(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentMapper.queryListByReconciliation(businessDocumentDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessDocumentDetaliPO> querySettlementList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentMapper.querySettlementList(businessDocumentDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessDocument getByWaybillNo(String waybillNo) {
|
||||
BusinessDocument businessDocument = businessDocumentMapper.selectOne(new LambdaQueryWrapper<BusinessDocument>()
|
||||
.eq(BusinessDocument::getWaybillNumber, waybillNo).eq(BusinessDocument::getDelFlag, 1).last("limit 1"));
|
||||
|
||||
return businessDocument;
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.mhd.common.core.annotation.DateNullToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 业务单据对象 business_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "APP应收账单", description = "APP应收账单")
|
||||
public class AccountsReceivableAppPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
private Long businessDocumentId;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
private Long businessDocumentDetaliId;
|
||||
|
||||
@ApiModelProperty("一级科目code")
|
||||
private String firstSubject = "";
|
||||
|
||||
@ApiModelProperty("一级科目名称")
|
||||
private String firstSubjectName = "";
|
||||
|
||||
@ApiModelProperty("二级科目code")
|
||||
private String secondSubject = "";
|
||||
|
||||
@ApiModelProperty("二级科目名称")
|
||||
private String secondSubjectName = "";
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty("运单/订单号")
|
||||
@Excel(name = "运单/订单号")
|
||||
private String waybillNumber = "";
|
||||
|
||||
@ApiModelProperty("运单/订单来源")
|
||||
@Excel(name = "运单/订单来源")
|
||||
private String waybillSource = "";
|
||||
|
||||
@ApiModelProperty("运单/订单来源name")
|
||||
@Excel(name = "运单/订单来源name")
|
||||
private String waybillSourceName = "";
|
||||
|
||||
@ApiModelProperty("应收结算类型:1-月结,2-现结")
|
||||
@Excel(name = "应收结算类型:1-月结,2-现结")
|
||||
private Integer receivableType;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String loadingAdress = "";
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String unloadAdress = "";
|
||||
|
||||
@ApiModelProperty("承运人姓名")
|
||||
@Excel(name = "承运人姓名")
|
||||
private String carrierName = "";
|
||||
|
||||
@ApiModelProperty("司机姓名")
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName = "";
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber = "";
|
||||
|
||||
@ApiModelProperty("接收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "接收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonSerialize(nullsUsing = DateNullToStringSerializer.class)
|
||||
private Date receptionTime;
|
||||
|
||||
@ApiModelProperty(name = "运单id")
|
||||
private String waybillId = "";
|
||||
|
||||
@ApiModelProperty(name = "收货市区名称简写")
|
||||
private String addresseeAreaName = "";
|
||||
|
||||
@ApiModelProperty(name = "发货市区名称简写")
|
||||
private String mailAreaName = "";
|
||||
|
||||
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.mhd.common.core.annotation.DateNullToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 业务单据对象 business_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "业务单据对象", description = "业务单据响应对象")
|
||||
public class BusinessDocumentAppPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
private Long businessDocumentId;
|
||||
|
||||
@ApiModelProperty("对账单表id")
|
||||
@Excel(name = "对账单表id")
|
||||
private Long reconciliationId;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal verificationMoney = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty("托运人id")
|
||||
@Excel(name = "托运人id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String phone = "";
|
||||
|
||||
@ApiModelProperty("运单/订单号")
|
||||
@Excel(name = "运单/订单号")
|
||||
private String waybillNumber = "";
|
||||
|
||||
@ApiModelProperty("运单/订单来源")
|
||||
@Excel(name = "运单/订单来源")
|
||||
private String waybillSource = "";
|
||||
|
||||
@ApiModelProperty("运单/订单来源name")
|
||||
@Excel(name = "运单/订单来源name")
|
||||
private String waybillSourceName = "";
|
||||
|
||||
@ApiModelProperty("应收结算类型:1-月结,2-现结")
|
||||
@Excel(name = "应收结算类型:1-月结,2-现结")
|
||||
private Integer receivableType;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String loadingAdress = "";
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String unloadAdress = "";
|
||||
|
||||
@ApiModelProperty("应付金额")
|
||||
@Excel(name = "应付金额")
|
||||
private BigDecimal payableAmount = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty("应收金额")
|
||||
@Excel(name = "应收金额")
|
||||
private BigDecimal receivableAmount = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty("运单数量")
|
||||
private Integer waybillCount;
|
||||
|
||||
@ApiModelProperty("承运人ID")
|
||||
@Excel(name = "承运人ID")
|
||||
private Long carrierId;
|
||||
|
||||
@ApiModelProperty("承运人姓名")
|
||||
@Excel(name = "承运人姓名")
|
||||
private String carrierName = "";
|
||||
|
||||
@ApiModelProperty("司机ID")
|
||||
@Excel(name = "司机ID")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty("司机姓名")
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName = "";
|
||||
|
||||
@ApiModelProperty("托运人姓名")
|
||||
@Excel(name = "托运人姓名")
|
||||
private String shipperName = "";
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber = "";
|
||||
|
||||
@ApiModelProperty("接收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "接收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonSerialize(nullsUsing = DateNullToStringSerializer.class)
|
||||
private Date receptionTime;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName = "";
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatus;
|
||||
|
||||
@ApiModelProperty("付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonSerialize(nullsUsing = DateNullToStringSerializer.class)
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty(name = "订单核实状态(1-未核实,2-已核实)")
|
||||
private Integer waybillVerifyFlag;
|
||||
|
||||
@ApiModelProperty("标记核实时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "标记核实时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonSerialize(nullsUsing = DateNullToStringSerializer.class)
|
||||
private Date waybillVerifyTime;
|
||||
|
||||
@ApiModelProperty("已申请开票金额")
|
||||
@Excel(name = "已申请开票金额")
|
||||
private BigDecimal invoiceCostHas = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty(name = "订单申请发票状态(1-已申请,2-未申请)")
|
||||
private Integer invoiceApplyStatus;
|
||||
|
||||
/** 开票记录表id */
|
||||
@ApiModelProperty(name = "开票记录表id")
|
||||
private Long invoiceInfoId;
|
||||
|
||||
/** 货物类型 */
|
||||
@ApiModelProperty(name = "货物类型")
|
||||
private String freightName = "";
|
||||
|
||||
@ApiModelProperty("货主付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTimeShipper;
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 业务单据对象 business_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "业务单据对象", description = "业务单据响应对象")
|
||||
public class BusinessDocumentPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
private Long businessDocumentId;
|
||||
|
||||
@ApiModelProperty("对账单表id")
|
||||
@Excel(name = "对账单表id")
|
||||
private Long reconciliationId;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal verificationMoney;
|
||||
|
||||
@ApiModelProperty("托运人id")
|
||||
@Excel(name = "托运人id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("运单/订单号")
|
||||
@Excel(name = "运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("运单/订单来源")
|
||||
@Excel(name = "运单/订单来源")
|
||||
private String waybillSource;
|
||||
|
||||
@ApiModelProperty("运单/订单来源name")
|
||||
@Excel(name = "运单/订单来源name")
|
||||
private String waybillSourceName;
|
||||
|
||||
@ApiModelProperty("应收结算类型:1-月结,2-现结")
|
||||
@Excel(name = "应收结算类型:1-月结,2-现结")
|
||||
private Integer receivableType;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String loadingAdress;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String unloadAdress;
|
||||
|
||||
@ApiModelProperty("应付金额")
|
||||
@Excel(name = "应付金额")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty("应收金额")
|
||||
@Excel(name = "应收金额")
|
||||
private BigDecimal receivableAmount;
|
||||
|
||||
@ApiModelProperty("运单数量")
|
||||
private Integer waybillCount;
|
||||
|
||||
@ApiModelProperty("承运人ID")
|
||||
@Excel(name = "承运人ID")
|
||||
private Long carrierId;
|
||||
|
||||
@ApiModelProperty("承运人姓名")
|
||||
@Excel(name = "承运人姓名")
|
||||
private String carrierName;
|
||||
|
||||
@ApiModelProperty("司机ID")
|
||||
@Excel(name = "司机ID")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty("司机姓名")
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName;
|
||||
|
||||
@ApiModelProperty("托运人姓名")
|
||||
@Excel(name = "托运人姓名")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty("接收时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "接收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date receptionTime;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatus;
|
||||
|
||||
@ApiModelProperty("付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty(name = "订单核实状态(1-未核实,2-已核实)")
|
||||
private Integer waybillVerifyFlag;
|
||||
|
||||
@ApiModelProperty("标记核实时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "标记核实时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date waybillVerifyTime;
|
||||
|
||||
@ApiModelProperty("已申请开票金额")
|
||||
@Excel(name = "已申请开票金额")
|
||||
private BigDecimal invoiceCostHas;
|
||||
|
||||
@ApiModelProperty(name = "订单申请发票状态(1-已申请,2-未申请)")
|
||||
private Integer invoiceApplyStatus;
|
||||
|
||||
/** 开票记录表id */
|
||||
@ApiModelProperty(name = "开票记录表id")
|
||||
private Long invoiceInfoId;
|
||||
|
||||
/** 货物类型 */
|
||||
@ApiModelProperty(name = "货物类型")
|
||||
private String freightName;
|
||||
|
||||
@ApiModelProperty("审核状态(1-审核中,2-审核通过,3-审核拒绝)")
|
||||
@Excel(name = "审核状态(1-审核中,2-审核通过,3-审核拒绝)")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty(name = "运单id")
|
||||
private String waybillId;
|
||||
|
||||
@ApiModelProperty(name = "收货市区名称简写")
|
||||
private String addresseeAreaName;
|
||||
|
||||
@ApiModelProperty(name = "发货市区名称简写")
|
||||
private String mailAreaName;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatusShipper;
|
||||
|
||||
@ApiModelProperty(name = "司机提成费率")
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
@ApiModelProperty("货主付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTimeShipper;
|
||||
|
||||
@ApiModelProperty(name = "单据类型(1-普通单,2-合单(网货))")
|
||||
private Integer waybillType;
|
||||
|
||||
@ApiModelProperty(value = "合单主单单号(单据类型为2 不能为空)")
|
||||
private String mainOrderNumber;
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
package com.linke.finance.domain.businessDocument.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 业务单据对象 business_document
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BusinessDocumentDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
private Long businessDocumentId;
|
||||
|
||||
@ApiModelProperty("对账单表id")
|
||||
@Excel(name = "对账单表id")
|
||||
private Long reconciliationId;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal verificationMoney;
|
||||
|
||||
@ApiModelProperty("托运人id")
|
||||
@Excel(name = "托运人id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("运单/订单号")
|
||||
@Excel(name = "运单/订单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("运单/订单来源")
|
||||
@Excel(name = "运单/订单来源")
|
||||
private String waybillSource;
|
||||
|
||||
@ApiModelProperty("运单/订单来源name")
|
||||
@Excel(name = "运单/订单来源name")
|
||||
private String waybillSourceName;
|
||||
|
||||
@ApiModelProperty("应收结算类型:1-月结,2-现结")
|
||||
@Excel(name = "应收结算类型:1-月结,2-现结")
|
||||
private Integer receivableType;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String loadingAdress;
|
||||
|
||||
@ApiModelProperty("装货地址")
|
||||
@Excel(name = "装货地址")
|
||||
private String unloadAdress;
|
||||
|
||||
@ApiModelProperty("应付金额")
|
||||
@Excel(name = "应付金额")
|
||||
private BigDecimal payableAmount;
|
||||
|
||||
@ApiModelProperty("应收金额")
|
||||
@Excel(name = "应收金额")
|
||||
private BigDecimal receivableAmount;
|
||||
|
||||
@ApiModelProperty("承运人ID")
|
||||
@Excel(name = "承运人ID")
|
||||
private Long carrierId;
|
||||
|
||||
@ApiModelProperty("承运人姓名")
|
||||
@Excel(name = "承运人姓名")
|
||||
private String carrierName;
|
||||
|
||||
@ApiModelProperty("司机ID")
|
||||
@Excel(name = "司机ID")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty("司机姓名")
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName;
|
||||
|
||||
@ApiModelProperty("托运人姓名")
|
||||
@Excel(name = "托运人姓名")
|
||||
private String shipperName;
|
||||
@ApiModelProperty("托运人信息")
|
||||
@Excel(name = "托运人信息")
|
||||
private String shipperInfo;
|
||||
|
||||
@ApiModelProperty("车牌号")
|
||||
@Excel(name = "车牌号")
|
||||
private String vehicleLicensePlateNumber;
|
||||
|
||||
@ApiModelProperty("接收时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "接收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date receptionTime;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("运单号集合")
|
||||
private List<String> waybillNoList;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatus;
|
||||
|
||||
@ApiModelProperty("付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty(name = "订单核实状态(1-未核实,2-已核实)")
|
||||
private Integer waybillVerifyFlag;
|
||||
|
||||
@ApiModelProperty("标记核实时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "标记核实时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date waybillVerifyTime;
|
||||
|
||||
@ApiModelProperty("已开票金额")
|
||||
@Excel(name = "已开票金额")
|
||||
private BigDecimal invoiceCostHas;
|
||||
|
||||
@ApiModelProperty(name = "订单申请发票状态(1-已申请,2-未申请)")
|
||||
private Integer invoiceApplyStatus;
|
||||
|
||||
/** 货物类型 */
|
||||
@ApiModelProperty(name = "货物类型")
|
||||
private String freightName;
|
||||
|
||||
/** 开票记录表id */
|
||||
@ApiModelProperty(name = "开票记录表id")
|
||||
private Long invoiceInfoId;
|
||||
|
||||
@ApiModelProperty(name = "开单时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "开单时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "付款时间查询条件开始日期")
|
||||
private String payTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "付款时间查询条件结束日期")
|
||||
private String payTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "付款时间查询条件开始日期")
|
||||
private String payTimeShipperStart;
|
||||
|
||||
@ApiModelProperty(name = "付款时间查询条件结束日期")
|
||||
private String payTimeShipperEnd;
|
||||
|
||||
@ApiModelProperty("审核状态(1-审核中,2-审核通过,3-审核拒绝)")
|
||||
@Excel(name = "审核状态(1-审核中,2-审核通过,3-审核拒绝)")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty("业务明细id集合")
|
||||
private List<Long> businessDocumentDetailIds;
|
||||
|
||||
@ApiModelProperty(name = "APP收支明细查询条件(1-全部,2-今天,3-本周,4-本月,5-自定义)")
|
||||
private Integer queryDateFlag;
|
||||
|
||||
@ApiModelProperty(name = "接收时间查询条件开始日期")
|
||||
private String receptionTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "接收时间查询条件结束日期")
|
||||
private String receptionTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "运单id")
|
||||
private String waybillId;
|
||||
|
||||
@ApiModelProperty(name = "收货市区名称简写")
|
||||
private String addresseeAreaName;
|
||||
|
||||
@ApiModelProperty(name = "发货市区名称简写")
|
||||
private String mailAreaName;
|
||||
|
||||
@ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
private Integer payStatusShipper;
|
||||
|
||||
@ApiModelProperty(name = "查询类型(1-货主,2-司机)")
|
||||
private Integer queryType;
|
||||
|
||||
@ApiModelProperty(name = "司机提成费率")
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
@ApiModelProperty("货主付款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTimeShipper;
|
||||
|
||||
@ApiModelProperty(name = "单据类型(1-普通单,2-合单(网货))")
|
||||
private Integer waybillType;
|
||||
|
||||
@ApiModelProperty(value = "合单主单单号(单据类型为2 不能为空)")
|
||||
private String mainOrderNumber;
|
||||
}
|
||||
+205
@@ -0,0 +1,205 @@
|
||||
package com.linke.finance.domain.businessDocument.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.linke.finance.domain.businessDocument.entity.BusinessDocument;
|
||||
import com.linke.finance.domain.businessDocument.repository.facade.IBusinessDocumentService;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.AccountsReceivableAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentAppPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO;
|
||||
import com.linke.finance.domain.invoice.entity.InvoiceOrder;
|
||||
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.WlhyServiceFeign;
|
||||
import com.mhd.system.api.domain.TmsTransportNote;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 业务单据
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BusinessDocumentDomainService {
|
||||
|
||||
@Autowired
|
||||
private IBusinessDocumentService businessDocumentService;
|
||||
@Autowired
|
||||
private WlhyServiceFeign wlhyServiceFeign;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询业务单据列表
|
||||
* 只允许查询允许对账的业务单据
|
||||
*/
|
||||
public List<BusinessDocumentPO> queryList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.queryList(businessDocumentDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增业务单据
|
||||
*/
|
||||
public Boolean insert(BusinessDocumentDO businessDocumentDO) {
|
||||
|
||||
return businessDocumentService.insert(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务单据
|
||||
*/
|
||||
public Boolean update(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.update(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务单据
|
||||
*/
|
||||
public Boolean delete(Long[] businessDocumentIds) {
|
||||
return businessDocumentService.delete(businessDocumentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务单据详细信息
|
||||
*/
|
||||
public BusinessDocumentPO getInfo(Long businessDocumentId)
|
||||
{
|
||||
return businessDocumentService.getInfo(businessDocumentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务单据详细信息
|
||||
*/
|
||||
public BusinessDocument getByWaybillNo(String waybillNo)
|
||||
{
|
||||
return businessDocumentService.getByWaybillNo(waybillNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param list
|
||||
*/
|
||||
public boolean saveBatch(List<BusinessDocument> list){
|
||||
return businessDocumentService.saveBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改
|
||||
* @param list
|
||||
*/
|
||||
public void updateBatchById(List<BusinessDocument> list){
|
||||
businessDocumentService.updateBatchById(list);
|
||||
}
|
||||
|
||||
|
||||
public List<BusinessDocumentPO> queryInvoiceList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.queryInvoiceList(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ids查询订单信息
|
||||
* @param invoiceOrderIds
|
||||
* @return
|
||||
*/
|
||||
public List<BusinessDocument> selectListByIds(Long[] invoiceOrderIds) {
|
||||
LambdaQueryWrapper<BusinessDocument> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(BusinessDocument::getBusinessDocumentId,invoiceOrderIds);
|
||||
queryWrapper.eq(BusinessDocument::getDelFlag,1);
|
||||
return businessDocumentService.list(queryWrapper);
|
||||
}
|
||||
|
||||
public List<BusinessDocument> selectListByIds(List<Long> invoiceOrderIds) {
|
||||
LambdaQueryWrapper<BusinessDocument> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(BusinessDocument::getBusinessDocumentId,invoiceOrderIds);
|
||||
queryWrapper.eq(BusinessDocument::getDelFlag,1);
|
||||
return businessDocumentService.list(queryWrapper);
|
||||
}
|
||||
|
||||
public List<BusinessDocument> selectListByInvoiceIds(List<Long> invoiceOrderIds) {
|
||||
LambdaQueryWrapper<BusinessDocument> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(BusinessDocument::getInvoiceInfoId,invoiceOrderIds);
|
||||
queryWrapper.eq(BusinessDocument::getDelFlag,1);
|
||||
return businessDocumentService.list(queryWrapper);
|
||||
}
|
||||
|
||||
public List<BusinessDocument> selectListByReconciliationIds(List<Long> reconciliationIdList) {
|
||||
LambdaQueryWrapper<BusinessDocument> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(BusinessDocument::getReconciliationId,reconciliationIdList);
|
||||
queryWrapper.eq(BusinessDocument::getDelFlag,1);
|
||||
return businessDocumentService.list(queryWrapper);
|
||||
}
|
||||
|
||||
public boolean bindInvoiceInfoId(List<BusinessDocument> businessDocumentList, Long invoiceInfoId) {
|
||||
for (BusinessDocument businessDocument : businessDocumentList) {
|
||||
businessDocument.setInvoiceInfoId(invoiceInfoId);
|
||||
businessDocument.setInvoiceCostHas(businessDocument.getVerificationMoney());
|
||||
businessDocument.setUpdateByName(SecurityUtils.getUsername());
|
||||
businessDocument.setUpdateTime(new Date());
|
||||
businessDocument.setUpdateBy(SecurityUtils.getUserId());
|
||||
businessDocument.setInvoiceApplyStatus(1);
|
||||
}
|
||||
return businessDocumentService.updateBatchById(businessDocumentList);
|
||||
}
|
||||
|
||||
public List<BusinessDocumentPO> initiateReconciliation(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.initiateReconciliation(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据开票id查询单据信息
|
||||
* @param invoiceInfoId
|
||||
* @return
|
||||
*/
|
||||
public List<BusinessDocumentAppPO> queryListByInvoiceId(Long invoiceInfoId) {
|
||||
return businessDocumentService.queryListByInvoiceId(invoiceInfoId);
|
||||
}
|
||||
|
||||
public List<BusinessDocument> selectBatchIds(List<Long> businessDocumentIdList) {
|
||||
return businessDocumentService.selectBatchIds(businessDocumentIdList);
|
||||
}
|
||||
|
||||
public List<AccountsReceivableAppPO> businessDocumentList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.businessDocumentList(businessDocumentDO);
|
||||
}
|
||||
|
||||
public List<BusinessDocumentPO> queryListByReconciliation(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.queryListByReconciliation(businessDocumentDO);
|
||||
}
|
||||
|
||||
public List<BusinessDocumentDetaliPO> querySettlementList(BusinessDocumentDO businessDocumentDO) {
|
||||
return businessDocumentService.querySettlementList(businessDocumentDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据运单号,查询主单下所有合单数据列表
|
||||
* @param waybillNumber
|
||||
* @return
|
||||
*/
|
||||
public List<TmsTransportNote> selectBusinessByMainOrder(String waybillNumber) {
|
||||
//根据运单号,查询网货中台,并关联查询其主单下所有合单数据,统计是否还有未支付完成运单
|
||||
AjaxResult ajaxResult = wlhyServiceFeign.selectMainOrderByOrderNum(waybillNumber);
|
||||
List<TmsTransportNote> tmsTransportNoteList = null;
|
||||
if("200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
JSONObject.toJSONString(ajaxResult.get("data"));
|
||||
tmsTransportNoteList = JSON.parseArray(JSONObject.toJSONString(ajaxResult.get("data")), TmsTransportNote.class);
|
||||
}
|
||||
return tmsTransportNoteList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.linke.finance.domain.businessDocumentDetali.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 审核记录对象 audit_records
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AuditRecords extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("审核记录表id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long auditRecordsId;
|
||||
|
||||
@ApiModelProperty("审核过程")
|
||||
@Excel(name = "审核过程")
|
||||
private Long sort;
|
||||
|
||||
@ApiModelProperty("角色ID")
|
||||
@Excel(name = "角色ID")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty("角色code")
|
||||
@Excel(name = "角色code")
|
||||
private String roleCode;
|
||||
|
||||
@ApiModelProperty("角色名称")
|
||||
@Excel(name = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
@ApiModelProperty("业务单据详情表id")
|
||||
@Excel(name = "业务单据详情表id")
|
||||
private Long businessDocumentDetaliId;
|
||||
|
||||
@ApiModelProperty("业务单据表id")
|
||||
@Excel(name = "业务单据表id")
|
||||
private Long businessDocumentId;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
@ApiModelProperty("审核状态:2-审核同意,3-审核拒绝")
|
||||
private Integer auditStatus;
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
package com.linke.finance.domain.businessDocumentDetali.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
|
||||
/**
|
||||
* 应付单据表
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BusinessDocumentDetali extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("应付单据id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long businessDocumentDetaliId;
|
||||
|
||||
@ApiModelProperty("应付单据号")
|
||||
@Excel(name = "应付单据号")
|
||||
private String businessDocumentDetaliNumber;
|
||||
|
||||
@ApiModelProperty("业务类型:1-运单,2-作业单,3-借款单,4-订单,5-维修单")
|
||||
@Excel(name = "业务类型:1-运单,2-作业单,3-借款单,4-订单,5-维修单")
|
||||
private Integer businessType;
|
||||
|
||||
@ApiModelProperty("业务单据id")
|
||||
@Excel(name = "业务单据id")
|
||||
private String businessCocumentId;
|
||||
|
||||
@ApiModelProperty("费用类别")
|
||||
@Excel(name = "费用类别")
|
||||
private String expenseItem;
|
||||
|
||||
@ApiModelProperty("一级科目code")
|
||||
@Excel(name = "一级科目code")
|
||||
private String firstSubject;
|
||||
|
||||
@ApiModelProperty("一级科目名称")
|
||||
@Excel(name = "一级科目名称")
|
||||
private String firstSubjectName;
|
||||
|
||||
@ApiModelProperty("二级科目code")
|
||||
@Excel(name = "二级科目code")
|
||||
private String secondSubject;
|
||||
|
||||
@ApiModelProperty("二级科目名称")
|
||||
@Excel(name = "二级科目名称")
|
||||
private String secondSubjectName;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("已付金额")
|
||||
@Excel(name = "已付金额")
|
||||
private BigDecimal amountPaid;
|
||||
|
||||
// @ApiModelProperty("服务费")
|
||||
// @Excel(name = "服务费")
|
||||
// private BigDecimal service;
|
||||
|
||||
// @ApiModelProperty("托运人id")
|
||||
// @Excel(name = "托运人id")
|
||||
// private Long userId;
|
||||
|
||||
@ApiModelProperty("业务单据号:运单号/作业单号/借款单号/订单号/维修单号")
|
||||
@Excel(name = "业务单据号:运单号/作业单号/借款单号/订单号/维修单号")
|
||||
private String waybillNumber;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
// @ApiModelProperty("审核过程")
|
||||
// @Excel(name = "审核过程")
|
||||
// private Integer sort;
|
||||
// @ApiModelProperty("角色ID")
|
||||
// @Excel(name = "角色ID")
|
||||
// private Long roleId;
|
||||
// @ApiModelProperty("角色code")
|
||||
// @Excel(name = "角色code")
|
||||
// private String roleCode;
|
||||
// @ApiModelProperty("角色名称")
|
||||
// @Excel(name = "角色名称")
|
||||
// private String roleName;
|
||||
@ApiModelProperty("审批单")
|
||||
private String auditNumber;
|
||||
@ApiModelProperty("审核状态(0-未审批,1-审批中,2-已同意,3-已拒绝,4-已撤销)")
|
||||
@Excel(name = "审核状态(0-未审批,1-审批中,2-已同意,3-已拒绝,4-已撤销)")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty("审批方式:1-钉钉审批,2-人工审批")
|
||||
private Integer auditType;
|
||||
// @ApiModelProperty("最新审核角色")
|
||||
// private String auditRole;
|
||||
// @ApiModelProperty(value = "最新审核时间")
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
// private Date auditTime;
|
||||
@ApiModelProperty("审核说明")
|
||||
private String auditRemark;
|
||||
|
||||
@ApiModelProperty("支付状态(1-未付款,2-已付款,3-部分付款)")
|
||||
private Integer paymentStatus;
|
||||
|
||||
// @ApiModelProperty(name = "付款状态(1-已支付,2-未支付)")
|
||||
// private Integer payStatus;
|
||||
// @ApiModelProperty(name = "货主付款状态(1-已支付,2-未支付)")
|
||||
// private Integer payStatusShipper;
|
||||
|
||||
// @ApiModelProperty("付款时间")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
// @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
// private Date payTime;
|
||||
//
|
||||
// @ApiModelProperty("货主付款时间")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
// @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
// private Date payTimeShipper;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
@ApiModelProperty("部门id")
|
||||
private String departmentId;
|
||||
@ApiModelProperty("部门名称")
|
||||
private String departmentName;
|
||||
@ApiModelProperty("付款对象(收款方)")
|
||||
private String payee;
|
||||
@ApiModelProperty("收款人id")
|
||||
private String payId;
|
||||
@ApiModelProperty("收款人姓名")
|
||||
private String payName;
|
||||
@ApiModelProperty("车牌号")
|
||||
private String licenseNumber;
|
||||
@ApiModelProperty("车牌号")
|
||||
private String instanceId;
|
||||
@ApiModelProperty("审批状态 0-未申请 1-已申请 2-审批中 3-已撤销 4-审批完成")
|
||||
private Integer approvalStatus;
|
||||
@ApiModelProperty("审批结果")
|
||||
private String approvalResult;
|
||||
|
||||
@ApiModelProperty(value = "订单子单目的地")
|
||||
private String orderDetailDestination;
|
||||
|
||||
@ApiModelProperty("支付方式 0-挂账 1-即时")
|
||||
private Integer paymentMethod;
|
||||
|
||||
@ApiModelProperty("油卡号")
|
||||
private String fuelCardNumber;
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.linke.finance.domain.businessDocumentDetali.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.businessDocumentDetali.entity.AuditRecords;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.todo.AuditRecordsDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.AuditRecordsPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审核记录Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface IAuditRecordsService extends IService<AuditRecords>
|
||||
{
|
||||
/**
|
||||
* 分页查询审核记录列表
|
||||
*/
|
||||
public List<AuditRecordsPO> queryList(AuditRecordsDO auditRecordsDO);
|
||||
|
||||
/**
|
||||
* 新增审核记录
|
||||
*/
|
||||
public Boolean insert(AuditRecordsDO auditRecordsDO);
|
||||
|
||||
/**
|
||||
* 修改审核记录
|
||||
*/
|
||||
public Boolean update(AuditRecordsDO auditRecordsDO);
|
||||
|
||||
/**
|
||||
* 批量删除审核记录
|
||||
*/
|
||||
public Boolean delete(Long[] auditRecordsIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询审核记录
|
||||
*/
|
||||
public AuditRecordsPO getInfo(Long auditRecordsId);
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.linke.finance.domain.businessDocumentDetali.repository.facade;
|
||||
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.StartProcessInstanceResponse;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.linke.finance.domain.businessDocument.repository.po.BusinessDocumentPO;
|
||||
import com.linke.finance.domain.businessDocument.repository.todo.BusinessDocumentDO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.entity.BusinessDocumentDetali;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliAuditPO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.BusinessDocumentDetaliPO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.todo.BusinessDocumentDetaliDO;
|
||||
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
||||
import com.mhd.common.core.domain.dto.BusinessDocumentDetaliDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务单据详情Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-01-23
|
||||
*/
|
||||
public interface IBusinessDocumentDetaliService extends IService<BusinessDocumentDetali>
|
||||
{
|
||||
/**
|
||||
* 分页查询业务单据详情列表
|
||||
*/
|
||||
public List<BusinessDocumentDetaliPO> queryList(BusinessDocumentDetaliDO businessDocumentDetaliDO);
|
||||
|
||||
/**
|
||||
* 新增业务单据详情
|
||||
*/
|
||||
public Boolean insert(BusinessDocumentDetaliDO businessDocumentDetaliDO);
|
||||
|
||||
/**
|
||||
* 修改业务单据详情
|
||||
*/
|
||||
public Boolean update(BusinessDocumentDetaliDO businessDocumentDetaliDO);
|
||||
|
||||
/**
|
||||
* 批量删除业务单据详情
|
||||
*/
|
||||
public Boolean delete(Long[] businessDocumentDetaliIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务单据详情
|
||||
*/
|
||||
public BusinessDocumentDetaliPO getInfo(Long businessDocumentDetaliId);
|
||||
|
||||
List<BusinessDocumentDetaliPO> selectDetailsByOrderNo(String orderNo, String orderSource);
|
||||
|
||||
List<BusinessDocumentDetali> selectbatch(List<Long> businessDocumentDetailIds);
|
||||
|
||||
List<BusinessDocumentDetali> selectOtherDetailLs(List<Long> businessDocumentIdList, List<Long> businessDocumentDetailIds);
|
||||
|
||||
List<BusinessDocumentDetaliAuditPO> auditList(BusinessDocumentDetaliDO businessDocumentDetaliDO);
|
||||
|
||||
List<BusinessDocumentDetaliAuditPO> auditDetailList(BusinessDocumentDetaliDO businessDocumentDetaliDO);
|
||||
|
||||
List<BusinessDocumentDetaliPO> queryListByReconciliation(BusinessDocumentDetaliDO businessDocumentDetaliDO);
|
||||
|
||||
List<BusinessDocumentDetali> selectByBusinessDocumentInfo(BusinessDocumentDetaliDTO businessDocumentDetaliDTO);
|
||||
|
||||
public StartProcessInstanceResponse workflowProcessInstances(String businessDocumentDetaliIds);
|
||||
|
||||
public GetProcessInstanceResponse workflowProcessInstancesById(Long businessDocumentDetaliId);
|
||||
|
||||
public Boolean deleteBusinessDocumentDetailById(Long businessDocumentDetaliId);
|
||||
|
||||
public BusinessDocumentDetali queryListByBusinessDocumentDetaliNumber(String businessDocumentDetaliNumber);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.linke.finance.domain.businessDocumentDetali.repository.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.businessDocumentDetali.entity.AuditRecords;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.po.AuditRecordsPO;
|
||||
import com.linke.finance.domain.businessDocumentDetali.repository.todo.AuditRecordsDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 审核记录Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
public interface AuditRecordsMapper extends BaseMapper<AuditRecords>
|
||||
{
|
||||
/**
|
||||
* 查询审核记录列表
|
||||
*/
|
||||
public List<AuditRecordsPO> queryList(AuditRecordsDO auditRecordsDO);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user