Merge remote-tracking branch 'origin/main'
commit
37a3ca9723
@ -0,0 +1,7 @@
|
||||
-- 银行回单及审批流程字段新增
|
||||
ALTER TABLE archives_bank_slip ADD COLUMN `staff_id` bigint(20) NULL DEFAULT NULL COMMENT '认款员工id';
|
||||
ALTER TABLE archives_bank_slip ADD COLUMN `staff_name` varchar(64) NULL DEFAULT NULL COMMENT '认款员工名称';
|
||||
ALTER TABLE archives_bank_slip ADD COLUMN `subscription_status` varchar(64) NULL DEFAULT NULL COMMENT '认款状态 0:未认款 1 已认款';
|
||||
ALTER TABLE archives_flow ADD COLUMN `password` varchar(64) NULL DEFAULT NULL COMMENT '密码';
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
ALTER TABLE archives_bank_slip ADD COLUMN `file_url` varchar(64) NULL DEFAULT NULL COMMENT '回单文件地址';
|
83
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/BankSlipController.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/BankSlipController.java
83
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/BankSlipController.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/BankSlipController.java
8
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipCreateReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipCreateReqVO.java
8
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipCreateReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipCreateReqVO.java
@ -1,9 +1,9 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 银行回单创建 Request VO")
|
||||
@Data
|
13
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipExcelVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipExcelVO.java
13
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipExcelVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipExcelVO.java
@ -1,14 +1,9 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 银行回单 Excel VO
|
9
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipExportReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipExportReqVO.java
9
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipExportReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipExportReqVO.java
10
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipPageReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipPageReqVO.java
10
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipPageReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipPageReqVO.java
@ -1,10 +1,12 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
@ -1,7 +1,10 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 银行回单 Response VO")
|
10
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipUpdateReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipUpdateReqVO.java
10
yudao-module-archives/yudao-module-archives-biz/src/main/java/cn/iocoder/yudao/module/archives/controller/admin/bankslip/vo/BankSlipUpdateReqVO.java → yudao-module-accounting/yudao-module-accounting-biz/src/main/java/cn/iocoder/yudao/module/accounting/controller/admin/bankslip/vo/BankSlipUpdateReqVO.java
@ -1,9 +1,11 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 银行回单更新 Request VO")
|
||||
@Data
|
@ -1,9 +1,9 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.flow.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.flow.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 审批流程创建 Request VO")
|
||||
@Data
|
@ -1,13 +1,9 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.flow.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.flow.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 审批流程 Excel VO
|
@ -1,10 +1,12 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.flow.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.flow.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
@ -1,7 +1,10 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.flow.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.flow.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 审批流程 Response VO")
|
@ -1,9 +1,11 @@
|
||||
package cn.iocoder.yudao.module.archives.controller.admin.flow.vo;
|
||||
package cn.iocoder.yudao.module.accounting.controller.admin.flow.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 审批流程更新 Request VO")
|
||||
@Data
|
@ -1,13 +1,16 @@
|
||||
package cn.iocoder.yudao.module.archives.convert.bankslip;
|
||||
package cn.iocoder.yudao.module.accounting.convert.bankslip;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipCreateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipExcelVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipRespVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo.*;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.bankslip.BankSlipDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 银行回单 Convert
|
@ -1,13 +1,15 @@
|
||||
package cn.iocoder.yudao.module.archives.convert.flow;
|
||||
|
||||
import java.util.*;
|
||||
package cn.iocoder.yudao.module.accounting.convert.flow;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowCreateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowExcelVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowRespVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.flow.vo.*;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.flow.FlowDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批流程 Convert
|
@ -0,0 +1,109 @@
|
||||
package cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 银行回单实体
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BankReceiptDO {
|
||||
|
||||
private String log_id;
|
||||
private int words_result_num;
|
||||
private WordsResult words_result;
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class WordsResult {
|
||||
private List<PaymentAccount> 付款人账号;
|
||||
private List<TransactionDate> 交易日期;
|
||||
private List<String> 用途;
|
||||
private List<String> 流水号;
|
||||
private List<String> 摘要;
|
||||
private List<String> 付款人户名;
|
||||
private List<LowerAmount> 小写金额;
|
||||
private List<PaymentAccount> 收款人账号;
|
||||
private List<UpperAmount> 大写金额;
|
||||
private List<String> 收款人户名;
|
||||
private List<String> 标题;
|
||||
private List<String> 回单编号;
|
||||
private List<String> 付款人开户银行;
|
||||
private List<String> 收款人开户银行;
|
||||
|
||||
// 添加相应的 getter 和 setter 方法
|
||||
}
|
||||
|
||||
// @Data
|
||||
// @ToString(callSuper = true)
|
||||
// @NoArgsConstructor
|
||||
// @AllArgsConstructor
|
||||
// public static class WordsResultData {
|
||||
// private PaymentAccount 付款人账号;
|
||||
// private TransactionDate 交易日期;
|
||||
// private String 用途;
|
||||
// private String 流水号;
|
||||
// private String 摘要;
|
||||
// private String 付款人户名;
|
||||
// private LowerAmount 小写金额;
|
||||
// private PaymentAccount 收款人账号;
|
||||
// private UpperAmount 大写金额;
|
||||
// private String 收款人户名;
|
||||
// private String 标题;
|
||||
// private String 回单编号;
|
||||
// private String 付款人开户银行;
|
||||
// private String 收款人开户银行;
|
||||
//
|
||||
// // 添加相应的 getter 和 setter 方法
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class PaymentAccount {
|
||||
private String word;
|
||||
|
||||
// 添加相应的 getter 和 setter 方法
|
||||
}
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
||||
public static class TransactionDate {
|
||||
private String word;
|
||||
|
||||
// 添加相应的 getter 和 setter 方法
|
||||
}
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class LowerAmount {
|
||||
private String word;
|
||||
|
||||
// 添加相应的 getter 和 setter 方法
|
||||
}
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class UpperAmount {
|
||||
private String word;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,13 +1,10 @@
|
||||
package cn.iocoder.yudao.module.archives.dal.dataobject.flow;
|
||||
package cn.iocoder.yudao.module.accounting.dal.dataobject.flow;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
@ -1,13 +1,14 @@
|
||||
package cn.iocoder.yudao.module.archives.dal.mysql.bankslip;
|
||||
|
||||
import java.util.*;
|
||||
package cn.iocoder.yudao.module.accounting.dal.mysql.bankslip;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.bankslip.BankSlipDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipExportReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipPageReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 银行回单 Mapper
|
@ -1,13 +1,14 @@
|
||||
package cn.iocoder.yudao.module.archives.dal.mysql.flow;
|
||||
|
||||
import java.util.*;
|
||||
package cn.iocoder.yudao.module.accounting.dal.mysql.flow;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.flow.FlowDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowExportReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowPageReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.flow.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批流程 Mapper
|
@ -0,0 +1,151 @@
|
||||
package cn.iocoder.yudao.module.accounting.service.bankslip;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipCreateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipExportReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipPageReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.BankSlipUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.convert.bankslip.BankSlipConvert;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankReceiptDO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.mysql.bankslip.BankSlipMapper;
|
||||
import cn.iocoder.yudao.module.infra.service.file.FileService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.DataInput;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.accounting.enums.ErrorCodeConstants.BANK_SLIP_NOT_EXISTS;
|
||||
|
||||
|
||||
/**
|
||||
* 银行回单 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BankSlipServiceImpl implements BankSlipService {
|
||||
|
||||
@Resource
|
||||
private BankSlipMapper bankSlipMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private FileService fileService;
|
||||
|
||||
@Override
|
||||
public Long createBankSlip(BankSlipCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
BankSlipDO bankSlip = BankSlipConvert.INSTANCE.convert(createReqVO);
|
||||
bankSlipMapper.insert(bankSlip);
|
||||
// 返回
|
||||
return bankSlip.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBankSlip(BankSlipUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBankSlipExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BankSlipDO updateObj = BankSlipConvert.INSTANCE.convert(updateReqVO);
|
||||
bankSlipMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBankSlip(Long id) {
|
||||
// 校验存在
|
||||
validateBankSlipExists(id);
|
||||
// 删除
|
||||
bankSlipMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateBankSlipExists(Long id) {
|
||||
if (bankSlipMapper.selectById(id) == null) {
|
||||
throw exception(BANK_SLIP_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BankSlipDO getBankSlip(Long id) {
|
||||
return bankSlipMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BankSlipDO> getBankSlipList(Collection<Long> ids) {
|
||||
return bankSlipMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BankSlipDO> getBankSlipPage(BankSlipPageReqVO pageReqVO) {
|
||||
return bankSlipMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BankSlipDO> getBankSlipList(BankSlipExportReqVO exportReqVO) {
|
||||
return bankSlipMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得银行回单分页时间段
|
||||
*
|
||||
* @param months 分页查询
|
||||
* @return 发票分页
|
||||
*/
|
||||
@Override
|
||||
public PageResult<BankSlipDO> getBankSlipPageTime(Long months) {
|
||||
QueryWrapper<BankSlipDO> wrapper = new QueryWrapper<>();
|
||||
wrapper.ge("trad_time", LocalDateTime.now().minusMonths(months));
|
||||
List<BankSlipDO> invoicesDOS = bankSlipMapper.selectList(wrapper);
|
||||
PageResult<BankSlipDO> pageResult = new PageResult<>();
|
||||
pageResult.setList(invoicesDOS);
|
||||
long size =(long) invoicesDOS.size();
|
||||
pageResult.setTotal(size);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行回单json转银行回单对象
|
||||
* @param bankReceiptDO
|
||||
*/
|
||||
@Override
|
||||
public BankSlipDO jsonToJavaObject(BankReceiptDO bankReceiptDO, MultipartFile multipartFile) throws IOException {
|
||||
BankSlipDO bankSlipDO = new BankSlipDO();
|
||||
String invoiceDateStr = bankReceiptDO.getWords_result().get交易日期().get(0).getWord().replace("年", "-").replaceAll("月", "-").replaceAll("日", "").trim();
|
||||
LocalDate parse = LocalDate.parse(invoiceDateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
LocalDateTime date = parse.atStartOfDay();;
|
||||
bankSlipDO.setTradTime(date);
|
||||
// 将日期字符串解析为 LocalDate 对象
|
||||
//这里用中文是因为调用百度ocr银行回单的接口返回的数据json都是中文的
|
||||
bankSlipDO
|
||||
.setBank(bankReceiptDO.getWords_result().get标题().get(0))
|
||||
.setMyCompany(bankReceiptDO.getWords_result().get付款人开户银行().get(0))
|
||||
.setMyNum(bankReceiptDO.getWords_result().get付款人账号().get(0).getWord())
|
||||
.setAdverseCompany(bankReceiptDO.getWords_result().get收款人开户银行().get(0))
|
||||
.setAdverseNum(bankReceiptDO.getWords_result().get收款人账号().get(0).getWord())
|
||||
.setSerialNum(bankReceiptDO.getWords_result().get流水号().get(0))
|
||||
.setTradMoney(bankReceiptDO.getWords_result().get大写金额().get(0).getWord())
|
||||
.setReceiptNum(bankReceiptDO.getWords_result().get回单编号().get(0))
|
||||
.setDigest(bankReceiptDO.getWords_result().get摘要().get(0))
|
||||
.setPurpose(bankReceiptDO.getWords_result().get用途().get(0))
|
||||
;
|
||||
bankSlipDO.setFileUrl(
|
||||
fileService.createFile(null, null, IoUtil.readBytes(multipartFile.getInputStream())));
|
||||
|
||||
return bankSlipDO;
|
||||
}
|
||||
|
||||
}
|
@ -1,10 +1,17 @@
|
||||
package cn.iocoder.yudao.module.archives.service.flow;
|
||||
package cn.iocoder.yudao.module.accounting.service.flow;
|
||||
|
||||
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.flow.vo.*;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.flow.FlowDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowCreateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowExportReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowPageReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批流程 Service 接口
|
@ -1,19 +1,24 @@
|
||||
package cn.iocoder.yudao.module.archives.service.flow;
|
||||
package cn.iocoder.yudao.module.accounting.service.flow;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowCreateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowExportReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowPageReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.controller.admin.flow.vo.FlowUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.accounting.convert.flow.FlowConvert;
|
||||
import cn.iocoder.yudao.module.accounting.dal.dataobject.flow.FlowDO;
|
||||
import cn.iocoder.yudao.module.accounting.dal.mysql.flow.FlowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.flow.vo.*;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.flow.FlowDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.archives.convert.flow.FlowConvert;
|
||||
import cn.iocoder.yudao.module.archives.dal.mysql.flow.FlowMapper;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.accounting.enums.ErrorCodeConstants.FLOW_NOT_EXISTS;
|
||||
|
||||
|
||||
/**
|
||||
* 审批流程 Service 实现类
|
@ -1,6 +1,6 @@
|
||||
<?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="cn.iocoder.yudao.module.archives.dal.mysql.bankslip.BankSlipMapper">
|
||||
<mapper namespace="cn.iocoder.yudao.module.accounting.dal.mysql.bankslip.BankSlipMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
@ -1,6 +1,6 @@
|
||||
<?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="cn.iocoder.yudao.module.archives.dal.mysql.flow.FlowMapper">
|
||||
<mapper namespace="cn.iocoder.yudao.module.accounting.dal.mysql.flow.FlowMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
@ -1,101 +0,0 @@
|
||||
package cn.iocoder.yudao.module.archives.service.bankslip;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.archives.controller.admin.bankslip.vo.*;
|
||||
import cn.iocoder.yudao.module.archives.dal.dataobject.bankslip.BankSlipDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.archives.convert.bankslip.BankSlipConvert;
|
||||
import cn.iocoder.yudao.module.archives.dal.mysql.bankslip.BankSlipMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 银行回单 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BankSlipServiceImpl implements BankSlipService {
|
||||
|
||||
@Resource
|
||||
private BankSlipMapper bankSlipMapper;
|
||||
|
||||
@Override
|
||||
public Long createBankSlip(BankSlipCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
BankSlipDO bankSlip = BankSlipConvert.INSTANCE.convert(createReqVO);
|
||||
bankSlipMapper.insert(bankSlip);
|
||||
// 返回
|
||||
return bankSlip.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBankSlip(BankSlipUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBankSlipExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BankSlipDO updateObj = BankSlipConvert.INSTANCE.convert(updateReqVO);
|
||||
bankSlipMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBankSlip(Long id) {
|
||||
// 校验存在
|
||||
validateBankSlipExists(id);
|
||||
// 删除
|
||||
bankSlipMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateBankSlipExists(Long id) {
|
||||
if (bankSlipMapper.selectById(id) == null) {
|
||||
throw exception(BANK_SLIP_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BankSlipDO getBankSlip(Long id) {
|
||||
return bankSlipMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BankSlipDO> getBankSlipList(Collection<Long> ids) {
|
||||
return bankSlipMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BankSlipDO> getBankSlipPage(BankSlipPageReqVO pageReqVO) {
|
||||
return bankSlipMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BankSlipDO> getBankSlipList(BankSlipExportReqVO exportReqVO) {
|
||||
return bankSlipMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得银行回单分页时间段
|
||||
*
|
||||
* @param months 分页查询
|
||||
* @return 发票分页
|
||||
*/
|
||||
@Override
|
||||
public PageResult<BankSlipDO> getBankSlipPageTime(Long months) {
|
||||
QueryWrapper<BankSlipDO> wrapper = new QueryWrapper<>();
|
||||
wrapper.ge("trad_time", LocalDateTime.now().minusMonths(months));
|
||||
List<BankSlipDO> invoicesDOS = bankSlipMapper.selectList(wrapper);
|
||||
PageResult<BankSlipDO> pageResult = new PageResult<>();
|
||||
pageResult.setList(invoicesDOS);
|
||||
long size =(long) invoicesDOS.size();
|
||||
pageResult.setTotal(size);
|
||||
return pageResult;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue