Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
094ad590
Commit
094ad590
authored
Dec 26, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(wealth): 开票管理,收款单对应多订单
parent
ac16eac2
Changes
43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
755 additions
and
194 deletions
+755
-194
RegionDTO.java
...cn/iocoder/yudao/module/ecw/api/region/dto/RegionDTO.java
+3
-0
RegionApiImpl.java
...n/iocoder/yudao/module/ecw/service/api/RegionApiImpl.java
+1
-0
OrderApi.java
.../main/java/cn/iocoder/boot/module/order/api/OrderApi.java
+5
-0
OrderApiImpl.java
.../java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
+9
-0
ReceiptInvoiceConvert.java
.../wealth/convert/receiptInvoice/ReceiptInvoiceConvert.java
+3
-0
ReceiptDO.java
...yudao/module/wealth/dal/dataobject/receipt/ReceiptDO.java
+0
-10
ReceiptInvoiceDO.java
...ealth/dal/dataobject/receiptInvoice/ReceiptInvoiceDO.java
+8
-24
ReceivableDO.java
...module/wealth/dal/dataobject/receivable/ReceivableDO.java
+4
-0
ReceiptMapper.java
.../yudao/module/wealth/dal/mysql/receipt/ReceiptMapper.java
+2
-9
ReceiptInvoiceMapper.java
...wealth/dal/mysql/receiptInvoice/ReceiptInvoiceMapper.java
+1
-1
BankReceiptDetailsMapper.java
...ealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
+9
-0
InvoiceDataStatusEnum.java
...oder/yudao/module/wealth/enums/InvoiceDataStatusEnum.java
+5
-1
InvoicingLinkEnum.java
.../iocoder/yudao/module/wealth/enums/InvoicingLinkEnum.java
+5
-5
InvoicingStatusEnum.java
...ocoder/yudao/module/wealth/enums/InvoicingStatusEnum.java
+1
-6
UpdateCurrencyExchangeRate.java
...r/yudao/module/wealth/job/UpdateCurrencyExchangeRate.java
+49
-0
UpdateReceiptNewFeildTask.java
...er/yudao/module/wealth/job/UpdateReceiptNewFeildTask.java
+116
-0
FinanceReceiptApproveService.java
...o/module/wealth/service/FinanceReceiptApproveService.java
+4
-4
ReceiptServiceImpl.java
...dao/module/wealth/service/receipt/ReceiptServiceImpl.java
+56
-32
ReceiptInvoiceService.java
.../wealth/service/receiptInvoice/ReceiptInvoiceService.java
+2
-0
ReceiptInvoiceServiceImpl.java
...lth/service/receiptInvoice/ReceiptInvoiceServiceImpl.java
+96
-28
BankReceiptDetailsImpl.java
...le/wealth/service/receiptItem/BankReceiptDetailsImpl.java
+27
-0
BankReceiptDetailsService.java
...wealth/service/receiptItem/BankReceiptDetailsService.java
+4
-0
ReceiptItemServiceImpl.java
...le/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+1
-1
ReceivableService.java
...o/module/wealth/service/receivable/ReceivableService.java
+2
-0
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+27
-0
ReceiptBackVO.java
...iocoder/yudao/module/wealth/vo/receipt/ReceiptBackVO.java
+7
-0
ReceiptBaseVO.java
...iocoder/yudao/module/wealth/vo/receipt/ReceiptBaseVO.java
+1
-1
ReceiptRelationOrderInfoVO.java
.../module/wealth/vo/receipt/ReceiptRelationOrderInfoVO.java
+17
-0
ReceiptInvoiceCreateReqVO.java
...e/wealth/vo/receiptInvoice/ReceiptInvoiceCreateReqVO.java
+1
-1
ReceiptInvoiceDetailVO.java
...dule/wealth/vo/receiptInvoice/ReceiptInvoiceDetailVO.java
+29
-0
ReceiptInvoiceLogBackVO.java
...ule/wealth/vo/receiptInvoice/ReceiptInvoiceLogBackVO.java
+2
-1
ReceiptInvoicePageBackVO.java
...le/wealth/vo/receiptInvoice/ReceiptInvoicePageBackVO.java
+13
-11
ReceiptInvoiceQueryVO.java
...odule/wealth/vo/receiptInvoice/ReceiptInvoiceQueryVO.java
+3
-1
BankIncomeItemReq.java
...yudao/module/wealth/vo/receiptItem/BankIncomeItemReq.java
+36
-0
BankIncomeItemResp.java
...udao/module/wealth/vo/receiptItem/BankIncomeItemResp.java
+66
-0
ReceivableBackVO.java
...r/yudao/module/wealth/vo/receivable/ReceivableBackVO.java
+8
-0
ReceiptController.java
...le/wealth/controller/admin/receipt/ReceiptController.java
+9
-5
ReceiptInvoiceController.java
...roller/admin/receiptInvoice/ReceiptInvoiceController.java
+7
-0
BankReceiptDetailsControl.java
...ntroller/admin/receiptItem/BankReceiptDetailsControl.java
+6
-18
BankReceiptDetailsMapper.xml
...resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
+59
-1
ReceiptMapper.xml
...-rest/src/main/resources/mapper/receipt/ReceiptMapper.xml
+17
-16
ReceiptInvoiceMapper.xml
.../resources/mapper/receiptInvoice/ReceiptInvoiceMapper.xml
+21
-5
application-local.yaml
yudao-server/src/main/resources/application-local.yaml
+13
-13
No files found.
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/api/region/dto/RegionDTO.java
View file @
094ad590
...
...
@@ -13,4 +13,7 @@ public class RegionDTO {
@ApiModelProperty
(
value
=
"英文"
)
private
String
titleEn
;
@ApiModelProperty
(
value
=
"进口国应收额币种"
)
private
String
importCurrency5
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/RegionApiImpl.java
View file @
094ad590
...
...
@@ -36,6 +36,7 @@ public class RegionApiImpl implements RegionApi {
regionDTO
.
setId
(
regionDO
.
getId
());
regionDTO
.
setTitleZh
(
regionDO
.
getTitleZh
());
regionDTO
.
setTitleEn
(
regionDO
.
getTitleEn
());
regionDTO
.
setImportCurrency5
(
regionDO
.
getImportCurrency5
());
return
regionDTO
;
}
return
null
;
...
...
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/OrderApi.java
View file @
094ad590
...
...
@@ -41,4 +41,9 @@ public interface OrderApi {
* @param orderNo
*/
OrderRespDTO
getOrderByNo
(
String
orderNo
);
/**
* 根据订单号获取目的国
*/
Long
getDestCountryByOrderId
(
Long
orderId
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
View file @
094ad590
...
...
@@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigne
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper
;
import
cn.iocoder.yudao.module.order.service.order.*
;
import
cn.iocoder.yudao.module.order.service.order.impl.OrderItemServiceImpl
;
import
cn.iocoder.yudao.module.order.service.orderOperateLog.OrderOperateLogService
;
...
...
@@ -37,6 +38,8 @@ public class OrderApiImpl implements OrderApi {
@Resource
private
OrderService
orderService
;
@Resource
private
OrderMapper
orderMapper
;
@Resource
private
OrderBusinessService
orderBusinessService
;
@Resource
private
CustomerService
customerService
;
...
...
@@ -192,4 +195,10 @@ public class OrderApiImpl implements OrderApi {
BeanUtils
.
copyProperties
(
orderDO
,
orderRespDTO
);
return
orderRespDTO
;
}
@Override
public
Long
getDestCountryByOrderId
(
Long
orderId
)
{
String
destCountryByOrderId
=
orderMapper
.
getDestCountryByOrderId
(
orderId
);
return
destCountryByOrderId
==
null
?
null
:
Long
.
valueOf
(
destCountryByOrderId
);
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/convert/receiptInvoice/ReceiptInvoiceConvert.java
View file @
094ad590
...
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.wealth.convert.receiptInvoice;
import
java.util.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptInvoice.ReceiptInvoiceDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptInvoiceLog.ReceiptInvoiceLogDO
;
import
cn.iocoder.yudao.module.wealth.vo.receiptInvoice.*
;
...
...
@@ -55,4 +56,6 @@ public interface ReceiptInvoiceConvert {
List
<
ReceiptInvoiceLogBackVO
>
logDOtoLogVOList
(
List
<
ReceiptInvoiceLogDO
>
invoiceLogDOs
);
ReceiptInvoiceDO
convert
(
ReceiptInvoiceUpdateInfoReqVO
updateReqVO
);
ReceiptInvoiceDetailVO
convert
(
ReceiptDO
receiptDO
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/receipt/ReceiptDO.java
View file @
094ad590
...
...
@@ -212,16 +212,6 @@ public class ReceiptDO extends BaseDO {
* 财务备注
*/
private
String
financeRemark
;
/**
*订单ID
*/
private
long
orderId
;
/**
*订单编号
*/
private
String
orderNo
;
/**
* 明细状态
*/
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/receiptInvoice/ReceiptInvoiceDO.java
View file @
094ad590
...
...
@@ -38,14 +38,6 @@ public class ReceiptInvoiceDO extends BaseDO {
* 收款单号(例:SKD001)
*/
private
String
receiptNo
;
/**
* 部门id
*/
private
Long
departmentId
;
/**
* 部门名称
*/
private
String
departmentName
;
/**
* 申请人id
*/
...
...
@@ -106,26 +98,10 @@ public class ReceiptInvoiceDO extends BaseDO {
* 开发票人id
*/
private
Long
invoicerId
;
/**
* 开票人名称
*/
private
String
invoicerName
;
/**
* 开票时间
*/
private
Date
invoiceTime
;
/**
* 订单id
*/
private
Long
orderId
;
/**
* 订单号(NG2414248L)
*/
private
String
orderNo
;
/**
* 提单号(CNG244432-26)
*/
private
String
tidanNo
;
/**
* 开票币种符号
...
...
@@ -142,4 +118,12 @@ public class ReceiptInvoiceDO extends BaseDO {
*/
private
String
invoiceInfoRemark
;
/**
* 开票取消人id
*/
private
Long
cancelUserId
;
/**
* 开票取消时间
*/
private
Date
cancelTime
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/receivable/ReceivableDO.java
View file @
094ad590
...
...
@@ -88,6 +88,10 @@ public class ReceivableDO extends BaseDO {
* 货币id
*/
private
Long
currencyId
;
/**
* 基准币种id
*/
private
Long
baseCurrencyId
;
/**
* 单价
*/
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receipt/ReceiptMapper.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
dal
.
mysql
.
receipt
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.vo.commissionPayable.CommissionPayableBackVO
;
import
cn.iocoder.yudao.module.wealth.vo.commissionPayable.CommissionPayableQueryVO
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.OrderVo
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.ReceiptBackVO
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.ReceiptExportDto
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.ReceiptQueryVO
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.*
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -96,4 +88,5 @@ public interface ReceiptMapper extends AbstractMapper<ReceiptDO> {
IPage
<
ReceiptBackVO
>
getReceiptBackPage
(
@Param
(
"mpPage"
)
IPage
<
ReceiptBackVO
>
mpPage
,
@Param
(
"query"
)
ReceiptQueryVO
query
);
List
<
ReceiptRelationOrderInfoVO
>
getOrderInfoByReceiptId
(
Long
id
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptInvoice/ReceiptInvoiceMapper.java
View file @
094ad590
...
...
@@ -17,7 +17,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public
interface
ReceiptInvoiceMapper
extends
AbstractMapper
<
ReceiptInvoiceDO
>
{
void
getReceiptInvoicePage
(
IPage
<
ReceiptInvoicePageBackVO
>
mpPage
,
@Param
(
"query"
)
ReceiptInvoiceQueryVO
query
);
IPage
<
ReceiptInvoicePageBackVO
>
getReceiptInvoicePage
(
IPage
<
ReceiptInvoicePageBackVO
>
mpPage
,
@Param
(
"query"
)
ReceiptInvoiceQueryVO
query
);
ReceiptInvoiceDetailVO
getReceiptInvoiceDetail
(
Long
id
);
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
dal
.
mysql
.
receiptItem
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.BankIncomeItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.BankIncomeItemResp
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Mapper
...
...
@@ -11,4 +16,8 @@ public interface BankReceiptDetailsMapper {
List
<
ReceiptItemResp
>
getBankReceiptDetailsList
(
ReceiptItemReq
req
);
long
GetCount
(
ReceiptItemReq
req
);
void
getBankIncomeItemPage
(
IPage
<
BankIncomeItemResp
>
page
,
@Param
(
"req"
)
BankIncomeItemReq
req
);
BigDecimal
calculateAccountBalance
(
String
accountNo
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/InvoiceDataStatusEnum.java
View file @
094ad590
...
...
@@ -17,7 +17,11 @@ public enum InvoiceDataStatusEnum implements IntArrayValuable {
/**
* 驳回
*/
REJECT
(
1
,
"驳回"
,
"Reject"
);
REJECT
(
1
,
"驳回"
,
"Reject"
),
/**
* 无需审核
*/
NO_AUDIT
(
2
,
"无需审核"
,
"No Audit"
);
public
static
final
int
[]
ARRAYS
=
Arrays
.
stream
(
values
()).
mapToInt
(
InvoiceDataStatusEnum:
:
getValue
).
toArray
();
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/InvoicingLinkEnum.java
View file @
094ad590
...
...
@@ -19,15 +19,15 @@ public enum InvoicingLinkEnum implements IntArrayValuable {
*/
CANCEL_INVOICE
(
1
,
"取消开票"
,
"Cancel Invoice"
),
/**
*
驳回开票
*
修改开票信息
*/
REJECT_INVOICE
(
2
,
"驳回开票"
,
"Reject Invoice
"
),
MODIFY_INVOICE_INFO
(
2
,
"修改开票信息"
,
"Modify Invoice Info
"
),
/**
* 删除开票信息
*/
DELETE_INVOICE_INFO
(
3
,
"删除开票"
,
"Delete Invoice Info"
),
DELETE_INVOICE_INFO
(
3
,
"删除开票
信息
"
,
"Delete Invoice Info"
),
/**
* 驳回开票
信息
* 驳回开票
资料
*/
REJECT_INVOICE_DATA
(
4
,
"驳回开票资料"
,
"Reject Invoice Data"
),
/**
...
...
@@ -37,7 +37,7 @@ public enum InvoicingLinkEnum implements IntArrayValuable {
/**
* 修改开票资料
*/
MODIFY_INVOICE_
INFO
(
6
,
"修改开票资料"
,
"Modify Invoice Info
"
);
MODIFY_INVOICE_
DATA
(
6
,
"修改开票资料"
,
"Modify Invoice Data
"
);
public
static
final
int
[]
ARRAYS
=
Arrays
.
stream
(
values
()).
mapToInt
(
InvoicingLinkEnum:
:
getValue
).
toArray
();
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/InvoicingStatusEnum.java
View file @
094ad590
...
...
@@ -25,12 +25,7 @@ public enum InvoicingStatusEnum implements IntArrayValuable {
/**
* 不开票
*/
NO_INVOICE
(
3
,
"不开票"
,
"NoInvoice"
),
/**
* 无申请记录
*/
NO_RECORD
(
4
,
"无申请记录"
,
"NoRecord"
);
NO_INVOICE
(
3
,
"不开票"
,
"NoInvoice"
);
public
static
final
int
[]
ARRAYS
=
Arrays
.
stream
(
values
()).
mapToInt
(
InvoicingStatusEnum:
:
getValue
).
toArray
();
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/job/UpdateCurrencyExchangeRate.java
0 → 100644
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
job
;
import
cn.iocoder.yudao.framework.quartz.core.handler.JobHandler
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
@Component
@Slf4j
public
class
UpdateCurrencyExchangeRate
implements
JobHandler
{
/**
* 更新兑兑目的国各种费用币种汇率
* @param param 参数
*/
@Override
public
String
execute
(
String
param
)
throws
Exception
{
return
"success"
;
}
/**
* 更新兑兑目的国运费币种汇率
* 当订单费用核销>=100%且费用类型为运费/额外费用-运费/全包价且兑目的国运费币种汇率为空,
* 更新目的国运费币种汇率=当前系统本币兑目的国运费用币种汇率,兑目的国运费币种汇率来源=系统汇率+年月日,例如系统汇率2024年06月27日 00:00:00
*/
private
void
updateFreightExchangeRate
()
{
}
/**
* 更新兑兑目的国清关费币种汇率
* 当订单费用核销>=100%且费用类型为清关费/额外费用-清关费且兑目的国清关费币种汇率为空,
* 更新目的国清关费币种汇率=当前系统本币兑目的国清关费币种汇率,兑目的国清关费币种汇率来源=系统汇率+年月日,例如系统汇率2024年06月27日 00:00:00
*/
private
void
updateClearanceFeeExchangeRate
()
{
}
/**
* 更新兑兑目的国额外费用主币种汇率
* 当订单费用核销>=100%且费用类型非清关费/额外费用-清关费/全包价/运费/额外费用-运费且兑目的国额外费用主币种汇率汇率为空,
* 更新目的国额外费用主币种汇率=当前系统本币兑目的国额外费用主币种汇率,兑目的国额外费用主币种汇率来源=系统汇率+年月日,例如系统汇率2024年06月27日 00:00:00
*/
private
void
updateExtraMainExchangeRate
()
{
}
/**
* 更新兑兑目的国额外费用副币种汇率
* 当订单费用核销>=100%且费用类型非清关费/额外费用-清关费/全包价/运费/额外费用-运费且兑目的国额外费用副币种汇率汇率为空,
* 更新目的国额外费用副币种汇率=当前系统本币兑目的国额外费用副币种汇率,兑目的国额外费用副币种汇率来源=系统汇率+年月日,例如系统汇率2024年06月27日 00:00:00
*/
private
void
updateExtraSecondaryExchangeRate
()
{
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/job/UpdateReceiptNewFeildTask.java
0 → 100644
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
job
;
import
cn.iocoder.yudao.framework.quartz.core.handler.JobHandler
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receipt.ReceiptMapper
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.ReceiptItemMapper
;
import
cn.iocoder.yudao.module.wealth.enums.ReceiptItemStatusInReceiptEnum
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Component
@Slf4j
public
class
UpdateReceiptNewFeildTask
implements
JobHandler
{
@Resource
private
ReceiptItemMapper
receiptItemMapper
;
@Resource
private
ReceiptMapper
receiptMapper
;
/**
* 更新收款单新字段:应收明细状态
* @param param 参数
*/
@Override
public
String
execute
(
String
param
)
throws
Exception
{
LambdaQueryWrapper
<
ReceiptDO
>
receiptDOLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
receiptDOLambdaQueryWrapper
.
select
(
ReceiptDO:
:
getId
)
.
eq
(
ReceiptDO:
:
getDeleted
,
false
);
List
<
ReceiptDO
>
receiptDOS
=
receiptMapper
.
selectList
(
receiptDOLambdaQueryWrapper
);
for
(
ReceiptDO
receiptDO
:
receiptDOS
)
{
LambdaQueryWrapper
<
ReceiptItemDO
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
ReceiptItemDO:
:
getReceiptId
,
receiptDO
.
getId
())
.
select
(
ReceiptItemDO:
:
getReceiptId
,
ReceiptItemDO:
:
getStatus
);
List
<
ReceiptItemDO
>
listItem
=
receiptItemMapper
.
selectList
(
lambdaQueryWrapper
);
if
(!
listItem
.
isEmpty
())
{
ReceiptItemStatusInReceiptEnum
sMxStatus
=
getReceiptMxStatus
(
listItem
,
receiptDO
.
getId
());
receiptDO
.
setReceiptItemStatus
(
sMxStatus
.
getValue
());
}
else
{
receiptDO
.
setReceiptItemStatus
(
ReceiptItemStatusInReceiptEnum
.
NO_INPUT
.
getValue
());
}
}
receiptMapper
.
updateBatch
(
receiptDOS
);
return
"success"
;
}
/**
* 计算收款单明细状态
* 收款单主表
* SELECT * from ecw_receipt where receipt_no='SKD00006547'
* 收款单明细表
* SELECT * from ecw_receipt_item where receipt_id=6554
*/
private
ReceiptItemStatusInReceiptEnum
getReceiptMxStatus
(
List
<
ReceiptItemDO
>
listItem
,
long
ReceiptId
)
{
//未录入 收款单下无收款明细 OK
//未提交 :收款单下有收款明细且全未提交 OK
//部分提交 收款单下有收款明细且部分提交(无需判断收款明细是否审批) OK
//未审核 收款明细全部提交且全部未审批 OK
//部分审核 收款明细全部提交且部分已审批 OK
//全部审核 收款明细全部已审批 OK
ReceiptItemStatusInReceiptEnum
sMxStatus
=
null
;
//计算明细总数
Long
iCount
=
listItem
.
stream
().
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
).
collect
(
Collectors
.
counting
());
if
(
iCount
==
0
)
{
sMxStatus
=
ReceiptItemStatusInReceiptEnum
.
NO_INPUT
;
return
sMxStatus
;
}
else
{
//存在记录就判断状态
//status 状态0待核销,待提交 1已核销
//2核销审核中,3反核销审核中
//bmpStatus
//PROCESS(1, "处理中"),APPROVE(2, "通过"),
//REJECT(3, "不通过"),CANCEL(4, "已取消");
long
Item0
=
listItem
.
stream
().
filter
(
i
->
i
.
getStatus
()
==
0
).
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
).
count
();
long
Item1
=
listItem
.
stream
().
filter
(
i
->
i
.
getStatus
()
==
1
).
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
).
count
();
long
Item2
=
listItem
.
stream
().
filter
(
i
->
i
.
getStatus
()
==
2
).
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
).
count
();
long
Item3
=
listItem
.
stream
().
filter
(
i
->
i
.
getStatus
()
==
3
).
filter
(
i
->
i
.
getReceiptId
()
==
ReceiptId
).
count
();
if
(
Item0
==
iCount
)
{
//0待核销
//收款单下有收款明细且全未提交
sMxStatus
=
ReceiptItemStatusInReceiptEnum
.
UN_SUBMITTED
;
return
sMxStatus
;
}
if
(
Item0
>
0
&&
Item0
<
iCount
)
{
//部分提交 收款单下有收款明细且部分提交(无需判断收款明细是否审批)
sMxStatus
=
ReceiptItemStatusInReceiptEnum
.
PART_SUBMITTED
;
return
sMxStatus
;
}
//进部分提交,部分审核逻辑
//未审核 收款明细全部提交且全部未审批
if
(
Item2
==
iCount
)
{
sMxStatus
=
ReceiptItemStatusInReceiptEnum
.
UN_APPROVED
;
return
sMxStatus
;
}
if
(
Item1
==
iCount
)
{
//1已核销
sMxStatus
=
ReceiptItemStatusInReceiptEnum
.
ALL_APPROVED
;
return
sMxStatus
;
}
if
((
Item2
+
Item3
)
==
iCount
||
(
Item1
+
Item3
)
==
iCount
||
(
Item2
+
Item1
)
==
iCount
)
{
sMxStatus
=
ReceiptItemStatusInReceiptEnum
.
PART_APPROVED
;
return
sMxStatus
;
}
}
return
sMxStatus
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java
View file @
094ad590
...
...
@@ -73,7 +73,7 @@ public class FinanceReceiptApproveService {
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
//添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
//
updateReceipt.setOrderId(receiptDO.getOrderId());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
...
...
@@ -104,7 +104,7 @@ public class FinanceReceiptApproveService {
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
// 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
//
updateReceipt.setOrderId(receiptDO.getOrderId());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
...
@@ -127,7 +127,7 @@ public class FinanceReceiptApproveService {
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
// 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
//
updateReceipt.setOrderId(receiptDO.getOrderId());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
...
@@ -175,7 +175,7 @@ public class FinanceReceiptApproveService {
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
// 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
//
updateReceipt.setOrderId(receiptDO.getOrderId());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
View file @
094ad590
This diff is collapsed.
Click to expand it.
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptInvoice/ReceiptInvoiceService.java
View file @
094ad590
...
...
@@ -65,4 +65,6 @@ public interface ReceiptInvoiceService extends IService<ReceiptInvoiceDO> {
Boolean
deleteInvoiceInfo
(
@Valid
ReceiptInvoiceOperateReqVO
reqVO
);
void
updateReceiptInvoiceInfo
(
@Valid
ReceiptInvoiceUpdateInfoReqVO
updateReqVO
);
ReceiptInvoiceDetailVO
getReceiptDetailForCreateInvoice
(
Long
receiptId
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptInvoice/ReceiptInvoiceServiceImpl.java
View file @
094ad590
This diff is collapsed.
Click to expand it.
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsImpl.java
View file @
094ad590
...
...
@@ -6,6 +6,8 @@ import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import
cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO
;
import
cn.iocoder.yudao.module.system.service.user.AdminUserService
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.BankReceiptDetailsMapper
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.BankIncomeItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.BankIncomeItemResp
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -15,7 +17,9 @@ import org.springframework.stereotype.Service;
import
org.springframework.validation.annotation.Validated
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -69,6 +73,29 @@ public class BankReceiptDetailsImpl implements BankReceiptDetailsService {
}
@Override
public
PageResult
<
BankIncomeItemResp
>
getBankIncomeItemPage
(
BankIncomeItemReq
req
)
{
IPage
<
BankIncomeItemResp
>
mpPage
=
MyBatisUtils
.
buildPage
(
req
);
bankReceiptDetailsMapper
.
getBankIncomeItemPage
(
mpPage
,
req
);
if
(
mpPage
.
getTotal
()
==
0
)
{
return
PageResult
.
empty
();
}
// 计算账号余额
List
<
BankIncomeItemResp
>
records
=
mpPage
.
getRecords
();
HashMap
<
String
,
BigDecimal
>
accountBalanceMap
=
new
HashMap
<>();
for
(
BankIncomeItemResp
record
:
records
)
{
if
(
accountBalanceMap
.
containsKey
(
record
.
getAccountNo
()))
{
record
.
setAccountBalance
(
accountBalanceMap
.
get
(
record
.
getAccountNo
()));
}
else
{
record
.
setAccountBalance
(
bankReceiptDetailsMapper
.
calculateAccountBalance
(
record
.
getAccountNo
()));
accountBalanceMap
.
put
(
record
.
getAccountNo
(),
record
.
getAccountBalance
());
}
}
// 汇总不同币种总额
//bankReceiptDetailsMapper.
return
PageResult
.
of
(
mpPage
);
}
/*
组装附件信息
*/
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsService.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
service
.
receiptItem
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.BankIncomeItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.BankIncomeItemResp
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
public
interface
BankReceiptDetailsService
{
PageResult
<
ReceiptItemResp
>
getBankReceiptDetailsList
(
ReceiptItemReq
req
);
PageResult
<
BankIncomeItemResp
>
getBankIncomeItemPage
(
BankIncomeItemReq
req
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
View file @
094ad590
...
...
@@ -108,7 +108,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
ReceiptDO
update
=
new
ReceiptDO
();
update
.
setId
(
receiptDO
.
getId
());
update
.
setState
(
2
);
update
.
setOrderId
(
receiptDO
.
getOrderId
());
//
update.setOrderId(receiptDO.getOrderId());
receiptService
.
updateById
(
update
);
}
// TODO 校验当前收款单汇率是否过期,过期则更新为导入的汇率 没过期不更新?更新汇率后有效期是啥?
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableService.java
View file @
094ad590
...
...
@@ -268,4 +268,6 @@ public interface ReceivableService extends IService<ReceivableDO> {
PageResult
<
BatchGenReceiptPageVO
>
batchGenReceiptPage
(
@Valid
BatchGenReceiptPageQueryVO
query
,
PageVO
page
);
void
writeOffByReceiptItem
(
List
<
ReceivableWriteOffReqVO
>
receivableWriteOffList
);
Long
getDestCountryCurrencyId
(
Long
orderId
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
service
.
receivable
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.boot.module.order.api.OrderApi
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.OrderOperateLogEvent
;
import
cn.iocoder.yudao.framework.apollo.core.vo.ApplyInfoVO
;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
...
...
@@ -15,6 +16,7 @@ import cn.iocoder.yudao.framework.security.core.LoginUser;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO
;
import
cn.iocoder.yudao.module.ecw.api.customer.CustomerApi
;
import
cn.iocoder.yudao.module.ecw.api.customer.dto.CustomerDTO
;
import
cn.iocoder.yudao.module.ecw.api.region.RegionApi
;
...
...
@@ -83,6 +85,10 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
@Resource
private
RegionApi
regionApi
;
@Resource
@Lazy
private
OrderApi
orderApi
;
@Override
public
Long
createReceivable
(
ReceivableCreateReqVO
createReqVO
)
{
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
...
...
@@ -257,12 +263,17 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
@Override
public
List
<
ReceivableBackVO
>
getReceivableByOrderId
(
Long
orderId
)
{
List
<
ReceivableBackVO
>
receivableBackVOList
=
receivableMapper
.
getReceivableByOrderId
(
orderId
);
Long
destCountryCurrencyId
=
getDestCountryCurrencyId
(
orderId
);
receivableBackVOList
.
forEach
(
receivableBackVO
->
{
if
(
receivableBackVO
.
getDiscountTotal
()
==
null
)
{
receivableBackVO
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
receivableBackVO
.
setNotIncludedTaxAmount
(
receivableBackVO
.
getTotalAmount
());
receivableBackVO
.
setActualAmount
(
receivableBackVO
.
getTaxAmount
().
subtract
(
receivableBackVO
.
getDiscountTotal
()));
receivableBackVO
.
setBaseCurrencyId
(
destCountryCurrencyId
);
ExchangeRateRespDTO
currencyRate
=
currencyApi
.
getCurrencyRate
(
receivableBackVO
.
getCurrencyId
(),
destCountryCurrencyId
);
receivableBackVO
.
setExchangeRate
(
currencyRate
.
getCurrencyRate
());
receivableBackVO
.
setBaseAmount
(
receivableBackVO
.
getActualAmount
().
multiply
(
currencyRate
.
getCurrencyRate
()));
});
return
receivableBackVOList
;
}
...
...
@@ -297,6 +308,11 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
receivableBackVO
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
receivableBackVO
.
setNotWriteOffAmount
(
receivableBackVO
.
getActualAmount
().
subtract
(
receivableBackVO
.
getWriteOffAmount
()));
// TODO 核销/未核销美元暂时默认为0,待计算
receivableBackVO
.
setWriteOffAmountUsd
(
BigDecimal
.
ZERO
);
receivableBackVO
.
setNotWriteOffAmountUsd
(
BigDecimal
.
ZERO
);
receivableBackVO
.
setBaseAmount
(
BigDecimal
.
ZERO
);
receivableBackVO
.
setBaseCurrencyId
(
1L
);
// 核销比例 = 已核销金额 / 实际金额,保留两位小数字符串
receivableBackVO
.
setWriteOffProportion
(
receivableBackVO
.
getWriteOffAmount
().
divide
(
receivableBackVO
.
getActualAmount
(),
2
,
RoundingMode
.
HALF_UP
).
toString
());
});
...
...
@@ -499,6 +515,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
* 实际金额 = 含税金额 - 优惠金额
* 未核销金额 = 实际金额 - 核销金额
* TODO 暂定 不含税金额 = 总金额
*
* @param allCurrency
* @param statistics
*/
...
...
@@ -555,4 +572,14 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
receivableMapper
.
updateById
(
receivableDO
);
}
}
@Override
public
Long
getDestCountryCurrencyId
(
Long
orderId
)
{
Long
countryId
=
orderApi
.
getDestCountryByOrderId
(
orderId
);
if
(
countryId
==
null
)
{
return
null
;
}
RegionDTO
regionById
=
regionApi
.
getRegionById
(
countryId
);
return
Long
.
parseLong
(
regionById
.
getImportCurrency5
());
}
}
\ No newline at end of file
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receipt/ReceiptBackVO.java
View file @
094ad590
...
...
@@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
...
...
@@ -226,4 +227,10 @@ public class ReceiptBackVO {
@ApiModelProperty
(
value
=
"开票资料状态"
)
private
Integer
invoiceDataStatus
;
@ApiModelProperty
(
value
=
"开票id"
)
private
Long
invoiceId
;
@ApiModelProperty
(
value
=
"相关订单信息列表"
)
private
List
<
ReceiptRelationOrderInfoVO
>
orderInfoList
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receipt/ReceiptBaseVO.java
View file @
094ad590
...
...
@@ -151,7 +151,7 @@ public class ReceiptBaseVO {
private
String
financeRemark
;
@ApiModelProperty
(
value
=
"订单ID"
)
private
lo
ng
orderId
;
private
Stri
ng
orderId
;
@ApiModelProperty
(
value
=
"订单编号"
)
private
String
orderNo
;
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receipt/ReceiptRelationOrderInfoVO.java
0 → 100644
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receipt
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
ReceiptRelationOrderInfoVO
{
@ApiModelProperty
(
value
=
"订单号"
)
private
String
orderNo
;
@ApiModelProperty
(
value
=
"订单ID"
)
private
Long
orderId
;
@ApiModelProperty
(
value
=
"提单号"
)
private
String
tidanNo
;
}
\ No newline at end of file
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptInvoice/ReceiptInvoiceCreateReqVO.java
View file @
094ad590
...
...
@@ -40,5 +40,5 @@ public class ReceiptInvoiceCreateReqVO {
private
String
invoiceAddress
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
r
emark
;
private
String
invoiceR
emark
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptInvoice/ReceiptInvoiceDetailVO.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptInvoice
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.ReceiptRelationOrderInfoVO
;
import
cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO
;
import
cn.iocoder.yudao.module.wealth.vo.receivable.WealthMoneyAmountVO
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -9,11 +11,16 @@ import lombok.Data;
import
java.util.Date
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"管理后台 - 开票详情 VO"
)
public
class
ReceiptInvoiceDetailVO
{
//订单信息/基础信息
@ApiModelProperty
(
value
=
"开票id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"开票编号"
)
private
String
invoiceNo
;
...
...
@@ -53,6 +60,12 @@ public class ReceiptInvoiceDetailVO {
@ApiModelProperty
(
value
=
"开票类型名称"
)
private
String
invoiceType
;
@ApiModelProperty
(
value
=
"基准币种id"
)
private
Long
baseCurrencyId
;
@ApiModelProperty
(
value
=
"相关订单信息列表"
)
private
List
<
ReceiptRelationOrderInfoVO
>
orderInfoList
;
// 开票资料
@ApiModelProperty
(
value
=
"发票抬头"
)
private
String
invoiceHeader
;
...
...
@@ -60,6 +73,12 @@ public class ReceiptInvoiceDetailVO {
@ApiModelProperty
(
value
=
"纳税人识别号"
)
private
String
taxpayer
;
@ApiModelProperty
(
value
=
"开户行"
)
private
String
accountBank
;
@ApiModelProperty
(
value
=
"账号"
)
private
String
accountName
;
@ApiModelProperty
(
value
=
"税率"
)
private
java
.
math
.
BigDecimal
taxRate
;
...
...
@@ -97,8 +116,16 @@ public class ReceiptInvoiceDetailVO {
private
String
invoicerName
;
@ApiModelProperty
(
value
=
"开票时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
invoiceTime
;
@ApiModelProperty
(
value
=
"取消开票人"
)
private
String
cancelUserName
;
@ApiModelProperty
(
value
=
"取消开票时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
cancelTime
;
// 应收信息
@ApiModelProperty
(
value
=
"应收明细"
)
private
List
<
ReceivableBackVO
>
receivableList
;
...
...
@@ -115,8 +142,10 @@ public class ReceiptInvoiceDetailVO {
private
String
writeOffUser
;
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"创建人"
)
private
String
creator
;
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptInvoice/ReceiptInvoiceLogBackVO.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptInvoice
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
...
...
@@ -37,7 +38,7 @@ public class ReceiptInvoiceLogBackVO {
private
Integer
bpmStatus
;
@ExcelProperty
(
"创建时间"
)
@
DateTime
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@
Json
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptInvoice/ReceiptInvoicePageBackVO.java
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptInvoice
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.ReceiptRelationOrderInfoVO
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
"管理后台 - 收款单开票列表 Response VO"
)
public
class
ReceiptInvoicePageBackVO
{
...
...
@@ -13,6 +16,10 @@ public class ReceiptInvoicePageBackVO {
@ApiModelProperty
(
value
=
"主键"
,
required
=
true
)
private
Long
id
;
@ExcelProperty
(
"开票编号"
)
@ApiModelProperty
(
value
=
"开票编号"
,
required
=
true
)
private
String
invoiceNo
;
@ExcelProperty
(
"收款单id"
)
@ApiModelProperty
(
value
=
"收款单id"
,
required
=
true
)
private
Long
receiptId
;
...
...
@@ -28,9 +35,9 @@ public class ReceiptInvoicePageBackVO {
@ApiModelProperty
(
value
=
"开票状态"
)
private
Integer
invoicingStatus
;
@ExcelProperty
(
"开票
明细
状态"
)
@ApiModelProperty
(
value
=
"开票
明细
状态"
)
private
Integer
invoic
ingDetail
Status
;
@ExcelProperty
(
"开票
资料
状态"
)
@ApiModelProperty
(
value
=
"开票
资料
状态"
)
private
Integer
invoic
eData
Status
;
@ExcelProperty
(
"部门id"
)
@ApiModelProperty
(
value
=
"部门id"
)
...
...
@@ -51,8 +58,7 @@ public class ReceiptInvoicePageBackVO {
@ApiModelProperty
(
value
=
"发票抬头"
)
private
String
invoiceHeader
;
@ApiModelProperty
(
value
=
"开票金额(暂时不知道从哪拿)"
)
// TODO 暂时不知道从哪拿
@ApiModelProperty
(
value
=
"开票金额"
)
private
java
.
math
.
BigDecimal
invoiceMoney
;
@ApiModelProperty
(
value
=
"开票品名"
)
...
...
@@ -61,16 +67,12 @@ public class ReceiptInvoicePageBackVO {
@ApiModelProperty
(
value
=
"税率"
)
private
java
.
math
.
BigDecimal
taxRate
;
@ApiModelProperty
(
value
=
"订单号(NG2414248L)"
)
private
String
orderNo
;
@ApiModelProperty
(
value
=
"提单号(CNG244432-26)"
)
private
String
tidanNo
;
@ApiModelProperty
(
value
=
"收款状态"
)
private
Integer
receiptState
;
@ApiModelProperty
(
value
=
"核销比例"
)
private
java
.
math
.
BigDecimal
writeOffProportion
;
@ApiModelProperty
(
value
=
"相关订单信息列表"
)
private
List
<
ReceiptRelationOrderInfoVO
>
orderInfoList
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptInvoice/ReceiptInvoiceQueryVO.java
View file @
094ad590
...
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
"管理后台 - 收款单开票信息查询 VO"
)
public
class
ReceiptInvoiceQueryVO
{
...
...
@@ -21,6 +23,6 @@ public class ReceiptInvoiceQueryVO {
private
String
tidanNo
;
@ApiModelProperty
(
value
=
"开票状态"
)
private
Integer
invoicingStatus
;
private
List
<
Integer
>
invoicingStatus
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/BankIncomeItemReq.java
0 → 100644
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptItem
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"管理后台 - 银行收款单明细列表"
)
public
class
BankIncomeItemReq
extends
PageParam
{
@ApiModelProperty
(
value
=
"收款账号银行名称"
)
private
List
<
Integer
>
platformAccountIds
;
@ApiModelProperty
(
value
=
"收/支,暂时没支"
)
private
Integer
isIncome
;
@ApiModelProperty
(
value
=
"金额符号"
)
private
Integer
relationSymbol
;
@ApiModelProperty
(
value
=
"金额"
)
private
java
.
math
.
BigDecimal
amount
;
@ApiModelProperty
(
value
=
"交易日期开始"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
amountDateStart
;
@ApiModelProperty
(
value
=
"交易日期结束"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
amountDateEnd
;
@ApiModelProperty
(
value
=
"关联单号"
)
private
String
relationNo
;
@ApiModelProperty
(
value
=
"交易日期排序方式"
)
private
Boolean
isAsc
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/BankIncomeItemResp.java
0 → 100644
View file @
094ad590
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptItem
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"管理后台 - 银行账号收支明细列表返回结果"
)
public
class
BankIncomeItemResp
{
@ApiModelProperty
(
value
=
"银行收款明细id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"收款单id"
)
private
String
receiptId
;
@ApiModelProperty
(
value
=
"收款账号"
)
private
String
accountNo
;
/**
* 当次实收金额不含税
*/
private
java
.
math
.
BigDecimal
amount
;
/**
* 税点
*/
private
java
.
math
.
BigDecimal
taxPoint
;
/**
* 当次实收金额含税
*/
private
java
.
math
.
BigDecimal
taxAmount
;
/**
* 收款账号名称
*/
private
String
accountName
;
@ApiModelProperty
(
value
=
"收款账号银行名称"
)
private
String
accountBankName
;
@ApiModelProperty
(
value
=
"货币id"
)
private
Long
currencyId
;
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"实收日期"
)
private
Date
amountDate
;
@ApiModelProperty
(
value
=
"收款单编号"
)
private
String
receiptNo
;
@ApiModelProperty
(
value
=
"订单ID"
)
private
long
orderId
;
@ApiModelProperty
(
value
=
"订单编号"
)
private
String
orderNo
;
@ApiModelProperty
(
value
=
"提单编号"
)
private
String
tidanNo
;
@ApiModelProperty
(
value
=
"账号余额"
)
private
java
.
math
.
BigDecimal
accountBalance
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableBackVO.java
View file @
094ad590
...
...
@@ -231,4 +231,12 @@ public class ReceivableBackVO {
@ApiModelProperty
(
value
=
"实际金额"
)
private
BigDecimal
actualAmount
;
@ApiModelProperty
(
value
=
"核销金额"
)
private
BigDecimal
writeOffAmountUsd
;
@ApiModelProperty
(
value
=
"未核销金额"
)
private
BigDecimal
notWriteOffAmountUsd
;
@ApiModelProperty
(
value
=
"基准币种id"
)
private
Long
baseCurrencyId
;
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receipt/ReceiptController.java
View file @
094ad590
...
...
@@ -23,6 +23,7 @@ import cn.iocoder.yudao.module.wealth.convert.receiptApproval.ReceiptApprovalCon
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptAccount.ReceiptAccountDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptApproval.ReceiptApprovalDO
;
import
cn.iocoder.yudao.module.wealth.job.UpdateReceiptNewFeildTask
;
import
cn.iocoder.yudao.module.wealth.service.receipt.ReceiptService
;
import
cn.iocoder.yudao.module.wealth.service.receiptAccount.ReceiptAccountService
;
import
cn.iocoder.yudao.module.wealth.service.receiptApproval.ReceiptApprovalService
;
...
...
@@ -68,11 +69,6 @@ import static cn.iocoder.yudao.module.wealth.enums.ErrorCodeConstants.PAYMENT_NO
@RequestMapping
(
"/ecw/receipt"
)
@Slf4j
public
class
ReceiptController
{
//ecw_receivable 应收款
//ecw_receipt 收款单
//ecw_order 订单表
@Resource
private
ReceiptService
receiptService
;
...
...
@@ -90,6 +86,9 @@ public class ReceiptController {
@Resource
private
ReceiptApprovalService
receiptApprovalService
;
@Resource
private
UpdateReceiptNewFeildTask
updateReceiptNewFeildTask
;
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得收款单分页"
)
...
...
@@ -715,4 +714,9 @@ public class ReceiptController {
return
"¥"
;
}
}
@GetMapping
(
"/updateReceiptNewFeild"
)
@ApiOperation
(
"更新应收明细"
)
public
CommonResult
<
String
>
updateReceiptNewFeild
()
throws
Exception
{
return
success
(
updateReceiptNewFeildTask
.
execute
(
""
));
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptInvoice/ReceiptInvoiceController.java
View file @
094ad590
...
...
@@ -50,6 +50,13 @@ public class ReceiptInvoiceController {
return
success
(
receiptInvoiceDetail
);
}
@GetMapping
(
"/receipt/info/get"
)
@ApiOperation
(
"获得收款单开票信息"
)
public
CommonResult
<
ReceiptInvoiceDetailVO
>
getReceiptDetailForCreateInvoice
(
@RequestParam
(
"receiptId"
)
Long
receiptId
)
{
ReceiptInvoiceDetailVO
receiptInvoiceDetail
=
receiptInvoiceService
.
getReceiptDetailForCreateInvoice
(
receiptId
);
return
success
(
receiptInvoiceDetail
);
}
@PostMapping
(
"/page"
)
@ApiOperation
(
"获得收款单开票信息分页"
)
public
CommonResult
<
PageResult
<
ReceiptInvoicePageBackVO
>>
getReceiptInvoicePage
(
@RequestBody
@Valid
ReceiptInvoiceQueryVO
query
,
PageVO
page
)
{
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/BankReceiptDetailsControl.java
View file @
094ad590
...
...
@@ -2,28 +2,22 @@ package cn.iocoder.yudao.module.wealth.controller.admin.receiptItem;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.wealth.convert.receiptItem.ReceiptItemConvert
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receipt.ReceiptMapper
;
import
cn.iocoder.yudao.module.wealth.service.receiptItem.BankReceiptDetailsService
;
import
cn.iocoder.yudao.module.wealth.
service.receiptItem.ReceiptItemService
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.
ReceiptItemBackVO
;
import
cn.iocoder.yudao.module.wealth.
vo.receiptItem.BankIncomeItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.
BankIncomeItemResp
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
...
...
@@ -45,15 +39,9 @@ public class BankReceiptDetailsControl {
return
success
(
bankReceiptDetailsService
.
getBankReceiptDetailsList
(
req
));
}
@GetMapping
(
"/test"
)
@ApiOperation
(
"测试"
)
public
CommonResult
<
Boolean
>
doTest
(
ReceiptItemReq
req
)
{
ReceiptDO
r
=
new
ReceiptDO
();
r
.
setOrderId
(
123
);
r
.
setReceiptNo
(
"ww"
);
receiptMapper
.
insert
(
r
);
return
success
(
true
);
@GetMapping
(
"/income/page"
)
@ApiOperation
(
"银行账号收支明细列表"
)
public
CommonResult
<
PageResult
<
BankIncomeItemResp
>>
getBankIncomeItemPage
(
BankIncomeItemReq
req
)
{
return
success
(
bankReceiptDetailsService
.
getBankIncomeItemPage
(
req
));
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
View file @
094ad590
...
...
@@ -75,6 +75,64 @@
left join ecw_receipt_approval a on a.bmp_id=m.bmp_id and a.deleted=0
<include
refid=
"WherePage"
/>
</select>
<select
id=
"getBankIncomeItemPage"
>
SELECT
eri.id,
eri.receipt_id,
eri.account_no,
eri.account_name,
eri.account_bank_name,
eri.amount,
eri.currency_id,
er.receipt_no,
eo.tidan_no,
eo.order_no,
eri.amount_date,
eri.remark
FROM ecw_receipt_item eri
LEFT JOIN ecw_receipt er ON eri.receipt_id = er.id
LEFT JOIN ecw_order eo ON eo.order_id = er.order_id
LEFT JOIN ecw_receipt_account era ON era.receipt_id = eri.receipt_id
WHERE eri.status = 1
<if
test=
"req.relationNo != null and req.relationNo != ''"
>
AND (er.receipt_no LIKE concat('%',#{req.receiptNo},'%') OR eo.order_no LIKE
concat('%',#{req.relationNo},'%') OR eo.tidan_no = #{req.relationNo})
</if>
<if
test=
"req.platformAccountIds != null and req.platformAccountIds.size > 0"
>
AND era.platform_account_id IN
<foreach
collection=
"req.platformAccountIds"
item=
"platformAccountId"
open=
"("
separator=
","
close=
")"
>
#{platformAccountId}
</foreach>
</if>
<if
test=
"req.amount != null and req.relationSymbol != null"
>
<!--1:大于 2:等于 3:小于-->
<if
test=
"req.rewardCountOperate == 1"
>
AND eri.amount
>
#{req.amount}
</if>
<if
test=
"req.rewardCountOperate == 2"
>
AND eri.amount = #{req.amount}
</if>
<if
test=
"req.rewardCountOperate == 3"
>
AND eri.amount
<
#{req.amount}
</if>
</if>
<if
test=
"req.amountDateStart != null and req.amountDateEnd != null"
>
AND eri.amount_date BETWEEN #{req.amountDateStart} AND #{req.amountDateEnd}
</if>
<if
test=
"req.isAsc != null"
>
<if
test=
"req.isAsc"
>
ORDER BY eri.amount_date
</if>
<if
test=
"!req.isAsc"
>
ORDER BY eri.amount_date DESC
</if>
</if>
</select>
<select
id=
"calculateAccountBalance"
resultType=
"java.math.BigDecimal"
>
SELECT SUM(amount)
FROM ecw_receipt_item
WHERE
account_no = #{accountNo} AND status = 1
</select>
</mapper>
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receipt/ReceiptMapper.xml
View file @
094ad590
...
...
@@ -6,12 +6,12 @@
<!--添加关联订单和应收款表的关联-->
SELECT
er.*,
rb
.order_no AS orderNo,
o
.order_no AS orderNo,
o.tidan_no AS tidanNo,
rb
.order_id AS orderId
o
.order_id AS orderId
FROM ecw_receipt er
LEFT JOIN ecw_receivable rb ON rb.receipt_id=er.id AND rb.deleted=0
LEFT JOIN ecw_order o ON o.order_
no=rb.order_no
AND o.deleted=0
INNER JOIN (SELECT receipt_id,order_id FROM ecw_receivable GROUP BY receipt_id, order_id ) rb ON rb.receipt_id = er.id
LEFT JOIN ecw_order o ON o.order_
id=rb.order_id
AND o.deleted=0
WHERE er.deleted = 0
<if
test=
"query.receiptItemStatus != null"
>
AND er.`detail_status` = #{query.receiptItemStatus}
...
...
@@ -45,19 +45,20 @@
AND er.`create_time` between #{query.beginCreateTime} and #{query.endCreateTime}
</if>
<if
test=
"query.numberNo != null and query.numberNo != '' "
>
and er.id in ( SELECT DISTINCT
t.receipt_id
FROM
ecw_receivable t
LEFT JOIN ecw_order o ON t.order_id = o.order_id
WHERE
t.deleted = 0 and t.receipt_id is not null
AND (
t.order_no = #{query.numberNo}
OR o.tidan_no = #{query.numberNo}
OR o.container_number = #{query.numberNo})
)
AND (o.order_no = #{query.numberNo} OR o.tidan_no = #{query.numberNo} OR o.container_number =
#{query.numberNo}))
</if>
GROUP BY er.receipt_no
</select>
<select
id=
"getOrderInfoByReceiptId"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receipt.ReceiptRelationOrderInfoVO"
>
SELECT
o.order_no AS orderNo,
o.tidan_no AS tidanNo,
o.order_id AS orderId
FROM ecw_receivable er
LEFT JOIN ecw_order o ON o.order_id=er.order_id
WHERE er.deleted= 0 AND er.receipt_id = #{id}
GROUP BY o.order_id
</select>
</mapper>
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receiptInvoice/ReceiptInvoiceMapper.xml
View file @
094ad590
...
...
@@ -6,9 +6,17 @@
SELECT
eri.*,
er.state AS receiptState,
er.write_off_proportion
er.write_off_proportion,
er.invoicing_status,
er.invoice_data_status,
sd.id AS departmentId,
sd.name AS departmentName
FROM ecw_receipt_invoice eri
LEFT JOIN ecw_receipt er ON eri.receipt_id = er.id
LEFT JOIN system_user su ON eri.apply_user_id = su.id
LEFT JOIN system_dept sd ON su.dept_id = sd.id
INNER JOIN (SELECT receipt_id,order_id FROM ecw_receivable GROUP BY receipt_id, order_id ) rb ON rb.receipt_id = er.id
LEFT JOIN ecw_order o ON o.order_id=rb.order_id
WHERE eri.deleted = 0
<if
test=
"query.receiptNo != null and query.receiptNo != '' "
>
AND eri.`receipt_no` LIKE CONCAT('%',#{query.receiptNo},'%')
...
...
@@ -17,14 +25,21 @@
AND eri.`invoice_no` LIKE CONCAT('%',#{query.invoiceNo},'%')
</if>
<if
test=
"query.orderNo != null and query.orderNo != '' "
>
AND
eri
.`order_no` = #{query.orderNo}
AND
o
.`order_no` = #{query.orderNo}
</if>
<if
test=
"query.tidanNo != null and query.tidanNo != '' "
>
AND eri.`tidan_no` = #{query.tidanNo}
AND o.`tidan_no` = #{query.tidanNo}
</if>
<if
test=
"query.invoicingStatus != null and query.invoicingStatus.size == 1"
>
AND er.`invoicing_status` = #{query.invoicingStatus[0]}
</if>
<if
test=
"query.invoicingStatus != null "
>
AND eri.`invoicing_status` = #{query.invoicingStatus}
<if
test=
"query.invoicingStatus != null and query.invoicingStatus.size > 1"
>
AND er.`invoicing_status` IN
<foreach
collection=
"query.invoicingStatus"
item=
"invoicingStatus"
open=
"("
separator=
","
close=
")"
>
#{invoicingStatus}
</foreach>
</if>
GROUP BY er.id
</select>
<select
id=
"getReceiptInvoiceDetail"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receiptInvoice.ReceiptInvoiceDetailVO"
>
...
...
@@ -36,6 +51,7 @@
er.customer_name
FROM ecw_receipt_invoice eri
LEFT JOIN ecw_receipt er ON eri.receipt_id = er.id
WHERE eri.id = #{id}
</select>
<select
id=
"getCurrentMaxInvoiceCode"
resultType=
"java.lang.String"
>
SELECT invoice_no FROM ecw_receipt_invoice ORDER BY invoice_no DESC LIMIT 1
...
...
yudao-server/src/main/resources/application-local.yaml
View file @
094ad590
...
...
@@ -47,32 +47,32 @@ spring:
master
:
name
:
jiedao
# name: ruoyi-vue-pro-flowable
url
:
jdbc:mysql://1
17.72.42.41:2290
/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
url
:
jdbc:mysql://1
59.75.224.138:2292
/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
jiedao
password
:
Jiedao2024
username
:
root
password
:
mysql@2022
slave
:
# 模拟从库,可根据自己需要修改
name
:
jiedao
# name: ruoyi-vue-pro-flowable
url
:
jdbc:mysql://1
17.72.42.41:2290
/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
url
:
jdbc:mysql://1
59.75.224.138:2292
/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
jiedao
password
:
Jiedao2024
username
:
root
password
:
mysql@2022
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis
:
host
:
1
17.72.42.41
# 地址
port
:
229
1
# 端口
password
:
Redis2024
database
:
0
# 数据库索引
host
:
1
59.75.224.138
# 地址
port
:
229
7
# 端口
password
:
redis@2022
database
:
1
# 数据库索引
timeout
:
60s
connect-timeout
:
60s
redis-limiter
:
redis-host
:
1
17.72.42.41
# redis server IP 默认值:127.0.0.1
redis-port
:
229
1
# redis service 端口 默认值:6379
redis-host
:
1
59.75.224.138
# redis server IP 默认值:127.0.0.1
redis-port
:
229
7
# redis service 端口 默认值:6379
redis-db
:
4
# redis service 数据库 默认值:6379
redis-password
:
Redis2024
# redis 访问密码 默认值:null
redis-password
:
redis@2022
# redis 访问密码 默认值:null
redis-connection-timeout
:
2000
# redis 连接超时时间 默认值:2000
redis-pool-max-idle
:
50
# redis 连接池最大空闲连接数 默认值:50
redis-pool-min-idle
:
10
# redis 连接池最小空闲连接数 默认值: 10
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment