Commit c7c398b6 by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !1
parents 1f0ac52b 88522f68
......@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gic</groupId>
<artifactId>gic-platform-auth-api</artifactId>
<artifactId>gic-platform-finance-api</artifactId>
<version>4.0-SNAPSHOT</version>
<dependencies>
<dependency>
......
......@@ -13,8 +13,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<libraryVersion>4.0-SNAPSHOT</libraryVersion>
</properties>
......@@ -30,11 +30,6 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-enterprise-base-api</artifactId>
<version>${gic-enterprise-base-api}</version>
</dependency>
<!--参数验证-->
<dependency>
<groupId>org.hibernate</groupId>
......@@ -86,6 +81,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
......
package com.gic.finance.constant;
/**
* 商户类型
* @ClassName: EnterprisePlatformTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/13 10:54 AM

*/
public enum EnterprisePlatformTypeEnum {
GIC(1, "GIC"),
HAO_BAN(2, "好办");
private int code;
private String message;
private EnterprisePlatformTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (EnterprisePlatformTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.constant;
/**
* 发起审批方类型
* @ClassName: InitiatorTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/13 10:56 AM

*/
public enum InitiatorTypeEnum {
ENTERPRISE(1, "商户"),
OPERATION(2, "运维后台");
private int code;
private String message;
private InitiatorTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (InitiatorTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.constant;
/**
* 发票发起类型
* @ClassName: InvoiceInitiateTypeConstants

* @Description: 

* @author guojuxing

* @date 2019/9/18 9:42 AM

*/
public class InvoiceInitiateTypeConstants {
/**
* 应用市场
*/
public final static int APP = 2;
/**
* 计费中心
*/
public final static int BILLING = 1;
}
package com.gic.finance.constant;
/**
* 发票状态
* @ClassName: InvoiceStatusEnum

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:30 PM

*/
public enum InvoiceStatusEnum {
TO_BE_ISSUED(1, "待开具"),
TO_BE_MAILED(2, "待邮寄"),
MAILED(3, "已邮寄"),
REJECT(4, "已驳回"),
CANCEL(5, "已取消");
private int code;
private String message;
private InvoiceStatusEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (InvoiceStatusEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.constant;
/**
* 发票类型
* @ClassName: InvoiceTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:35 PM

*/
public enum InvoiceTypeEnum {
NORMAL(1, "纸质普通发票"),
VAT_INVOICE(2, "纸质增值税专用发票");
private int code;
private String message;
private InvoiceTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (InvoiceTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.constant;
/**
* 开票户使用状态
* @ClassName: InitiatorTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/13 10:56 AM

*/
public enum InvoiceUseStatusEnum {
ENABLE(1, "启用"),
DISABLE(2, "停用"),
DELETE(3, "删除");
private int code;
private String message;
private InvoiceUseStatusEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (InvoiceUseStatusEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.constant;
/**
* 服务订购类型
* @ClassName: OrderTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/9 1:41 PM

*/
public enum OrderTypeEnum {
RECHARGE(1, "充值"),
SHORT_MESSAGE_PACKAGE(2, "短信套餐"),
SERVICE(3, "服务"),
EXTENSION_PACKAGE(4, "拓展包"),
PACKAGE(5, "套餐包");
private int code;
private String message;
private OrderTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static String getMessageBuCode(Integer code) {
if (code == null) {
return "--";
}
for (OrderTypeEnum statusEnum : values()) {
if (statusEnum.getCode() == code.intValue()) {
return statusEnum.getMessage();
}
}
return "未知";
}
}
package com.gic.finance.constant;
/**
* 转账审批状态
* @ClassName: TransferAccountApprovalStatusEnum

* @Description: 

* @author guojuxing

* @date 2019/8/9 1:37 PM

*/
public enum TransferAccountApprovalStatusEnum {
TO_BE_APPROVED(1, "待审批"),
CANCEL(2, "已取消"),
REJECT(3, "已驳回"),
AGREE(4, "审批通过");
private int code;
private String message;
private TransferAccountApprovalStatusEnum(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static String getMessageBuCode(Integer code) {
if (code == null) {
return "--";
}
for (TransferAccountApprovalStatusEnum statusEnum : values()) {
if (statusEnum.getCode() == code.intValue()) {
return statusEnum.getMessage();
}
}
return "未知";
}
}
package com.gic.finance.constant;
/**
* 提现申请方类型
* @ClassName: InvoiceTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:35 PM

*/
public enum WithdrawalApplyTypeEnum {
SERVICE_PROVIDER(1, "服务商"),
SUPPLIER(2, "供应商");
private int code;
private String message;
private WithdrawalApplyTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (WithdrawalApplyTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.constant;
/**
* 提现审核状态
* @ClassName: InvoiceStatusEnum

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:30 PM

*/
public enum WithdrawalStatusEnum {
TO_BE_EXAMINE(1, "待审核"),
PASS(2, "审核通过"),
COMPLETE(3, "已完成"),
REJECT(5, "已驳回"),
CANCEL(4, "已取消");
private int code;
private String message;
private WithdrawalStatusEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "--";
}
for (WithdrawalStatusEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.finance.dto;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 提现管理
* @ClassName: CashWithdrawalDTO

* @Description: 

* @author guojuxing

* @date 2019/8/29 4:23 PM

*/
public class CashWithdrawalDTO implements Serializable{
private static final long serialVersionUID = -1035259456291986313L;
/**
* 提现申请参数校验组
* @Title: 

* @Description:

 * @author guojuxing
* @return 


 */
public interface CashWithdrawal {
}
/**
*
*/
private Integer cashWithdrawalId;
/**
* 申请单流水号
*/
private String cashWithdrawalSerialNumber;
/**
* 申请方类型 1:服务商 2:供应商
*/
private Integer applyType;
/**
* 提现金额
*/
@NotNull(message = "提现金额不能为空", groups = {CashWithdrawal.class})
private Double cashWithdrawalAmount;
/**
* 提现状态 1:待审核 2:审核通过 3:已完成 4:已取消 5:已驳回
*/
private Integer cashWithdrawalStatus;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 操作人
*/
private String operatorId;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
*
*/
private Integer enterpriseId;
/**
* 银行转账流水号
*/
private String bankSerialNumber;
/**
* 收款开户名称
*/
@NotBlank(message = "收款账户不能为空", groups = {CashWithdrawal.class})
private String receiptName;
/**
* 收款支行名称
*/
@NotBlank(message = "收款支行名称不能为空", groups = {CashWithdrawal.class})
private String receiptBranchName;
/**
* 收款开户行
*/
@NotBlank(message = "收款开户行不能为空", groups = {CashWithdrawal.class})
private String receiptBank;
/**
* 收款银行账号
*/
@NotBlank(message = "收款银行账号不能为空", groups = {CashWithdrawal.class})
private String receiptBankAccount;
/**
* 打款方信息ID
*/
private Integer payId;
/**
* 打款户开户名称
*/
private String payAccountName;
/**
* 打款户支行名称
*/
private String payAccountBranchName;
/**
* 打款户开户行
*/
private String payAccountBank;
/**
* 打款户银行账号
*/
private String payAccount;
/**
* 物流公司
*/
@NotBlank(message = "发票物流公司名称不能为空", groups = {CashWithdrawal.class})
private String expressMailName;
/**
* 发票物流号
*/
@NotBlank(message = "发票物流单号不能为空", groups = {CashWithdrawal.class})
private String expressMailNumber;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 提现单ID
*/
@NotBlank(message = "提现单号不能为空", groups = {CashWithdrawal.class})
private String cashProvider;
public Integer getCashWithdrawalId() {
return cashWithdrawalId;
}
public void setCashWithdrawalId(Integer cashWithdrawalId) {
this.cashWithdrawalId = cashWithdrawalId;
}
public String getCashWithdrawalSerialNumber() {
return cashWithdrawalSerialNumber;
}
public void setCashWithdrawalSerialNumber(String cashWithdrawalSerialNumber) {
this.cashWithdrawalSerialNumber = cashWithdrawalSerialNumber;
}
public Integer getApplyType() {
return applyType;
}
public void setApplyType(Integer applyType) {
this.applyType = applyType;
}
public Double getCashWithdrawalAmount() {
return cashWithdrawalAmount;
}
public void setCashWithdrawalAmount(Double cashWithdrawalAmount) {
this.cashWithdrawalAmount = cashWithdrawalAmount;
}
public Integer getCashWithdrawalStatus() {
return cashWithdrawalStatus;
}
public void setCashWithdrawalStatus(Integer cashWithdrawalStatus) {
this.cashWithdrawalStatus = cashWithdrawalStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getOperatorTime() {
return operatorTime;
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getBankSerialNumber() {
return bankSerialNumber;
}
public void setBankSerialNumber(String bankSerialNumber) {
this.bankSerialNumber = bankSerialNumber;
}
public String getReceiptName() {
return receiptName;
}
public void setReceiptName(String receiptName) {
this.receiptName = receiptName;
}
public String getReceiptBranchName() {
return receiptBranchName;
}
public void setReceiptBranchName(String receiptBranchName) {
this.receiptBranchName = receiptBranchName;
}
public String getReceiptBank() {
return receiptBank;
}
public void setReceiptBank(String receiptBank) {
this.receiptBank = receiptBank;
}
public String getReceiptBankAccount() {
return receiptBankAccount;
}
public void setReceiptBankAccount(String receiptBankAccount) {
this.receiptBankAccount = receiptBankAccount;
}
public Integer getPayId() {
return payId;
}
public void setPayId(Integer payId) {
this.payId = payId;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getPayAccountName() {
return payAccountName;
}
public void setPayAccountName(String payAccountName) {
this.payAccountName = payAccountName;
}
public String getPayAccountBranchName() {
return payAccountBranchName;
}
public void setPayAccountBranchName(String payAccountBranchName) {
this.payAccountBranchName = payAccountBranchName;
}
public String getPayAccountBank() {
return payAccountBank;
}
public void setPayAccountBank(String payAccountBank) {
this.payAccountBank = payAccountBank;
}
public String getPayAccount() {
return payAccount;
}
public void setPayAccount(String payAccount) {
this.payAccount = payAccount;
}
public String getCashProvider() {
return cashProvider;
}
public void setCashProvider(String cashProvider) {
this.cashProvider = cashProvider;
}
}
package com.gic.finance.dto;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 开票户
* @ClassName: InvoiceAccountDTO

* @Description: 

* @author guojuxing

* @date 2019/8/15 10:05 AM

*/
public class InvoiceAccountDTO implements Serializable{
private static final long serialVersionUID = -8590063187778073490L;
public interface Save {
}
public interface Edit {
}
/**
*
*/
@NotNull(message = "主键不能为空", groups = {Edit.class})
private Integer invoiceAccountId;
/**
* 开户单位名称
*/
@NotBlank(message = "单位名称不能为空", groups = {Save.class})
private String accountName;
/**
* 纳税识别号
*/
@NotBlank(message = "纳税号不能为空", groups = {Save.class})
private String taxNumber;
/**
* 地址
*/
@NotBlank(message = "地址不能为空", groups = {Save.class})
private String address;
/**
* 开户行
*/
@NotBlank(message = "开户行不能为空", groups = {Save.class})
private String bank;
/**
* 开户电话
*/
@NotBlank(message = "电话不能为空", groups = {Save.class})
private String accountPhone;
/**
* 开户账号
*/
@NotBlank(message = "开户账号不能为空", groups = {Save.class})
private String bankAccount;
/**
* 状态 0 :删除 1:启用 2:停用
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getInvoiceAccountId() {
return invoiceAccountId;
}
public void setInvoiceAccountId(Integer invoiceAccountId) {
this.invoiceAccountId = invoiceAccountId;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getTaxNumber() {
return taxNumber;
}
public void setTaxNumber(String taxNumber) {
this.taxNumber = taxNumber;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getAccountPhone() {
return accountPhone;
}
public void setAccountPhone(String accountPhone) {
this.accountPhone = accountPhone;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
package com.gic.finance.dto;
import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
/**
* 发票管理
* @ClassName: InvoiceManageDTO

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:40 PM

*/
public class InvoiceManageDTO implements Serializable {
private static final long serialVersionUID = -4433646384541039471L;
/**
* 开票参数校验分组
*/
public interface ApplyInvoiceValid {
}
/**
*
*/
private Integer invoiceManageId;
/**
* 申请单流水号
*/
private String invoiceApplySerial;
/**
* (商户类型)1:GIC 2: 好办
*/
@NotNull(message = "商户类型不能为空", groups = { ApplyInvoiceValid.class })
@Size(message = "商户类型值不规范", min = 1, max = 2)
private Integer platformType;
/**
* (发票类型)1:纸质普通发票 2: 纸质增值税专用发票
*/
@NotNull(message = "发票类型不能为空", groups = { ApplyInvoiceValid.class })
@Size(message = "发票类型值不规范", min = 1, max = 2)
private Integer invoiceType;
/**
* 开票金额
*/
@NotNull(message = "开票金额不能为空", groups = {ApplyInvoiceValid.class})
private Double billingAmount;
/**
* 发票状态 1:待开具 2:待邮寄 3:已邮寄 4:已驳回 5:已取消
*/
private Integer invoiceStatus;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 操作人
*/
private String operatorId;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
*
*/
@NotNull(message = "商户ID不能为空", groups = { ApplyInvoiceValid.class })
private Integer enterpriseId;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 公司logo
*/
private String logo;
/**
* 开户单位名称
*/
private String accountName;
/**
* 纳税识别号
*/
@NotBlank(message = "纳税识别号不能为空", groups = { ApplyInvoiceValid.class })
private String taxNumber;
/**
* 地址
*/
private String address;
/**
* 开户行
*/
private String bank;
/**
* 开户电话
*/
private String accountPhone;
/**
* 开户账号
*/
private String bankAccount;
/**
* 收货人
*/
@NotBlank(message = "收货人不能为空", groups = { ApplyInvoiceValid.class })
private String shippingName;
/**
* 收货电话
*/
@NotBlank(message = "收货电话不能为空", groups = { ApplyInvoiceValid.class })
private String shippingPhone;
/**
* 收货地址
*/
@NotBlank(message = "收货地址不能为空", groups = { ApplyInvoiceValid.class })
private String shippingAddress;
/**
* 开票户ID
*/
private Integer invoicerId;
/**
* 快递公司
*/
private String expressMailName;
/**
* 快递单号
*/
private String expressMailNumber;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 发起人
*/
private String initiator;
/**
* 发起人类型 1:计费中心 2:应用市场
*/
private Integer initiateType;
public Integer getInvoiceManageId() {
return invoiceManageId;
}
public void setInvoiceManageId(Integer invoiceManageId) {
this.invoiceManageId = invoiceManageId;
}
public String getInvoiceApplySerial() {
return invoiceApplySerial;
}
public void setInvoiceApplySerial(String invoiceApplySerial) {
this.invoiceApplySerial = invoiceApplySerial;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Double getBillingAmount() {
return billingAmount;
}
public void setBillingAmount(Double billingAmount) {
this.billingAmount = billingAmount;
}
public Integer getInvoiceStatus() {
return invoiceStatus;
}
public void setInvoiceStatus(Integer invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getOperatorTime() {
return operatorTime;
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getTaxNumber() {
return taxNumber;
}
public void setTaxNumber(String taxNumber) {
this.taxNumber = taxNumber;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getAccountPhone() {
return accountPhone;
}
public void setAccountPhone(String accountPhone) {
this.accountPhone = accountPhone;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public String getShippingName() {
return shippingName;
}
public void setShippingName(String shippingName) {
this.shippingName = shippingName;
}
public String getShippingPhone() {
return shippingPhone;
}
public void setShippingPhone(String shippingPhone) {
this.shippingPhone = shippingPhone;
}
public String getShippingAddress() {
return shippingAddress;
}
public void setShippingAddress(String shippingAddress) {
this.shippingAddress = shippingAddress;
}
public Integer getInvoicerId() {
return invoicerId;
}
public void setInvoicerId(Integer invoicerId) {
this.invoicerId = invoicerId;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getInitiator() {
return initiator;
}
public void setInitiator(String initiator) {
this.initiator = initiator;
}
public Integer getInitiateType() {
return initiateType;
}
public void setInitiateType(Integer initiateType) {
this.initiateType = initiateType;
}
}
package com.gic.finance.dto;
import java.io.Serializable;
/**
* 操作人信息
* @ClassName: OperationUserInfoDTO

* @Description: 

* @author guojuxing

* @date 2019/9/27 2:16 PM

*/
public class OperationUserInfoDTO implements Serializable{
private static final long serialVersionUID = -570322634465207981L;
private Integer id;
// 用户登录名(账号)
private String loginName;
// 用户真实姓名
private String realName;
// 用户手机号',
private String userMobile;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public String getUserMobile() {
return userMobile;
}
public void setUserMobile(String userMobile) {
this.userMobile = userMobile;
}
}
package com.gic.finance.dto;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 打款户信息
* @ClassName: PayAccountDTO

* @Description: 

* @author guojuxing

* @date 2019/8/29 2:20 PM

*/
public class PayAccountDTO implements Serializable{
private static final long serialVersionUID = 5695680475810544460L;
public interface SavePayAccount {
}
public interface EditPayAccount {
}
/**
*
*/
@NotNull(message = "主键不能为空", groups = {EditPayAccount.class})
private Integer payAccountId;
/**
* 开户名称
*/
@NotBlank(message = "开户名称不能为空", groups = {SavePayAccount.class})
private String accountName;
/**
* 开户银行
*/
@NotBlank(message = "开户银行不能为空", groups = {SavePayAccount.class})
private String bank;
/**
* 支行名称
*/
@NotBlank(message = "支行名称不能为空", groups = {SavePayAccount.class})
private String branchName;
/**
* 开户账号
*/
@NotBlank(message = "开户账号不能为空", groups = {SavePayAccount.class})
private String bankAccount;
/**
* 状态 0 :删除 1:启用 2:停用
*/
private Integer status;
/**
* 排序
*/
private Integer sort;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 序号
*/
private Integer seq;
public Integer getPayAccountId() {
return payAccountId;
}
public void setPayAccountId(Integer payAccountId) {
this.payAccountId = payAccountId;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getBranchName() {
return branchName;
}
public void setBranchName(String branchName) {
this.branchName = branchName;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getSeq() {
return seq;
}
public void setSeq(Integer seq) {
this.seq = seq;
}
}
package com.gic.finance.dto;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 转账审批
* @ClassName: TransferAccountsApprovalDTO

* @Description: 

* @author guojuxing

* @date 2019/8/9 11:09 AM

*/
public class TransferAccountsApprovalDTO implements Serializable{
private static final long serialVersionUID = -7424594607676731039L;
/**
* 发起审批参数验证分组
*/
public interface InitiateApprovalValid {
}
/**
* 审批操作参数验证分组
*/
public interface ApprovalValid {
}
/**
*
*/
@NotNull(message = "转账审批主键不能为空", groups = {ApprovalValid.class})
private Integer transferApprovalId;
/**
* 关联订单流水号
*/
@NotBlank(message = "关联订单流水号不能为空", groups = {InitiateApprovalValid.class})
private String orderNumber;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
@NotNull(message = "关联订单平台方不能为空", groups = {InitiateApprovalValid.class})
private Integer platformType;
/**
* 发起方1:商户 2:运维后台
*/
@NotNull(message = "发起方类型不能为空", groups = {InitiateApprovalValid.class})
private Integer initiatorType;
/**
* 发起方姓名
*/
private String initiatorName;
/**
*
*/
@NotNull(message = "商户ID不能为空", groups = {InitiateApprovalValid.class})
private Integer enterpriseId;
/**
* 计划金额
*/
@NotNull(message = "计划金额不能为空", groups = {InitiateApprovalValid.class})
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 到账金额
*/
private Double accountAmount;
/**
* 验证码
*/
@NotBlank(message = "验证码不能为空", groups = {InitiateApprovalValid.class})
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批人
*/
private String approvalId;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批时间
*/
private Date approvalTime;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 审批人手机号码
*/
private String approvalPhone;
/**
* 审批人手机号国际区号
*/
private String approvalPhoneAreaCode;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 公司logo
*/
private String logo;
/**
* 5:套餐包 4:拓展包 3:服务 2:短信套餐包 1:充值
*/
private Integer orderType;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public Integer getInitiatorType() {
return initiatorType;
}
public void setInitiatorType(Integer initiatorType) {
this.initiatorType = initiatorType;
}
public String getInitiatorName() {
return initiatorName;
}
public void setInitiatorName(String initiatorName) {
this.initiatorName = initiatorName;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public Double getAccountAmount() {
return accountAmount;
}
public void setAccountAmount(Double accountAmount) {
this.accountAmount = accountAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public Integer getApprovalStatus() {
return approvalStatus;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalId() {
return approvalId;
}
public void setApprovalId(String approvalId) {
this.approvalId = approvalId;
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Date getApprovalTime() {
return approvalTime;
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getApprovalPhone() {
return approvalPhone;
}
public void setApprovalPhone(String approvalPhone) {
this.approvalPhone = approvalPhone;
}
public String getApprovalPhoneAreaCode() {
return approvalPhoneAreaCode;
}
public void setApprovalPhoneAreaCode(String approvalPhoneAreaCode) {
this.approvalPhoneAreaCode = approvalPhoneAreaCode;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
}
package com.gic.finance.dto.callback;
import java.io.Serializable;
import java.util.Date;
/**
* 发票回调DTO
* @ClassName: InvoiceCallbackDTO

* @Description: 

* @author guojuxing

* @date 2019/9/18 9:32 AM

*/
public class InvoiceCallbackDTO implements Serializable{
private static final long serialVersionUID = 1841339950679558692L;
/**
* 申请单流水号
*/
private String invoiceApplySerial;
/**
* (商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* (发票类型)1:纸质普通发票 2: 纸质增值税专用发票
*/
private Integer invoiceType;
/**
* 开票金额
*/
private Double billingAmount;
/**
* 发票状态 1:待开具 2:待邮寄 3:已邮寄 4:已驳回 5:已取消
*/
private Integer invoiceStatus;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 操作人
*/
private String operatorId;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
* 快递公司
*/
private String expressMailName;
/**
* 快递单号
*/
private String expressMailNumber;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 发起人
*/
private String initiator;
public String getInvoiceApplySerial() {
return invoiceApplySerial;
}
public void setInvoiceApplySerial(String invoiceApplySerial) {
this.invoiceApplySerial = invoiceApplySerial;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Double getBillingAmount() {
return billingAmount;
}
public void setBillingAmount(Double billingAmount) {
this.billingAmount = billingAmount;
}
public Integer getInvoiceStatus() {
return invoiceStatus;
}
public void setInvoiceStatus(Integer invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getOperatorTime() {
return operatorTime;
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getInitiator() {
return initiator;
}
public void setInitiator(String initiator) {
this.initiator = initiator;
}
}
package com.gic.finance.qo;
/**
* 提现管理分页查询列表参数
* @ClassName: CashWithdrawalQueryListQO

* @Description: 

* @author guojuxing

* @date 2019/8/29 4:26 PM

*/
public class CashWithdrawalQueryListQO extends PageQO{
private static final long serialVersionUID = 1686504771000503833L;
/**
* 输入申请单流水号/操作人姓名
*/
private String search;
/**
* 提现状态 1:待审核 2:审核通过 3:已完成 4:已取消 5:已驳回
*/
private Integer cashWithdrawalStatus;
/**
* 申请方类型 1:服务商 2:供应商
*/
private Integer applyType;
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public Integer getCashWithdrawalStatus() {
return cashWithdrawalStatus;
}
public void setCashWithdrawalStatus(Integer cashWithdrawalStatus) {
this.cashWithdrawalStatus = cashWithdrawalStatus;
}
public Integer getApplyType() {
return applyType;
}
public void setApplyType(Integer applyType) {
this.applyType = applyType;
}
}
package com.gic.finance.qo;
import java.io.Serializable;
/**
* 发票管理列表查询参数
* @ClassName: InvoiceManageListQueryQO

* @Description: 

* @author guojuxing

* @date 2019/8/15 9:23 AM

*/
public class InvoiceManageListQueryQO extends com.gic.finance.qo.PageQO implements Serializable{
private static final long serialVersionUID = 4126844399438333342L;
/**
* 输入流水号/商户名称/公司名称
*/
private String search;
/**
* 发票状态
*/
private Integer invoiceStatus;
/**
* 平台类型 1:GIC 2:好办
*/
private Integer platformType;
/**
* 发票类型
*/
private Integer invoiceType;
private String startTime;
private String endTime;
private Integer enterpriseId;
/**
* 发票状态,因为计费中心的状态不是和财务这边完全一致
*/
private String invoiceStatusStr;
public String getInvoiceStatusStr() {
return invoiceStatusStr;
}
public void setInvoiceStatusStr(String invoiceStatusStr) {
this.invoiceStatusStr = invoiceStatusStr;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public Integer getInvoiceStatus() {
return invoiceStatus;
}
public void setInvoiceStatus(Integer invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
}
package com.gic.finance.qo;
import java.io.Serializable;
/**
* 分页数据
* @ClassName: PageQO

* @Description: 

* @author guojuxing

* @date 2019/8/13 11:29 AM

*/
public class PageQO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 页码
*/
private Integer currentPage = 1;
/**
* 分页大小
*/
private Integer pageSize = 20;
public Integer getCurrentPage() {
if (currentPage == null) {
currentPage = 1;
}
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getPageSize() {
if (pageSize == null) {
pageSize = 20;
}
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
package com.gic.finance.qo;
/**
* 转账审批列表查询条件
* @ClassName: TransferListQueryQO

* @Description: 

* @author guojuxing

* @date 2019/8/13 11:23 AM

*/
public class TransferListQueryQO extends PageQO{
private static final long serialVersionUID = -1713673945449020165L;
/**
* 输入流水号/商户名称/公司名称/验证码
*/
private String search;
/**
* 审批状态
*/
private Integer approvalStatus;
/**
* 商户
*/
private Integer enterpriseId;
/**
* 平台类型 1:GIC 2:好办
*/
private Integer platformType;
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public Integer getApprovalStatus() {
return approvalStatus;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
}
package com.gic.finance.service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.finance.dto.CashWithdrawalDTO;
import com.gic.finance.dto.OperationUserInfoDTO;
import com.gic.finance.qo.CashWithdrawalQueryListQO;
/**
* 提现管理
* @ClassName: CashWithdrawalApiService

* @Description: 

* @author guojuxing

* @date 2019/8/29 4:24 PM

*/
public interface CashWithdrawalApiService {
/**
* 提现申请--服务商
* @Title: save

* @Description:

 * @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
提现申请单号

 */
ServiceResponse<String> cashWithdrawalOfServiceProvider(CashWithdrawalDTO dto);
/**
* 提现申请--供应商
* @Title: save

* @Description:

 * @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
提现申请单号

 */
ServiceResponse<String> cashWithdrawalOfSupplier(CashWithdrawalDTO dto);
/**
* 审核通过
* @Title: approval

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> approval(Integer id, OperationUserInfoDTO dto);
/**
* 详情
* @Title: getDetail

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.CashWithdrawalDTO>


 */
ServiceResponse<CashWithdrawalDTO> getDetail(Integer id);
/**
* 驳回
* @Title: reject

* @Description:

 * @author guojuxing
* @param id 主键
* @param rejectReason
 驳回理由
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> reject(Integer id, String rejectReason, OperationUserInfoDTO dto);
/**
* 打款
* @Title: pay

* @Description:

 * @author guojuxing
* @param id 申请单主键第
* @param payId 打款户信息ID
* @param bankSerialNumber
 银行转账流水号
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> pay(Integer id, Integer payId, String bankSerialNumber);
/**
* 分页查询
* @Title: listCashWithdrawalPage

* @Description:

 * @author guojuxing
* @param params

* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.finance.dto.CashWithdrawalDTO>>


 */
ServiceResponse<Page<CashWithdrawalDTO>> listCashWithdrawalPage(CashWithdrawalQueryListQO params);
}
package com.gic.finance.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.finance.dto.InvoiceAccountDTO;
import java.util.List;
/**
* 开票户
* @ClassName: InvoiceAccountApiService

* @Description: 

* @author guojuxing

* @date 2019/8/15 10:07 AM

*/
public interface InvoiceAccountApiService {
/**
* 新增
* @Title: save

* @Description:

 * @author guojuxing
* @param invoiceAccountDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> save(InvoiceAccountDTO invoiceAccountDTO);
/**
* 编辑
* @Title: update

* @Description:

 * @author guojuxing
* @param invoiceAccountDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> update(InvoiceAccountDTO invoiceAccountDTO);
/**
* 启用
* @Title: enable

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> enable(Integer id);
/**
* 关闭
* @Title: enable

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> disable(Integer id);
/**
* 详情
* @Title: getById

* @Description:

 * @author guojuxing
* @param invoiceAccountId

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.InvoiceAccountDTO>


 */
ServiceResponse<InvoiceAccountDTO> getById(Integer invoiceAccountId);
/**
* 查询启用的那条数据
* @Title: getEnable

* @Description:

 * @author guojuxing 

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.InvoiceAccountDTO>


 */
ServiceResponse<InvoiceAccountDTO> getEnable();
/**
* 查询列表数据
* @Title: listInvoiceAccount

* @Description:

 * @author guojuxing 

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.finance.dto.InvoiceAccountDTO>>


 */
ServiceResponse<List<InvoiceAccountDTO>> listInvoiceAccount();
}
package com.gic.finance.service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.finance.dto.InvoiceManageDTO;
import com.gic.finance.dto.OperationUserInfoDTO;
import com.gic.finance.qo.InvoiceManageListQueryQO;
/**
* 发票管理
* @ClassName: InvoiceManageApiService

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:41 PM

*/
public interface InvoiceManageApiService {
/**
* 发票申请请求 <br>
* 商户名称、公司名称、公司logo <br>
* 这数据如果有,需要传,如果没有,我默认给值 <br>
* @Title: save

* @Description:

 * @author guojuxing
* @param invoiceManageDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
流水单号

 */
ServiceResponse<String> applyInvoice(InvoiceManageDTO invoiceManageDTO);
/**
* 应用市场开票申请
* @Title: applyInvoiceForApp

* @Description:

 * @author guojuxing
* @param invoiceManageDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
流水单号

 */
ServiceResponse<String> applyInvoiceForApp(InvoiceManageDTO invoiceManageDTO);
/**
* 开票。待邮寄/邮寄
* @Title: invoice

* @Description:

 * @author guojuxing
* @param invoiceManageId
* @param expressMailName
* @param expressMailNumber

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> invoice(Integer invoiceManageId, String expressMailName, String expressMailNumber, OperationUserInfoDTO dto);
/**
* 驳回
* @Title: rejectInvoice

* @Description:

 * @author guojuxing
* @param invoiceManageId
* @param rejectReason
 驳回理由
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> rejectInvoice(Integer invoiceManageId, String rejectReason, OperationUserInfoDTO dto);
/**
* 取消
* @Title: cancelInvoice

* @Description:

 * @author guojuxing
* @param invoiceManageId

* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
 返回日志操作对象

 */
ServiceResponse<String> cancelInvoice(Integer invoiceManageId);
/**
* 分页查询发票管理列表
* @Title: listInvoiceManage

* @Description:

 * @author guojuxing
* @param params

* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.finance.dto.InvoiceManageDTO>>


 */
ServiceResponse<Page<InvoiceManageDTO>> listInvoiceManage(InvoiceManageListQueryQO params);
/**
* 详情
* @Title: getById

* @Description:

 * @author guojuxing
* @param invoiceManageId

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.InvoiceManageDTO>


 */
ServiceResponse<InvoiceManageDTO> getById(Integer invoiceManageId);
/**
* 应用市场取消开票
* @Title: cancelInvoiceForApp

* @Description:

 * @author guojuxing
* @param initiator

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> cancelInvoiceForApp(String initiator);
}
package com.gic.finance.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.finance.dto.PayAccountDTO;
import java.util.List;
/**
* 打款户接口
* @ClassName: PayAccountApiService

* @Description: 

* @author guojuxing

* @date 2019/8/29 2:22 PM

*/
public interface PayAccountApiService {
/**
* 新增打款户信息
* @Title: save

* @Description:

 * @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> save(PayAccountDTO dto);
/**
* 编辑保存
* @Title: update

* @Description:

 * @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> update(PayAccountDTO dto);
/**
* 删除
* @Title: delete

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> delete(Integer id);
/**
* 拖拽排序
* @Title: setSort

* @Description:

 * @author guojuxing
* @param id
* @param sort

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> setSort(Integer id, Integer sort);
/**
* 上移排序
* @Title: upSort

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> upSort(Integer id);
/**
* 下移排序
* @Title: downSort

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> downSort(Integer id);
/**
* 根据主键查询数据
* @Title: getById

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.PayAccountDTO>


 */
ServiceResponse<PayAccountDTO> getById(Integer id);
/**
* 列表查询
* @Title: listPayAccount

* @Description:

 * @author guojuxing 

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.finance.dto.PayAccountDTO>>


 */
ServiceResponse<List<PayAccountDTO>> listPayAccount();
}
package com.gic.finance.service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.finance.dto.OperationUserInfoDTO;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.qo.TransferListQueryQO;
import java.util.List;
/**
* 转账审批
* @ClassName: TransferAccountsApprovalApiService

* @Description: 

* @author guojuxing

* @date 2019/8/9 11:13 AM

*/
public interface TransferAccountsApprovalApiService {
/**
* 充值类型 发起审批 <br>
* 商户名称、公司名称、公司logo 发起方姓名 <br>
* 这数据如果有,需要传,如果没有,我默认给值 <br>
* @Title: rechargeInitiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> rechargeInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 短信套餐包类型 发起审批 <br>
* 商户名称、公司名称、公司logo 发起方姓名 <br>
* 这数据如果有,需要传,如果没有,我默认给值 <br>
* @Title: smsInitiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> smsInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 服务类型 发起审批 <br>
* 商户名称、公司名称、公司logo 发起方姓名 <br>
* 这数据如果有,需要传,如果没有,我默认给值 <br>
* @Title: serviceInitiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> serviceInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 拓展包类型 发起审批 <br>
* 商户名称、公司名称、公司logo 发起方姓名 <br>
* 这数据如果有,需要传,如果没有,我默认给值 <br>
* @Title: extensionPackageInitiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> extensionPackageInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 套餐包类型 发起审批 <br>
* 商户名称、公司名称、公司logo 发起方姓名 <br>
* 这数据如果有,需要传,如果没有,我默认给值 <br>
* @Title: packageInitiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> packageInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 主键查询
* @Title: getById

* @Description:

 * @author guojuxing
* @param transferApprovalId

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.TransferAccountsApprovalDTO>


 */
ServiceResponse<TransferAccountsApprovalDTO> getById(Integer transferApprovalId);
/**
* 根据订单流水号查询单条数据
* @Title: getByOrderNumber

* @Description:

 * @author guojuxing
* @param orderNumber

* @return com.gic.api.base.commons.ServiceResponse<com.gic.finance.dto.TransferAccountsApprovalDTO>


 */
ServiceResponse<TransferAccountsApprovalDTO> getByOrderNumber(String orderNumber);
/**
* 审批通过操作
* @Title: agreeApproval

* @Description:

 * @author guojuxing
* @param transferApprovalId
* @param accountAmount

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> agreeApproval(Integer transferApprovalId, Double accountAmount, OperationUserInfoDTO userInfoDTO);
/**
* 回驳
* @Title: rejectApproval

* @Description:

 * @author guojuxing
* @param transferApprovalId
 转账审批主键
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> rejectApproval(Integer transferApprovalId, OperationUserInfoDTO userInfoDTO);
/**
* 取消
* @Title: rejectApproval

* @Description:

 * @author guojuxing
* @param orderSerialNumber 订单流水号

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> cancelApproval(String orderSerialNumber);
/**
* 取消审批
* @Title: cancelApproval

* @Description:

 * @author guojuxing
* @param transferApprovalId

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> cancelApproval(Integer transferApprovalId);
/**
* 分页查询
* @Title: listTransferAccountsApproval

* @Description:

 * @author guojuxing
* @param params

* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.finance.dto.TransferAccountsApprovalDTO>>


 */
ServiceResponse<Page<TransferAccountsApprovalDTO>> listTransferAccountsApproval(TransferListQueryQO params);
/**
* 订单流水号查询审批数据
* @Title: listByOrderSerialNumber

* @Description:

 * @author guojuxing
* @param orderSerialNumberList

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.finance.dto.TransferAccountsApprovalDTO>>


 */
ServiceResponse<List<TransferAccountsApprovalDTO>> listByOrderSerialNumber(List<String> orderSerialNumberList);
}
package com.gic.finance.utils;
public class T {
}
......@@ -113,6 +113,16 @@
<artifactId>gic-platform-auth-api</artifactId>
<version>${gic-platform-auth-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-finance-api</artifactId>
<version>${gic-platform-finance-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-open-platform-api</artifactId>
<version>${gic-open-platform-api}</version>
</dependency>
</dependencies>
<build>
......
package com.gic.finance.dao.mapper;
import com.gic.finance.entity.TabCashWithdrawal;
import com.gic.finance.qo.CashWithdrawalQueryListQO;
import java.util.List;
public interface TabCashWithdrawalMapper {
/**
* 根据主键删除
*
* @param cashWithdrawalId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer cashWithdrawalId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabCashWithdrawal record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabCashWithdrawal record);
/**
* 根据主键查询
*
* @param cashWithdrawalId 主键
* @return 实体对象
*/
TabCashWithdrawal selectByPrimaryKey(Integer cashWithdrawalId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabCashWithdrawal record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabCashWithdrawal record);
/**
* 查询列表
* @Title: listCashWithdrawal

* @Description:

 * @author guojuxing
* @param params

* @return java.util.List<com.gic.finance.entity.TabCashWithdrawal>


 */
List<TabCashWithdrawal> listCashWithdrawal(CashWithdrawalQueryListQO params);
}
\ No newline at end of file
package com.gic.finance.dao.mapper;
import com.gic.finance.entity.TabInvoiceAccount;
import java.util.List;
public interface TabInvoiceAccountMapper {
/**
* 根据主键删除
*
* @param invoiceAccountId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer invoiceAccountId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabInvoiceAccount record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabInvoiceAccount record);
/**
* 根据主键查询
*
* @param invoiceAccountId 主键
* @return 实体对象
*/
TabInvoiceAccount selectByPrimaryKey(Integer invoiceAccountId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabInvoiceAccount record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabInvoiceAccount record);
/**
* 查询启用的那条数据,启用的只有一条
* @Title: getEnable

* @Description:

 * @author guojuxing 

* @return com.gic.finance.entity.TabInvoiceAccount


 */
TabInvoiceAccount getEnable();
/**
* 关闭状态
* @Title: closeStatus

* @Description:

 * @author guojuxing 

* @return int


 */
int closeStatus();
/**
* 查询列表数据
* @Title: listInvoiceAccount

* @Description:

 * @author guojuxing 

* @return java.util.List<com.gic.finance.entity.TabInvoiceAccount>


 */
List<TabInvoiceAccount> listInvoiceAccount();
}
\ No newline at end of file
package com.gic.finance.dao.mapper;
import com.gic.finance.entity.TabInvoiceManage;
import com.gic.finance.qo.InvoiceManageListQueryQO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TabInvoiceManageMapper {
/**
* 根据主键删除
*
* @param invoiceManageId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer invoiceManageId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabInvoiceManage record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabInvoiceManage record);
/**
* 根据主键查询
*
* @param invoiceManageId 主键
* @return 实体对象
*/
TabInvoiceManage selectByPrimaryKey(Integer invoiceManageId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabInvoiceManage record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabInvoiceManage record);
/**
* 查询发票列表数据
* @Title: listInvoiceManage

* @Description:

 * @author guojuxing
* @param params

* @return java.util.List<com.gic.finance.entity.TabInvoiceManage>


 */
List<TabInvoiceManage> listInvoiceManage(InvoiceManageListQueryQO params);
/**
* 查询
* @Title: selectInvoiceByInitiator

* @Description:

 * @author guojuxing
* @param initiator 发起人主键
* @param initiateType 发起方类型
* @return TabInvoiceManage


 */
TabInvoiceManage selectInvoiceByInitiator(@Param("initiator") String initiator, @Param("initiateType") Integer initiateType);
}
\ No newline at end of file
package com.gic.finance.dao.mapper;
import com.gic.finance.entity.TabPayAccount;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TabPayAccountMapper {
/**
* 根据主键删除
*
* @param payAccountId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer payAccountId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabPayAccount record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabPayAccount record);
/**
* 根据主键查询
*
* @param payAccountId 主键
* @return 实体对象
*/
TabPayAccount selectByPrimaryKey(Integer payAccountId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabPayAccount record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabPayAccount record);
/**
* 查询列表数据
* @Title: listPayAccount

* @Description:

 * @author guojuxing 

* @return java.util.List<com.gic.finance.entity.TabPayAccount>


 */
List<TabPayAccount> listPayAccount();
/**
* 查询排序值最大的,即排在最末
* @Title: getMaxSort

* @Description:

 * @author guojuxing 

* @return int


 */
int getMaxSort();
int getMinSort();
/**
* 查询排序值前面的记录
* @Title: getPreOfSort

* @Description:

 * @author guojuxing
* @param sort

* @return com.gic.finance.entity.TabPayAccount


 */
TabPayAccount getPreOfSort(@Param("sort") Integer sort);
/**
* 查询排序值后面的记录
* @Title: getNextOfSort

* @Description:

 * @author guojuxing
* @param sort

* @return com.gic.finance.entity.TabPayAccount


 */
TabPayAccount getNextOfSort(@Param("sort")Integer sort);
}
\ No newline at end of file
package com.gic.finance.dao.mapper;
import com.gic.finance.qo.TransferListQueryQO;
import org.apache.ibatis.annotations.Param;
import com.gic.finance.entity.TabTransferAccountsApproval;
import java.util.List;
public interface TabTransferAccountsApprovalMapper {
/**
* 根据主键删除
*
* @param transferApprovalId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer transferApprovalId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabTransferAccountsApproval record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabTransferAccountsApproval record);
/**
* 根据主键查询
*
* @param transferApprovalId 主键
* @return 实体对象
*/
TabTransferAccountsApproval selectByPrimaryKey(Integer transferApprovalId);
/**
* 根据订单流水号查询单条
* @Title: selectByOrderNumber

* @Description:

 * @author guojuxing
* @param orderNumber

* @return com.gic.finance.entity.TabTransferAccountsApproval


 */
TabTransferAccountsApproval selectByOrderNumber(@Param("orderNumber") String orderNumber);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabTransferAccountsApproval record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabTransferAccountsApproval record);
/**
* 查询转账审批列表
* @Title: listTransferAccountsApproval

* @Description:

 * @author guojuxing
* @param params

* @return java.util.List<com.gic.finance.entity.TabTransferAccountsApproval>


 */
List<TabTransferAccountsApproval> listTransferAccountsApproval(TransferListQueryQO params);
List<TabTransferAccountsApproval> listByOrderSerialNumber(@Param("list") List<String> orderSerialNumberList);
}
\ No newline at end of file
package com.gic.finance.entity;
import java.util.Date;
/**
* tab_cash_withdrawal
*/
public class TabCashWithdrawal {
/**
*
*/
private Integer cashWithdrawalId;
/**
* 申请单流水号
*/
private String cashWithdrawalSerialNumber;
/**
* 申请方类型 1:服务商 2:供应商
*/
private Integer applyType;
/**
* 提现金额
*/
private Double cashWithdrawalAmount;
/**
* 提现状态 1:待审核 2:审核通过 3:已完成 4:已取消 5:已驳回
*/
private Integer cashWithdrawalStatus;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 操作人
*/
private String operatorId;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
*
*/
private Integer enterpriseId;
/**
* 银行转账流水号
*/
private String bankSerialNumber;
/**
* 收款开户名称
*/
private String receiptName;
/**
* 收款支行名称
*/
private String receiptBranchName;
/**
* 收款开户行
*/
private String receiptBank;
/**
* 收款银行账号
*/
private String receiptBankAccount;
/**
* 打款方信息ID
*/
private Integer payId;
/**
* 打款户开户名称
*/
private String payAccountName;
/**
* 打款户支行名称
*/
private String payAccountBranchName;
/**
* 打款户开户行
*/
private String payAccountBank;
/**
* 打款户银行账号
*/
private String payAccount;
/**
* 物流公司
*/
private String expressMailName;
/**
* 发票物流号
*/
private String expressMailNumber;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 提现单ID
*/
private String cashProvider;
public Integer getCashWithdrawalId() {
return cashWithdrawalId;
}
public void setCashWithdrawalId(Integer cashWithdrawalId) {
this.cashWithdrawalId = cashWithdrawalId;
}
public String getCashWithdrawalSerialNumber() {
return cashWithdrawalSerialNumber;
}
public void setCashWithdrawalSerialNumber(String cashWithdrawalSerialNumber) {
this.cashWithdrawalSerialNumber = cashWithdrawalSerialNumber;
}
public Integer getApplyType() {
return applyType;
}
public void setApplyType(Integer applyType) {
this.applyType = applyType;
}
public Double getCashWithdrawalAmount() {
return cashWithdrawalAmount;
}
public void setCashWithdrawalAmount(Double cashWithdrawalAmount) {
this.cashWithdrawalAmount = cashWithdrawalAmount;
}
public Integer getCashWithdrawalStatus() {
return cashWithdrawalStatus;
}
public void setCashWithdrawalStatus(Integer cashWithdrawalStatus) {
this.cashWithdrawalStatus = cashWithdrawalStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getOperatorTime() {
return operatorTime;
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getBankSerialNumber() {
return bankSerialNumber;
}
public void setBankSerialNumber(String bankSerialNumber) {
this.bankSerialNumber = bankSerialNumber;
}
public String getReceiptName() {
return receiptName;
}
public void setReceiptName(String receiptName) {
this.receiptName = receiptName;
}
public String getReceiptBranchName() {
return receiptBranchName;
}
public void setReceiptBranchName(String receiptBranchName) {
this.receiptBranchName = receiptBranchName;
}
public String getReceiptBank() {
return receiptBank;
}
public void setReceiptBank(String receiptBank) {
this.receiptBank = receiptBank;
}
public String getReceiptBankAccount() {
return receiptBankAccount;
}
public void setReceiptBankAccount(String receiptBankAccount) {
this.receiptBankAccount = receiptBankAccount;
}
public Integer getPayId() {
return payId;
}
public void setPayId(Integer payId) {
this.payId = payId;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getPayAccountName() {
return payAccountName;
}
public void setPayAccountName(String payAccountName) {
this.payAccountName = payAccountName;
}
public String getPayAccountBranchName() {
return payAccountBranchName;
}
public void setPayAccountBranchName(String payAccountBranchName) {
this.payAccountBranchName = payAccountBranchName;
}
public String getPayAccountBank() {
return payAccountBank;
}
public void setPayAccountBank(String payAccountBank) {
this.payAccountBank = payAccountBank;
}
public String getPayAccount() {
return payAccount;
}
public void setPayAccount(String payAccount) {
this.payAccount = payAccount;
}
public String getCashProvider() {
return cashProvider;
}
public void setCashProvider(String cashProvider) {
this.cashProvider = cashProvider;
}
}
\ No newline at end of file
package com.gic.finance.entity;
import java.util.Date;
/**
* tab_invoice_account
*/
public class TabInvoiceAccount {
/**
*
*/
private Integer invoiceAccountId;
/**
* 开户单位名称
*/
private String accountName;
/**
* 纳税识别号
*/
private String taxNumber;
/**
* 地址
*/
private String address;
/**
* 开户行
*/
private String bank;
/**
* 开户电话
*/
private String accountPhone;
/**
* 开户账号
*/
private String bankAccount;
/**
* 状态 0 :删除 1:启用 2:停用
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getInvoiceAccountId() {
return invoiceAccountId;
}
public void setInvoiceAccountId(Integer invoiceAccountId) {
this.invoiceAccountId = invoiceAccountId;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getTaxNumber() {
return taxNumber;
}
public void setTaxNumber(String taxNumber) {
this.taxNumber = taxNumber;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getAccountPhone() {
return accountPhone;
}
public void setAccountPhone(String accountPhone) {
this.accountPhone = accountPhone;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.finance.entity;
import java.util.Date;
/**
* tab_invoice_manage
*/
public class TabInvoiceManage {
/**
*
*/
private Integer invoiceManageId;
/**
* 申请单流水号
*/
private String invoiceApplySerial;
/**
* (商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* (发票类型)1:纸质普通发票 2: 纸质增值税专用发票
*/
private Integer invoiceType;
/**
* 开票金额
*/
private Double billingAmount;
/**
* 发票状态 1:待开具 2:待邮寄 3:已邮寄 4:已驳回 5:已取消
*/
private Integer invoiceStatus;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 操作人
*/
private String operatorId;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
*
*/
private Integer enterpriseId;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 公司logo
*/
private String logo;
/**
* 开户单位名称
*/
private String accountName;
/**
* 纳税识别号
*/
private String taxNumber;
/**
* 地址
*/
private String address;
/**
* 开户行
*/
private String bank;
/**
* 开户电话
*/
private String accountPhone;
/**
* 开户账号
*/
private String bankAccount;
/**
* 收货人
*/
private String shippingName;
/**
* 收货电话
*/
private String shippingPhone;
/**
* 收货地址
*/
private String shippingAddress;
/**
* 开票户ID
*/
private Integer invoicerId;
/**
* 快递公司
*/
private String expressMailName;
/**
* 快递单号
*/
private String expressMailNumber;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 发起人
*/
private String initiator;
/**
* 发起人类型 1:计费中心 2:应用市场
*/
private Integer initiateType;
public Integer getInvoiceManageId() {
return invoiceManageId;
}
public void setInvoiceManageId(Integer invoiceManageId) {
this.invoiceManageId = invoiceManageId;
}
public String getInvoiceApplySerial() {
return invoiceApplySerial;
}
public void setInvoiceApplySerial(String invoiceApplySerial) {
this.invoiceApplySerial = invoiceApplySerial;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Double getBillingAmount() {
return billingAmount;
}
public void setBillingAmount(Double billingAmount) {
this.billingAmount = billingAmount;
}
public Integer getInvoiceStatus() {
return invoiceStatus;
}
public void setInvoiceStatus(Integer invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getOperatorTime() {
return operatorTime;
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getTaxNumber() {
return taxNumber;
}
public void setTaxNumber(String taxNumber) {
this.taxNumber = taxNumber;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getAccountPhone() {
return accountPhone;
}
public void setAccountPhone(String accountPhone) {
this.accountPhone = accountPhone;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public String getShippingName() {
return shippingName;
}
public void setShippingName(String shippingName) {
this.shippingName = shippingName;
}
public String getShippingPhone() {
return shippingPhone;
}
public void setShippingPhone(String shippingPhone) {
this.shippingPhone = shippingPhone;
}
public String getShippingAddress() {
return shippingAddress;
}
public void setShippingAddress(String shippingAddress) {
this.shippingAddress = shippingAddress;
}
public Integer getInvoicerId() {
return invoicerId;
}
public void setInvoicerId(Integer invoicerId) {
this.invoicerId = invoicerId;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getInitiator() {
return initiator;
}
public void setInitiator(String initiator) {
this.initiator = initiator;
}
public Integer getInitiateType() {
return initiateType;
}
public void setInitiateType(Integer initiateType) {
this.initiateType = initiateType;
}
}
\ No newline at end of file
package com.gic.finance.entity;
import java.util.Date;
/**
* tab_pay_account
*/
public class TabPayAccount {
/**
*
*/
private Integer payAccountId;
/**
* 开户名称
*/
private String accountName;
/**
* 开户银行
*/
private String bank;
/**
* 支行名称
*/
private String branchName;
/**
* 开户账号
*/
private String bankAccount;
/**
* 状态 0 :删除 1:启用 2:停用
*/
private Integer status;
/**
* 排序
*/
private Integer sort;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getPayAccountId() {
return payAccountId;
}
public void setPayAccountId(Integer payAccountId) {
this.payAccountId = payAccountId;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getBranchName() {
return branchName;
}
public void setBranchName(String branchName) {
this.branchName = branchName;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.finance.entity;
import java.util.Date;
/**
* tab_transfer_accounts_approval
*/
public class TabTransferAccountsApproval {
/**
*
*/
private Integer transferApprovalId;
/**
* 关联订单流水号
*/
private String orderNumber;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 发起方1:商户 2:运维后台
*/
private Integer initiatorType;
/**
* 发起方姓名
*/
private String initiatorName;
/**
*
*/
private Integer enterpriseId;
/**
* 计划金额
*/
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 到账金额
*/
private Double accountAmount;
/**
* 验证码
*/
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批人
*/
private String approvalId;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批时间
*/
private Date approvalTime;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 审批人手机号码
*/
private String approvalPhone;
/**
* 审批人手机号国际区号
*/
private String approvalPhoneAreaCode;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 公司logo
*/
private String logo;
/**
* 1:套餐包 2:拓展包 3:服务 4:短信套餐包 5:充值
*/
private Integer orderType;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public Integer getInitiatorType() {
return initiatorType;
}
public void setInitiatorType(Integer initiatorType) {
this.initiatorType = initiatorType;
}
public String getInitiatorName() {
return initiatorName;
}
public void setInitiatorName(String initiatorName) {
this.initiatorName = initiatorName;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public Double getAccountAmount() {
return accountAmount;
}
public void setAccountAmount(Double accountAmount) {
this.accountAmount = accountAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public Integer getApprovalStatus() {
return approvalStatus;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalId() {
return approvalId;
}
public void setApprovalId(String approvalId) {
this.approvalId = approvalId;
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Date getApprovalTime() {
return approvalTime;
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getApprovalPhone() {
return approvalPhone;
}
public void setApprovalPhone(String approvalPhone) {
this.approvalPhone = approvalPhone;
}
public String getApprovalPhoneAreaCode() {
return approvalPhoneAreaCode;
}
public void setApprovalPhoneAreaCode(String approvalPhoneAreaCode) {
this.approvalPhoneAreaCode = approvalPhoneAreaCode;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
}
\ No newline at end of file
package com.gic.finance.filter;
public class T {
}
package com.gic.finance.service;
import com.gic.finance.dto.CashWithdrawalDTO;
import com.gic.finance.entity.TabCashWithdrawal;
import com.gic.finance.qo.CashWithdrawalQueryListQO;
import com.github.pagehelper.Page;
/**
* 提现管理
* @ClassName: CashWithdrawalService

* @Description: 

* @author guojuxing

* @date 2019/8/30 9:15 AM

*/
public interface CashWithdrawalService {
/**
* 新增
* @Title: save

* @Description:

 * @author guojuxing
* @param dto

* @return void


 */
void save(CashWithdrawalDTO dto);
/**
* 更新
* @Title: updateStatus

* @Description:

 * @author guojuxing
* @param record

* @return void


 */
void update(TabCashWithdrawal record);
/**
* 分页查询
* @Title: pageCashWithdrawal

* @Description:

 * @author guojuxing
* @param params

* @return com.github.pagehelper.Page<com.gic.finance.dto.CashWithdrawalDTO>


 */
Page<TabCashWithdrawal> pageCashWithdrawal(CashWithdrawalQueryListQO params);
TabCashWithdrawal getById(Integer id);
}
package com.gic.finance.service;
import com.gic.finance.dto.InvoiceAccountDTO;
import com.gic.finance.entity.TabInvoiceAccount;
import java.util.List;
/**
* 开票管理-开票账户
* @ClassName: InvoiceAccountService

* @Description: 

* @author guojuxing

* @date 2019/8/28 5:26 PM

*/
public interface InvoiceAccountService {
/**
* 新增
* @Title: save

* @Description:

 * @author guojuxing
* @param dto

* @return void


 */
void save(InvoiceAccountDTO dto);
/**
* 查询启用的那条数据,启用的只有一条
* @Title: getEnable

* @Description:

 * @author guojuxing 

* @return com.gic.finance.entity.TabInvoiceAccount


 */
TabInvoiceAccount getEnable();
TabInvoiceAccount getById(Integer id);
/**
* 更新
* @Title: update

* @Description:

 * @author guojuxing
* @param dto

* @return void


 */
void update(InvoiceAccountDTO dto);
/**
* 关闭
* @Title: closeStatus

* @Description:

 * @author guojuxing 

* @return void


 */
void closeStatus();
/**
* 查询列表数据
* @Title: listInvoiceAccount

* @Description:

 * @author guojuxing 

* @return java.util.List<com.gic.finance.entity.TabInvoiceAccount>


 */
List<TabInvoiceAccount> listInvoiceAccount();
}
package com.gic.finance.service;
import com.gic.finance.dto.InvoiceManageDTO;
import com.gic.finance.entity.TabInvoiceManage;
import com.gic.finance.qo.InvoiceManageListQueryQO;
import com.github.pagehelper.Page;
/**
* 发票管理
* @ClassName: InvoiceManageService

* @Description: 

* @author guojuxing

* @date 2019/8/14 2:44 PM

*/
public interface InvoiceManageService {
/**
* save
* @Title: save

* @Description:

 * @author guojuxing
* @param invoiceManageDTO

* @return void


 */
void save(InvoiceManageDTO invoiceManageDTO);
/**
* 查询单条
* @Title: getById

* @Description:

 * @author guojuxing
* @param invoiceManageId

* @return com.gic.finance.entity.TabInvoiceManage


 */
TabInvoiceManage getById(Integer invoiceManageId);
/**
* update
* @Title: update

* @Description:

 * @author guojuxing
* @param invoiceManageDTO

* @return void


 */
void update(InvoiceManageDTO invoiceManageDTO);
/**
* 分页查询发票列表
* @Title: listInvoiceManage

* @Description:

 * @author guojuxing
* @param params

* @return com.github.pagehelper.Page<com.gic.finance.entity.TabInvoiceManage>


 */
Page<TabInvoiceManage> listInvoiceManage(InvoiceManageListQueryQO params);
/**
* 查询
* @Title: selectInvoiceByInitiator

* @Description:

 * @author guojuxing
* @param initiator 发起人主键
* @param initiateType 发起方类型
* @return TabInvoiceManage


 */
TabInvoiceManage selectInvoiceByInitiator(String initiator, Integer initiateType);
}
package com.gic.finance.service;
import com.gic.finance.dto.PayAccountDTO;
import com.gic.finance.entity.TabPayAccount;
import java.util.List;
/**
* 打款户接口
* @ClassName: PayAccountService

* @Description: 

* @author guojuxing

* @date 2019/8/29 2:49 PM

*/
public interface PayAccountService {
/**
* 新增
* @Title: save

* @Description:

 * @author guojuxing
* @param dto

* @return void


 */
int save(PayAccountDTO dto);
int update(PayAccountDTO dto);
/**
* 查询列表
* @Title: listPayAccount

* @Description:

 * @author guojuxing 

* @return java.util.List<com.gic.finance.dto.PayAccountDTO>


 */
List<PayAccountDTO> listPayAccount();
/**
* 根据主键查询
* @Title: getById

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.finance.entity.TabPayAccount


 */
TabPayAccount getById(Integer id);
/**
* 拖拽排序
* @Title: setSort

* @Description:

 * @author guojuxing
* @param record
* @param sortValue

* @return void


 */
void setSort(TabPayAccount record, Integer sortValue);
/**
* 查询排序值最大的,即排在最末
* @Title: getTheMaxSort

* @Description:

 * @author guojuxing 

* @return int


 */
int getTheMaxSort();
int getMinSort();
/**
* 查询排序值前面的记录
* @Title: getPreOfSort

* @Description:

 * @author guojuxing
* @param sort

* @return com.gic.finance.entity.TabPayAccount


 */
TabPayAccount getPreOfSort(Integer sort);
/**
* 查询排序值后面的记录
* @Title: getNextOfSort

* @Description:

 * @author guojuxing
* @param sort

* @return com.gic.finance.entity.TabPayAccount


 */
TabPayAccount getNextOfSort(Integer sort);
}
package com.gic.finance.service;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.entity.TabTransferAccountsApproval;
import com.gic.finance.qo.TransferListQueryQO;
import com.github.pagehelper.Page;
import java.util.List;
/**
* 转账审批
* @author $user$
* @ClassName: $ClassName$
* @Description: $desc$
* @date $date$ $time$
*/
public interface TransferAccountsApprovalService {
/**
* 保存
* @Title: initiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return int


 */
int initiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 主键查询单条
* @Title: getById

* @Description:

 * @author guojuxing
* @param transferApprovalId

* @return com.gic.finance.entity.TabTransferAccountsApproval


 */
TabTransferAccountsApproval getById(Integer transferApprovalId);
/**
* 根据订单流水号查询单条数据
* @Title: getByOrderNumber

* @Description:

 * @author guojuxing
* @param orderNumber

* @return com.gic.finance.entity.TabTransferAccountsApproval


 */
TabTransferAccountsApproval getByOrderNumber(String orderNumber);
/**
* 更新
* @Title: updateTransferAccountsApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return void


 */
void updateTransferAccountsApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO);
/**
* 分页查询
* @Title: listTransferAccountsApproval

* @Description:

 * @author guojuxing
* @param params 

* @return com.github.pagehelper.Page<com.gic.finance.dto.TransferAccountsApprovalDTO>


 */
Page<TabTransferAccountsApproval> listTransferAccountsApproval(TransferListQueryQO params);
/**
* 订单流水号查询审批信息
* @Title: listByOrderSerialNumber

* @Description:

 * @author guojuxing
* @param orderSerialNumberList

* @return java.util.List<com.gic.finance.entity.TabTransferAccountsApproval>


 */
List<TabTransferAccountsApproval> listByOrderSerialNumber(List<String> orderSerialNumberList);
}
package com.gic.finance.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.finance.dao.mapper.TabCashWithdrawalMapper;
import com.gic.finance.dto.CashWithdrawalDTO;
import com.gic.finance.entity.TabCashWithdrawal;
import com.gic.finance.qo.CashWithdrawalQueryListQO;
import com.gic.finance.service.CashWithdrawalService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service("cashWithdrawalService")
public class CashWithdrawalServiceImpl implements CashWithdrawalService {
@Autowired
private TabCashWithdrawalMapper tabCashWithdrawalMapper;
@Override
public void save(CashWithdrawalDTO dto) {
tabCashWithdrawalMapper.insertSelective(EntityUtil.changeEntityNew(TabCashWithdrawal.class, dto));
}
@Override
public void update(TabCashWithdrawal record) {
record.setUpdateTime(new Date());
tabCashWithdrawalMapper.updateByPrimaryKeySelective(record);
}
@Override
public Page<TabCashWithdrawal> pageCashWithdrawal(CashWithdrawalQueryListQO params) {
PageHelper.startPage(params.getCurrentPage(), params.getPageSize());
List<TabCashWithdrawal> list = tabCashWithdrawalMapper.listCashWithdrawal(params);
return (Page<TabCashWithdrawal>) list;
}
@Override
public TabCashWithdrawal getById(Integer id) {
return tabCashWithdrawalMapper.selectByPrimaryKey(id);
}
}
package com.gic.finance.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.finance.dao.mapper.TabInvoiceAccountMapper;
import com.gic.finance.dto.InvoiceAccountDTO;
import com.gic.finance.entity.TabInvoiceAccount;
import com.gic.finance.service.InvoiceAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service("invoiceAccountService")
public class InvoiceAccountServiceImpl implements InvoiceAccountService{
@Autowired
private TabInvoiceAccountMapper tabInvoiceAccountMapper;
@Override
public void save(InvoiceAccountDTO dto) {
tabInvoiceAccountMapper.insert(EntityUtil.changeEntityNew(TabInvoiceAccount.class, dto));
}
@Override
public TabInvoiceAccount getEnable() {
return tabInvoiceAccountMapper.getEnable();
}
@Override
public TabInvoiceAccount getById(Integer id) {
return tabInvoiceAccountMapper.selectByPrimaryKey(id);
}
@Override
public void update(InvoiceAccountDTO dto) {
dto.setUpdateTime(new Date());
tabInvoiceAccountMapper.updateByPrimaryKeySelective(EntityUtil.changeEntityNew(TabInvoiceAccount.class, dto));
}
@Override
public void closeStatus() {
tabInvoiceAccountMapper.closeStatus();
}
@Override
public List<TabInvoiceAccount> listInvoiceAccount() {
return tabInvoiceAccountMapper.listInvoiceAccount();
}
}
package com.gic.finance.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.finance.qo.InvoiceManageListQueryQO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.finance.dao.mapper.TabInvoiceManageMapper;
import com.gic.finance.dto.InvoiceManageDTO;
import com.gic.finance.entity.TabInvoiceManage;
import com.gic.finance.service.InvoiceManageService;
import java.util.Date;
import java.util.List;
@Service("invoiceManageService")
public class InvoiceManageServiceImpl implements InvoiceManageService{
@Autowired
private TabInvoiceManageMapper tabInvoiceManageMapper;
@Override
public void save(InvoiceManageDTO invoiceManageDTO) {
TabInvoiceManage tabInvoiceManage = EntityUtil.changeEntityNew(TabInvoiceManage.class, invoiceManageDTO);
tabInvoiceManageMapper.insertSelective(tabInvoiceManage);
}
@Override
public TabInvoiceManage getById(Integer invoiceManageId) {
return tabInvoiceManageMapper.selectByPrimaryKey(invoiceManageId);
}
@Override
public void update(InvoiceManageDTO invoiceManageDTO) {
invoiceManageDTO.setUpdateTime(new Date());
TabInvoiceManage tabInvoiceManage = EntityUtil.changeEntityNew(TabInvoiceManage.class, invoiceManageDTO);
tabInvoiceManageMapper.updateByPrimaryKeySelective(tabInvoiceManage);
}
@Override
public Page<TabInvoiceManage> listInvoiceManage(InvoiceManageListQueryQO params) {
PageHelper.startPage(params.getCurrentPage(), params.getPageSize());
List<TabInvoiceManage> list = tabInvoiceManageMapper.listInvoiceManage(params);
return (Page<TabInvoiceManage>) list;
}
@Override
public TabInvoiceManage selectInvoiceByInitiator(String initiator, Integer initiateType) {
return tabInvoiceManageMapper.selectInvoiceByInitiator(initiator, initiateType);
}
}
package com.gic.finance.service.impl;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.finance.dao.mapper.TabPayAccountMapper;
import com.gic.finance.dto.PayAccountDTO;
import com.gic.finance.entity.TabPayAccount;
import com.gic.finance.service.PayAccountService;
@Service("payAccountService")
public class PayAccountServiceImpl implements PayAccountService {
@Autowired
private TabPayAccountMapper tabPayAccountMapper;
@Override
public int save(PayAccountDTO dto) {
return tabPayAccountMapper.insert(EntityUtil.changeEntityNew(TabPayAccount.class, dto));
}
@Override
public int update(PayAccountDTO dto) {
dto.setUpdateTime(new Date());
return tabPayAccountMapper.updateByPrimaryKeySelective(EntityUtil.changeEntityNew(TabPayAccount.class, dto));
}
@Override
public List<PayAccountDTO> listPayAccount() {
return EntityUtil.changeEntityListNew(PayAccountDTO.class, tabPayAccountMapper.listPayAccount());
}
@Override
public TabPayAccount getById(Integer id) {
return tabPayAccountMapper.selectByPrimaryKey(id);
}
@Override
public void setSort(TabPayAccount record, Integer sortValue) {
List<TabPayAccount> list = tabPayAccountMapper.listPayAccount();
Integer fromSortValue = record.getSort();
if (fromSortValue > sortValue) {
//向上拖拽
for (int i = 0, length = list.size(); i < length; i++) {
TabPayAccount temp = list.get(i);
//如果大于sortValue,都需要降低排序值,往后推
boolean isNeedDown = temp.getSort() >= sortValue && temp.getSort() < fromSortValue;
if (isNeedDown) {
updateSort(list.get(i + 1).getSort(), temp.getPayAccountId());
}
}
} else if (fromSortValue < sortValue) {
//向下拖拽
for (int i = 0, length = list.size(); i < length; i++) {
TabPayAccount temp = list.get(i);
boolean isNeedUp = temp.getSort() <= sortValue && temp.getSort() > fromSortValue;
if (isNeedUp) {
updateSort(list.get(i - 1).getSort(), temp.getPayAccountId());
}
}
}
updateSort(sortValue, record.getPayAccountId());
}
@Override
public int getTheMaxSort() {
return tabPayAccountMapper.getMaxSort();
}
@Override
public int getMinSort() {
return tabPayAccountMapper.getMinSort();
}
@Override
public TabPayAccount getPreOfSort(Integer sort) {
return null;
}
@Override
public TabPayAccount getNextOfSort(Integer sort) {
return null;
}
private void updateSort(Integer sort, Integer id) {
TabPayAccount record = new TabPayAccount();
record.setPayAccountId(id);
record.setSort(sort);
tabPayAccountMapper.updateByPrimaryKeySelective(record);
}
}
package com.gic.finance.service.impl;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.finance.dao.mapper.TabTransferAccountsApprovalMapper;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.entity.TabTransferAccountsApproval;
import com.gic.finance.qo.TransferListQueryQO;
import com.gic.finance.service.TransferAccountsApprovalService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
/**
* @ClassName: TransferAccountsApprovalServiceImpl

* @Description: 

* @author guojuxing

* @date 2019/8/13 2:18 PM

*/
@Service("transferAccountsApprovalService")
public class TransferAccountsApprovalServiceImpl implements TransferAccountsApprovalService{
@Autowired
private TabTransferAccountsApprovalMapper tabTransferAccountsApprovalMapper;
@Override
public int initiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
TabTransferAccountsApproval transfer = EntityUtil.changeEntityNew(TabTransferAccountsApproval.class, transferAccountsApprovalDTO);
tabTransferAccountsApprovalMapper.insertSelective(transfer);
return 1;
}
@Override
public TabTransferAccountsApproval getById(Integer transferApprovalId) {
return tabTransferAccountsApprovalMapper.selectByPrimaryKey(transferApprovalId);
}
@Override
public TabTransferAccountsApproval getByOrderNumber(String orderNumber) {
return tabTransferAccountsApprovalMapper.selectByOrderNumber(orderNumber);
}
@Override
public void updateTransferAccountsApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
transferAccountsApprovalDTO.setUpdateTime(new Date());
TabTransferAccountsApproval transfer = EntityUtil.changeEntityNew(TabTransferAccountsApproval.class, transferAccountsApprovalDTO);
tabTransferAccountsApprovalMapper.updateByPrimaryKeySelective(transfer);
}
@Override
public Page<TabTransferAccountsApproval> listTransferAccountsApproval(TransferListQueryQO params) {
PageHelper.startPage(params.getCurrentPage(), params.getPageSize());
List<TabTransferAccountsApproval> list = tabTransferAccountsApprovalMapper.listTransferAccountsApproval(params);
return (Page<TabTransferAccountsApproval>) list;
}
@Override
public List<TabTransferAccountsApproval> listByOrderSerialNumber(List<String> orderSerialNumberList) {
return tabTransferAccountsApprovalMapper.listByOrderSerialNumber(orderSerialNumberList);
}
}
package com.gic.finance.service.outer.impl;
import java.util.Date;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.utils.AsyncCallbackUtils;
import com.gic.enterprise.utils.CreateRandomUtils;
import com.gic.enterprise.utils.valid.ValidParamsUtils;
import com.gic.finance.constant.WithdrawalApplyTypeEnum;
import com.gic.finance.constant.WithdrawalStatusEnum;
import com.gic.finance.dto.CashWithdrawalDTO;
import com.gic.finance.dto.OperationUserInfoDTO;
import com.gic.finance.entity.TabCashWithdrawal;
import com.gic.finance.entity.TabPayAccount;
import com.gic.finance.qo.CashWithdrawalQueryListQO;
import com.gic.finance.service.CashWithdrawalApiService;
import com.gic.finance.service.CashWithdrawalService;
import com.gic.finance.service.PayAccountService;
@Service("cashWithdrawalApiService")
public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
@Autowired
private CashWithdrawalService cashWithdrawalService;
@Autowired
private PayAccountService payAccountService;
/**
* 提现申请
* @Title: cashWithdrawal

* @Description:

 * @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
private ServiceResponse<String> cashWithdrawal(CashWithdrawalDTO dto) {
ServiceResponse paramValid = ValidParamsUtils.allCheckValidate(dto, CashWithdrawalDTO.CashWithdrawal.class);
if (!paramValid.isSuccess()) {
return paramValid;
}
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setCashWithdrawalStatus(WithdrawalStatusEnum.TO_BE_EXAMINE.getCode());
//流水号
dto.setCashWithdrawalSerialNumber(CreateRandomUtils.createSerialNumber());
cashWithdrawalService.save(dto);
return ServiceResponse.success(dto.getCashWithdrawalSerialNumber());
}
@Override
public ServiceResponse<String> cashWithdrawalOfServiceProvider(CashWithdrawalDTO dto) {
dto.setApplyType(WithdrawalApplyTypeEnum.SERVICE_PROVIDER.getCode());
return cashWithdrawal(dto);
}
@Override
public ServiceResponse<String> cashWithdrawalOfSupplier(CashWithdrawalDTO dto) {
dto.setApplyType(WithdrawalApplyTypeEnum.SUPPLIER.getCode());
return cashWithdrawal(dto);
}
@Override
public ServiceResponse<Void> approval(Integer id, OperationUserInfoDTO dto) {
TabCashWithdrawal record = cashWithdrawalService.getById(id);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录");
}
// 操作人相关信息
getOperationUserInfo(record, dto);
record.setCashWithdrawalStatus(WithdrawalStatusEnum.PASS.getCode());
cashWithdrawalService.update(record);
return ServiceResponse.success();
}
@Override
public ServiceResponse<CashWithdrawalDTO> getDetail(Integer id) {
TabCashWithdrawal record = cashWithdrawalService.getById(id);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(CashWithdrawalDTO.class, record));
}
@Override
public ServiceResponse<Void> reject(Integer id, String rejectReason, OperationUserInfoDTO dto) {
if (StringUtils.isBlank(rejectReason)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "驳回理由不能为空");
}
TabCashWithdrawal record = cashWithdrawalService.getById(id);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录");
}
// 操作人相关信息
getOperationUserInfo(record, dto);
record.setCashWithdrawalStatus(WithdrawalStatusEnum.REJECT.getCode());
record.setRejectReason(rejectReason);
cashWithdrawalService.update(record);
//回调
AsyncCallbackUtils.callBack(record, "com.gic.open.api.service.market.PayCallbackApiService", "callbackWithdraw");
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> pay(Integer id, Integer payId, String bankSerialNumber) {
if (StringUtils.isBlank(bankSerialNumber)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "银行流水号不能为空");
}
TabCashWithdrawal record = cashWithdrawalService.getById(id);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此申请单记录");
}
TabPayAccount account = payAccountService.getById(payId);
if (account == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "无此打款户信息记录,请前往添加");
}
//todo 操作人相关信息
record.setOperatorTime(new Date());
record.setPayId(payId);
record.setPayAccount(account.getBankAccount());
record.setPayAccountBank(account.getBank());
record.setPayAccountBranchName(account.getBranchName());
record.setPayAccountName(account.getAccountName());
record.setBankSerialNumber(bankSerialNumber);
record.setCashWithdrawalStatus(WithdrawalStatusEnum.COMPLETE.getCode());
cashWithdrawalService.update(record);
//回调
AsyncCallbackUtils.callBack(record, "com.gic.open.api.service.market.PayCallbackApiService", "callbackWithdraw");
return ServiceResponse.success();
}
@Override
public ServiceResponse<Page<CashWithdrawalDTO>> listCashWithdrawalPage(CashWithdrawalQueryListQO params) {
com.github.pagehelper.Page page = cashWithdrawalService.pageCashWithdrawal(params);
Page<CashWithdrawalDTO> resultPage = PageHelperUtils.changePageHelperToCurrentPage(page, CashWithdrawalDTO.class);
return ServiceResponse.success(resultPage);
}
private void getOperationUserInfo(TabCashWithdrawal record, OperationUserInfoDTO userInfo) {
record.setOperatorId(userInfo.getId().toString());
record.setOperatorName(userInfo.getRealName());
record.setOperatorPhone(userInfo.getUserMobile());
record.setOperatorTime(new Date());
}
}
package com.gic.finance.service.outer.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.utils.valid.ValidParamsUtils;
import com.gic.finance.constant.InvoiceUseStatusEnum;
import com.gic.finance.dto.InvoiceAccountDTO;
import com.gic.finance.entity.TabInvoiceAccount;
import com.gic.finance.service.InvoiceAccountApiService;
import com.gic.finance.service.InvoiceAccountService;
@Service("invoiceAccountApiService")
public class InvoiceAccountApiServiceImpl implements InvoiceAccountApiService {
@Autowired
private InvoiceAccountService invoiceAccountService;
@Override
public ServiceResponse<Void> save(InvoiceAccountDTO invoiceAccountDTO) {
ServiceResponse paramValid = ValidParamsUtils.allCheckValidate(invoiceAccountDTO, InvoiceAccountDTO.Save.class);
if (!paramValid.isSuccess()) {
return paramValid;
}
//关闭之前的
invoiceAccountService.closeStatus();
invoiceAccountDTO.setCreateTime(new Date());
invoiceAccountDTO.setUpdateTime(new Date());
//启用默认
invoiceAccountDTO.setStatus(InvoiceUseStatusEnum.ENABLE.getCode());
invoiceAccountService.save(invoiceAccountDTO);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> update(InvoiceAccountDTO invoiceAccountDTO) {
ServiceResponse paramValid = ValidParamsUtils.allCheckValidate(invoiceAccountDTO, InvoiceAccountDTO.Save.class,
InvoiceAccountDTO.Edit.class);
if (!paramValid.isSuccess()) {
return paramValid;
}
TabInvoiceAccount tab = invoiceAccountService.getById(invoiceAccountDTO.getInvoiceAccountId());
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键有误");
}
invoiceAccountService.update(invoiceAccountDTO);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> enable(Integer id) {
TabInvoiceAccount tab = invoiceAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键有误");
}
//关闭之前的
invoiceAccountService.closeStatus();
InvoiceAccountDTO dto = new InvoiceAccountDTO();
dto.setInvoiceAccountId(id);
dto.setStatus(InvoiceUseStatusEnum.ENABLE.getCode());
invoiceAccountService.update(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> disable(Integer id) {
TabInvoiceAccount tab = invoiceAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键有误");
}
TabInvoiceAccount enableTab = invoiceAccountService.getEnable();
if (enableTab.getInvoiceAccountId().intValue() == id.intValue()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "不能关闭,必须有一个是开启状态");
}
InvoiceAccountDTO dto = new InvoiceAccountDTO();
dto.setInvoiceAccountId(id);
dto.setStatus(InvoiceUseStatusEnum.DISABLE.getCode());
invoiceAccountService.update(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<InvoiceAccountDTO> getById(Integer invoiceAccountId) {
TabInvoiceAccount tab = invoiceAccountService.getById(invoiceAccountId);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键有误");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(InvoiceAccountDTO.class, tab));
}
@Override
public ServiceResponse<InvoiceAccountDTO> getEnable() {
TabInvoiceAccount tab = invoiceAccountService.getEnable();
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "没有启用的开票户信息,请启用");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(InvoiceAccountDTO.class, tab));
}
@Override
public ServiceResponse<List<InvoiceAccountDTO>> listInvoiceAccount() {
List<TabInvoiceAccount> accountList = invoiceAccountService.listInvoiceAccount();
if (CollectionUtils.isNotEmpty(accountList)) {
return ServiceResponse.success(EntityUtil.changeEntityListNew(InvoiceAccountDTO.class, accountList));
}
return ServiceResponse.success(new ArrayList<>());
}
}
package com.gic.finance.service.outer.impl;
import java.util.Date;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.utils.AsyncCallbackUtils;
import com.gic.enterprise.utils.CreateRandomUtils;
import com.gic.enterprise.utils.valid.ValidParamsUtils;
import com.gic.finance.constant.InvoiceInitiateTypeConstants;
import com.gic.finance.constant.InvoiceStatusEnum;
import com.gic.finance.dto.InvoiceManageDTO;
import com.gic.finance.dto.OperationUserInfoDTO;
import com.gic.finance.dto.callback.InvoiceCallbackDTO;
import com.gic.finance.entity.TabInvoiceAccount;
import com.gic.finance.entity.TabInvoiceManage;
import com.gic.finance.qo.InvoiceManageListQueryQO;
import com.gic.finance.service.InvoiceAccountService;
import com.gic.finance.service.InvoiceManageApiService;
import com.gic.finance.service.InvoiceManageService;
@Service("invoiceManageApiService")
public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
private static final Logger LOGGER = LogManager.getLogger(InvoiceManageApiServiceImpl.class);
@Autowired
private InvoiceManageService invoiceManageService;
@Autowired
private InvoiceAccountService invoiceAccountService;
public ServiceResponse<String> applyInvoiceInit(InvoiceManageDTO invoiceManageDTO) {
ServiceResponse paramResponse = ValidParamsUtils.allCheckValidate(invoiceManageDTO,
InvoiceManageDTO.ApplyInvoiceValid.class);
if (!paramResponse.isSuccess()) {
return paramResponse;
}
if (invoiceManageDTO.getBillingAmount() < 1000) {
//如果开票金额小于1000,则不允许开票
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "开票金额小于1000");
}
invoiceManageDTO.setCreateTime(new Date());
invoiceManageDTO.setUpdateTime(new Date());
invoiceManageDTO.setInvoiceStatus(InvoiceStatusEnum.TO_BE_ISSUED.getCode());
invoiceManageDTO.setInvoiceApplySerial(CreateRandomUtils.createSerialNumber());
if (StringUtils.isBlank(invoiceManageDTO.getEnterpriseName())) {
invoiceManageDTO.setEnterpriseName("暂无商户名称");
}
if (StringUtils.isBlank(invoiceManageDTO.getCompanyName())) {
invoiceManageDTO.setCompanyName("暂无公司名称");
}
if (StringUtils.isBlank(invoiceManageDTO.getLogo())) {
invoiceManageDTO.setLogo("暂无公司logo");
}
invoiceManageService.save(invoiceManageDTO);
return ServiceResponse.success(invoiceManageDTO.getInvoiceApplySerial());
}
@Override
public ServiceResponse<String> applyInvoice(InvoiceManageDTO invoiceManageDTO) {
//计费中心
invoiceManageDTO.setInitiateType(InvoiceInitiateTypeConstants.BILLING);
return applyInvoiceInit(invoiceManageDTO);
}
@Override
public ServiceResponse<String> applyInvoiceForApp(InvoiceManageDTO invoiceManageDTO) {
if (StringUtils.isBlank(invoiceManageDTO.getInitiator())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "发起人(initiator)主键不能为空");
}
//应用市场类型
invoiceManageDTO.setInitiateType(InvoiceInitiateTypeConstants.APP);
return applyInvoiceInit(invoiceManageDTO);
}
@Override
public ServiceResponse<Void> invoice(Integer invoiceManageId, String expressMailName, String expressMailNumber, OperationUserInfoDTO dto) {
TabInvoiceManage tabInvoiceManage = invoiceManageService.getById(invoiceManageId);
if (tabInvoiceManage == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "发票管理主键有误");
}
InvoiceManageDTO invoiceManageDTO = new InvoiceManageDTO();
invoiceManageDTO.setInvoiceManageId(invoiceManageId);
if (StringUtils.isBlank(expressMailName) || StringUtils.isBlank(expressMailNumber)) {
//待邮寄
invoiceManageDTO.setInvoiceStatus(InvoiceStatusEnum.TO_BE_MAILED.getCode());
tabInvoiceManage.setInvoiceStatus(InvoiceStatusEnum.TO_BE_MAILED.getCode());
} else {
invoiceManageDTO.setInvoiceStatus(InvoiceStatusEnum.MAILED.getCode());
//物流信息
invoiceManageDTO.setExpressMailName(expressMailName);
invoiceManageDTO.setExpressMailNumber(expressMailNumber);
tabInvoiceManage.setInvoiceStatus(InvoiceStatusEnum.MAILED.getCode());
tabInvoiceManage.setExpressMailName(expressMailName);
tabInvoiceManage.setExpressMailNumber(expressMailNumber);
}
getOperationUserInfo(invoiceManageDTO, dto);
//开票户信息插入
TabInvoiceAccount account = invoiceAccountService.getEnable();
if (account == null) {
return ServiceResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), "没有启用的开票户信息,请启用");
}
invoiceManageDTO.setInvoicerId(account.getInvoiceAccountId());
invoiceManageService.update(invoiceManageDTO);
//回调
if (tabInvoiceManage.getInitiateType().intValue() == InvoiceInitiateTypeConstants.APP) {
InvoiceCallbackDTO callbackDTO = EntityUtil.changeEntityNew(InvoiceCallbackDTO.class, tabInvoiceManage);
AsyncCallbackUtils.callBack(callbackDTO, "com.gic.open.api.service.market.InvoiceCallbackApiService",
"invoiceCallback");
}
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> rejectInvoice(Integer invoiceManageId, String rejectReason, OperationUserInfoDTO dto) {
TabInvoiceManage tabInvoiceManage = invoiceManageService.getById(invoiceManageId);
if (tabInvoiceManage == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "发票管理主键有误");
}
InvoiceManageDTO invoiceManageDTO = new InvoiceManageDTO();
invoiceManageDTO.setInvoiceManageId(invoiceManageId);
invoiceManageDTO.setInvoiceStatus(InvoiceStatusEnum.REJECT.getCode());
if (StringUtils.isBlank(rejectReason)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "驳回理由不能为空");
}
invoiceManageDTO.setRejectReason(rejectReason);
getOperationUserInfo(invoiceManageDTO, dto);
invoiceManageService.update(invoiceManageDTO);
//回调
if (tabInvoiceManage.getInitiateType().intValue() == InvoiceInitiateTypeConstants.APP) {
tabInvoiceManage.setInvoiceStatus(InvoiceStatusEnum.REJECT.getCode());
tabInvoiceManage.setRejectReason(rejectReason);
InvoiceCallbackDTO callbackDTO = EntityUtil.changeEntityNew(InvoiceCallbackDTO.class, tabInvoiceManage);
AsyncCallbackUtils.callBack(callbackDTO, "com.gic.open.api.service.market.InvoiceCallbackApiService",
"invoiceCallback");
}
return ServiceResponse.success();
}
@Override
public ServiceResponse<String> cancelInvoice(Integer invoiceManageId) {
TabInvoiceManage tabInvoiceManage = invoiceManageService.getById(invoiceManageId);
if (tabInvoiceManage == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "发票管理主键有误");
}
InvoiceManageDTO invoiceManageDTO = new InvoiceManageDTO();
invoiceManageDTO.setInvoiceManageId(invoiceManageId);
invoiceManageDTO.setInvoiceStatus(InvoiceStatusEnum.CANCEL.getCode());
invoiceManageService.update(invoiceManageDTO);
return ServiceResponse.success(tabInvoiceManage.getInvoiceApplySerial());
}
@Override
public ServiceResponse<Page<InvoiceManageDTO>> listInvoiceManage(InvoiceManageListQueryQO params) {
com.github.pagehelper.Page page = invoiceManageService.listInvoiceManage(params);
Page<InvoiceManageDTO> resultPage = PageHelperUtils.changePageHelperToCurrentPage(page, InvoiceManageDTO.class);
return ServiceResponse.success(resultPage);
}
@Override
public ServiceResponse<InvoiceManageDTO> getById(Integer invoiceManageId) {
TabInvoiceManage tabInvoiceManage = invoiceManageService.getById(invoiceManageId);
if (tabInvoiceManage == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "发票管理主键有误");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(InvoiceManageDTO.class, tabInvoiceManage));
}
@Override
public ServiceResponse<Void> cancelInvoiceForApp(String initiator) {
LOGGER.info("应用市场取消开票:{}", initiator);
TabInvoiceManage record = invoiceManageService.selectInvoiceByInitiator(initiator,
InvoiceInitiateTypeConstants.APP);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,查无数据");
}
if (record.getInvoiceStatus().intValue() != InvoiceStatusEnum.TO_BE_ISSUED.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(),
"不是" + InvoiceStatusEnum.TO_BE_ISSUED.getMessage() + "状态,无法取消");
}
InvoiceManageDTO invoiceManageDTO = new InvoiceManageDTO();
invoiceManageDTO.setInvoiceManageId(record.getInvoiceManageId());
invoiceManageDTO.setInvoiceStatus(InvoiceStatusEnum.CANCEL.getCode());
invoiceManageService.update(invoiceManageDTO);
return ServiceResponse.success();
}
private void getOperationUserInfo(InvoiceManageDTO dto, OperationUserInfoDTO userInfo) {
dto.setOperatorId(userInfo.getId().toString());
dto.setOperatorName(userInfo.getRealName());
dto.setOperatorPhone(userInfo.getUserMobile());
dto.setOperatorTime(new Date());
}
}
package com.gic.finance.service.outer.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.utils.valid.ValidParamsUtils;
import com.gic.finance.dto.PayAccountDTO;
import com.gic.finance.entity.TabPayAccount;
import com.gic.finance.service.PayAccountApiService;
import com.gic.finance.service.PayAccountService;
@Service("payAccountApiService")
public class PayAccountApiServiceImpl implements PayAccountApiService {
@Autowired
private PayAccountService payAccountService;
@Override
public ServiceResponse<Void> save(PayAccountDTO dto) {
ServiceResponse paramValid = ValidParamsUtils.allCheckValidate(dto, PayAccountDTO.SavePayAccount.class);
if (!paramValid.isSuccess()) {
return paramValid;
}
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
//序号
int sort = payAccountService.getTheMaxSort();
dto.setSort(sort + 1);
payAccountService.save(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> update(PayAccountDTO dto) {
ServiceResponse paramValid = ValidParamsUtils.allCheckValidate(dto, PayAccountDTO.SavePayAccount.class,
PayAccountDTO.EditPayAccount.class);
if (!paramValid.isSuccess()) {
return paramValid;
}
payAccountService.update(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> delete(Integer id) {
TabPayAccount tab = payAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误");
}
PayAccountDTO dto = new PayAccountDTO();
dto.setPayAccountId(id);
dto.setStatus(0);
payAccountService.update(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> setSort(Integer id, Integer sort) {
TabPayAccount tab = payAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误,无此记录");
}
if (sort == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "排序值不能为空");
}
payAccountService.setSort(tab, sort);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> upSort(Integer id) {
TabPayAccount tab = payAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误");
}
int minSort = payAccountService.getMinSort();
if (minSort == tab.getSort().intValue()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已在最前面,不能上移");
}
TabPayAccount pre = payAccountService.getNextOfSort(tab.getSort());
updateSortValue(id, pre.getSort());
updateSortValue(pre.getPayAccountId(), tab.getSort());
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> downSort(Integer id) {
TabPayAccount tab = payAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误");
}
int maxSort = payAccountService.getTheMaxSort();
if (maxSort == tab.getSort().intValue()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已在最下面,不能下移");
}
TabPayAccount next = payAccountService.getNextOfSort(tab.getSort());
updateSortValue(id, next.getSort());
updateSortValue(next.getPayAccountId(), tab.getSort());
return ServiceResponse.success();
}
@Override
public ServiceResponse<PayAccountDTO> getById(Integer id) {
TabPayAccount tab = payAccountService.getById(id);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数有误");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(PayAccountDTO.class, tab));
}
@Override
public ServiceResponse<List<PayAccountDTO>> listPayAccount() {
List<PayAccountDTO> list = payAccountService.listPayAccount();
if (CollectionUtils.isNotEmpty(list)) {
for (int i = 0, len = list.size(); i < len; i++) {
list.get(i).setSeq(i + 1);
}
return ServiceResponse.success(list);
}
return ServiceResponse.success(new ArrayList<>());
}
private void updateSortValue(Integer id, Integer sort) {
PayAccountDTO dto = new PayAccountDTO();
dto.setPayAccountId(id);
dto.setSort(sort);
payAccountService.update(dto);
}
}
package com.gic.finance.service.outer.impl;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.utils.AsyncCallbackUtils;
import com.gic.enterprise.utils.CreateRandomUtils;
import com.gic.finance.constant.OrderTypeEnum;
import com.gic.finance.constant.TransferAccountApprovalStatusEnum;
import com.gic.finance.dto.OperationUserInfoDTO;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.entity.TabTransferAccountsApproval;
import com.gic.finance.qo.TransferListQueryQO;
import com.gic.finance.service.TransferAccountsApprovalApiService;
import com.gic.finance.service.TransferAccountsApprovalService;
import com.gic.store.utils.valid.ValidUtil;
/**
* 转账审批
* @author $user$
* @ClassName: $ClassName$
* @Description: $desc$
* @date $date$ $time$
*/
@Service("transferAccountsApprovalApiService")
public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsApprovalApiService {
private static final Logger LOGGER = LoggerFactory.getLogger(TransferAccountsApprovalApiServiceImpl.class);
private final static String SERVICE_NAME = "转账审批";
@Autowired
private TransferAccountsApprovalService transferAccountsApprovalService;
/**
* 发起审批
* @Title: initiateApproval

* @Description:

 * @author guojuxing
* @param transferAccountsApprovalDTO

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
private ServiceResponse<Void> initiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
//valid param
ServiceResponse paramValid = ValidUtil.allCheckValidate(transferAccountsApprovalDTO,
TransferAccountsApprovalDTO.InitiateApprovalValid.class);
if (!paramValid.isSuccess()) {
return paramValid;
}
transferAccountsApprovalDTO.setCreateTime(new Date());
transferAccountsApprovalDTO.setUpdateTime(new Date());
transferAccountsApprovalDTO.setApprovalStatus(TransferAccountApprovalStatusEnum.TO_BE_APPROVED.getCode());
if (StringUtils.isBlank(transferAccountsApprovalDTO.getEnterpriseName())) {
transferAccountsApprovalDTO.setEnterpriseName("暂无商户名称");
}
if (StringUtils.isBlank(transferAccountsApprovalDTO.getCompanyName())) {
transferAccountsApprovalDTO.setCompanyName("暂无公司名称");
}
if (StringUtils.isBlank(transferAccountsApprovalDTO.getLogo())) {
transferAccountsApprovalDTO.setLogo("暂无公司logo");
}
if (StringUtils.isBlank(transferAccountsApprovalDTO.getInitiatorName())) {
transferAccountsApprovalDTO.setInitiatorName("暂无发起方名称");
}
//审批流水号生成
String approvalSerialNumber = CreateRandomUtils.createSerialNumber();
LOGGER.info("转账审批-发起审批-审批流水号:{}", approvalSerialNumber);
transferAccountsApprovalDTO.setApprovalNumber(approvalSerialNumber);
transferAccountsApprovalService.initiateApproval(transferAccountsApprovalDTO);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> rechargeInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
transferAccountsApprovalDTO.setOrderType(OrderTypeEnum.RECHARGE.getCode());
return initiateApproval(transferAccountsApprovalDTO);
}
@Override
public ServiceResponse<Void> smsInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
transferAccountsApprovalDTO.setOrderType(OrderTypeEnum.SHORT_MESSAGE_PACKAGE.getCode());
return initiateApproval(transferAccountsApprovalDTO);
}
@Override
public ServiceResponse<Void> serviceInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
transferAccountsApprovalDTO.setOrderType(OrderTypeEnum.SERVICE.getCode());
return initiateApproval(transferAccountsApprovalDTO);
}
@Override
public ServiceResponse<Void> extensionPackageInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
transferAccountsApprovalDTO.setOrderType(OrderTypeEnum.EXTENSION_PACKAGE.getCode());
return initiateApproval(transferAccountsApprovalDTO);
}
@Override
public ServiceResponse<Void> packageInitiateApproval(TransferAccountsApprovalDTO transferAccountsApprovalDTO) {
transferAccountsApprovalDTO.setOrderType(OrderTypeEnum.PACKAGE.getCode());
return initiateApproval(transferAccountsApprovalDTO);
}
@Override
public ServiceResponse<TransferAccountsApprovalDTO> getById(Integer transferApprovalId) {
LOGGER.info(SERVICE_NAME + "-getById:{}", transferApprovalId);
TabTransferAccountsApproval tab = transferAccountsApprovalService.getById(transferApprovalId);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "转账审批主键有误");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(TransferAccountsApprovalDTO.class, tab));
}
@Override
public ServiceResponse<TransferAccountsApprovalDTO> getByOrderNumber(String orderNumber) {
TabTransferAccountsApproval tab = transferAccountsApprovalService.getByOrderNumber(orderNumber);
// if (tab == null) {
// return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "订单流水号有误,查询不到数据");
// }
return ServiceResponse.success(EntityUtil.changeEntityNew(TransferAccountsApprovalDTO.class, tab));
}
@Override
public ServiceResponse<Void> agreeApproval(Integer transferApprovalId, Double accountAmount, OperationUserInfoDTO userInfoDTO) {
TabTransferAccountsApproval tab = transferAccountsApprovalService.getById(transferApprovalId);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "转账审批主键有误");
}
if (accountAmount == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "到账金额不能为空");
}
TransferAccountsApprovalDTO dto = new TransferAccountsApprovalDTO();
dto.setTransferApprovalId(transferApprovalId);
dto.setAccountAmount(accountAmount);
dto.setBadAmount(tab.getPlannedAmount() - accountAmount);
dto.setApprovalStatus(TransferAccountApprovalStatusEnum.AGREE.getCode());
// 审批人等信息获取插入
operationUserInfo(dto, userInfoDTO);
//回调所需参数
tab.setAccountAmount(accountAmount);
tab.setBadAmount(tab.getPlannedAmount() - accountAmount);
tab.setApprovalStatus(TransferAccountApprovalStatusEnum.AGREE.getCode());
tab.setApprovalTime(new Date());
callBack(tab);
transferAccountsApprovalService.updateTransferAccountsApproval(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> rejectApproval(Integer transferApprovalId, OperationUserInfoDTO userInfoDTO) {
TabTransferAccountsApproval tab = transferAccountsApprovalService.getById(transferApprovalId);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "转账审批主键有误");
}
TransferAccountsApprovalDTO dto = new TransferAccountsApprovalDTO();
dto.setTransferApprovalId(transferApprovalId);
dto.setApprovalStatus(TransferAccountApprovalStatusEnum.REJECT.getCode());
// 审批人等信息获取插入
operationUserInfo(dto, userInfoDTO);
//回调所需参数
tab.setApprovalStatus(TransferAccountApprovalStatusEnum.REJECT.getCode());
tab.setApprovalTime(new Date());
callBack(tab);
transferAccountsApprovalService.updateTransferAccountsApproval(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> cancelApproval(String orderSerialNumber) {
TabTransferAccountsApproval tab = transferAccountsApprovalService.getByOrderNumber(orderSerialNumber);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "订单流水号有误");
}
if (tab.getApprovalStatus().intValue() != TransferAccountApprovalStatusEnum.TO_BE_APPROVED.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "此订单已审核,不能取消");
}
updateCancelApproval(tab.getTransferApprovalId());
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> cancelApproval(Integer transferApprovalId) {
TabTransferAccountsApproval tab = transferAccountsApprovalService.getById(transferApprovalId);
if (tab == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "转账审批主键有误");
}
if (tab.getApprovalStatus().intValue() != TransferAccountApprovalStatusEnum.TO_BE_APPROVED.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "此订单已审核,不能取消");
}
updateCancelApproval(transferApprovalId);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Page<TransferAccountsApprovalDTO>> listTransferAccountsApproval(TransferListQueryQO params) {
com.github.pagehelper.Page page = transferAccountsApprovalService.listTransferAccountsApproval(params);
Page<TransferAccountsApprovalDTO> resultPage = PageHelperUtils.changePageHelperToCurrentPage(page, TransferAccountsApprovalDTO.class);
return ServiceResponse.success(resultPage);
}
@Override
public ServiceResponse<List<TransferAccountsApprovalDTO>> listByOrderSerialNumber(List<String> orderSerialNumberList) {
List<TabTransferAccountsApproval> list = transferAccountsApprovalService.listByOrderSerialNumber(orderSerialNumberList);
return ServiceResponse.success(EntityUtil.changeEntityListNew(TransferAccountsApprovalDTO.class, list));
}
/**
* 状态改为取消
* @Title: updateCancelApproval

* @Description:

 * @author guojuxing
* @param transferApprovalId

* @return void


 */
private void updateCancelApproval(Integer transferApprovalId) {
TransferAccountsApprovalDTO dto = new TransferAccountsApprovalDTO();
dto.setTransferApprovalId(transferApprovalId);
dto.setApprovalStatus(TransferAccountApprovalStatusEnum.CANCEL.getCode());
transferAccountsApprovalService.updateTransferAccountsApproval(dto);
}
private void callBack(TabTransferAccountsApproval tab) {
LOGGER.info("转账审批回调:{}" ,JSONObject.toJSONString(tab));
int orderType = tab.getOrderType().intValue();
boolean isBilling = orderType == OrderTypeEnum.RECHARGE.getCode() ||
orderType == OrderTypeEnum.SHORT_MESSAGE_PACKAGE.getCode();
String interfaceUrl;
String method;
if (isBilling) {
interfaceUrl = "com.gic.enterprise.service.BillingPayInfoApiService";
method = "offlineCallBack";
} else {
//服务类型
interfaceUrl = "com.gic.open.api.service.market.PayCallbackApiService";
method = "payCallbackTransfer";
}
//回调
AsyncCallbackUtils.callBack(tab, interfaceUrl, method);
}
private void operationUserInfo(TransferAccountsApprovalDTO dto, OperationUserInfoDTO userInfoDTO) {
dto.setApprovalId(userInfoDTO.getId().toString());
dto.setApprovalName(userInfoDTO.getRealName());
dto.setApprovalPhone(userInfoDTO.getUserMobile());
dto.setApprovalTime(new Date());
}
}
......@@ -15,4 +15,15 @@
<dubbo:protocol name="dubbo" port="20330"/>
<!--转账审批-->
<dubbo:service interface="com.gic.finance.service.TransferAccountsApprovalApiService" ref="transferAccountsApprovalApiService" timeout="6000" />
<!--发票管理-->
<dubbo:service interface="com.gic.finance.service.InvoiceManageApiService" ref="invoiceManageApiService" timeout="6000" />
<!--开票户信息-->
<dubbo:service interface="com.gic.finance.service.InvoiceAccountApiService" ref="invoiceAccountApiService" timeout="6000" />
<!--打款户信息-->
<dubbo:service interface="com.gic.finance.service.PayAccountApiService" ref="payAccountApiService" timeout="6000" />
<!--提现管理-->
<dubbo:service interface="com.gic.finance.service.CashWithdrawalApiService" ref="cashWithdrawalApiService" timeout="6000" />
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.finance.dao.mapper.TabCashWithdrawalMapper">
<resultMap id="BaseResultMap" type="com.gic.finance.entity.TabCashWithdrawal">
<id column="cash_withdrawal_id" jdbcType="INTEGER" property="cashWithdrawalId" />
<result column="cash_withdrawal_serial_number" jdbcType="VARCHAR" property="cashWithdrawalSerialNumber" />
<result column="apply_type" jdbcType="INTEGER" property="applyType" />
<result column="cash_withdrawal_amount" jdbcType="DOUBLE" property="cashWithdrawalAmount" />
<result column="cash_withdrawal_status" jdbcType="INTEGER" property="cashWithdrawalStatus" />
<result column="reject_reason" jdbcType="VARCHAR" property="rejectReason" />
<result column="operator_id" jdbcType="VARCHAR" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
<result column="operator_time" jdbcType="TIMESTAMP" property="operatorTime" />
<result column="operator_phone" jdbcType="VARCHAR" property="operatorPhone" />
<result column="operator_phone_area_code" jdbcType="VARCHAR" property="operatorPhoneAreaCode" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="bank_serial_number" jdbcType="VARCHAR" property="bankSerialNumber" />
<result column="receipt_name" jdbcType="VARCHAR" property="receiptName" />
<result column="receipt_branch_name" jdbcType="VARCHAR" property="receiptBranchName" />
<result column="receipt_bank" jdbcType="VARCHAR" property="receiptBank" />
<result column="receipt_bank_account" jdbcType="VARCHAR" property="receiptBankAccount" />
<result column="pay_id" jdbcType="INTEGER" property="payId" />
<result column="express_mail_name" jdbcType="VARCHAR" property="expressMailName" />
<result column="express_mail_number" jdbcType="VARCHAR" property="expressMailNumber" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="pay_account" jdbcType="VARCHAR" property="payAccount" />
<result column="pay_account_name" jdbcType="VARCHAR" property="payAccountName" />
<result column="pay_account_branch_name" jdbcType="VARCHAR" property="payAccountBranchName" />
<result column="pay_account_bank" jdbcType="VARCHAR" property="payAccountBank" />
<result column="cash_provider" jdbcType="VARCHAR" property="cashProvider" />
</resultMap>
<sql id="Base_Column_List">
cash_withdrawal_id, cash_withdrawal_serial_number, apply_type, cash_withdrawal_amount,
cash_withdrawal_status, reject_reason, operator_id, operator_name, operator_time,
operator_phone, operator_phone_area_code, enterprise_id, bank_serial_number, receipt_name,
receipt_branch_name, receipt_bank, receipt_bank_account, pay_id, express_mail_name,
express_mail_number, create_time, update_time, pay_account_name, pay_account_branch_name,
pay_account_bank, pay_account, cash_provider
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_cash_withdrawal
where cash_withdrawal_id = #{cashWithdrawalId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_cash_withdrawal
where cash_withdrawal_id = #{cashWithdrawalId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabCashWithdrawal">
insert into tab_cash_withdrawal (cash_withdrawal_id, cash_withdrawal_serial_number,
apply_type, cash_withdrawal_amount, cash_withdrawal_status,
reject_reason, operator_id, operator_name,
operator_time, operator_phone, operator_phone_area_code,
enterprise_id, bank_serial_number, receipt_name,
receipt_branch_name, receipt_bank, receipt_bank_account,
pay_id, express_mail_name, express_mail_number,
create_time, update_time, pay_account_name, pay_account_branch_name,
pay_account_bank, pay_account, cash_provider)
values (#{cashWithdrawalId,jdbcType=INTEGER}, #{cashWithdrawalSerialNumber,jdbcType=VARCHAR},
#{applyType,jdbcType=INTEGER}, #{cashWithdrawalAmount,jdbcType=DOUBLE}, #{cashWithdrawalStatus,jdbcType=INTEGER},
#{rejectReason,jdbcType=VARCHAR}, #{operatorId,jdbcType=VARCHAR}, #{operatorName,jdbcType=VARCHAR},
#{operatorTime,jdbcType=TIMESTAMP}, #{operatorPhone,jdbcType=VARCHAR}, #{operatorPhoneAreaCode,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{bankSerialNumber,jdbcType=VARCHAR}, #{receiptName,jdbcType=VARCHAR},
#{receiptBranchName,jdbcType=VARCHAR}, #{receiptBank,jdbcType=VARCHAR}, #{receiptBankAccount,jdbcType=VARCHAR},
#{payId,jdbcType=INTEGER}, #{expressMailName,jdbcType=VARCHAR}, #{expressMailNumber,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{payAccountName,jdbcType=VARCHAR},
#{payAccountBranchName,jdbcType=VARCHAR}, #{payAccountBank,jdbcType=VARCHAR}, #{payAccount,jdbcType=VARCHAR},
#{cashProvider,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabCashWithdrawal">
insert into tab_cash_withdrawal
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cashWithdrawalId != null">
cash_withdrawal_id,
</if>
<if test="cashWithdrawalSerialNumber != null">
cash_withdrawal_serial_number,
</if>
<if test="applyType != null">
apply_type,
</if>
<if test="cashWithdrawalAmount != null">
cash_withdrawal_amount,
</if>
<if test="cashWithdrawalStatus != null">
cash_withdrawal_status,
</if>
<if test="rejectReason != null">
reject_reason,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="operatorName != null">
operator_name,
</if>
<if test="operatorTime != null">
operator_time,
</if>
<if test="operatorPhone != null">
operator_phone,
</if>
<if test="operatorPhoneAreaCode != null">
operator_phone_area_code,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="bankSerialNumber != null">
bank_serial_number,
</if>
<if test="receiptName != null">
receipt_name,
</if>
<if test="receiptBranchName != null">
receipt_branch_name,
</if>
<if test="receiptBank != null">
receipt_bank,
</if>
<if test="receiptBankAccount != null">
receipt_bank_account,
</if>
<if test="payId != null">
pay_id,
</if>
<if test="expressMailName != null">
express_mail_name,
</if>
<if test="expressMailNumber != null">
express_mail_number,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="payAccountName != null">
pay_account_name,
</if>
<if test="payAccountBranchName != null">
pay_account_branch_name,
</if>
<if test="payAccountBank != null">
pay_account_bank,
</if>
<if test="payAccount != null">
pay_account,
</if>
<if test="cashProvider != null">
cash_provider,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cashWithdrawalId != null">
#{cashWithdrawalId,jdbcType=INTEGER},
</if>
<if test="cashWithdrawalSerialNumber != null">
#{cashWithdrawalSerialNumber,jdbcType=VARCHAR},
</if>
<if test="applyType != null">
#{applyType,jdbcType=INTEGER},
</if>
<if test="cashWithdrawalAmount != null">
#{cashWithdrawalAmount,jdbcType=DOUBLE},
</if>
<if test="cashWithdrawalStatus != null">
#{cashWithdrawalStatus,jdbcType=INTEGER},
</if>
<if test="rejectReason != null">
#{rejectReason,jdbcType=VARCHAR},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=VARCHAR},
</if>
<if test="operatorName != null">
#{operatorName,jdbcType=VARCHAR},
</if>
<if test="operatorTime != null">
#{operatorTime,jdbcType=TIMESTAMP},
</if>
<if test="operatorPhone != null">
#{operatorPhone,jdbcType=VARCHAR},
</if>
<if test="operatorPhoneAreaCode != null">
#{operatorPhoneAreaCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="bankSerialNumber != null">
#{bankSerialNumber,jdbcType=VARCHAR},
</if>
<if test="receiptName != null">
#{receiptName,jdbcType=VARCHAR},
</if>
<if test="receiptBranchName != null">
#{receiptBranchName,jdbcType=VARCHAR},
</if>
<if test="receiptBank != null">
#{receiptBank,jdbcType=VARCHAR},
</if>
<if test="receiptBankAccount != null">
#{receiptBankAccount,jdbcType=VARCHAR},
</if>
<if test="payId != null">
#{payId,jdbcType=INTEGER},
</if>
<if test="expressMailName != null">
#{expressMailName,jdbcType=VARCHAR},
</if>
<if test="expressMailNumber != null">
#{expressMailNumber,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="payAccountBank != null">
#{payAccountBank,jdbcType=VARCHAR},
</if>
<if test="payAccountBranchName != null">
#{payAccountBranchName,jdbcType=VARCHAR},
</if>
<if test="payAccountBank != null">
#{payAccountBank,jdbcType=VARCHAR},
</if>
<if test="payAccount != null">
#{payAccount,jdbcType=VARCHAR},
</if>
<if test="cashProvider != null">
#{cashProvider,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabCashWithdrawal">
update tab_cash_withdrawal
<set>
<if test="cashWithdrawalSerialNumber != null">
cash_withdrawal_serial_number = #{cashWithdrawalSerialNumber,jdbcType=VARCHAR},
</if>
<if test="applyType != null">
apply_type = #{applyType,jdbcType=INTEGER},
</if>
<if test="cashWithdrawalAmount != null">
cash_withdrawal_amount = #{cashWithdrawalAmount,jdbcType=DOUBLE},
</if>
<if test="cashWithdrawalStatus != null">
cash_withdrawal_status = #{cashWithdrawalStatus,jdbcType=INTEGER},
</if>
<if test="rejectReason != null">
reject_reason = #{rejectReason,jdbcType=VARCHAR},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=VARCHAR},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=VARCHAR},
</if>
<if test="operatorTime != null">
operator_time = #{operatorTime,jdbcType=TIMESTAMP},
</if>
<if test="operatorPhone != null">
operator_phone = #{operatorPhone,jdbcType=VARCHAR},
</if>
<if test="operatorPhoneAreaCode != null">
operator_phone_area_code = #{operatorPhoneAreaCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="bankSerialNumber != null">
bank_serial_number = #{bankSerialNumber,jdbcType=VARCHAR},
</if>
<if test="receiptName != null">
receipt_name = #{receiptName,jdbcType=VARCHAR},
</if>
<if test="receiptBranchName != null">
receipt_branch_name = #{receiptBranchName,jdbcType=VARCHAR},
</if>
<if test="receiptBank != null">
receipt_bank = #{receiptBank,jdbcType=VARCHAR},
</if>
<if test="receiptBankAccount != null">
receipt_bank_account = #{receiptBankAccount,jdbcType=VARCHAR},
</if>
<if test="payId != null">
pay_id = #{payId,jdbcType=INTEGER},
</if>
<if test="expressMailName != null">
express_mail_name = #{expressMailName,jdbcType=VARCHAR},
</if>
<if test="expressMailNumber != null">
express_mail_number = #{expressMailNumber,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="payAccountName != null">
pay_account_name = #{payAccountName,jdbcType=VARCHAR},
</if>
<if test="payAccountBranchName != null">
pay_account_branch_name = #{payAccountBranchName,jdbcType=VARCHAR},
</if>
<if test="payAccountBank != null">
pay_account_bank = #{payAccountBank,jdbcType=VARCHAR},
</if>
<if test="payAccount != null">
pay_account = #{payAccount,jdbcType=VARCHAR},
</if>
<if test="cashProvider != null">
cash_provider = #{cashProvider,jdbcType=VARCHAR},
</if>
</set>
where cash_withdrawal_id = #{cashWithdrawalId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.finance.entity.TabCashWithdrawal">
update tab_cash_withdrawal
set cash_withdrawal_serial_number = #{cashWithdrawalSerialNumber,jdbcType=VARCHAR},
apply_type = #{applyType,jdbcType=INTEGER},
cash_withdrawal_amount = #{cashWithdrawalAmount,jdbcType=DOUBLE},
cash_withdrawal_status = #{cashWithdrawalStatus,jdbcType=INTEGER},
reject_reason = #{rejectReason,jdbcType=VARCHAR},
operator_id = #{operatorId,jdbcType=VARCHAR},
operator_name = #{operatorName,jdbcType=VARCHAR},
operator_time = #{operatorTime,jdbcType=TIMESTAMP},
operator_phone = #{operatorPhone,jdbcType=VARCHAR},
operator_phone_area_code = #{operatorPhoneAreaCode,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
bank_serial_number = #{bankSerialNumber,jdbcType=VARCHAR},
receipt_name = #{receiptName,jdbcType=VARCHAR},
receipt_branch_name = #{receiptBranchName,jdbcType=VARCHAR},
receipt_bank = #{receiptBank,jdbcType=VARCHAR},
receipt_bank_account = #{receiptBankAccount,jdbcType=VARCHAR},
pay_id = #{payId,jdbcType=INTEGER},
express_mail_name = #{expressMailName,jdbcType=VARCHAR},
express_mail_number = #{expressMailNumber,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
pay_account_name = #{payAccountName,jdbcType=VARCHAR},
pay_account_branch_name = #{payAccountBranchName,jdbcType=VARCHAR},
pay_account_bank = #{payAccountBank,jdbcType=VARCHAR},
pay_account = #{payAccount,jdbcType=VARCHAR},
cash_provider = #{cashProvider,jdbcType=VARCHAR}
where cash_withdrawal_id = #{cashWithdrawalId,jdbcType=INTEGER}
</update>
<select id="listCashWithdrawal" parameterType="com.gic.finance.qo.CashWithdrawalQueryListQO" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_cash_withdrawal
where 1=1
<if test="search != null and search != '' ">
and ( cash_withdrawal_serial_number like concat('%', #{search}, '%') or operator_name like concat('%', #{search}, '%') )
</if>
<if test="cashWithdrawalStatus != null">
and cash_withdrawal_status = #{cashWithdrawalStatus}
</if>
<if test="applyType != null">
and apply_type = #{applyType}
</if>
order by create_time desc
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.finance.dao.mapper.TabInvoiceAccountMapper">
<resultMap id="BaseResultMap" type="com.gic.finance.entity.TabInvoiceAccount">
<id column="invoice_account_id" jdbcType="INTEGER" property="invoiceAccountId" />
<result column="account_name" jdbcType="VARCHAR" property="accountName" />
<result column="tax_number" jdbcType="VARCHAR" property="taxNumber" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="bank" jdbcType="VARCHAR" property="bank" />
<result column="account_phone" jdbcType="VARCHAR" property="accountPhone" />
<result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
invoice_account_id, account_name, tax_number, address, bank, account_phone, bank_account,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_invoice_account
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_invoice_account
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabInvoiceAccount">
insert into tab_invoice_account (invoice_account_id, account_name, tax_number,
address, bank, account_phone,
bank_account, status, create_time,
update_time)
values (#{invoiceAccountId,jdbcType=INTEGER}, #{accountName,jdbcType=VARCHAR}, #{taxNumber,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR}, #{accountPhone,jdbcType=VARCHAR},
#{bankAccount,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabInvoiceAccount">
insert into tab_invoice_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="invoiceAccountId != null">
invoice_account_id,
</if>
<if test="accountName != null">
account_name,
</if>
<if test="taxNumber != null">
tax_number,
</if>
<if test="address != null">
address,
</if>
<if test="bank != null">
bank,
</if>
<if test="accountPhone != null">
account_phone,
</if>
<if test="bankAccount != null">
bank_account,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="invoiceAccountId != null">
#{invoiceAccountId,jdbcType=INTEGER},
</if>
<if test="accountName != null">
#{accountName,jdbcType=VARCHAR},
</if>
<if test="taxNumber != null">
#{taxNumber,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="bank != null">
#{bank,jdbcType=VARCHAR},
</if>
<if test="accountPhone != null">
#{accountPhone,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
#{bankAccount,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabInvoiceAccount">
update tab_invoice_account
<set>
<if test="accountName != null">
account_name = #{accountName,jdbcType=VARCHAR},
</if>
<if test="taxNumber != null">
tax_number = #{taxNumber,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="bank != null">
bank = #{bank,jdbcType=VARCHAR},
</if>
<if test="accountPhone != null">
account_phone = #{accountPhone,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
bank_account = #{bankAccount,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.finance.entity.TabInvoiceAccount">
update tab_invoice_account
set account_name = #{accountName,jdbcType=VARCHAR},
tax_number = #{taxNumber,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
bank = #{bank,jdbcType=VARCHAR},
account_phone = #{accountPhone,jdbcType=VARCHAR},
bank_account = #{bankAccount,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where invoice_account_id = #{invoiceAccountId,jdbcType=INTEGER}
</update>
<select id="getEnable" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_invoice_account
where status = 1
</select>
<update id="closeStatus">
update tab_invoice_account set status = 2
</update>
<select id="listInvoiceAccount" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_invoice_account
where status != 0
order by status
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.finance.dao.mapper.TabInvoiceManageMapper">
<resultMap id="BaseResultMap" type="com.gic.finance.entity.TabInvoiceManage">
<id column="invoice_manage_id" jdbcType="INTEGER" property="invoiceManageId" />
<result column="invoice_apply_serial" jdbcType="VARCHAR" property="invoiceApplySerial" />
<result column="platform_type" jdbcType="INTEGER" property="platformType" />
<result column="invoice_type" jdbcType="INTEGER" property="invoiceType" />
<result column="billing_amount" jdbcType="DOUBLE" property="billingAmount" />
<result column="invoice_status" jdbcType="INTEGER" property="invoiceStatus" />
<result column="reject_reason" jdbcType="VARCHAR" property="rejectReason" />
<result column="operator_id" jdbcType="VARCHAR" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
<result column="operator_time" jdbcType="TIMESTAMP" property="operatorTime" />
<result column="operator_phone" jdbcType="VARCHAR" property="operatorPhone" />
<result column="operator_phone_area_code" jdbcType="VARCHAR" property="operatorPhoneAreaCode" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="account_name" jdbcType="VARCHAR" property="accountName" />
<result column="tax_number" jdbcType="VARCHAR" property="taxNumber" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="bank" jdbcType="VARCHAR" property="bank" />
<result column="account_phone" jdbcType="VARCHAR" property="accountPhone" />
<result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
<result column="shipping_name" jdbcType="VARCHAR" property="shippingName" />
<result column="shipping_phone" jdbcType="VARCHAR" property="shippingPhone" />
<result column="shipping_address" jdbcType="VARCHAR" property="shippingAddress" />
<result column="invoicer_id" jdbcType="INTEGER" property="invoicerId" />
<result column="express_mail_name" jdbcType="VARCHAR" property="expressMailName" />
<result column="express_mail_number" jdbcType="VARCHAR" property="expressMailNumber" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="initiator" jdbcType="VARCHAR" property="initiator" />
<result column="initiate_type" jdbcType="INTEGER" property="initiateType" />
</resultMap>
<sql id="Base_Column_List">
invoice_manage_id, invoice_apply_serial, platform_type, invoice_type, billing_amount,
invoice_status, reject_reason, operator_id, operator_name, operator_time, operator_phone,
operator_phone_area_code, enterprise_id, enterprise_name, company_name, logo, account_name,
tax_number, address, bank, account_phone, bank_account, shipping_name, shipping_phone,
shipping_address, invoicer_id, express_mail_name, express_mail_number, create_time,
update_time, initiator, initiate_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_invoice_manage
where invoice_manage_id = #{invoiceManageId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_invoice_manage
where invoice_manage_id = #{invoiceManageId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabInvoiceManage">
insert into tab_invoice_manage (invoice_manage_id, invoice_apply_serial,
platform_type, invoice_type, billing_amount,
invoice_status, reject_reason, operator_id,
operator_name, operator_time, operator_phone,
operator_phone_area_code, enterprise_id, enterprise_name,
company_name, logo, account_name,
tax_number, address, bank,
account_phone, bank_account, shipping_name,
shipping_phone, shipping_address, invoicer_id,
express_mail_name, express_mail_number, create_time,
update_time, initiator, initiate_type
)
values (#{invoiceManageId,jdbcType=INTEGER}, #{invoiceApplySerial,jdbcType=VARCHAR},
#{platformType,jdbcType=INTEGER}, #{invoiceType,jdbcType=INTEGER}, #{billingAmount,jdbcType=DOUBLE},
#{invoiceStatus,jdbcType=INTEGER}, #{rejectReason,jdbcType=VARCHAR}, #{operatorId,jdbcType=VARCHAR},
#{operatorName,jdbcType=VARCHAR}, #{operatorTime,jdbcType=TIMESTAMP}, #{operatorPhone,jdbcType=VARCHAR},
#{operatorPhoneAreaCode,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{enterpriseName,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR},
#{taxNumber,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR},
#{accountPhone,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, #{shippingName,jdbcType=VARCHAR},
#{shippingPhone,jdbcType=VARCHAR}, #{shippingAddress,jdbcType=VARCHAR}, #{invoicerId,jdbcType=INTEGER},
#{expressMailName,jdbcType=VARCHAR}, #{expressMailNumber,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{initiator,jdbcType=VARCHAR}, #{initiateType,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabInvoiceManage">
insert into tab_invoice_manage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="invoiceManageId != null">
invoice_manage_id,
</if>
<if test="invoiceApplySerial != null">
invoice_apply_serial,
</if>
<if test="platformType != null">
platform_type,
</if>
<if test="invoiceType != null">
invoice_type,
</if>
<if test="billingAmount != null">
billing_amount,
</if>
<if test="invoiceStatus != null">
invoice_status,
</if>
<if test="rejectReason != null">
reject_reason,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="operatorName != null">
operator_name,
</if>
<if test="operatorTime != null">
operator_time,
</if>
<if test="operatorPhone != null">
operator_phone,
</if>
<if test="operatorPhoneAreaCode != null">
operator_phone_area_code,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseName != null">
enterprise_name,
</if>
<if test="companyName != null">
company_name,
</if>
<if test="logo != null">
logo,
</if>
<if test="accountName != null">
account_name,
</if>
<if test="taxNumber != null">
tax_number,
</if>
<if test="address != null">
address,
</if>
<if test="bank != null">
bank,
</if>
<if test="accountPhone != null">
account_phone,
</if>
<if test="bankAccount != null">
bank_account,
</if>
<if test="shippingName != null">
shipping_name,
</if>
<if test="shippingPhone != null">
shipping_phone,
</if>
<if test="shippingAddress != null">
shipping_address,
</if>
<if test="invoicerId != null">
invoicer_id,
</if>
<if test="expressMailName != null">
express_mail_name,
</if>
<if test="expressMailNumber != null">
express_mail_number,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="initiator != null">
initiator,
</if>
<if test="initiateType != null">
initiate_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="invoiceManageId != null">
#{invoiceManageId,jdbcType=INTEGER},
</if>
<if test="invoiceApplySerial != null">
#{invoiceApplySerial,jdbcType=VARCHAR},
</if>
<if test="platformType != null">
#{platformType,jdbcType=INTEGER},
</if>
<if test="invoiceType != null">
#{invoiceType,jdbcType=INTEGER},
</if>
<if test="billingAmount != null">
#{billingAmount,jdbcType=DOUBLE},
</if>
<if test="invoiceStatus != null">
#{invoiceStatus,jdbcType=INTEGER},
</if>
<if test="rejectReason != null">
#{rejectReason,jdbcType=VARCHAR},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=VARCHAR},
</if>
<if test="operatorName != null">
#{operatorName,jdbcType=VARCHAR},
</if>
<if test="operatorTime != null">
#{operatorTime,jdbcType=TIMESTAMP},
</if>
<if test="operatorPhone != null">
#{operatorPhone,jdbcType=VARCHAR},
</if>
<if test="operatorPhoneAreaCode != null">
#{operatorPhoneAreaCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseName != null">
#{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="accountName != null">
#{accountName,jdbcType=VARCHAR},
</if>
<if test="taxNumber != null">
#{taxNumber,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="bank != null">
#{bank,jdbcType=VARCHAR},
</if>
<if test="accountPhone != null">
#{accountPhone,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
#{bankAccount,jdbcType=VARCHAR},
</if>
<if test="shippingName != null">
#{shippingName,jdbcType=VARCHAR},
</if>
<if test="shippingPhone != null">
#{shippingPhone,jdbcType=VARCHAR},
</if>
<if test="shippingAddress != null">
#{shippingAddress,jdbcType=VARCHAR},
</if>
<if test="invoicerId != null">
#{invoicerId,jdbcType=INTEGER},
</if>
<if test="expressMailName != null">
#{expressMailName,jdbcType=VARCHAR},
</if>
<if test="expressMailNumber != null">
#{expressMailNumber,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="initiator != null">
#{initiator,jdbcType=VARCHAR},
</if>
<if test="initiateType != null">
#{initiateType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabInvoiceManage">
update tab_invoice_manage
<set>
<if test="invoiceApplySerial != null">
invoice_apply_serial = #{invoiceApplySerial,jdbcType=VARCHAR},
</if>
<if test="platformType != null">
platform_type = #{platformType,jdbcType=INTEGER},
</if>
<if test="invoiceType != null">
invoice_type = #{invoiceType,jdbcType=INTEGER},
</if>
<if test="billingAmount != null">
billing_amount = #{billingAmount,jdbcType=DOUBLE},
</if>
<if test="invoiceStatus != null">
invoice_status = #{invoiceStatus,jdbcType=INTEGER},
</if>
<if test="rejectReason != null">
reject_reason = #{rejectReason,jdbcType=VARCHAR},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=VARCHAR},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=VARCHAR},
</if>
<if test="operatorTime != null">
operator_time = #{operatorTime,jdbcType=TIMESTAMP},
</if>
<if test="operatorPhone != null">
operator_phone = #{operatorPhone,jdbcType=VARCHAR},
</if>
<if test="operatorPhoneAreaCode != null">
operator_phone_area_code = #{operatorPhoneAreaCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseName != null">
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="accountName != null">
account_name = #{accountName,jdbcType=VARCHAR},
</if>
<if test="taxNumber != null">
tax_number = #{taxNumber,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="bank != null">
bank = #{bank,jdbcType=VARCHAR},
</if>
<if test="accountPhone != null">
account_phone = #{accountPhone,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
bank_account = #{bankAccount,jdbcType=VARCHAR},
</if>
<if test="shippingName != null">
shipping_name = #{shippingName,jdbcType=VARCHAR},
</if>
<if test="shippingPhone != null">
shipping_phone = #{shippingPhone,jdbcType=VARCHAR},
</if>
<if test="shippingAddress != null">
shipping_address = #{shippingAddress,jdbcType=VARCHAR},
</if>
<if test="invoicerId != null">
invoicer_id = #{invoicerId,jdbcType=INTEGER},
</if>
<if test="expressMailName != null">
express_mail_name = #{expressMailName,jdbcType=VARCHAR},
</if>
<if test="expressMailNumber != null">
express_mail_number = #{expressMailNumber,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="initiator != null">
initiator = #{initiator,jdbcType=VARCHAR},
</if>
<if test="initiateType != null">
initiate_type = #{initiateType,jdbcType=INTEGER},
</if>
</set>
where invoice_manage_id = #{invoiceManageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.finance.entity.TabInvoiceManage">
update tab_invoice_manage
set invoice_apply_serial = #{invoiceApplySerial,jdbcType=VARCHAR},
platform_type = #{platformType,jdbcType=INTEGER},
invoice_type = #{invoiceType,jdbcType=INTEGER},
billing_amount = #{billingAmount,jdbcType=DOUBLE},
invoice_status = #{invoiceStatus,jdbcType=INTEGER},
reject_reason = #{rejectReason,jdbcType=VARCHAR},
operator_id = #{operatorId,jdbcType=VARCHAR},
operator_name = #{operatorName,jdbcType=VARCHAR},
operator_time = #{operatorTime,jdbcType=TIMESTAMP},
operator_phone = #{operatorPhone,jdbcType=VARCHAR},
operator_phone_area_code = #{operatorPhoneAreaCode,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
account_name = #{accountName,jdbcType=VARCHAR},
tax_number = #{taxNumber,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
bank = #{bank,jdbcType=VARCHAR},
account_phone = #{accountPhone,jdbcType=VARCHAR},
bank_account = #{bankAccount,jdbcType=VARCHAR},
shipping_name = #{shippingName,jdbcType=VARCHAR},
shipping_phone = #{shippingPhone,jdbcType=VARCHAR},
shipping_address = #{shippingAddress,jdbcType=VARCHAR},
invoicer_id = #{invoicerId,jdbcType=INTEGER},
express_mail_name = #{expressMailName,jdbcType=VARCHAR},
express_mail_number = #{expressMailNumber,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
initiator = #{initiator,jdbcType=VARCHAR},
initiate_type = #{initiateType,jdbcType=INTEGER}
where invoice_manage_id = #{invoiceManageId,jdbcType=INTEGER}
</update>
<select id="listInvoiceManage" parameterType="com.gic.finance.qo.InvoiceManageListQueryQO" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_invoice_manage
where 1=1
<if test="search != null and search != '' ">
and ( enterprise_name like concat('%', #{search}, '%') or company_name like concat('%', #{search}, '%')
or invoice_apply_serial like concat('%', #{search}, '%'))
</if>
<if test="invoiceStatus != null">
and invoice_status = #{invoiceStatus}
</if>
<if test="platformType != null">
and platform_type = #{platformType}
</if>
<if test="invoiceType != null">
and invoice_type = #{invoiceType}
</if>
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="invoiceStatusStr != null">
and invoice_status in (#{invoiceStatusStr})
</if>
order by create_time desc
</select>
<select id="selectInvoiceByInitiator" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_invoice_manage
where initiator = #{initiator}
and initiate_type = #{initiateType}
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.finance.dao.mapper.TabPayAccountMapper">
<resultMap id="BaseResultMap" type="com.gic.finance.entity.TabPayAccount">
<id column="pay_account_id" jdbcType="INTEGER" property="payAccountId" />
<result column="account_name" jdbcType="VARCHAR" property="accountName" />
<result column="bank" jdbcType="VARCHAR" property="bank" />
<result column="branch_name" jdbcType="VARCHAR" property="branchName" />
<result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
pay_account_id, account_name, bank, branch_name, bank_account, status, sort, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_pay_account
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_pay_account
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabPayAccount">
insert into tab_pay_account (pay_account_id, account_name, bank,
branch_name, bank_account, status,
sort, create_time, update_time
)
values (#{payAccountId,jdbcType=INTEGER}, #{accountName,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR},
#{branchName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabPayAccount">
insert into tab_pay_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payAccountId != null">
pay_account_id,
</if>
<if test="accountName != null">
account_name,
</if>
<if test="bank != null">
bank,
</if>
<if test="branchName != null">
branch_name,
</if>
<if test="bankAccount != null">
bank_account,
</if>
<if test="status != null">
status,
</if>
<if test="sort != null">
sort,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payAccountId != null">
#{payAccountId,jdbcType=INTEGER},
</if>
<if test="accountName != null">
#{accountName,jdbcType=VARCHAR},
</if>
<if test="bank != null">
#{bank,jdbcType=VARCHAR},
</if>
<if test="branchName != null">
#{branchName,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
#{bankAccount,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabPayAccount">
update tab_pay_account
<set>
<if test="accountName != null">
account_name = #{accountName,jdbcType=VARCHAR},
</if>
<if test="bank != null">
bank = #{bank,jdbcType=VARCHAR},
</if>
<if test="branchName != null">
branch_name = #{branchName,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
bank_account = #{bankAccount,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.finance.entity.TabPayAccount">
update tab_pay_account
set account_name = #{accountName,jdbcType=VARCHAR},
bank = #{bank,jdbcType=VARCHAR},
branch_name = #{branchName,jdbcType=VARCHAR},
bank_account = #{bankAccount,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where pay_account_id = #{payAccountId,jdbcType=INTEGER}
</update>
<select id="listPayAccount" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_pay_account
where status != 0
order by sort
</select>
<select id="getMaxSort" resultType="int">
select
ifnull(max(sort), 0)
from tab_pay_account
where status != 0
</select>
<select id="getMinSort" resultType="int">
select
ifnull(min(sort),0)
from tab_pay_account
where status != 0
</select>
<select id="getPreOfSort" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_pay_account
where status != 0
and sort &lt; #{sort}
</select>
<select id="getNextOfSort" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_pay_account
where status != 0
and sort > #{sort}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.finance.dao.mapper.TabTransferAccountsApprovalMapper">
<resultMap id="BaseResultMap" type="com.gic.finance.entity.TabTransferAccountsApproval">
<id column="transfer_approval_id" jdbcType="INTEGER" property="transferApprovalId" />
<result column="order_number" jdbcType="VARCHAR" property="orderNumber" />
<result column="platform_type" jdbcType="INTEGER" property="platformType" />
<result column="initiator_type" jdbcType="INTEGER" property="initiatorType" />
<result column="initiator_name" jdbcType="VARCHAR" property="initiatorName" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="planned_amount" jdbcType="DOUBLE" property="plannedAmount" />
<result column="bad_amount" jdbcType="DOUBLE" property="badAmount" />
<result column="account_amount" jdbcType="DOUBLE" property="accountAmount" />
<result column="verify_code" jdbcType="VARCHAR" property="verifyCode" />
<result column="approval_number" jdbcType="VARCHAR" property="approvalNumber" />
<result column="approval_status" jdbcType="INTEGER" property="approvalStatus" />
<result column="approval_id" jdbcType="VARCHAR" property="approvalId" />
<result column="approval_name" jdbcType="VARCHAR" property="approvalName" />
<result column="approval_time" jdbcType="TIMESTAMP" property="approvalTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="approval_phone" jdbcType="VARCHAR" property="approvalPhone" />
<result column="approval_phone_area_code" jdbcType="VARCHAR" property="approvalPhoneAreaCode" />
<result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="order_type" jdbcType="INTEGER" property="orderType" />
</resultMap>
<sql id="Base_Column_List">
transfer_approval_id, order_number, platform_type, initiator_type, initiator_name,
enterprise_id, planned_amount, bad_amount, account_amount, verify_code, approval_number,
approval_status, approval_id, approval_name, approval_time, create_time, update_time,
approval_phone, approval_phone_area_code, enterprise_name, company_name, logo, order_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_transfer_accounts_approval
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_transfer_accounts_approval
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.finance.entity.TabTransferAccountsApproval">
insert into tab_transfer_accounts_approval (transfer_approval_id, order_number,
platform_type, initiator_type, initiator_name,
enterprise_id, planned_amount, bad_amount,
account_amount, verify_code, approval_number,
approval_status, approval_id, approval_name,
approval_time, create_time, update_time,
approval_phone, approval_phone_area_code, enterprise_name,
company_name, logo, order_type
)
values (#{transferApprovalId,jdbcType=INTEGER}, #{orderNumber,jdbcType=VARCHAR},
#{platformType,jdbcType=INTEGER}, #{initiatorType,jdbcType=INTEGER}, #{initiatorName,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{plannedAmount,jdbcType=DOUBLE}, #{badAmount,jdbcType=DOUBLE},
#{accountAmount,jdbcType=DOUBLE}, #{verifyCode,jdbcType=VARCHAR}, #{approvalNumber,jdbcType=VARCHAR},
#{approvalStatus,jdbcType=INTEGER}, #{approvalId,jdbcType=VARCHAR}, #{approvalName,jdbcType=VARCHAR},
#{approvalTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{approvalPhone,jdbcType=VARCHAR}, #{approvalPhoneAreaCode,jdbcType=VARCHAR}, #{enterpriseName,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.finance.entity.TabTransferAccountsApproval">
insert into tab_transfer_accounts_approval
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="transferApprovalId != null">
transfer_approval_id,
</if>
<if test="orderNumber != null">
order_number,
</if>
<if test="platformType != null">
platform_type,
</if>
<if test="initiatorType != null">
initiator_type,
</if>
<if test="initiatorName != null">
initiator_name,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="plannedAmount != null">
planned_amount,
</if>
<if test="badAmount != null">
bad_amount,
</if>
<if test="accountAmount != null">
account_amount,
</if>
<if test="verifyCode != null">
verify_code,
</if>
<if test="approvalNumber != null">
approval_number,
</if>
<if test="approvalStatus != null">
approval_status,
</if>
<if test="approvalId != null">
approval_id,
</if>
<if test="approvalName != null">
approval_name,
</if>
<if test="approvalTime != null">
approval_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="approvalPhone != null">
approval_phone,
</if>
<if test="approvalPhoneAreaCode != null">
approval_phone_area_code,
</if>
<if test="enterpriseName != null">
enterprise_name,
</if>
<if test="companyName != null">
company_name,
</if>
<if test="logo != null">
logo,
</if>
<if test="orderType != null">
order_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="transferApprovalId != null">
#{transferApprovalId,jdbcType=INTEGER},
</if>
<if test="orderNumber != null">
#{orderNumber,jdbcType=VARCHAR},
</if>
<if test="platformType != null">
#{platformType,jdbcType=INTEGER},
</if>
<if test="initiatorType != null">
#{initiatorType,jdbcType=INTEGER},
</if>
<if test="initiatorName != null">
#{initiatorName,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="plannedAmount != null">
#{plannedAmount,jdbcType=DOUBLE},
</if>
<if test="badAmount != null">
#{badAmount,jdbcType=DOUBLE},
</if>
<if test="accountAmount != null">
#{accountAmount,jdbcType=DOUBLE},
</if>
<if test="verifyCode != null">
#{verifyCode,jdbcType=VARCHAR},
</if>
<if test="approvalNumber != null">
#{approvalNumber,jdbcType=VARCHAR},
</if>
<if test="approvalStatus != null">
#{approvalStatus,jdbcType=INTEGER},
</if>
<if test="approvalId != null">
#{approvalId,jdbcType=VARCHAR},
</if>
<if test="approvalName != null">
#{approvalName,jdbcType=VARCHAR},
</if>
<if test="approvalTime != null">
#{approvalTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="approvalPhone != null">
#{approvalPhone,jdbcType=VARCHAR},
</if>
<if test="approvalPhoneAreaCode != null">
#{approvalPhoneAreaCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseName != null">
#{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
#{orderType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.finance.entity.TabTransferAccountsApproval">
update tab_transfer_accounts_approval
<set>
<if test="orderNumber != null">
order_number = #{orderNumber,jdbcType=VARCHAR},
</if>
<if test="platformType != null">
platform_type = #{platformType,jdbcType=INTEGER},
</if>
<if test="initiatorType != null">
initiator_type = #{initiatorType,jdbcType=INTEGER},
</if>
<if test="initiatorName != null">
initiator_name = #{initiatorName,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="plannedAmount != null">
planned_amount = #{plannedAmount,jdbcType=DOUBLE},
</if>
<if test="badAmount != null">
bad_amount = #{badAmount,jdbcType=DOUBLE},
</if>
<if test="accountAmount != null">
account_amount = #{accountAmount,jdbcType=DOUBLE},
</if>
<if test="verifyCode != null">
verify_code = #{verifyCode,jdbcType=VARCHAR},
</if>
<if test="approvalNumber != null">
approval_number = #{approvalNumber,jdbcType=VARCHAR},
</if>
<if test="approvalStatus != null">
approval_status = #{approvalStatus,jdbcType=INTEGER},
</if>
<if test="approvalId != null">
approval_id = #{approvalId,jdbcType=VARCHAR},
</if>
<if test="approvalName != null">
approval_name = #{approvalName,jdbcType=VARCHAR},
</if>
<if test="approvalTime != null">
approval_time = #{approvalTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="approvalPhone != null">
approval_phone = #{approvalPhone,jdbcType=VARCHAR},
</if>
<if test="approvalPhoneAreaCode != null">
approval_phone_area_code = #{approvalPhoneAreaCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseName != null">
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
order_type = #{orderType,jdbcType=INTEGER},
</if>
</set>
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.finance.entity.TabTransferAccountsApproval">
update tab_transfer_accounts_approval
set order_number = #{orderNumber,jdbcType=VARCHAR},
platform_type = #{platformType,jdbcType=INTEGER},
initiator_type = #{initiatorType,jdbcType=INTEGER},
initiator_name = #{initiatorName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
planned_amount = #{plannedAmount,jdbcType=DOUBLE},
bad_amount = #{badAmount,jdbcType=DOUBLE},
account_amount = #{accountAmount,jdbcType=DOUBLE},
verify_code = #{verifyCode,jdbcType=VARCHAR},
approval_number = #{approvalNumber,jdbcType=VARCHAR},
approval_status = #{approvalStatus,jdbcType=INTEGER},
approval_id = #{approvalId,jdbcType=VARCHAR},
approval_name = #{approvalName,jdbcType=VARCHAR},
approval_time = #{approvalTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
approval_phone = #{approvalPhone,jdbcType=VARCHAR},
approval_phone_area_code = #{approvalPhoneAreaCode,jdbcType=VARCHAR},
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
order_type = #{orderType,jdbcType=INTEGER}
where transfer_approval_id = #{transferApprovalId,jdbcType=INTEGER}
</update>
<select id="selectByOrderNumber" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_transfer_accounts_approval
where order_number = #{orderNumber}
</select>
<select id="listTransferAccountsApproval" resultMap="BaseResultMap" parameterType="com.gic.finance.qo.TransferListQueryQO">
select
<include refid="Base_Column_List" />
from tab_transfer_accounts_approval
where 1=1
<if test="search != null and search != '' ">
and ( enterprise_name like concat('%', #{search}, '%') or company_name like concat('%', #{search}, '%')
or approval_number like concat('%', #{search}, '%') or verify_code like concat('%', #{search}, '%') )
</if>
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId}
</if>
<if test="approvalStatus != null">
and approval_status = #{approvalStatus}
</if>
<if test="platformType != null">
and platform_type = #{platformType}
</if>
order by create_time desc
</select>
<select id="listByOrderSerialNumber" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_transfer_accounts_approval
where 1=1
<if test="list != null and list.size() > 0">
and order_number in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -80,21 +80,20 @@
<version>${gic-enterprise-base-api}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.5.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
</exclusions>
<groupId>com.gic</groupId>
<artifactId>gic-platform-auth-api</artifactId>
<version>${gic-platform-auth-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-enterprise-api</artifactId>
<version>${gic-platform-enterprise-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-platform-finance-api</artifactId>
<version>${gic-platform-finance-api}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
......@@ -118,12 +117,46 @@
<version>3.11</version>
</dependency>
<dependency>
<groupId>com.gic.authcenter </groupId>
<artifactId>gic-authcenter-security-core </artifactId>
<version>${gic-authcenter-security-core} </version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.gic </groupId>
<artifactId>gic-redis-data </artifactId>
<version>${gic-redis-data} </version>
</dependency>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter-api</artifactId>
<version>${gic-authcenter-api}</version>
</dependency>
<!--开放平台-->
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-open-platform-api</artifactId>
<version>${gic-open-platform-api}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.gic.authcenter</groupId>
<artifactId>gic-authcenter</artifactId>
<version>4.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
......@@ -143,6 +176,7 @@
<version>2.1.5.RELEASE</version>
<configuration>
<mainClass>com.gic.finance.web.Main</mainClass>
<excludeGroupIds>ch.qos.logback</excludeGroupIds>
</configuration>
<executions>
<execution>
......
package com.gic.finance.web;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.gic.authcenter.security.core.anno.EnableGicOAuth2Sso;
import com.gic.authcenter.security.core.boot.GicSsoSecurityConfigAdapter;
import com.gic.dubbo.util.DubboContextUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......@@ -15,10 +18,8 @@ import org.springframework.context.annotation.ImportResource;
* @author zhurz
*/
@SpringBootApplication(
scanBasePackages = "com.gic",
scanBasePackages = "com.gic.finance",
exclude = {
RedisAutoConfiguration.class,
RedisRepositoriesAutoConfiguration.class,
QuartzAutoConfiguration.class
}
)
......@@ -29,9 +30,11 @@ import org.springframework.context.annotation.ImportResource;
"classpath*:spring-interceptor.xml",
"classpath*:redis-init.xml"
})
public class Main {
@EnableApolloConfig({ "application", "BUZ.oauth.4.0" })
@EnableGicOAuth2Sso
public class Main extends GicSsoSecurityConfigAdapter {
public static void main(String[] args) {
public static void main(String[] args){
ConfigurableApplicationContext context = SpringApplication.run(Main.class, args);
DubboContextUtil.setApplicationContext(context);
}
......
package com.gic.finance.web.controller;
import com.gic.finance.dto.CashWithdrawalDTO;
import com.gic.finance.qo.CashWithdrawalQueryListQO;
import com.gic.finance.service.CashWithdrawalApiService;
import com.gic.finance.web.utils.UserInfoUtils;
import com.gic.finance.web.vo.CashWithdrawalDetailVO;
import com.gic.finance.web.vo.CashWithdrawalListVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.finance.dto.PayAccountDTO;
import com.gic.finance.service.PayAccountApiService;
/**
* 提现管理
* @ClassName: CashWithdrawalController

* @Description: 

* @author guojuxing

* @date 2019/8/29 3:33 PM

*/
@RestController
@RequestMapping("/cash-withdrawal")
public class CashWithdrawalController {
private static Logger LOGGER = LoggerFactory.getLogger(CashWithdrawalController.class);
@Autowired
private PayAccountApiService payAccountApiService;
@Autowired
private CashWithdrawalApiService cashWithdrawalApiService;
/**
* 新增打款账户
* @Title: savePayAccount

* @Description:

 * @author guojuxing
* @param dto

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/save-pay-account")
public RestResponse savePayAccount(PayAccountDTO dto) {
return ResultControllerUtils.commonResult(payAccountApiService.save(dto));
}
@RequestMapping("/edit-pay-account")
public RestResponse editPayAccount(PayAccountDTO dto) {
return ResultControllerUtils.commonResult(payAccountApiService.update(dto));
}
/**
* 下移排序
* @Title: downSort

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/down-sort")
public RestResponse downSort(Integer id) {
return ResultControllerUtils.commonResult(payAccountApiService.downSort(id));
}
@RequestMapping("/up-sort")
public RestResponse upSort(Integer id) {
return ResultControllerUtils.commonResult(payAccountApiService.upSort(id));
}
/**
* 拖拽排序
* @Title: setSort

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/set-sort")
public RestResponse setSort(Integer id, Integer sortValue) {
return ResultControllerUtils.commonResult(payAccountApiService.setSort(id, sortValue));
}
@RequestMapping("/delete-pay-account")
public RestResponse deletePayAccount(Integer id) {
return ResultControllerUtils.commonResult(payAccountApiService.delete(id));
}
/**
* 详情
* @Title: getDetail

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/get-pay-account-detail")
public RestResponse getPayAccountDetail(Integer id) {
return ResultControllerUtils.commonResult(payAccountApiService.getById(id));
}
/**
* 查询列表数据
* @Title: listPayAccount

* @Description:

 * @author guojuxing 

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/list-pay-account")
public RestResponse listPayAccount() {
return ResultControllerUtils.commonResult(payAccountApiService.listPayAccount());
}
/**
* 提现管理列表
* @Title: listCashWithdrawal

* @Description:

 * @author guojuxing
* @param params

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/list-cash-withdrawal")
public RestResponse listCashWithdrawal(CashWithdrawalQueryListQO params) {
return ResultControllerUtils.commonPageResult(cashWithdrawalApiService.listCashWithdrawalPage(params),
CashWithdrawalListVO.class);
}
/**
* 审批通过
* @Title: approval

* @Description:

 * @author guojuxing
* @param id

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/approval")
public RestResponse approval(Integer id) {
return ResultControllerUtils
.commonResult(cashWithdrawalApiService.approval(id, UserInfoUtils.getOpertaionUserInfo()));
}
@RequestMapping("/save")
public RestResponse save(CashWithdrawalDTO dto) {
return ResultControllerUtils.commonResult(cashWithdrawalApiService.cashWithdrawalOfServiceProvider(dto));
}
/**
* 驳回
* @Title: reject

* @Description:

 * @author guojuxing
* @param id
* @param rejectReason

* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/reject")
public RestResponse reject(Integer id, String rejectReason) {
return ResultControllerUtils
.commonResult(cashWithdrawalApiService.reject(id, rejectReason, UserInfoUtils.getOpertaionUserInfo()));
}
/**
* 打款
* @Title: pay

* @Description:

 * @author guojuxing
* @param id
* @param payId 打款户ID
* @param bankSerialNumber
 银行转账流水号
* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/pay")
public RestResponse pay(Integer id, Integer payId, String bankSerialNumber) {
return ResultControllerUtils.commonResult(cashWithdrawalApiService.pay(id, payId, bankSerialNumber));
}
@RequestMapping("/get-detail")
public RestResponse getDetail(Integer id) {
return ResultControllerUtils.commonResultOne(cashWithdrawalApiService.getDetail(id),
CashWithdrawalDetailVO.class);
}
}
package com.gic.finance.web.controller;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.finance.dto.InvoiceAccountDTO;
import com.gic.finance.service.InvoiceAccountApiService;
import com.gic.finance.web.utils.UserInfoUtils;
import com.gic.finance.web.vo.InvoiceManagerDetailVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.finance.dto.InvoiceManageDTO;
import com.gic.finance.qo.InvoiceManageListQueryQO;
import com.gic.finance.service.InvoiceManageApiService;
import com.gic.finance.web.vo.InvoiceManageListVO;
/**
* 发票管理
* @ClassName: InvoiceManageController

* @Description: 

* @author guojuxing

* @date 2019/8/14 3:14 PM

*/
@RestController
@RequestMapping("/invoice-manage")
public class InvoiceManageController {
private static Logger LOGGER = LoggerFactory.getLogger(InvoiceManageController.class);
@Autowired
private InvoiceManageApiService invoiceManageApiService;
@Autowired
private InvoiceAccountApiService invoiceAccountApiService;
/**
* 发起审批
* @param dto
* @return
*/
@RequestMapping("/apply-invoice")
public RestResponse applyInvoice(InvoiceManageDTO dto) {
return ResultControllerUtils.commonResult(invoiceManageApiService.applyInvoice(dto));
}
/**
* 同意审批
* @param dto
* @return
*/
@RequestMapping("/invoice")
public RestResponse invoice(InvoiceManageDTO dto) {
return ResultControllerUtils.commonResult(invoiceManageApiService.invoice(dto.getInvoiceManageId(),
dto.getExpressMailName(), dto.getExpressMailNumber(), UserInfoUtils.getOpertaionUserInfo()));
}
/**
* 驳回审批
* @param dto
* @return
*/
@RequestMapping("/reject-invoice")
public RestResponse rejectInvoice(InvoiceManageDTO dto) {
return ResultControllerUtils.commonResult(invoiceManageApiService.rejectInvoice(dto.getInvoiceManageId(),
dto.getRejectReason(), UserInfoUtils.getOpertaionUserInfo()));
}
/**
* 取消审批
* @param dto
* @return
*/
@RequestMapping("/cancel-invoice")
public RestResponse cancelInvoice(InvoiceManageDTO dto) {
return ResultControllerUtils.commonResult(invoiceManageApiService.cancelInvoice(dto.getInvoiceManageId()));
}
/**
* 新增开票户信息
* @param dto
* @return
*/
@RequestMapping("/save-invoice-account")
public RestResponse saveInvoiceAccount(InvoiceAccountDTO dto) {
return ResultControllerUtils.commonResult(invoiceAccountApiService.save(dto));
}
/**
* 编辑开票户信息
* @param dto
* @return
*/
@RequestMapping("/edit-invoice-account")
public RestResponse editInvoiceAccount(InvoiceAccountDTO dto) {
return ResultControllerUtils.commonResult(invoiceAccountApiService.update(dto));
}
/**
* 开启开票户信息
* @param id
* @return
*/
@RequestMapping("/enable-invoice-account")
public RestResponse enableInvoiceAccount(Integer id) {
return ResultControllerUtils.commonResult(invoiceAccountApiService.enable(id));
}
/**
* 关闭开票户信息
* @param id
* @return
*/
@RequestMapping("/disable-invoice-account")
public RestResponse disableInvoiceAccount(Integer id) {
return ResultControllerUtils.commonResult(invoiceAccountApiService.disable(id));
}
@RequestMapping("/list-invoice-account")
public RestResponse listInvoiceAccount() {
return ResultControllerUtils.commonResult(invoiceAccountApiService.listInvoiceAccount());
}
/**
* 详情
* @param invoiceManageId
* @return
*/
@RequestMapping("/get-detail")
public RestResponse getDetail(Integer invoiceManageId) {
ServiceResponse<InvoiceManageDTO> invoiceResult = invoiceManageApiService.getById(invoiceManageId);
if (invoiceResult.isSuccess()) {
InvoiceManageDTO invoice = invoiceResult.getResult();
InvoiceManagerDetailVO vo = EntityUtil.changeEntityNew(InvoiceManagerDetailVO.class, invoice);
ServiceResponse<InvoiceAccountDTO> accountResult;
if (invoice.getInvoicerId() != null) {
accountResult = invoiceAccountApiService.getById(invoice.getInvoicerId());
} else {
accountResult = invoiceAccountApiService.getEnable();
}
if (accountResult.isSuccess()) {
InvoiceAccountDTO account = accountResult.getResult();
vo.setAccountName(account.getAccountName());
vo.setAccountPhone(account.getAccountPhone());
vo.setAddress(account.getAddress());
vo.setBank(account.getBank());
vo.setBankAccount(account.getBankAccount());
vo.setTaxNumberOfInvoice(account.getTaxNumber());
} else {
return EnterpriseRestResponse.failure(accountResult);
}
return RestResponse.success(vo);
} else {
return EnterpriseRestResponse.failure(invoiceResult);
}
}
@RequestMapping("/list-invoice")
public RestResponse listInvoice(InvoiceManageListQueryQO params) {
return ResultControllerUtils.commonPageResult(invoiceManageApiService.listInvoiceManage(params),
InvoiceManageListVO.class);
}
}
package com.gic.finance.web.controller;
import com.gic.commons.util.CollectionUtil;
import com.gic.enterprise.dto.EnterpriseDTO;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.web.utils.UserInfoUtils;
import com.gic.finance.web.vo.*;
import com.gic.open.api.dto.OrderDTO;
import com.gic.open.api.dto.OrderItemDTO;
import com.gic.open.api.service.OrderApiService;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.dto.BillingOrderDTO;
import com.gic.enterprise.dto.BillingRechargeRecordDTO;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.service.BillingOrderApiService;
import com.gic.enterprise.service.BillingRechargeRecordApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.finance.constant.OrderTypeEnum;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.qo.TransferListQueryQO;
import com.gic.finance.service.TransferAccountsApprovalApiService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 转账审批
* @ClassName: TransferAccountsApprovalController

* @Description: 

* @author guojuxing

* @date 2019/8/9 5:05 PM

*/
@RestController
@RequestMapping("/transfer-accounts-approval")
public class TransferAccountsApprovalController {
private static final Logger LOGGER = LoggerFactory.getLogger(TransferAccountsApprovalController.class);
@Autowired
private TransferAccountsApprovalApiService transferAccountsApprovalApiService;
@Autowired
private BillingOrderApiService billingOrderApiService;
@Autowired
private BillingRechargeRecordApiService billingRechargeRecordApiService;
@Autowired
private OrderApiService orderApiService;
@Autowired
private EnterpriseApiService enterpriseApiService;
@RequestMapping("/get-approval")
public RestResponse getById(Integer id) {
ServiceResponse<TransferAccountsApprovalDTO> transferResult = transferAccountsApprovalApiService.getById(id);
if (transferResult.isSuccess()) {
TransferAccountsApprovalDTO transfer = transferResult.getResult();
//短信套餐包
if (transfer.getOrderType().intValue() == OrderTypeEnum.SHORT_MESSAGE_PACKAGE.getCode()) {
ServiceResponse<BillingOrderDTO> orderDetail = billingOrderApiService
.getOrderBySerialNumber(transfer.getOrderNumber());
TransferApprovalSmsVO vo = EntityUtil.changeEntityNew(TransferApprovalSmsVO.class, transfer);
if (orderDetail.isSuccess()) {
BillingOrderDTO order = orderDetail.getResult();
//订单详情
vo.setOrderItemJson(order.getItemJson());
vo.setPayInfoSerialNumber(order.getPayInfoSerialNumber());
vo.setCouponCardContent(order.getCouponCardContent());
vo.setCouponCardName(order.getCouponCardName());
vo.setTotalFeePaid(order.getTotalFeePaid());
vo.setTotalFee(order.getTotalFee());
//总计费用:计划金额 - 优惠券
if (order.getCouponCardContent() == null) {
order.setCouponCardContent(0D);
}
vo.setTotalCountFee(transfer.getPlannedAmount() - order.getCouponCardContent());
return RestResponse.success(vo);
} else {
return EnterpriseRestResponse.failure(orderDetail);
}
} else if (transfer.getOrderType().intValue() == OrderTypeEnum.RECHARGE.getCode()) {
TransferApprovalRechargeVO vo = EntityUtil.changeEntityNew(TransferApprovalRechargeVO.class, transfer);
ServiceResponse<BillingRechargeRecordDTO> rechargeResult = billingRechargeRecordApiService
.getRechargeRecordForApproval(transfer.getOrderNumber());
if (rechargeResult.isSuccess()) {
BillingRechargeRecordDTO recharge = rechargeResult.getResult();
//支付流水号
vo.setPayInfoSerialNumber(recharge.getPayInfoSerialNumber());
vo.setTotalCountFee(transfer.getPlannedAmount());
return RestResponse.success(vo);
} else {
return EnterpriseRestResponse.failure(rechargeResult);
}
} else {
TransferApprovalServiceVO vo = EntityUtil.changeEntityNew(TransferApprovalServiceVO.class, transfer);
ServiceResponse<OrderDTO> orderResult = orderApiService.getOrderForFinance(transfer.getOrderNumber());
if (orderResult.isSuccess()) {
OrderDTO orderDTO = orderResult.getResult();
vo.setOrderCreateTime(orderDTO.getCreateTime());
//支付类型
vo.setPayType(orderDTO.getPayType());
//支付流水号
vo.setPayInfoSerialNumber(orderDTO.getPayNumber());
vo.setTotalCountFee(transfer.getPlannedAmount());
vo.setRelationOrderType(orderDTO.getOrderType());
vo.setOperType(orderDTO.getOperType());
vo.setOperName(orderDTO.getOperName());
vo.setPayDetail(orderDTO.getPayDetail());
String couponName = orderDTO.getCouponName();
if (!StringUtils.isBlank(couponName)) {
ServiceDiscountVO discountVO = new ServiceDiscountVO();
discountVO.setDiscountDetail(orderDTO.getDiscountDetail());
discountVO.setDiscountName(couponName);
vo.setServiceDiscountVO(discountVO);
}
if (orderDTO.getOrderItemList() != null) {
List<ServiceInfoVO> serviceInfoVOList = new ArrayList<>();
List<ExpandPackageVO> expandPackageVOList = new ArrayList<>();
List<LicenseVO> licenseVOList = new ArrayList<>();
for (OrderItemDTO itemDTO : orderDTO.getOrderItemList()) {
if (itemDTO.getServeType() == 1) {
//服务
ServiceInfoVO serviceInfoVO = new ServiceInfoVO();
serviceInfoVO.setServeName(itemDTO.getServeName());
serviceInfoVO.setSkuInfo(itemDTO.getSkuInfo());
//销售价
serviceInfoVO.setTotalAmount(itemDTO.getSaleAmount());
serviceInfoVO.setServeInfo(itemDTO.getServeInfo());
serviceInfoVO.setApplicationId(itemDTO.getApplicationId());
serviceInfoVO.setPayDetail(itemDTO.getPayDetail());
serviceInfoVOList.add(serviceInfoVO);
} else if (itemDTO.getServeType() == 2) {
//license
LicenseVO licenseVO = new LicenseVO();
licenseVO.setLicenseUnit(itemDTO.getLicenseUnit());
licenseVO.setServeName(itemDTO.getServeName());
//销售价
licenseVO.setTotalAmount(itemDTO.getSaleAmount());
licenseVO.setServeQuantity(itemDTO.getServeQuantity());
licenseVO.setServeInfo(itemDTO.getServeInfo());
licenseVO.setApplicationId(itemDTO.getApplicationId());
licenseVO.setPayDetail(itemDTO.getPayDetail());
licenseVOList.add(licenseVO);
} else if (itemDTO.getServeType() == 3) {
//拓展包
ExpandPackageVO expandPackageVO = new ExpandPackageVO();
expandPackageVO.setImageUrl(itemDTO.getImageUrl());
expandPackageVO.setServeName(itemDTO.getServeName());
expandPackageVO.setServeQuantity(itemDTO.getServeQuantity());
//销售价
expandPackageVO.setTotalAmount(itemDTO.getSaleAmount());
expandPackageVO.setPayDetail(itemDTO.getPayDetail());
expandPackageVO.setServeInfo(itemDTO.getServeInfo());
expandPackageVOList.add(expandPackageVO);
}
}
Map<Long, List<LicenseVO>> licenseMap;
if (licenseVOList.size() > 0) {
//license是在服务下面,进行匹配
licenseMap = CollectionUtil.group(licenseVOList, "applicationId");
vo.setLicenseVOList(licenseVOList);
} else {
licenseMap = new HashMap<>(2);
}
if (serviceInfoVOList.size() > 0) {
for (ServiceInfoVO serviceInfoVO : serviceInfoVOList) {
if (licenseMap.containsKey(serviceInfoVO.getApplicationId())) {
serviceInfoVO.setLicenseVOList(licenseMap.get(serviceInfoVO.getApplicationId()));
}
}
vo.setServiceInfoVOList(serviceInfoVOList);
} else if (licenseVOList.size() > 0) {
//没有服务,只有license数据,比如扩容
ServiceInfoVO temp = new ServiceInfoVO();
boolean isGicEnterprise = transfer.getPlatformType() != null && transfer.getPlatformType()
.intValue() == EnterprisePlatformTypeEnum.GIC.getCode();
if (isGicEnterprise) {
ServiceResponse<EnterpriseDTO> tempResult = enterpriseApiService
.getEnterpriseById(transfer.getEnterpriseId());
if (tempResult.isSuccess()) {
temp.setVersionName(orderDTO.getServeName() + "-" + tempResult.getResult().getVersionName());
} else {
LOGGER.warn(tempResult.getMessage());
}
} else {
temp.setVersionName(orderDTO.getServeName());
}
temp.setLicenseVOList(licenseVOList);
serviceInfoVOList.add(temp);
vo.setServiceInfoVOList(serviceInfoVOList);
}
if (expandPackageVOList.size() > 0) {
vo.setExpandPackageVOList(expandPackageVOList);
}
}
return RestResponse.success(vo);
} else {
return EnterpriseRestResponse.failure(orderResult);
}
}
} else {
return EnterpriseRestResponse.failure(transferResult);
}
}
@RequestMapping("/agree-approval")
public RestResponse agreeApproval(Integer id, Double accountAmount) {
return ResultControllerUtils.commonResult(transferAccountsApprovalApiService.agreeApproval(id, accountAmount,
UserInfoUtils.getOpertaionUserInfo()));
}
@RequestMapping("/reject-approval")
public RestResponse rejectApproval(Integer id) {
return ResultControllerUtils.commonResult(
transferAccountsApprovalApiService.rejectApproval(id, UserInfoUtils.getOpertaionUserInfo()));
}
@RequestMapping("/cancel-approval")
public RestResponse cancelApproval(Integer id) {
return ResultControllerUtils.commonResult(transferAccountsApprovalApiService.cancelApproval(id));
}
@RequestMapping("/list-approval")
public RestResponse listTransferAccountsApproval(TransferListQueryQO params) {
return ResultControllerUtils.commonPageResult(
transferAccountsApprovalApiService.listTransferAccountsApproval(params), TransferApprovalListVO.class);
}
}
package com.gic.finance.web.controller;
import com.gic.authcenter.security.core.util.UserUtils;
import com.gic.commons.webapi.reponse.RestResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/user")
public class UserController {
@RequestMapping("/userinfo")
public RestResponse userInfo(){
return RestResponse.success(UserUtils.getUser());
}
}
package com.gic.finance.web.exception;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindException;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.exception.CommonException;
/**
* 全局异常处理类
*
* @author hua
*/
@ControllerAdvice
public class GlobalExceptionHandler {
private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
@ResponseBody
@ExceptionHandler(Exception.class)
public RestResponse controllerException(HttpServletResponse response, Exception ex) {
logger.error("err", ex);
RestResponse failureResponse = getRestResponse(ErrorCode.SYSTEM_ERROR.getCode(), ErrorCode.SYSTEM_ERROR.getMsg());
StringBuilder sb = new StringBuilder();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try (PrintWriter printWriter = new PrintWriter(baos)) {
ex.printStackTrace(printWriter);
}
try {
sb.append(baos.toString());
} catch (Exception ignored) {
}
if (sb.length() == 0) {
sb.append(ex.getMessage());
}
// 输出详细错误信息,便于调试
failureResponse.setDetailError(sb.toString());
return failureResponse;
}
/**
* 参数校验异常统一处理
* @param e
* @return
*/
@ResponseBody
@ExceptionHandler(BindException.class)
public RestResponse customException(BindException e) {
List<FieldError> fieldErrors = e.getFieldErrors();
StringBuilder errorMessage = new StringBuilder();
fieldErrors.forEach(fieldError -> {
errorMessage
.append(fieldError.getDefaultMessage())
.append(",");
});
String error = errorMessage.toString();
int length = error.length();
return getRestResponse(ErrorCode.PARAMETER_ERROR.getCode(), error.substring(0, length - 1));
}
@ResponseBody
@ExceptionHandler(ConstraintViolationException.class)
public RestResponse constraintViolationException(ConstraintViolationException e) {
Set<ConstraintViolation<?>> constraintViolations = e.getConstraintViolations();
String paramName = constraintViolations.iterator().next().getPropertyPath().toString();
String paramError = constraintViolations.iterator().next().getMessage();
return getRestResponse(ErrorCode.PARAMETER_ERROR.getCode(), getFailFastMsg(paramName, paramError));
}
@ResponseBody
@ExceptionHandler(CommonException.class)
public RestResponse customException(CommonException e) {
return getRestResponse(e.getErrorCode(), e.getMessage());
}
private RestResponse getRestResponse(String errorCode, String message) {
return RestResponse.failure(errorCode, message);
}
private static String getFailFastMsg(String paramName, String paramError) {
return String.format("%s:%s", paramName, paramError);
}
}
package com.gic.finance.web.utils;
import java.util.Date;
/**
* 日期类工具
* @ClassName: DateUtils

* @Description: 

* @author guojuxing

* @date 2019/9/2 10:31 AM

*/
public class DateUtils {
/**
* 返回时间戳
* @Title: dateToLong

* @Description:

 * @author guojuxing
* @param date

* @return java.lang.Long


 */
public static Long dateToLong(Date date) {
if (date != null) {
return date.getTime();
}
return null;
}
}
package com.gic.auth.web.utils;
import com.gic.store.constant.Constants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.*;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @author zhiwj
* @date 2019/7/2
*/
public class ExcelUtils {
private static final short ROW_HEIGHT = 500;
private static final int COLUMN_HEIGHT = 5000;
public static XSSFWorkbook getXSSFWorkbook(String sheetName, List<List<String>> everyLines, XSSFWorkbook wb) {
if (CollectionUtils.isEmpty(everyLines)) {
return null;
}
// 第一步,创建一个XSSFWorkbook,对应一个Excel文件
if (wb == null) {
wb = new XSSFWorkbook();
}
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
XSSFSheet sheet = wb.createSheet(sheetName);
sheet.setDefaultRowHeight(ROW_HEIGHT);
// 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制
XSSFRow row = sheet.createRow(0);
// 第四步,创建单元格,并设置值表头
XSSFCellStyle style = wb.createCellStyle();
XSSFFont font = wb.createFont();
font.setFontName("微软雅黑");
style.setFont(font);
//声明列对象
XSSFCell cell = null;
//创建标题
List<String> titles = everyLines.get(0);
for (int i = 0; i < titles.size(); i++) {
cell = row.createCell(i);
cell.setCellValue(titles.get(i));
cell.setCellStyle(style);
}
//创建内容
for (int i = 1; i < everyLines.size(); i++) {
row = sheet.createRow(i);
for (int j = 0; j < everyLines.get(i).size(); j++) {
sheet.setColumnWidth(j, COLUMN_HEIGHT);
//将内容按顺序赋给对应的列对象
XSSFCell cell1 = row.createCell(j);
cell1.setCellValue(everyLines.get(i).get(j));
cell1.setCellStyle(style);
}
}
return wb;
}
public static Workbook getWorkbook(String title, List<String> rowName, List<String> description, List<List<String>> dataList, String regionIdStr) {
XSSFWorkbook workbook = new XSSFWorkbook(); // 创建工作簿对象
XSSFSheet sheet = workbook.createSheet(title); // 创建工作表
XSSFRow row1 = sheet.createRow(0);
row1.setZeroHeight(true);
XSSFCell cell1 = row1.createCell(0);
if (StringUtils.isNotBlank(regionIdStr)) {
cell1.setCellValue(regionIdStr);
}
XSSFRow rowm = sheet.createRow(1); // 产生表格标题行
XSSFCell cellTiltle = rowm.createCell(0); //创建表格标题列
// sheet样式定义; getColumnTopStyle(); getStyle()均为自定义方法 --在下面,可扩展
XSSFCellStyle columnTopStyle = ExcelUtils.getColumnTopStyle(workbook);// 获取列头样式对象
XSSFCellStyle titleStyle = ExcelUtils.getTitleStyle(workbook);// 获取列头样式对象
XSSFCellStyle style = ExcelUtils.getStyle(workbook); // 获取单元格样式对象
//合并表格标题行,合并列数为列名的长度,第一个0为起始行号,第二个1为终止行号,第三个0为起始列好,第四个参数为终止列号
sheet.addMergedRegion(new CellRangeAddress(1, 2, 0, (rowName.size() - 1)));
cellTiltle.setCellStyle(columnTopStyle); //设置标题行样式
cellTiltle.setCellValue(title); //设置标题行值
int columnNum = rowName.size(); // 定义所需列数
XSSFRow rowRowName = sheet.createRow(3); // 在索引2的位置创建行(最顶端的行开始的第二行)
// 将列头设置到sheet的单元格中
for (int n = 0; n < columnNum; n++) {
XSSFCell cellRowName = rowRowName.createCell(n); // 创建列头对应个数的单元格
cellRowName.setCellType(XSSFCell.CELL_TYPE_STRING); // 设置列头单元格的数据类型
XSSFRichTextString text = new XSSFRichTextString(rowName.get(n));
cellRowName.setCellValue(text); // 设置列头单元格的值
cellRowName.setCellStyle(titleStyle); // 设置列头单元格样式
}
// 定义数据开始的行数
int dataLine = 4;
if (CollectionUtils.isNotEmpty(description)) {
int descriptionNum = description.size(); // 定义所需列数
XSSFRow descriptionRow = sheet.createRow(dataLine); // 在索引2的位置创建行(最顶端的行开始的第二行)
dataLine++;
for (int n = 0; n < descriptionNum; n++) {
XSSFCell cellRowName = descriptionRow.createCell(n); // 创建列头对应个数的单元格
cellRowName.setCellType(XSSFCell.CELL_TYPE_STRING); // 设置列头单元格的数据类型
XSSFRichTextString text = new XSSFRichTextString(description.get(n));
cellRowName.setCellValue(text); // 设置列头单元格的值
cellRowName.setCellStyle(titleStyle); // 设置列头单元格样式
}
}
// 将查询出的数据设置到sheet对应的单元格中
for (int i = 0; i < dataList.size(); i++) {
List<String> obj = dataList.get(i); // 遍历每个对象
XSSFRow row = sheet.createRow(i + dataLine); // 创建所需的行数
for (int j = 0; j < obj.size(); j++) {
XSSFCell cell = null; // 设置单元格的数据类型
if (j == 0) {
cell = row.createCell(j, XSSFCell.CELL_TYPE_NUMERIC);
cell.setCellValue(i + 1);
} else {
cell = row.createCell(j, XSSFCell.CELL_TYPE_STRING);
if (!"".equals(obj.get(j)) && obj.get(j) != null) {
cell.setCellValue(obj.get(j)); // 设置单元格的值
}
}
cell.setCellStyle(style); // 设置单元格样式
}
}
// 让列宽随着导出的列长自动适应
for (int colNum = 0; colNum < columnNum; colNum++) {
int columnWidth = sheet.getColumnWidth(colNum) / 256;
for (int rowNum = 0; rowNum < sheet.getLastRowNum(); rowNum++) {
XSSFRow currentRow;
// 当前行未被使用过
if (sheet.getRow(rowNum) == null) {
currentRow = sheet.createRow(rowNum);
} else {
currentRow = sheet.getRow(rowNum);
}
if (currentRow.getCell(colNum) != null) {
XSSFCell currentCell = currentRow.getCell(colNum);
if (currentCell.getCellType() == XSSFCell.CELL_TYPE_STRING) {
int length = currentCell.getStringCellValue()
.getBytes().length;
if (columnWidth < length) {
columnWidth = length;
}
}
}
}
if (colNum == 0) {
sheet.setColumnWidth(colNum, (columnWidth - 2) * 256);
} else {
sheet.setColumnWidth(colNum, (columnWidth + 4) * 256);
}
}
return workbook;
}
private static XSSFCellStyle getTitleStyle(XSSFWorkbook workbook) {
XSSFCellStyle style = ExcelUtils.getColumnTopStyle(workbook);
style.setFillForegroundColor(IndexedColors.LIGHT_GREEN.getIndex());
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
return style;
}
/*
* 列头单元格样式
*/
private static XSSFCellStyle getColumnTopStyle(XSSFWorkbook workbook) {
// 设置字体
XSSFFont font = workbook.createFont();
// 设置字体大小
font.setFontHeightInPoints((short) 11);
// 字体加粗
font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
// 设置字体名字
font.setFontName("Courier New");
// 设置样式;
XSSFCellStyle style = workbook.createCellStyle();
// 设置底边框;
style.setBorderBottom(XSSFCellStyle.BORDER_THIN);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style.setBorderLeft(XSSFCellStyle.BORDER_THIN);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style.setBorderRight(XSSFCellStyle.BORDER_THIN);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style.setBorderTop(XSSFCellStyle.BORDER_THIN);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style.setFont(font);
// 设置自动换行;
style.setWrapText(false);
// 设置水平对齐的样式为居中对齐;
style.setAlignment(XSSFCellStyle.ALIGN_CENTER);
// 设置垂直对齐的样式为居中对齐;
style.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
return style;
}
/*
* 列数据信息单元格样式
*/
private static XSSFCellStyle getStyle(XSSFWorkbook workbook) {
// 设置字体
XSSFFont font = workbook.createFont();
// 设置字体大小
// font.setFontHeightInPoints((short)10);
// 字体加粗
// font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
// 设置字体名字
font.setFontName("Courier New");
font.setColor(IndexedColors.RED.index);
// 设置样式;
XSSFCellStyle style = workbook.createCellStyle();
// 设置底边框;
style.setBorderBottom(XSSFCellStyle.BORDER_THIN);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style.setBorderLeft(XSSFCellStyle.BORDER_THIN);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style.setBorderRight(XSSFCellStyle.BORDER_THIN);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style.setBorderTop(XSSFCellStyle.BORDER_THIN);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style.setFont(font);
// 设置自动换行;
style.setWrapText(false);
// 设置水平对齐的样式为居中对齐;
style.setAlignment(XSSFCellStyle.ALIGN_CENTER);
// 设置垂直对齐的样式为居中对齐;
style.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
return style;
}
public static Workbook getWorkbookFromUpload(InputStream inputStream, String fileName) throws IOException {
Workbook wb;
String fileType = fileName.substring(fileName.lastIndexOf("."));
if (".xlsx".equals(fileType)) {
wb = new XSSFWorkbook(inputStream);
} else if ("xls".equals(fileType)) {
wb = new HSSFWorkbook(inputStream);
} else {
return null;
}
return wb;
}
/**
* @param row 表示数据从第几行开始 例如:第一行为表头,第二行为数据,row的值为2
* @param fileType 文件的后缀 例如:xls xlsx
* @return
*/
public static List<Map<Integer, String>> readExcel(int row, String fileType, Workbook xssfWorkbook, Map<Integer, Boolean> dateTypeMap) {
if (fileType.equals("xlsx")) {
return readXlsx(xssfWorkbook, row, dateTypeMap);
} else {
return null;
}
}
public static List<Map<Integer, String>> readXlsx(Workbook xssfWorkbook, int row, Map<Integer, Boolean> dateTypeMap) {
List<Map<Integer, String>> result = new ArrayList<Map<Integer, String>>();
SimpleDateFormat format = new SimpleDateFormat(Constants.dateformat);
// XSSFWorkbook xssfWorkbook = new XSSFWorkbook(in);
for (int numSheet = 0; numSheet < 1; numSheet++) {
Sheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);
if (xssfSheet == null || xssfSheet.getLastRowNum() == 1) {
continue;
}
for (int rowNum = row - 1; rowNum <= xssfSheet.getLastRowNum(); rowNum++) {
Row xssfRow = xssfSheet.getRow(rowNum);
if (xssfRow == null) {
continue;
}
int minColix = xssfRow.getFirstCellNum();
int maxColix = xssfRow.getLastCellNum();
Map<Integer, String> map = new HashMap<Integer, String>();
for (int colix = minColix; colix < maxColix; colix++) {
Cell xssfCell = xssfRow.getCell(colix);
if (xssfCell == null) {
map.put(colix, "");
} else {
Boolean isDate = dateTypeMap.get(colix);
if (isDate != null && isDate) {
if (xssfCell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
Date date = xssfCell.getDateCellValue();
map.put(colix, format.format(date));
} else {
xssfCell.setCellType(Cell.CELL_TYPE_STRING);
map.put(colix, xssfCell.getStringCellValue());
}
} else {
if (xssfCell.getCellType() != Cell.CELL_TYPE_STRING) {
xssfCell.setCellType(Cell.CELL_TYPE_STRING);
}
map.put(colix, xssfCell.getStringCellValue());
}
}
}
if (!isEmpty(map, minColix, maxColix)) {
result.add(map);
}
}
}
return result;
}
private static boolean isEmpty(Map<Integer, String> data, int startIndex, int endIndex) {
boolean isEmplty = true;
for (int i = startIndex + 1; i <= endIndex; i++) {
String value = data.get(i);
if (!StringUtils.isBlank(value)) {
isEmplty = false;
}
}
return isEmplty;
}
}
\ No newline at end of file
package com.gic.finance.web.utils;
import com.gic.authcenter.security.core.dto.UserDetailsVO;
import com.gic.authcenter.security.core.util.UserUtils;
import com.gic.commons.util.EntityUtil;
import com.gic.finance.dto.OperationUserInfoDTO;
public class UserInfoUtils {
public static OperationUserInfoDTO getOpertaionUserInfo() {
UserDetailsVO userDetailsVO = UserUtils.getUser();
return EntityUtil.changeEntityNew(OperationUserInfoDTO.class, userDetailsVO);
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import com.gic.finance.constant.WithdrawalApplyTypeEnum;
import com.gic.finance.constant.WithdrawalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 提现管理详情
* @ClassName: CashWithdrawalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/30 10:41 AM

*/
public class CashWithdrawalDetailVO implements Serializable{
private static final long serialVersionUID = 1601094826663117214L;
/**
*
*/
private Integer cashWithdrawalId;
/**
* 申请单流水号
*/
private String cashWithdrawalSerialNumber;
/**
* 申请方类型 1:服务商 2:供应商
*/
private Integer applyType;
private String applyTypeStr;
/**
* 提现金额
*/
private Double cashWithdrawalAmount;
/**
* 提现状态 1:待审核 2:审核通过 3:已完成 4:已取消 5:已驳回
*/
private Integer cashWithdrawalStatus;
private String cashWithdrawalStatusStr;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
* 收款开户名称
*/
private String receiptName;
/**
* 收款支行名称
*/
private String receiptBranchName;
/**
* 收款开户行
*/
private String receiptBank;
/**
* 收款银行账号
*/
private String receiptBankAccount;
/**
* 打款户开户名称
*/
private String payAccountName;
/**
* 打款户支行名称
*/
private String payAccountBranchName;
/**
* 打款户开户行
*/
private String payAccountBank;
/**
* 打款户银行账号
*/
private String payAccount;
/**
* 物流公司
*/
private String expressMailName;
/**
* 发票物流号
*/
private String expressMailNumber;
/**
*
*/
private Date createTime;
/**
* 银行转账流水号
*/
private String bankSerialNumber;
public Integer getCashWithdrawalId() {
return cashWithdrawalId;
}
public void setCashWithdrawalId(Integer cashWithdrawalId) {
this.cashWithdrawalId = cashWithdrawalId;
}
public String getCashWithdrawalSerialNumber() {
return cashWithdrawalSerialNumber;
}
public void setCashWithdrawalSerialNumber(String cashWithdrawalSerialNumber) {
this.cashWithdrawalSerialNumber = cashWithdrawalSerialNumber;
}
public void setApplyType(Integer applyType) {
this.applyType = applyType;
}
public String getApplyTypeStr() {
return WithdrawalApplyTypeEnum.getMessageByCode(applyType);
}
public Double getCashWithdrawalAmount() {
return cashWithdrawalAmount;
}
public void setCashWithdrawalAmount(Double cashWithdrawalAmount) {
this.cashWithdrawalAmount = cashWithdrawalAmount;
}
public Integer getCashWithdrawalStatus() {
return cashWithdrawalStatus;
}
public void setCashWithdrawalStatus(Integer cashWithdrawalStatus) {
this.cashWithdrawalStatus = cashWithdrawalStatus;
}
public String getCashWithdrawalStatusStr() {
return WithdrawalStatusEnum.getMessageByCode(cashWithdrawalStatus);
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Long getOperatorTime() {
return DateUtils.dateToLong(operatorTime);
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getReceiptName() {
return receiptName;
}
public void setReceiptName(String receiptName) {
this.receiptName = receiptName;
}
public String getReceiptBranchName() {
return receiptBranchName;
}
public void setReceiptBranchName(String receiptBranchName) {
this.receiptBranchName = receiptBranchName;
}
public String getReceiptBank() {
return receiptBank;
}
public void setReceiptBank(String receiptBank) {
this.receiptBank = receiptBank;
}
public String getReceiptBankAccount() {
return receiptBankAccount;
}
public void setReceiptBankAccount(String receiptBankAccount) {
this.receiptBankAccount = receiptBankAccount;
}
public String getPayAccountName() {
return payAccountName;
}
public void setPayAccountName(String payAccountName) {
this.payAccountName = payAccountName;
}
public String getPayAccountBranchName() {
return payAccountBranchName;
}
public void setPayAccountBranchName(String payAccountBranchName) {
this.payAccountBranchName = payAccountBranchName;
}
public String getPayAccountBank() {
return payAccountBank;
}
public void setPayAccountBank(String payAccountBank) {
this.payAccountBank = payAccountBank;
}
public String getPayAccount() {
return payAccount;
}
public void setPayAccount(String payAccount) {
this.payAccount = payAccount;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public String getBankSerialNumber() {
return bankSerialNumber;
}
public void setBankSerialNumber(String bankSerialNumber) {
this.bankSerialNumber = bankSerialNumber;
}
}
package com.gic.finance.web.vo;
import com.gic.finance.constant.WithdrawalApplyTypeEnum;
import com.gic.finance.constant.WithdrawalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
import java.io.Serializable;
import java.util.Date;
/**
* 提现管理列表
* @ClassName: CashWithdrawalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/30 10:41 AM

*/
public class CashWithdrawalListVO implements Serializable{
private static final long serialVersionUID = 7588915723413260711L;
/**
*
*/
private Integer cashWithdrawalId;
/**
* 申请单流水号
*/
private String cashWithdrawalSerialNumber;
/**
* 申请方类型 1:服务商 2:供应商
*/
private Integer applyType;
private String applyTypeStr;
/**
* 提现金额
*/
private Double cashWithdrawalAmount;
/**
* 提现状态 1:待审核 2:审核通过 3:已完成 4:已取消 5:已驳回
*/
private Integer cashWithdrawalStatus;
private String cashWithdrawalStatusStr;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
*
*/
private Date createTime;
public Integer getCashWithdrawalId() {
return cashWithdrawalId;
}
public void setCashWithdrawalId(Integer cashWithdrawalId) {
this.cashWithdrawalId = cashWithdrawalId;
}
public String getCashWithdrawalSerialNumber() {
return cashWithdrawalSerialNumber;
}
public void setCashWithdrawalSerialNumber(String cashWithdrawalSerialNumber) {
this.cashWithdrawalSerialNumber = cashWithdrawalSerialNumber;
}
public void setApplyType(Integer applyType) {
this.applyType = applyType;
}
public String getApplyTypeStr() {
return WithdrawalApplyTypeEnum.getMessageByCode(applyType);
}
public Double getCashWithdrawalAmount() {
return cashWithdrawalAmount;
}
public void setCashWithdrawalAmount(Double cashWithdrawalAmount) {
this.cashWithdrawalAmount = cashWithdrawalAmount;
}
public Integer getCashWithdrawalStatus() {
return cashWithdrawalStatus;
}
public void setCashWithdrawalStatus(Integer cashWithdrawalStatus) {
this.cashWithdrawalStatus = cashWithdrawalStatus;
}
public String getCashWithdrawalStatusStr() {
return WithdrawalStatusEnum.getMessageByCode(cashWithdrawalStatus);
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Long getOperatorTime() {
return DateUtils.dateToLong(operatorTime);
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 转账审批详情个-拓展包信息
* @ClassName: ExpandPackageVO

* @Description: 

* @author guojuxing

* @date 2019/9/11 3:18 PM

*/
public class ExpandPackageVO implements Serializable{
private static final long serialVersionUID = 8184386301939808866L;
/**
* 名称
*/
private String serveName;
/**
* 订单原价
*/
private BigDecimal totalAmount;
// 购买数量
private Integer serveQuantity;
/**
* 图片
*/
private String imageUrl;
/**
*
*/
private String serveInfo;
/**
* 支付详情json{100:现金 ,101:xxx}
*/
private String payDetail;
public String getServeName() {
return serveName;
}
public void setServeName(String serveName) {
this.serveName = serveName;
}
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public Integer getServeQuantity() {
return serveQuantity;
}
public void setServeQuantity(Integer serveQuantity) {
this.serveQuantity = serveQuantity;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public String getServeInfo() {
return serveInfo;
}
public void setServeInfo(String serveInfo) {
this.serveInfo = serveInfo;
}
public String getPayDetail() {
return payDetail;
}
public void setPayDetail(String payDetail) {
this.payDetail = payDetail;
}
}
package com.gic.finance.web.vo;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.InvoiceStatusEnum;
import com.gic.finance.web.utils.DateUtils;
import java.io.Serializable;
import java.util.Date;
/**
* 发票列表VO
* @ClassName: InvoiceManageListVO

* @Description: 

* @author guojuxing

* @date 2019/8/15 9:40 AM

*/
public class InvoiceManageListVO implements Serializable{
private static final long serialVersionUID = -2907051857343527897L;
/**
*
*/
private Integer invoiceManageId;
/**
*
*/
private Date createTime;
/**
* 申请单流水号
*/
private String invoiceApplySerial;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 商户类型名称
*/
private String platformTypeStr;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 公司logo
*/
private String logo;
/**
* 开票金额
*/
private Double billingAmount;
/**
* 发票状态 1:待开具 2:待邮寄 3:已邮寄 4:已驳回 5:已取消
*/
private Integer invoiceStatus;
/**
* 发票状态名称
*/
private String invoiceStatusStr;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 快递公司
*/
private String expressMailName;
/**
* 快递单号
*/
private String expressMailNumber;
public Integer getInvoiceManageId() {
return invoiceManageId;
}
public void setInvoiceManageId(Integer invoiceManageId) {
this.invoiceManageId = invoiceManageId;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getInvoiceApplySerial() {
return invoiceApplySerial;
}
public void setInvoiceApplySerial(String invoiceApplySerial) {
this.invoiceApplySerial = invoiceApplySerial;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformTypeStr() {
return EnterprisePlatformTypeEnum.getMessageByCode(platformType);
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public Double getBillingAmount() {
return billingAmount;
}
public void setBillingAmount(Double billingAmount) {
this.billingAmount = billingAmount;
}
public void setInvoiceStatus(Integer invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public String getInvoiceStatusStr() {
return InvoiceStatusEnum.getMessageByCode(invoiceStatus);
}
public Long getOperatorTime() {
return DateUtils.dateToLong(operatorTime);
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import com.gic.finance.constant.InvoiceStatusEnum;
import com.gic.finance.constant.InvoiceTypeEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 发票管理详情
* @ClassName: InvoiceManagerDetailVO

* @Description: 

* @author guojuxing

* @date 2019/8/29 9:44 AM

*/
public class InvoiceManagerDetailVO implements Serializable{
private static final long serialVersionUID = 3809863484337760339L;
/**
*
*/
private Integer invoiceManageId;
/**
* (发票类型)1:纸质普通发票 2: 纸质增值税专用发票
*/
private Integer invoiceType;
private String invoiceTypeStr;
/**
*
*/
private Date createTime;
/**
* 申请单流水号
*/
private String invoiceApplySerial;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 开票金额
*/
private Double billingAmount;
/**
* 发票状态 1:待开具 2:待邮寄 3:已邮寄 4:已驳回 5:已取消
*/
private Integer invoiceStatus;
/**
* 发票状态名称
*/
private String invoiceStatusStr;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作时间
*/
private Date operatorTime;
/**
* 操作人手机号码
*/
private String operatorPhone;
/**
* 操作人手机号国际区号
*/
private String operatorPhoneAreaCode;
/**
* 快递公司
*/
private String expressMailName;
/**
* 快递单号
*/
private String expressMailNumber;
/**
* 驳回理由
*/
private String rejectReason;
/**
* 纳税识别号
*/
private String taxNumber;
/**
* 开户单位名称
*/
private String accountName;
/**
* 纳税识别号-开票户
*/
private String taxNumberOfInvoice;
/**
* 地址
*/
private String address;
/**
* 开户行
*/
private String bank;
/**
* 开户电话
*/
private String accountPhone;
/**
* 开户账号
*/
private String bankAccount;
/**
* 收货人
*/
private String shippingName;
/**
* 收货电话
*/
private String shippingPhone;
/**
* 收货地址
*/
private String shippingAddress;
public Integer getInvoiceManageId() {
return invoiceManageId;
}
public void setInvoiceManageId(Integer invoiceManageId) {
this.invoiceManageId = invoiceManageId;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public String getInvoiceTypeStr() {
return InvoiceTypeEnum.getMessageByCode(invoiceType);
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getInvoiceApplySerial() {
return invoiceApplySerial;
}
public void setInvoiceApplySerial(String invoiceApplySerial) {
this.invoiceApplySerial = invoiceApplySerial;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public Double getBillingAmount() {
return billingAmount;
}
public void setBillingAmount(Double billingAmount) {
this.billingAmount = billingAmount;
}
public void setInvoiceStatus(Integer invoiceStatus) {
this.invoiceStatus = invoiceStatus;
}
public String getInvoiceStatusStr() {
return InvoiceStatusEnum.getMessageByCode(invoiceStatus);
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Long getOperatorTime() {
return DateUtils.dateToLong(operatorTime);
}
public void setOperatorTime(Date operatorTime) {
this.operatorTime = operatorTime;
}
public String getOperatorPhone() {
return operatorPhone;
}
public void setOperatorPhone(String operatorPhone) {
this.operatorPhone = operatorPhone;
}
public String getOperatorPhoneAreaCode() {
return operatorPhoneAreaCode;
}
public void setOperatorPhoneAreaCode(String operatorPhoneAreaCode) {
this.operatorPhoneAreaCode = operatorPhoneAreaCode;
}
public String getExpressMailName() {
return expressMailName;
}
public void setExpressMailName(String expressMailName) {
this.expressMailName = expressMailName;
}
public String getExpressMailNumber() {
return expressMailNumber;
}
public void setExpressMailNumber(String expressMailNumber) {
this.expressMailNumber = expressMailNumber;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getTaxNumber() {
return taxNumber;
}
public void setTaxNumber(String taxNumber) {
this.taxNumber = taxNumber;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getTaxNumberOfInvoice() {
return taxNumberOfInvoice;
}
public void setTaxNumberOfInvoice(String taxNumberOfInvoice) {
this.taxNumberOfInvoice = taxNumberOfInvoice;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBank() {
return bank;
}
public void setBank(String bank) {
this.bank = bank;
}
public String getAccountPhone() {
return accountPhone;
}
public void setAccountPhone(String accountPhone) {
this.accountPhone = accountPhone;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public String getShippingName() {
return shippingName;
}
public void setShippingName(String shippingName) {
this.shippingName = shippingName;
}
public String getShippingPhone() {
return shippingPhone;
}
public void setShippingPhone(String shippingPhone) {
this.shippingPhone = shippingPhone;
}
public String getShippingAddress() {
return shippingAddress;
}
public void setShippingAddress(String shippingAddress) {
this.shippingAddress = shippingAddress;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 转账审批-license信息
* @ClassName: LicenseVO

* @Description: 

* @author guojuxing

* @date 2019/9/11 3:11 PM

*/
public class LicenseVO implements Serializable{
private static final long serialVersionUID = 5364676075681956671L;
/**
* 名称
*/
private String serveName;
/**
*
*/
private String serveInfo;
/**
* 订单原价
*/
private BigDecimal totalAmount;
// 购买数量
private Integer serveQuantity;
private String licenseUnit;
/**
* 应用id
*/
private Long applicationId;
/**
* 支付详情json{100:现金 ,101:xxx}
*/
private String payDetail;
public String getServeInfo() {
return serveInfo;
}
public void setServeInfo(String serveInfo) {
this.serveInfo = serveInfo;
}
public String getServeName() {
return serveName;
}
public void setServeName(String serveName) {
this.serveName = serveName;
}
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public Integer getServeQuantity() {
return serveQuantity;
}
public void setServeQuantity(Integer serveQuantity) {
this.serveQuantity = serveQuantity;
}
public String getLicenseUnit() {
return licenseUnit;
}
public void setLicenseUnit(String licenseUnit) {
this.licenseUnit = licenseUnit;
}
public Long getApplicationId() {
return applicationId;
}
public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}
public String getPayDetail() {
return payDetail;
}
public void setPayDetail(String payDetail) {
this.payDetail = payDetail;
}
}
package com.gic.finance.web.vo;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
/**
* 转账审批-优惠方式
* @ClassName: ServiceDiscountVO

* @Description: 

* @author guojuxing

* @date 2019/9/11 2:35 PM

*/
public class ServiceDiscountVO implements Serializable{
private static final long serialVersionUID = -8918828388480825357L;
/**
* 优惠方式名称
*/
private String discountTypeStr;
/**
* 优惠名称
*/
private String discountName;
/**
* 优惠金额
*/
private String fee;
/**
* 优惠详情{200:卡券}
*/
private String discountDetail;
public String getDiscountTypeStr() {
if (StringUtils.isBlank(discountDetail)) {
return "--";
}
JSONObject jsonObject = JSONObject.parseObject(discountDetail);
if (jsonObject.containsKey("200")) {
return "卡券";
}
return "--";
}
public String getDiscountName() {
return discountName;
}
public void setDiscountName(String discountName) {
this.discountName = discountName;
}
public String getFee() {
if (StringUtils.isBlank(discountDetail)) {
return "--";
}
JSONObject jsonObject = JSONObject.parseObject(discountDetail);
if (jsonObject.containsKey("200")) {
return jsonObject.getString("200");
}
return "--";
}
public void setDiscountDetail(String discountDetail) {
this.discountDetail = discountDetail;
}
}
package com.gic.finance.web.vo;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 转账审批-service订单项
* @ClassName: ServiceInfoVO

* @Description: 

* @author guojuxing

* @date 2019/9/11 2:50 PM

*/
public class ServiceInfoVO implements Serializable{
private static final long serialVersionUID = -1533446055799811700L;
/**
* 名称
*/
private String serveName;
private String skuInfo;
/**
*
*/
private String serveInfo;
private String versionName;
/**
* 服务描述
*/
private String servcieDesc;
/**
* 周期
*/
private String serviceCycle;
/**
* 订单项原价
*/
private BigDecimal totalAmount;
/**
* 支付详情json{100:现金 ,101:xxx}
*/
private String payDetail;
/**
* 应用id
*/
private Long applicationId;
private List<LicenseVO> licenseVOList;
public void setServeName(String serveName) {
this.serveName = serveName;
}
public void setSkuInfo(String skuInfo) {
this.skuInfo = skuInfo;
}
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public String getServcieDesc() {
if (StringUtils.isBlank(skuInfo)) {
if (StringUtils.isNotBlank(versionName)) {
return versionName;
}
return "--";
}
JSONObject jsonObject = JSONObject.parseObject(skuInfo);
JSONObject version = jsonObject.getJSONObject("version");
return serveName + "-" + version.get("name");
}
public String getServiceCycle() {
if (StringUtils.isBlank(skuInfo)) {
return "--";
}
JSONObject jsonObject = JSONObject.parseObject(skuInfo);
JSONObject period = jsonObject.getJSONObject("period");
Integer unitNum = (Integer) period.get("effect_time_unit");
String unit = "";
if (unitNum != null) {
unit = unitNum.toString();
}
if ("3".equals(unit)) {
unit = "年";
} else if("2".equals(unit)) {
unit = "月";
} else {
unit = "天";
}
return period.get("effect_time") + unit;
}
public String getServeInfo() {
return serveInfo;
}
public void setServeInfo(String serveInfo) {
this.serveInfo = serveInfo;
}
public Long getApplicationId() {
return applicationId;
}
public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}
public List<LicenseVO> getLicenseVOList() {
return licenseVOList;
}
public void setLicenseVOList(List<LicenseVO> licenseVOList) {
this.licenseVOList = licenseVOList;
}
public String getPayDetail() {
return payDetail;
}
public void setPayDetail(String payDetail) {
this.payDetail = payDetail;
}
public void setVersionName(String versionName) {
this.versionName = versionName;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.InitiatorTypeEnum;
import com.gic.finance.constant.TransferAccountApprovalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 转账审批详情VO
* @ClassName: TransferApprovalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/9 5:38 PM

*/
public class TransferApprovalDetailVO implements Serializable{
private static final long serialVersionUID = -5498377111887141636L;
private Integer transferApprovalId;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 商户类型名称
*/
private String platformTypeStr;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 发起方1:商户 2:运维后台
*/
private Integer initiatorType;
/**
* 发起方名称
*/
private String initiatorTypeStr;
/**
* 发起方姓名
*/
private String initiatorName;
/**
* 发起方电话
*/
private String initiatorPhone;
/**
* 发起方手机国际区号
*/
private String initiatorPhoneCode;
/**
* 订单创建时间时间
*/
private Date initiatorCreateTime;
/**
* 计划金额
*/
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 验证码
*/
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批状态 名称
*/
private String approvalStatusStr;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批人手机号码
*/
private String approvalPhone;
/**
* 审批人手机号国际区号
*/
private String approvalPhoneAreaCode;
/**
* 审批时间
*/
private Date approvalTime;
/**
* 订单项
*/
private String orderItemJson;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformTypeStr() {
return EnterprisePlatformTypeEnum.getMessageByCode(platformType);
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public void setInitiatorType(Integer initiatorType) {
this.initiatorType = initiatorType;
}
public String getInitiatorTypeStr() {
return InitiatorTypeEnum.getMessageByCode(initiatorType);
}
public String getInitiatorName() {
return initiatorName;
}
public void setInitiatorName(String initiatorName) {
this.initiatorName = initiatorName;
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalStatusStr() {
return TransferAccountApprovalStatusEnum.getMessageBuCode(approvalStatus);
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Long getApprovalTime() {
return DateUtils.dateToLong(approvalTime);
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public String getInitiatorPhone() {
return initiatorPhone;
}
public void setInitiatorPhone(String initiatorPhone) {
this.initiatorPhone = initiatorPhone;
}
public String getInitiatorPhoneCode() {
return initiatorPhoneCode;
}
public void setInitiatorPhoneCode(String initiatorPhoneCode) {
this.initiatorPhoneCode = initiatorPhoneCode;
}
public Long getInitiatorCreateTime() {
return DateUtils.dateToLong(initiatorCreateTime);
}
public void setInitiatorCreateTime(Date initiatorCreateTime) {
this.initiatorCreateTime = initiatorCreateTime;
}
public String getApprovalPhone() {
return approvalPhone;
}
public void setApprovalPhone(String approvalPhone) {
this.approvalPhone = approvalPhone;
}
public String getApprovalPhoneAreaCode() {
return approvalPhoneAreaCode;
}
public void setApprovalPhoneAreaCode(String approvalPhoneAreaCode) {
this.approvalPhoneAreaCode = approvalPhoneAreaCode;
}
public String getOrderItemJson() {
return orderItemJson;
}
public void setOrderItemJson(String orderItemJson) {
this.orderItemJson = orderItemJson;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.InitiatorTypeEnum;
import com.gic.finance.constant.TransferAccountApprovalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 转账审批列表VO
* @ClassName: TransferApprovalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/9 5:38 PM

*/
public class TransferApprovalListVO implements Serializable{
private static final long serialVersionUID = -1254096293186884889L;
private Integer transferApprovalId;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 商户类型名称
*/
private String platformTypeStr;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 公司logo
*/
private String logo;
/**
* 发起方1:商户 2:运维后台
*/
private Integer initiatorType;
/**
* 发起方名称
*/
private String initiatorTypeStr;
/**
* 发起方姓名
*/
private String initiatorName;
/**
* 计划金额
*/
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 验证码
*/
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批状态 名称
*/
private String approvalStatusStr;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批时间
*/
private Date approvalTime;
/**
*
*/
private Date createTime;
/**
* 1:套餐包 2:拓展包 3:服务 4:短信套餐包 5:充值
*/
private Integer orderType;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformTypeStr() {
return EnterprisePlatformTypeEnum.getMessageByCode(platformType);
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public void setInitiatorType(Integer initiatorType) {
this.initiatorType = initiatorType;
}
public String getInitiatorTypeStr() {
return InitiatorTypeEnum.getMessageByCode(initiatorType);
}
public String getInitiatorName() {
return initiatorName;
}
public void setInitiatorName(String initiatorName) {
this.initiatorName = initiatorName;
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalStatusStr() {
return TransferAccountApprovalStatusEnum.getMessageBuCode(approvalStatus);
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Long getApprovalTime() {
return DateUtils.dateToLong(approvalTime);
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.InitiatorTypeEnum;
import com.gic.finance.constant.TransferAccountApprovalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 转账审批详情VO-充值
* @ClassName: TransferApprovalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/9 5:38 PM

*/
public class TransferApprovalRechargeVO implements Serializable{
private static final long serialVersionUID = 2734432063082008967L;
private Integer transferApprovalId;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 商户类型名称
*/
private String platformTypeStr;
/**
* 计划金额
*/
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 验证码
*/
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批状态 名称
*/
private String approvalStatusStr;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批人手机号码
*/
private String approvalPhone;
/**
* 审批人手机号国际区号
*/
private String approvalPhoneAreaCode;
/**
* 审批时间
*/
private Date approvalTime;
/**
* 支付流水号
*/
private String payInfoSerialNumber;
/**
*
*/
private Date createTime;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 到账金额
*/
private Double accountAmount;
/**
* 总计费用
*/
private Double totalCountFee;
/**
* 订单流水号
*/
private String orderNumber;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformTypeStr() {
return EnterprisePlatformTypeEnum.getMessageByCode(platformType);
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalStatusStr() {
return TransferAccountApprovalStatusEnum.getMessageBuCode(approvalStatus);
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Long getApprovalTime() {
return DateUtils.dateToLong(approvalTime);
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public String getApprovalPhone() {
return approvalPhone;
}
public void setApprovalPhone(String approvalPhone) {
this.approvalPhone = approvalPhone;
}
public String getApprovalPhoneAreaCode() {
return approvalPhoneAreaCode;
}
public void setApprovalPhoneAreaCode(String approvalPhoneAreaCode) {
this.approvalPhoneAreaCode = approvalPhoneAreaCode;
}
public String getPayInfoSerialNumber() {
return payInfoSerialNumber;
}
public void setPayInfoSerialNumber(String payInfoSerialNumber) {
this.payInfoSerialNumber = payInfoSerialNumber;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public Double getAccountAmount() {
return accountAmount;
}
public void setAccountAmount(Double accountAmount) {
this.accountAmount = accountAmount;
}
public Double getTotalCountFee() {
return totalCountFee;
}
public void setTotalCountFee(Double totalCountFee) {
this.totalCountFee = totalCountFee;
}
public String getOrderNumber() {
return orderNumber;
}
public TransferApprovalRechargeVO setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
return this;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.OrderTypeEnum;
import com.gic.finance.constant.TransferAccountApprovalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 转账审批详情VO-服务、套餐包、拓展包
* @ClassName: TransferApprovalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/9 5:38 PM

*/
public class TransferApprovalServiceVO implements Serializable{
private static final long serialVersionUID = -4742066959808656137L;
private Integer transferApprovalId;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 商户类型名称
*/
private String platformTypeStr;
/**
* 计划金额
*/
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 验证码
*/
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批状态 名称
*/
private String approvalStatusStr;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批人手机号码
*/
private String approvalPhone;
/**
* 审批人手机号国际区号
*/
private String approvalPhoneAreaCode;
/**
* 审批时间
*/
private Date approvalTime;
/**
* 支付流水号
*/
private String payInfoSerialNumber;
/**
*
*/
private Date createTime;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 到账金额
*/
private Double accountAmount;
/**
* 总计费用
*/
private Double totalCountFee;
/**
* 支付详情json{100:现金 ,101:xxx}
*/
private String payDetail;
/**
* 订单创建时间
*/
private Date orderCreateTime;
/**
* 订单流水号
*/
private String orderNumber;
/**
* 1:套餐包 2:拓展包 3:服务 4:短信套餐包 5:充值
*/
private Integer orderType;
private String orderTypeStr;
/**
* 1购买 2续费 3升级 4扩容
*/
private Integer relationOrderType;
/**
* 订购类型
*/
private String relationOrderTypeStr;
/**
* 支付方式
*/
private Integer payType;
/**
* 支付方式
*/
private String payTypeStr;
/**
* 操作人类型(1:商户,2:运维)
*/
private Integer operType;
private String operTypeStr;
private String operName;
/**
* 优惠方式
*/
private ServiceDiscountVO serviceDiscountVO;
/**
* 服务信息
*/
private List<ServiceInfoVO> serviceInfoVOList;
/**
* license信息
*/
private List<LicenseVO> licenseVOList;
/**
* 拓展包
*/
private List<ExpandPackageVO> expandPackageVOList;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformTypeStr() {
return EnterprisePlatformTypeEnum.getMessageByCode(platformType);
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalStatusStr() {
return TransferAccountApprovalStatusEnum.getMessageBuCode(approvalStatus);
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Long getApprovalTime() {
return DateUtils.dateToLong(approvalTime);
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public String getApprovalPhone() {
return approvalPhone;
}
public void setApprovalPhone(String approvalPhone) {
this.approvalPhone = approvalPhone;
}
public String getApprovalPhoneAreaCode() {
return approvalPhoneAreaCode;
}
public void setApprovalPhoneAreaCode(String approvalPhoneAreaCode) {
this.approvalPhoneAreaCode = approvalPhoneAreaCode;
}
public String getPayInfoSerialNumber() {
return payInfoSerialNumber;
}
public void setPayInfoSerialNumber(String payInfoSerialNumber) {
this.payInfoSerialNumber = payInfoSerialNumber;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public Double getAccountAmount() {
return accountAmount;
}
public void setAccountAmount(Double accountAmount) {
this.accountAmount = accountAmount;
}
public Double getTotalCountFee() {
return totalCountFee;
}
public void setTotalCountFee(Double totalCountFee) {
this.totalCountFee = totalCountFee;
}
public Long getOrderCreateTime() {
return DateUtils.dateToLong(orderCreateTime);
}
public void setOrderCreateTime(Date orderCreateTime) {
this.orderCreateTime = orderCreateTime;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public String getOrderTypeStr() {
return OrderTypeEnum.getMessageBuCode(orderType);
}
public Integer getRelationOrderType() {
return relationOrderType;
}
public void setRelationOrderType(Integer relationOrderType) {
this.relationOrderType = relationOrderType;
}
public String getRelationOrderTypeStr() {
//1购买 2续费 3升级 4扩容
if (relationOrderType == null) {
return "--";
}
if (relationOrderType.intValue() == 1) {
return "服务开通";
} else if (relationOrderType.intValue() == 2) {
return "服务续费";
} else if (relationOrderType.intValue() == 3) {
return "版本升级";
} else if (relationOrderType.intValue() == 4) {
return "license扩容";
}
return "未知";
}
public Integer getPayType() {
return payType;
}
public void setPayType(Integer payType) {
this.payType = payType;
}
public String getPayTypeStr() {
if (payType == null) {
return "--";
}
switch (payType.intValue()) {
case 1:
return "余额";
case 2:
return "微信";
case 3:
return "支付宝";
case 4:
return "银行对公转账";
default:
return "未知";
}
}
public void setPayTypeStr(String payTypeStr) {
this.payTypeStr = payTypeStr;
}
public ServiceDiscountVO getServiceDiscountVO() {
return serviceDiscountVO;
}
public void setServiceDiscountVO(ServiceDiscountVO serviceDiscountVO) {
this.serviceDiscountVO = serviceDiscountVO;
}
public List<ServiceInfoVO> getServiceInfoVOList() {
return serviceInfoVOList;
}
public void setServiceInfoVOList(List<ServiceInfoVO> serviceInfoVOList) {
this.serviceInfoVOList = serviceInfoVOList;
}
public void setLicenseVOList(List<LicenseVO> licenseVOList) {
this.licenseVOList = licenseVOList;
}
public List<ExpandPackageVO> getExpandPackageVOList() {
return expandPackageVOList;
}
public void setExpandPackageVOList(List<ExpandPackageVO> expandPackageVOList) {
this.expandPackageVOList = expandPackageVOList;
}
public void setOperType(Integer operType) {
this.operType = operType;
}
public String getOperTypeStr() {
if (operType == null) {
return "--";
}
if (operType == 1) {
return "商户";
}
if (operType == 2) {
return "运维";
}
return "--";
}
public String getOperName() {
return operName;
}
public void setOperName(String operName) {
this.operName = operName;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getPayDetail() {
return payDetail;
}
public void setPayDetail(String payDetail) {
this.payDetail = payDetail;
}
}
package com.gic.finance.web.vo;
import java.io.Serializable;
import java.util.Date;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.TransferAccountApprovalStatusEnum;
import com.gic.finance.web.utils.DateUtils;
/**
* 转账审批详情VO-短信套餐包
* @ClassName: TransferApprovalListVO

* @Description: 

* @author guojuxing

* @date 2019/8/9 5:38 PM

*/
public class TransferApprovalSmsVO implements Serializable{
private static final long serialVersionUID = -7646329468400077405L;
private Integer transferApprovalId;
/**
* 关联订单平台方(商户类型)1:GIC 2: 好办
*/
private Integer platformType;
/**
* 商户类型名称
*/
private String platformTypeStr;
/**
* 计划金额
*/
private Double plannedAmount;
/**
* 坏账金额
*/
private Double badAmount;
/**
* 验证码
*/
private String verifyCode;
/**
* 审批流水号
*/
private String approvalNumber;
/**
* 审批状态 1:待审批 2:已取消 3:已驳回 4:审批通过
*/
private Integer approvalStatus;
/**
* 审批状态 名称
*/
private String approvalStatusStr;
/**
* 审批人姓名
*/
private String approvalName;
/**
* 审批人手机号码
*/
private String approvalPhone;
/**
* 审批人手机号国际区号
*/
private String approvalPhoneAreaCode;
/**
* 审批时间
*/
private Date approvalTime;
/**
* 订单项
*/
private String orderItemJson;
/**
* 支付流水号
*/
private String payInfoSerialNumber;
/**
* 优惠内容
*/
private Double couponCardContent;
/**
* 优惠券名
*/
private String couponCardName;
/**
* 应付金额
*/
private Double totalFee;
/**
* 实付金额
*/
private Double totalFeePaid;
/**
*
*/
private Date createTime;
/**
* 商户名称
*/
private String enterpriseName;
/**
* 公司名称
*/
private String companyName;
/**
* 到账金额
*/
private Double accountAmount;
/**
* 总计费用
*/
private Double totalCountFee;
/**
* 订单流水号
*/
private String orderNumber;
public Integer getTransferApprovalId() {
return transferApprovalId;
}
public void setTransferApprovalId(Integer transferApprovalId) {
this.transferApprovalId = transferApprovalId;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformTypeStr() {
return EnterprisePlatformTypeEnum.getMessageByCode(platformType);
}
public Double getPlannedAmount() {
return plannedAmount;
}
public void setPlannedAmount(Double plannedAmount) {
this.plannedAmount = plannedAmount;
}
public Double getBadAmount() {
return badAmount;
}
public void setBadAmount(Double badAmount) {
this.badAmount = badAmount;
}
public String getVerifyCode() {
return verifyCode;
}
public void setVerifyCode(String verifyCode) {
this.verifyCode = verifyCode;
}
public String getApprovalNumber() {
return approvalNumber;
}
public void setApprovalNumber(String approvalNumber) {
this.approvalNumber = approvalNumber;
}
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getApprovalStatusStr() {
return TransferAccountApprovalStatusEnum.getMessageBuCode(approvalStatus);
}
public String getApprovalName() {
return approvalName;
}
public void setApprovalName(String approvalName) {
this.approvalName = approvalName;
}
public Long getApprovalTime() {
return DateUtils.dateToLong(approvalTime);
}
public void setApprovalTime(Date approvalTime) {
this.approvalTime = approvalTime;
}
public String getApprovalPhone() {
return approvalPhone;
}
public void setApprovalPhone(String approvalPhone) {
this.approvalPhone = approvalPhone;
}
public String getApprovalPhoneAreaCode() {
return approvalPhoneAreaCode;
}
public void setApprovalPhoneAreaCode(String approvalPhoneAreaCode) {
this.approvalPhoneAreaCode = approvalPhoneAreaCode;
}
public String getOrderItemJson() {
return orderItemJson;
}
public void setOrderItemJson(String orderItemJson) {
this.orderItemJson = orderItemJson;
}
public String getPayInfoSerialNumber() {
return payInfoSerialNumber;
}
public void setPayInfoSerialNumber(String payInfoSerialNumber) {
this.payInfoSerialNumber = payInfoSerialNumber;
}
public Double getCouponCardContent() {
return couponCardContent;
}
public void setCouponCardContent(Double couponCardContent) {
this.couponCardContent = couponCardContent;
}
public String getCouponCardName() {
return couponCardName;
}
public void setCouponCardName(String couponCardName) {
this.couponCardName = couponCardName;
}
public Double getTotalFee() {
return totalFee;
}
public void setTotalFee(Double totalFee) {
this.totalFee = totalFee;
}
public Double getTotalFeePaid() {
return totalFeePaid;
}
public void setTotalFeePaid(Double totalFeePaid) {
this.totalFeePaid = totalFeePaid;
}
public Long getCreateTime() {
return DateUtils.dateToLong(createTime);
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public Double getAccountAmount() {
return accountAmount;
}
public void setAccountAmount(Double accountAmount) {
this.accountAmount = accountAmount;
}
public Double getTotalCountFee() {
return totalCountFee;
}
public void setTotalCountFee(Double totalCountFee) {
this.totalCountFee = totalCountFee;
}
public String getOrderNumber() {
return orderNumber;
}
public TransferApprovalSmsVO setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
return this;
}
}
app.id=gic-platform-finance
app.project-code=gic-platform-finance
logging.level.org.springframework.security=DEBUG
server.port=8350
server.servlet.context-path=/gic-finance-web
server.servlet.session.cookie.name=GICOPERATIONWEBSESSIONID
server.servlet.session.timeout=3600
spring.session.store-type=REDIS
spring.session.redis.namespace=gic-platform-finance
spring.session.timeout=3600
spring.redis.host=123.207.187.158
spring.redis.port=27019
spring.redis.password=crs-6vmo0g9s:gic*0571
spring.redis.database=11
spring.redis.timeout=5000
security.oauth2.client.clientId=gicfinanceid
security.oauth2.client.clientSecret=gicfinancesecret
security.oauth2.client.user-authorization-uri=http://localhost:8900/gic-authcenter/oauth/authorize
security.oauth2.client.access-token-uri=http://localhost:8900/gic-authcenter/oauth/token
security.oauth2.resource.user-info-uri=http://localhost:8900/gic-authcenter/resource/userDetails
server:
port: 8350
servlet:
context-path: /gic-finance-web
tomcat:
uri-encoding: UTF-8
spring:
jackson:
serialization:
# 以时间戳返回日期
write-dates-as-timestamps: true
http:
encoding:
charset: UTF-8
enabled: true
force: true
......@@ -35,4 +35,28 @@
<dubbo:reference interface="com.gic.store.service.ProvincesApiService" id="provincesApiService" timeout="60000" />
<dubbo:reference interface="com.gic.store.service.StoreStatusSettingApiService" id="storeStatusSettingApiService" timeout="60000" />
<dubbo:reference interface="com.gic.log.api.service.LogApiService" id="logApiService" timeout="60000" />
<!--转账审批-->
<dubbo:reference interface="com.gic.finance.service.TransferAccountsApprovalApiService" id="transferAccountsApprovalApiService" timeout="60000" />
<!--发票管理-->
<dubbo:reference interface="com.gic.finance.service.InvoiceManageApiService" id="invoiceManageApiService" timeout="60000" />
<!--开票户信息-->
<dubbo:reference interface="com.gic.finance.service.InvoiceAccountApiService" id="invoiceAccountApiService" timeout="60000" />
<!--打款户信息-->
<dubbo:reference interface="com.gic.finance.service.PayAccountApiService" id="payAccountApiService" timeout="60000" />
<!--提现管理-->
<dubbo:reference interface="com.gic.finance.service.CashWithdrawalApiService" id="cashWithdrawalApiService" timeout="60000" />
<dubbo:reference id="gicLogService" interface="com.gic.authcenter.api.service.GicLogService"/>
<dubbo:reference id="gicAppService" interface="com.gic.authcenter.api.service.GicAppService"/>
<dubbo:reference id="gicUserService" interface="com.gic.authcenter.api.service.GicUserService"/>
<dubbo:reference interface="com.gic.enterprise.service.BillingOrderApiService" id="billingOrderApiService" timeout="60000" />
<dubbo:reference interface="com.gic.enterprise.service.EnterpriseApiService" id="enterpriseApiService" timeout="60000" />
<dubbo:reference interface="com.gic.enterprise.service.BillingRechargeRecordApiService" id="billingRechargeRecordApiService" timeout="60000" />
<!--开放给平台订单详情-->
<dubbo:reference interface="com.gic.open.api.service.OrderApiService" id="orderApiService" timeout="60000" />
</beans>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment